Once our smart contract is built and tested, it is time to deploy it and interact with it.
nile
offers several commands to help during contracts deployments:
nile node
to run a local node usingstarknet-devnet
nile deploy contract --alias my_contract
to deploy a smart contractnile setup <private_key_alias>
to deploy an accountnile send <private_key_alias> <contract_identifier> <method> [PARAM_1, PARAM2...]
to interact with a deployed contract using a given accountnile [call|invoke] <contract_identifier> <method> [PARAM_1, PARAM2...]
to perform read/write operations on a contract
However, if we compare the CLI of nile
with the built-in starknet CLI, we can observe there are not a lot of differences.
The main added value is the support of the localhost
network.
✔️ several useful commands to deploy and interact with a contract
✔️ support of a local node using starknet-devnet
protostar
offers the possibility to deploy a smart contract once it has been compiled.
The interface is similar to the starknet-deploy
API:
protostar deploy ./build/main.json --network alpha-goerli
However, there is local devnet support.
✔️ support of contract deployment
❌ lack of local devnet
nile | protostar |
---|---|
✔️ several useful commands to deploy and interact with a contract | ✔️ support of contract deployment |
✔️ support of a local node using starknet-devnet |
❌ lack of local devnet |