Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

RPC eth_sendTransaction does not work as expected when based on input parameter rather than data parameter #801

Open
banishee opened this issue Feb 17, 2021 · 1 comment
Labels
rpc Ethereum JSON-RPC related issues and PRs Status: On Ice Type: User Reported

Comments

@banishee
Copy link

System info: [Include Ethermint commit, operating system name, and other relevant details]

  • branch dev

Steps to reproduce:

  1. Use eth_SendTransaction api to deploy a contract, and fill out the input parameter
  2. 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 takes input or data as a parameter

Actual behavior: [What actually happened]

  • the status of an evm transaction will be 0x0when it takes input 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))
``
@github-actions
Copy link

github-actions bot commented Apr 4, 2021

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.

@github-actions github-actions bot added the stale stale PRs that will be closed if no further action occurs label Apr 4, 2021
@araskachoi araskachoi reopened this Apr 12, 2021
@araskachoi araskachoi reopened this May 10, 2021
@araskachoi araskachoi added Status: On Ice rpc Ethereum JSON-RPC related issues and PRs Type: User Reported labels May 10, 2021
@github-actions github-actions bot removed the stale stale PRs that will be closed if no further action occurs label May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
rpc Ethereum JSON-RPC related issues and PRs Status: On Ice Type: User Reported
Projects
None yet
Development

No branches or pull requests

2 participants