Skip to content

Deploy a Solidity Contract

Before being able to deploy a contract, it needs to be compiled

The command compile-contract can be used to compile a .sol file.

File Format

The compiled.bin file must have the following format:

60....

Deploy the Contract

hanchond playground tx solidity deploy-contract /tmp/CheckAddress.bin
{"contract_address":"0xc2f633d1e91e1a2edeb55274753b44b204a4df91", "tx_hash":"0xa0a473953fb8ff88cbd7f63c956992d2621a7fbc47a6ba59427ef8482a0baf9f"}

Deploy the Contract with Params

Requirements:

  • ABI path
  • Params
hanchond playground tx solidity deploy-contract ./UniswapV2Factory.bin --gas-limit=1000000000 --abi=./UniswapV2Factory.abi --params=a:0x492bb9bb9a0b5a564307f65a75253e5d054669a9
{"contract_address":"0xc2f633d1e91e1a2edeb55274753b44b204a4df91", "tx_hash":"0xa0a473953fb8ff88cbd7f63c956992d2621a7fbc47a6ba59427ef8482a0baf9f"}

The supported params list can be found here