DeployContract

Deploys a contract. Returns TransactionExtention, which contains an unsigned transaction.

This endpoint supports both POST and GET methods.

Body Params
json
Defaults to "[{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]"

Smart Contract's Application Binary Interface

string
Defaults to 608060405234801561001057600080fd5b5060de8061001f6000396000f30060806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631ab06ee58114604d5780639507d39a146067575b600080fd5b348015605857600080fd5b506065600435602435608e565b005b348015607257600080fd5b50607c60043560a0565b60408051918252519081900360200190f35b60009182526020829052604090912055565b600090815260208190526040902054905600a165627a7a72305820fdfe832221d60dd582b4526afa20518b98c2e1cb0054653053a844cf265b25040029

The compiled contract's identifier, used to interact with the Virtual Machine.

int32

Maximum TRX consumption, measured in SUN (1 TRX = 1,000,000 SUN).

string

Parameter passed to the constructor of the contract. Call the virtual machine format of the parameter [1, 2], use the js tool provided by remix, convert the parameter array [1, 2] called by the contract caller into the parameter format required by the virtual machine.

int32

The max energy which will be consumed by the owner in the process of execution or creation of the contract, is an integer which should be greater than 0.

string
Defaults to TJmmqjb1DK9TTZbQXzRQ2AuA94z4gKAPFh

Contract owner address, converted to a hex string

string
Defaults to SomeContract

Contract name

int32

Amount of TRX transferred with this transaction, measured in SUN (1TRX = 1,000,000 SUN)

int32

The same as User Pay Ratio. The percentage of resources specified for users who use this contract. This field accepts integers between [0, 100]. If it is 0, it means the user does not consume resources until the developer resources are exhausted. However, it is strongly recommended to set the value between 1 and 99 (inclusive). This is prevent the contract developer from potential malicious infinite loop time out attacks.

int32

Optional. Whehter the address is in base58 format.

boolean
Defaults to true

Optional. Whehter the address is in base58 format.

Responses

Language
Credentials
Header
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json