You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
When trying to simulate error, I am getting different result which causes truffle-contract to detect that error as receipt in the extractReceipt function
{ code: -32010,
message:
'Transaction cost exceeds current gas limit. Limit: 8015630, got: 123232323. Try decreasing supplied gas.' }
Current Behavior
I am getting this error in ganache, which causes truffleContract to detect it as receipt
{
"stack": "n: Exceeds block gas limit\n at k._queueTransaction (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:578780)\n at k.queueRawTransaction (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:577344)\n at b.eth_sendRawTransaction (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:567858)\n at b.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:564744)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at a.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:563051)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at c.f.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:556029)\n at c.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:553855)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at s.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:562065)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at a.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:561512)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at d._handleAsync (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439074)\n at Timeout._onTimeout (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:438499)",
"name": "n"
}
Possible Solution
Not sure is it the problem from ganache or truffle contract? if truffle-contract should change their behaviour, let me know, I will create the issue in truffle-contract.
Steps to Reproduce (for bugs)
Running ./node_modules/.bin/ganache-cli -m 'blame left final crime wing curious actual light drip trip patient daughter' -p 9988 --verbose
running ./node_modules/.bin/truffle migrate --network docker. the migrated smart contract, is just a normal ERC721 token
run instance.mintWithTokenURI(toWalletAddress, productId, url, { gas: 123232323 }) (assuming that the truffle contract was deployed)
since I was testing for error, so I expected that it should return me error and rejected the promiEvent in truffle-contract, but it was resolved and returning this
{ tx: undefined,
receipt:
{ stack:
'n: Exceeds block gas limit\n at k._queueTransaction (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:578780)\n at k.queueRawTransaction (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:577344)\n at b.eth_sendRawTransaction (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:567858)\n at b.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:564744)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at a.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:563051)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at c.f.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:556029)\n at c.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:553855)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at s.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:562065)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at a.handleRequest (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:561512)\n at t (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439038)\n at d._handleAsync (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:439074)\n at Timeout._onTimeout (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:37:438499)',
name: 'n',
rawLogs: undefined,
logs: [] },
logs: [] }
To move forward, when I try to run the function twice but with lower gas as shown below
I will be getting uncaught error from truffle contract
TypeError: this.removeListener is not a function
at Object.receipt (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/@truffle/contract/lib/handlers.js:133:10)
at Function.start (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/@truffle/contract/lib/override.js:56:24)
at deferred.catch (/home/hanstf/Documents/projects/erc721-smartcontract-lib/node_modules/@truffle/contract/lib/execute.js:197:56)
This is not the case in testnet.
Context
Since it behave differently in testnet, we are having difficulty to do the testing
Your Environment
Version used: 6.7.0
Version of Truffle-contract: 4.0.36
Version of truffle: 5.0.41
NodeJS Version: 10.10
Operating System and version (include distro if Linux): Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
When trying to simulate error, I am getting different result which causes truffle-contract to detect that error as receipt in the extractReceipt function
Expected Behavior
Getting the same as testnet
Current Behavior
I am getting this error in ganache, which causes truffleContract to detect it as receipt
Possible Solution
Not sure is it the problem from ganache or truffle contract? if truffle-contract should change their behaviour, let me know, I will create the issue in truffle-contract.
Steps to Reproduce (for bugs)
I will be getting uncaught error from truffle contract
This is not the case in testnet.
Context
Since it behave differently in testnet, we are having difficulty to do the testing
Your Environment
The text was updated successfully, but these errors were encountered: