Write a Module
Create and deploy your first move module.
Last updated
Create and deploy your first move module.
Last updated
If you have not already, open your newly initiatlized project within your code editor of choice on your host machine. Remember, the move_workspace
directory within the container is bound to the /supra/move_workspace
directory on your host machine. Any changes made to these files on the host machine will be reflected within the container.
If you are using VS Code, we highly recommend that you.
sources
directory.In Move, global storage is a forest with trees rooted at an account address. Accounts can store both resource data and module code. Modules are deployed to an account, rather than a unique address being generated at deployment as you may be custom to with other VMs.
The sources directory holds the move modules that you will be working on within your project. Within the sources
directory of your exampleContract
package, create the hello_blockchain.move
file.
Once created, open the hello_blockchain.move file within your code editor and add the following code.