up
Upload and instantiate a smart contract
To deploy (upload and instantiate) a smart contract:
Alternatively, you can use the --use-wallet
option for a more secure signing method:
ℹ️ If you don't specify a live chain,
pop
will automatically spawn a local node for testing purposes.
Some of the options available are:
Specify the contract
constructor
to use, which in this example isnew()
.Specify the argument (
args
) to the constructor, which in this example isfalse
.Specify the account uploading and instantiating the contract with
--suri
, which in this example is the default development account of//Alice
. For other accounts, the actual secret key must be provided e.g. an 0x prefixed 64 bit hex string, or the seed phrase.Alternatively, use the
--use-wallet
option to sign transactions using a browser extension wallet. This is more secure than providing your account's private key directly in the command line.
⚠️ Use
--suri
only for development: Using--suri
should only be done with development accounts. Consider using--use-wallet
for production accounts.
You also can specify the url of your node with
--url ws://your-endpoint
, by default it is usingws://localhost:9944
.
For more information about the options, check cargo-contract documentation.
Additional options:
Last updated