1

In the truffle metacoin example why does this line not require {gas: xxxx}? Is it that this transaction doesn't need gas or that truffle sets some sort of default gas?

return meta.sendCoin(receiver, amount, {from: account});
2

If I understand this correctly it's not truffle that sets the default gas value, but web3 itself (source: web3 docs, although it doesn't specify which value that is). You can verify that by checking the receipt from the sendCoin transaction in truffle and inspecting txid.receipt.gasUsed (where txid is the name of the receipt retrieved from the transaction).

  • 1
    ah I see: "defaults to the mean network gas price". – Wilfred Apr 27 '17 at 20:02

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.