-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending signed tx returns an error while tx was successfull #2587
Comments
Could you add some more details about the connected node and for example add the responses you see in the network tab of your browser? |
@nivida it's a server side. I use infura:
and same for mainnet. |
Same problem, using infura too. |
Experiencing the same error when using Noteworthy these also produces integers for |
I'm running into this problem as well. I thought the problem was ganache so I deployed into Ropsten and tried to test my API against it, but I'm getting the same behavior. So I don't think it's something related to Infura or Ganache, simply because the transactions are actually on chain. What I'm doing now is testing my API with mocha and chai. I'm signing the transaction manually and then sending it signed post: (functionName, ...params) => new Promise((resolve, reject) => {
const contractFunction = Tru.contract.methods[functionName](...params);
const functionAbi = contractFunction.encodeABI();
contractFunction.estimateGas(from)
.then(gas => sign(functionAbi, gas))
.then(Tru.web3.eth.sendSignedTransaction)
.then((tx) => {
resolve(tx.transactionHash)
})
.catch((e) => {
console.error(`Post(${functionName}): ${e}`);
reject(e);
});
}), What I get in my tests is this: 1) Repository: SmartContract
Tru
should allow to register a candidates list:
Error: Transaction has been reverted by the EVM:
{
"transactionHash": "0x326a2971c3215a740c0104db0f0d372c90947dba04628224448f3690cbbe1fc9",
"transactionIndex": 0,
"blockHash": "0x89f543b36a673ee953f6d38f33be6217448d8e916b9ef556a059142e4c430902",
"blockNumber": 13,
"from": "0xdc1fb6c03c9cc8235a2f9cf35c94dd1d112ef45d",
"to": "0x04b5f46f401fa4f421a19f69efa0a29b1ae53270",
"gasUsed": 77149,
"cumulativeGasUsed": 77149,
"contractAddress": null,
"logs": [],
"status": true,
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000",
"v": "0x1b",
"r": "0x79c7a2a4a183f2f575dd939d8ea6bd546d91f3ca080401b414bec5dbbc989f1b",
"s": "0x1e13dfff69eade930c41f6ff204bdb28303abf881823743fe7d21abe68d830eb"
}
at SafeSubscriber._next (node_modules/web3-core-method/dist/web3-core-method.cjs.js:1017:32)
at SafeSubscriber.__tryOrUnsub (node_modules/rxjs/src/internal/Subscriber.ts:267:10)
at SafeSubscriber.next (node_modules/rxjs/src/internal/Subscriber.ts:209:14)
at Subscriber._next (node_modules/rxjs/src/internal/Subscriber.ts:139:22)
at Subscriber.next (node_modules/rxjs/src/internal/Subscriber.ts:99:12)
at TransactionObserver.emitNext (node_modules/web3-core-method/dist/web3-core-method.cjs.js:438:16)
at _callee2$ (node_modules/web3-core-method/dist/web3-core-method.cjs.js:408:24)
at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
at process._tickCallback (internal/process/next_tick.js:68:7) But if I go to the truffle console, and check for the specified tx, I get everything good. I can even retrieve data right away from my contract's internal structure. |
I'm pretty sure the transformation from hex to bool is happening at a higher layer in your code, as the raw result from Infura is clearly still a
|
@mesirendon and @ryanschneider see reference discussion about #2542 |
Description
I have a simple code that sends signed transaction:
That emit error event:
while the transaction was successful:
https://ropsten.etherscan.io/tx/0xa0e7c70064e7c80bc7534b40f951b434fc9e88a8547a4d88edd06e1e61ce7967
Probably the
status
field format was changed and the methodhasRevertReceiptStatus
doesn't work as expected:Versions
Details:
![image](https://user-images.githubusercontent.com/22537517/55058103-9fa52a80-509d-11e9-910b-a7b45bbd13c5.png)
Could you please give any comments? Is it a bug or the specific of testnet or whatever? Thanks a lot!
The text was updated successfully, but these errors were encountered: