I'm doing a dry run of a mainnet to get the total gas cost/

Replacing 'Migrations'
 > Total cost:         0.000343902 ETH

Replacing 'EthText'
> Total cost:         0.001205478 ETH

> Total deployments:   2
> Final cost:          0.00154938 ETH

That's 1549380 Gwei.

The Truffle docs set the default value of gasPrice to 100000000000 (100 Shannon).

So, is Shannon the unit Truffle is expecting for gasPrice? Do I need to convert the 1549380 Gwei to Shannon? Or is Gwei?

The docs are sort of confusing.


The default unit used by Truffle in truffle-config.js is Wei (1 Wei = 10^(-18) Ether). You should set the gasPrice in this unit.

You can use this website for conversions : https://eth-converter.com/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.