3

Trying to follow this example 100 wei seems very low for the gas price. Is it using a different unit? I'm also slightly unsure if the value should be hex or decimal, or if it accepts both

1

On the main github page, the value 0x09184e72a000 is used. Converting that to base 10, we get this figure: 10,000,000,000,000 (10 quadrillions).

According to the gas station, we can consider the average price (as of May 2018) to be 12 gwei, or 12,000,000,000 (12 billions) wei.

We can thus deduce that the amount set my ethereumjs-tx creators was set in wei, so that your contract will always have enough gas. They also perhaps assumed you'll be using it on a testnet first.

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.