feat(@embark/embarkjs): add bytecode to contract

Contract artifacts built by `new.EmbarkJS.Blockchain.Contract(config)` now save the bytecode and runtime bytecode from the config in the instance
This commit is contained in:
Iulian Rotaru (mortimr) 2019-03-19 11:58:01 -04:00 committed by Iuri Matias
parent 30e5af5038
commit 4d4704ac6f
1 changed files with 3 additions and 0 deletions

View File

@ -253,6 +253,9 @@ let Contract = function(options) {
ContractClass.abi = ContractClass.options.abi;
ContractClass.address = this.address;
ContractClass.gas = this.gas;
ContractClass.bytecode = '0x' + options.code;
ContractClass.runtime_bytecode = '0x' + options.runtime_bytecode;
ContractClass.real_runtime_bytecode = '0x' + options.real_runtime_bytecode;
let originalMethods = Object.keys(ContractClass);