-
Notifications
You must be signed in to change notification settings - Fork 10
Truffle deployment error: Returned error: gas required exceeds allowance or always failing transaction. #2
Comments
Then I tried to use ropsten first, firstly I created a file named
Before execution, I have re-cloned this repo and there is no modification, then The error message is:
I tried to comment out the deployment of Simple777Recipient, but it also did not work Very appreciate for your insights, thank you!! |
Hi @pupboss The best place to ask questions about this ERC777 example is in the OpenZeppelin community forum: On your first question: A key point to note is that in a testing environment an ERC777 token requires deploying an ERC1820 registry using openzeppelin-test-helpers. The same applies to a private network. On your second question: .env
I then deployed to Ropsten using:
The deployed contract is at: |
Hi @abcoathup Thank you for your detailed reply, today I tested the latest code, the good new is that I successfully deployed it on both Ropsten network and Truffle test network, here is the address: https://ropsten.etherscan.io/token/0x8D8Ddc7D53e8ee162084bDF47A1db59EC9775509 However when I tried to deploy it on my private chain (via Geth), I am still facing the same issue. Anyway, thanks for your help. Yeah one more thing, I already have a 1820 registry on my private chain and the address is exactly the same with example ERC777 code. Still have no idea how to solve the gas limit issue...I think it may not be a gas issue, truffle is misleading users...
|
Hi @pupboss, On Ropsten, the gas used by the transaction to deploy the contract was 3,344,178 so I assume it is not running out of gas on your private network. The next assumption is that the contract is reverting in the constructor, potentially when registering the interfaces with the already deployed ERC1820 contract? |
Dear Mr. Andrew, I have a piece of similar code, and I also ran the code in this repo, every time I execute
truffle migrate --reset
I got an error of exceeding allowance, could you give me some suggestions? Thank you in advance.My environment:
0xffffffff
I am using the command
truffle migrate --reset
so I modified the development section directly, moreover, I deleted the singleton registry in the migration filetruffle-config.js:
Detailed error of my code:
Error message of your code:
The text was updated successfully, but these errors were encountered: