Contract Deployment "not enough funds for gas" Arbitrum
Contract Deployment "not enough funds for gas" Arbitrum
Loading saved threads...
0x Taiga · External communityPost link
External question — Ethereum Stack Exchange
Author: 0x Taiga
Original post: https://ethereum.stackexchange.com/questions/133620
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I am trying to deploy a contract using the following code:
const Contract = await ethers.getContractFactory("Contract", {
libraries: {
UtilsLibrary: "0xF...e",
}
});
let pool = await Contract.deploy({gasLimit: 10000000, gasPrice: ethers.utils.parseUnits("1", "gwei")})
When I run this on Kovan, Goerly, Arbitrum Goerly, this works totally fine (obviously I correct the library address). When I run this on the Arbitrum mainnet I get an error saying "not enough funds for gas". I have changed multiple RPCs and result is not luck.
Contract takes about 5 mil gas to deploy and I have about 1 ETH in wallet. I really have no more ideas on what might be wrong here. Any suggestions appreciated.
UPD: I have deployed the UtilsLibrary totally fine as part of the script as well. So the correct signer is being used and it has funds.....
Quote
Report
0x Taiga · External communityPost link
External answer — Ethereum Stack Exchange
Author: 0x Taiga
Original post: https://ethereum.stackexchange.com/a/133622
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I had to increase the gas limit to 100mil and it took 80 mil to deploy. I am not sure why similar transaction only took 5mil on kovan and Arbitrum testnet
Quote
Report
0xSanson · External communityPost link
External answer — Ethereum Stack Exchange
Author: 0xSanson
Original post: https://ethereum.stackexchange.com/a/133657
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Arbitrum has a different way to compute gas cost, see here
https://developer.offchainlabs.com/docs/Differences_Overview#fee-stats
In particular,
calldata
is more expensive than L1, and this explains the contract deployment extra cost.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Ethereum Stack Exchange Author: 0xSanson Source score (net votes, not local likes): 0 Original post: https://ethereum.stackexchange.com/a/133657 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Arbitrum has a different way to compute gas cost, see here https://developer.offchainlabs.com/docs/Differences_Overview#fee-stats In particular, calldata is more expensive than L1, and this explains the contract deployment extra cost.
Checking account access…