Migration failing : how to fund a contract that requires eth to call an oracle ?

%3CLINGO-SUB%20id%3D%22lingo-sub-2252751%22%20slang%3D%22en-US%22%3EMigration%20failing%20%3A%20how%20to%20fund%20a%20contract%20that%20requires%20eth%20to%20call%20an%20oracle%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2252751%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20able%20to%20deploy%20contracts%20on%20ganache%20and%20test%20networks%20using%20migrations%20that%20includes%20sending%20some%20eth%20to%20one%20of%20the%20contracts%20-%20an%20oracle%20that%20requires%20eth%20to%20fund%20calls%20to%20the%20provider%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3Edeployer.deploy(Oracle%2C%20%7Bfrom%3A%20accounts%5B0%5D%2C%20gas%3A6721975%2C%20value%3A%200.25e18%7D)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20when%20I%20deploy%20the%20Oracle%20contract%20to%20Quorum%2FAzure%20blockchain%20service%2C%20I%20get%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EError%3A%20***%20Deployment%20Failed%20***%20%0A%22Oracle%22%20received%20a%20generic%20error%20from%20Geth%20that%20can%20be%20caused%20by%20hitting%20revert%20in%20a%20contract%20constructor%20or%20running%20out%20of%20gas.%20%0A*%20gas%20required%20exceeds%20allowance%20(6721975)%20or%20always%20failing%20transaction.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESome%20googling%20on%20this%20error%20led%20to%20posts%20(%3CA%20href%3D%22https%3A%2F%2Fethereum.stackexchange.com%2Fquestions%2F74209%2Fgas-required-exceeds-allowance-truffle-migrate%2F74211%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fethereum.stackexchange.com%2Fquestions%2F74209%2Fgas-required-exceeds-allowance-truffle-migrate%2F74211%3C%2FA%3E)%20but%20I%20am%20not%20sure%20this%20is%20the%20reason%20and%20I%20can%20not%20figure%20out%20how%20to%20change%20genesis%20on%20Azure%20blockchain.%20Any%20help%20will%20be%20much%20appreciated.%3C%2FP%3E%3CP%3EI%20also%20checked%20the%20Oracle%20contract's%20constructor%20and%20it%20does%20not%20have%20anything%20that%20will%20cause%20an%20exception.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I am able to deploy contracts on ganache and test networks using migrations that includes sending some eth to one of the contracts - an oracle that requires eth to fund calls to the provider

 

deployer.deploy(Oracle, {from: accounts[0], gas:6721975, value: 0.25e18});

 

However, when I deploy the Oracle contract to Quorum/Azure blockchain service, I get

 

Error: *** Deployment Failed *** 
"Oracle" received a generic error from Geth that can be caused by hitting revert in a contract constructor or running out of gas. 
* gas required exceeds allowance (6721975) or always failing transaction.

 

Some googling on this error led to posts (https://ethereum.stackexchange.com/questions/74209/gas-required-exceeds-allowance-truffle-migrate/74...) but I am not sure this is the reason and I can not figure out how to change genesis on Azure blockchain. Any help will be much appreciated.

I also checked the Oracle contract's constructor and it does not have anything that will cause an exception.

0 Replies