2

Deploying my contract on rinkeby cost ~12 USD in gas fees (using truffle cli). Is it possible for me to specify gas fees/set a limit in the smart contract so it costs me 0.5 USD, but takes longer to deploy ?

Thank you.

1 Answer 1

1

Deploying my contract on rinkeby cost ~12 USD in gas fees

Your gas fees are a function of

  • a) the gas required for deploying the contract, and
  • b) the gas price you've chosen.

b) can be altered, but with a lower price usually equating to a slower transaction. If it's much lower than the rest of the current market, then it's unlikely the transaction would be mined into a block.

a) cannot be altered unless you change the contract to make its code more compact or more efficient to execute.

Is it possible for me to specify gas fees/set a limit in the smart contract

The contract doesn't know anything about fees. All you can do is set a low gas price when deploying and hope the transaction is picked up by a miner.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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