- Install npm packages
pnpm install-
Install SUI cli See the official documentation: How to install SUI cli
-
Set the envs
cp .env.example .envSECRET_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,mainnetorlocalnet
If you are using move registry, you can simply run
mvr add lending@scallop/coreto import scallop lending to your package.
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:
-
sourcesfolder contains all the move contract code. -
typescriptfolder usually contains the typescript code that will be used to deploy & interact with the contract. -
publish-result.${networkType}.jsoncontains the important object ids of the contracts for each network type. -
index.tsexport the typescript code in thetypescriptfolder. -
Move.${networkType}.tomlis the toml file for each network type. -
Move.tomlis the default toml file, it will be used if theMove.${networkType}.tomlfor the current network type is not found. -
README.mddescription of the package, explain the usage of the package.
We recommend using DeepWiki to gain a deeper understanding of the project's architecture, core concepts, and implementation details.
It's recommended to use the Scallop SDK to interact with the contracts, see the official documentation: How to use Scallop SDK
or even generate demo code and transaction examples directly through DeepWiki integrated LLM interface.
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.
