- Install npm packages
pnpm install
-
Install SUI cli See the official documentation: How to install SUI cli
-
Set the envs
cp .env.example .env
SECRET_KEY
: The secret key of the account that will be used to deploy the contracts, make sure the account has enough SUI to pay for the transaction feesSUI_NETWORK_TYPE
: The network type of the SUI network. It can bedevnet
,testnet
,mainnet
orlocalnet
We use typescript to publish & interact with the contracts, and we make some improvements to the package structure to make it easier to use.
Let's take the test_coin
package as an example:
-
sources
folder contains all the move contract code. -
typescript
folder usually contains the typescript code that will be used to deploy & interact with the contract. -
publish-result.${networkType}.json
contains the important object ids of the contracts for each network type. -
index.ts
export the typescript code in thetypescript
folder. -
Move.${networkType}.toml
is the toml file for each network type. -
Move.toml
is the default toml file, it will be used if theMove.${networkType}.toml
for the current network type is not found. -
README.md
description of the package, explain the usage of the package.
It's recommended to use the Scallop SDK to interact with the contracts, see the official documentation: How to use Scallop SDK
The protocol is designed to be simple, efficient, and secure.
Moreover, the protocol is designed to be composable, meaning that other protocols can easily integrate with it.