The SDK comes with helper develoment methods and a hardhat plugin to deploy Move contracts.
The hardhat plugin extends the compile task with a sub-task to compile contracts written in Move and
generate the required artifacts for testing and deployment.
Right now this plugin requires the aptos CLI tool to deploy Move smart contracts.
Follow the installation instructions to get the tool, for instance for macOS:
brew install aptos
Move contracts should adhere to the following directory layout:
<hardhat project root>
- contracts
- move_package_1
- sources
- Move.toml
- move_package_2
- sources
- Move.toml
Currently, exactly one contract artifact is generated from each Move package with all the modules bundled. The package name becomes the artifact name.
For more deployment details, refer to Umi developer docs.
Keep building the SDK whenever a change is saved:
cd umi-sdk
yarn watch
Include the SDK in package.json as a link, as in counter example "umi-sdk": "link:../..",
Make sure to create an .env file using the .env.example template.