0

I have tried to deploy the example given in the following link(using remix and geth).While deploying, an error occurred in both geth and remix. And I found that the usage of "require" causes the problem.How to solve this issue without removing the "require"?

Smart contract Example

1 Answer 1

1

require(msg.value == 30 ether, "30 ether initial funding required");

Base on the code for the constructor you need to transfer 30 ethers to the contract upon deployment.

3
  • Thank you. Successfully deployed the code in Remix.But I don't know how to transfer the value while deploying contract in geth.
    – Pt.AR
    Commented Oct 10, 2018 at 11:21
  • How do you deploy your contract?
    – vhie
    Commented Oct 11, 2018 at 1:25
  • var gasAmt = eth.estimateGas({data:bin}) throws gas required exceeds allowance or always failing transaction in geth
    – Pt.AR
    Commented Oct 12, 2018 at 8:30

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.