ethermint
ethermint copied to clipboard
RPC eth_sendTransaction does not work as expected when based on input parameter rather than data parameter
System info: [Include Ethermint commit, operating system name, and other relevant details]
- branch
dev
Steps to reproduce:
- Use
eth_SendTransaction
api to deploy a contract, and fill out theinput
parameter - Then try to query the receipt, it will shows that the status is
0x0
Expected behavior: [What you expected to happen]
- the status of an evm transaction is suppsed to be
0x1
, whether it takesinput
ordata
as a parameter
Actual behavior: [What actually happened]
- the status of an evm transaction will be
0x0
when it takesinput
as a parameter
Additional info: [Include gist of relevant config, logs, etc.]
- Here is a piece of test code:
param := make([]map[string]string, 1)
param[0] = make(map[string]string)
param[0]["from"] = hexAddr1.Hex()
// set contract payload in "input", not "data"
param[0]["input"] = "0x6080604052348015600f57600080fd5b5060117f775a94827b8fd9b519d36cd827093c664f93347070a554f65e4a6f56cd73889860405160405180910390a2603580604b6000396000f3fe6080604052600080fdfea165627a7a723058206cab665f0f557620554bb45adf266708d2bd349b8a4314bdff205ee8440e3c240029"
param[0]["gasPrice"] = (*hexutil.Big)(defaultGasPrice.Amount.BigInt()).String()
rpcRes := Call(t, "eth_sendTransaction", param)
var hash hexutil.Bytes
require.NoError(t, json.Unmarshal(rpcRes.Result, &hash))
// try to query the receipt based on hash
receipt := WaitForReceipt(t, hash)
require.NotNil(t, receipt)
require.Equal(t, "0x1", receipt["status"].(string))
``
This issue is stale because it has been open 45 days with no activity. Remove stale
label or comment or this will be closed in 7 days.