ethernet vererion: 1.8.x, language: golang 1.11.x

I wrote a smart contract in solidity. The contract's contructor has two parameters like this:

uint256 _initialAmount, string _tokenName

I compiled this file and got the ABI and bytecode. Now, I want to deploy it to my private chain when the chain node start ( but not by JSON RPC request). I noticed there's a API in types.transaction.go like this:

func NewContractCreation(nonce uint64, amount *big.Int, gasLimit, uint64, gasPrice *big.Int, data []byte) *Transaction

So, how can I get the 'data' value? is it from ABI or bytecode?


  • 1
    Missing a language tag. – goodvibration Apr 21 at 11:50
  • The answer depends on what framework and programming language you are using to work with your private chain. – Mikko Ohtamaa Apr 21 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.