web3.eth.sendTransaction diff action with diff web3js version
Expected behavior
it will run the result
Actual behavior
but, it returns error
Steps to reproduce the behavior
- [First step] "web3": "^1.8.1" let accounts = await web3.eth.getAccounts() try { var sender = accounts[0] let txHash = await web3.eth.sendTransaction( { from: sender, to: to1, value: valueInWei, data: a }, function (err, res) { console.log('err is ', err) console.log('res is ', res) } ) it return ok
but "web3": "^4.1.1" it return error
const to1 = '0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC' const valueInWei = web3.utils.toWei('0.000599', 'ether') const a = '0x000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002132aeaaa3a000000000000000000000000003b4bad872281485d66d8d26c26a4d88c690ea420000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c0000000000000000000000000057f1887a8bf19b14fc0df6fd9b2acc9af147ea85302c3fc0f04d53a8b2f80d10378d220da3f81bc2d81b590acb231c19a826d3c2000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064f3c7820000000000000000000000000000000000000000000000000000000064fd485c0000000000000000000000000000000000000000000000000000000000000000360c6ebe000000000000000000000000000000000000000083acf66e4c7abce20000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f00000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000d9ea38e36000000000000000000000000000000a26b00c1f0df003000390027140000faa71900000000000000000000000000000000000000000000000000000000000000409828075877afd494fd9c0497ab61877a35899686f16163bba2791e760457dddac3cd4c1a4fdefd73d87cd1f8c2e351fefb4a455ddb2dfcb4209153cce6717ddc00000000360c6ebe'
@daxuanxiaoyou I am not able to reproduce this issue with 4.1.1, and got results for mined tx:
{
transactionHash: '0x67f9549a2219e1e93c29ec31d17ca5aab37caea04fbf7db1e5719284583edf66',
transactionIndex: '0x0',
blockNumber: '0x2',
blockHash: '0x749c15539e2796b1fa996f76f89326f51038c72f398156da453178b3bd0cf7df',
from: '0xb6b06f15390c7f8ba1e653a931d21946f9fe3e7a',
to: '0x00000000000000adc04c56bf30ac9d3c0aaf14dc',
cumulativeGasUsed: '0x6a7c',
gasUsed: '0x6a7c',
logs: [],
logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
status: '0x1',
effectiveGasPrice: '0x4a817c800',
type: '0x0'
}
pls share error logs that you are getting.
@daxuanxiaoyou
There is no activity on this issue from last two weeks, so closing, @daxuanxiaoyou feel free to reopen if you have more info about it.