|
|
@ -157,8 +157,11 @@ function executeTr(blockIndex, trIndex, state, ctrAddresses, trHashes, callBack) |
|
|
|
if (tr.contractId === tr.functionId) |
|
|
|
rpcParams.code = codeModel.contracts[tr.contractId].codeHex + encodedParams.join(""); |
|
|
|
else |
|
|
|
{ |
|
|
|
rpcParams.data = "0x" + func.qhash() + encodedParams.join(""); |
|
|
|
|
|
|
|
rpcParams.to = ctrAddresses[tr.contractId]; |
|
|
|
} |
|
|
|
|
|
|
|
var requests = [{ |
|
|
|
jsonrpc: "2.0", |
|
|
|
method: "eth_sendTransaction", |
|
|
@ -180,7 +183,7 @@ function executeTr(blockIndex, trIndex, state, ctrAddresses, trHashes, callBack) |
|
|
|
if (tr.contractId === tr.functionId) |
|
|
|
{ |
|
|
|
ctrAddresses[tr.contractId] = receipt.contractAddress |
|
|
|
ctrAddresses[tr.contractId + " - " + trIndex] = receipt.contractAddress //get right ctr address if deploy more than one contract of same type.
|
|
|
|
ctrAddresses["<" + tr.contractId + " - " + trIndex + ">"] = receipt.contractAddress //get right ctr address if deploy more than one contract of same type.
|
|
|
|
} |
|
|
|
executeTrNextStep(blockIndex, trIndex, state, ctrAddresses, trHashes, callBack) |
|
|
|
} |
|
|
|