Contract management in everdev gives you the ability to easily deploy and run your smart contracts on blockchain network(s).
View contract info
This command displays a detailed summary for a contract. Contract ABI and TVC files are required to run it. Account address on the network is calculated from TVC and signer.
Network, signer, data and account address parameters can be overridden with the following options:
Deploy contract
This command deploys a contract to the blockchain. Contract ABI and TVC files are required to run it.
Command displays deployment summary and requests constructor function parameters. Result example:
Deploy parameters can be specified in the deploy command with the following options:
Example of a 2/3 multisig wallet deployment command:
Enclosing special characters
If the parameters contain special characters, they must be enclosed in quotation marks. Here is an example of how this can be done:
Note that the entire set of params is enclosed in DOUBLE quotes, and each parameter containing special characters is enclosed in SINGLE quotes. In the next paragraph, you can find an example of calling a function when its argument is a struct.
Run contract deployed on the network
This command runs any function of a contract deployed on the blockchain. Contract ABI and TVC files are required to run it.
Command displays available functions and asks to select one. Result example:
Network, signer and account address parameters can be overridden and function parameters specified in the command with the following options:
Example of creating a transaction and confirming it in a multisig wallet:
To execute a contract without signing, use signer none option:
or
In this case you have to explicitly specify address in run function because otherwise everdev may calculate a wrong address from empty pubkey.
To execute a smart contract function with bytes argument, the argument needs to be in hex format.
Example:
Execute a smart contract function with structure arguments:
or with an array of structures:
Run contract locally on TVM
This command downloads a contract and runs it locally on TVM. Contract ABI and TVC files are required to run it.
Command displays available functions and asks to select one. Result example:
Network, signer and account address parameters can be overridden and function parameters specified in the command with the following options:
Emulate transaction executor locally on TVM
This command downloads a contract and emulates transaction execution locally on TVM. Contract ABI and TVC files are required to run it.
Command displays available functions and asks to select one. Result:
Network, signer and account address parameters can be overridden and function parameters specified in the command with the following options:
Top up contract balance from giver
If you have set a giver for a network, you can top up contract balances on it with the following command.
Defalt signer and giver parameters will be used, unless otherwise specified through the following options:
To top up any known address without providing keys or contract files, use the following command:
or
Decode data from a contract deployed on the network.
For example:
Decode TVC into code, data, libraries and special options.
$ everdev contract info -h
EverDev Version: 0.5.0
Use: everdev contract info file [options]
Args:
file ABI file
Options:
--help, -h Show command usage
--network, -n Network name
--signer, -s Signer key name
--data, -d Deploying initial data as name:value,...
This data is required to calculate the account address and to
deploy contract.
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--address, -a Account address
everdev contract deploy abi_filename
$ everdev contract deploy Contract.abi.json
Configuration
Network: dev
Signer: sign1
Address: 0:0435cb4e70585759ac514bb9fd1770caeb8c3941d882b5a16d589b368cb49261
Enter constructor parameters
param1 (uint256[]): value
Enter constructor parameters
param2 (uint8): value
Deploying...
$ everdev contract deploy -h
EverDev Version: 0.5.0
Use: everdev contract deploy file function [options]
Args:
file ABI file
function Function name
Options:
--help, -h Show command usage
--network, -n Network name
--signer, -s Signer key name
--input, -i Function parameters as name:value,...
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--data, -d Deploying initial data as name:value,...
This data is required to calculate the account address and to
deploy contract.
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--value, -v Deploying balance value in nano tokens
--prevent-ui, -p Prevent user interaction
Useful in shell scripting e.g. on server or in some
automating to disable waiting for the user input.
Instead everdev will abort with error.
For example when some parameters are missing in command line
then ton dev will prompt user to input values for missing
parameters (or fails if prevent-ui option is specified).
$ everdev contract run Contract.abi.json
Configuration
Network: dev
Signer: sign1
Address: 0:a4629d617df931d8ad86ed24f4cac3d321788ba082574144f5820f2894493fbc
Available functions:
1) func1
2) func2
Select function (number): 2
Running...
$ everdev contract run -h
EverDev Version: 0.5.0
Use: everdev contract run file function [options]
Args:
file ABI file
function Function name
Options:
--help, -h Show command usage
--network, -n Network name
--signer, -s Signer key name
--data, -d Deploying initial data as name:value,...
This data is required to calculate the account address and to
deploy contract.
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--address, -a Account address
--input, -i Function parameters as name:value,...
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--prevent-ui, -p Prevent user interaction
Useful in shell scripting e.g. on server or in some
automating to disable waiting for the user input.
Instead everdev will abort with error.
For example when some parameters are missing in command line
then ton dev will prompt user to input values for missing
parameters (or fails if prevent-ui option is specified).
everdev contract run SetcodeMultisigWallet.abi.json submitTransaction -n dev -s sign1 -i dest:255a3ad9dfa8aa4f3481856aafc7d79f47d50205190bd56147138740e9b177f3,value:500000000,bounce:true,allBalance:false,payload:""
everdev contract run SetcodeMultisigWallet.abi.json confirmTransaction -n dev -a 0:04dee1edc3f3d6b23529dcf5a6133627d06a39826bb14cc6334ffea272b15d50 -s sign2 -i transactionId:6954030467099431873
everdev contract run --signer none --address <address>
$ everdev contract run-local Contract.abi.json
Configuration
Network: dev
Signer: sign1
Address: 0:a4629d617df931d8ad86ed24f4cac3d321788ba082574144f5820f2894493fbc
Available functions:
1) func1
2) func1
Select function (number):
$ everdev contract run-local -h
EverDev Version: 0.5.0
Use: everdev contract run-local file function [options]
Args:
file ABI file
function Function name
Options:
--help, -h Show command usage
--network, -n Network name
--signer, -s Signer key name
--data, -d Deploying initial data as name:value,...
This data is required to calculate the account address and to
deploy contract.
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--address, -a Account address
--input, -i Function parameters as name:value,...
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--prevent-ui, -p Prevent user interaction
Useful in shell scripting e.g. on server or in some
automating to disable waiting for the user input.
Instead everdev will abort with error.
For example when some parameters are missing in command line
then ton dev will prompt user to input values for missing
parameters (or fails if prevent-ui option is specified).
everdev contract run-executor abi_filename
$ everdev contract run-executor Contract.abi.json
Configuration
Network: dev
Signer: sign1
Address: 0:a4629d617df931d8ad86ed24f4cac3d321788ba082574144f5820f2894493fbc
Available functions:
1) func1
2) func2
Select function (number):
$ everdev contract run-executor -h
EverDev Version: 0.5.0
Use: everdev contract run-executor file function [options]
Args:
file ABI file
function Function name
Options:
--help, -h Show command usage
--network, -n Network name
--signer, -s Signer key name
--data, -d Deploying initial data as name:value,...
This data is required to calculate the account address and to
deploy contract.
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--address, -a Account address
--input, -i Function parameters as name:value,...
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--prevent-ui, -p Prevent user interaction
Useful in shell scripting e.g. on server or in some
automating to disable waiting for the user input.
Instead everdev will abort with error.
For example when some parameters are missing in command line
then ton dev will prompt user to input values for missing
parameters (or fails if prevent-ui option is specified).
everdev contract topup abi_filename
$ everdev contract topup -h
EverDev Version: 0.5.0
Use: everdev contract topup file [options]
Args:
file ABI file
Options:
--help, -h Show command usage
--address, -a Account address
--network, -n Network name
--signer, -s Signer key name
--data, -d Deploying initial data as name:value,...
This data is required to calculate the account address and to
deploy contract.
Array values must be specified as [item,...]. Spaces are not
allowed. If value contains spaces or special symbols "[],:"
it must be enclosed in "" or ''
--value, -v Deploying balance value in nano tokens
everdev contract topup --address <address>
everdev ct -a <addrress>
$ everdev contract decode-data --help
EverDev Version: 1.2.0
Use: everdev contract decode-data file [options]
Args:
file ABI file
Options:
--help, -h Show command usage
--network, -n Network name
--address, -a Account address