简体   繁体   中英

I'm getting unrealistically low gas fee's when deploying an ERC-721 contract on testnet

I deployed my smart contract(ERC-721) on truffle (Rinkeby | Ropsten | local node) and again on Remix and I keep getting an average cost of 0.0165 ether. This gas fee seems unrealistic to me, even though my contract is pretty simple.

I finally tried deploying to MAINNET using Truffle and the transactions stopped due to a low gas value. I switched over to REMIX and the new total gas fee is 0.65 ($2500) ether.

Is this a realistic amount to deploy a smart contract? or do I need to change some setting on remix?

Do the testnet's give a good representation of what gas fee will cost on mainnet?

The amount of gas used from gas limit, not the gas price is going to be consistent between mainnet and testnets as the gas used from gas limit represents the amount of work that needs to be done to process the transaction logic in the EVM. Gas price (how much you pay for a unit of gas used) fluctuates as it is dependent on market economics/game theory, which is going to be very different on a test network vs live network.

References

https://ethereum.org/en/developers/docs/gas/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM