actually i'm creating a new contract with new Contract(params) but how to send eth in the same time (in the same tx like geth does) ?


You can treat (new Contract) as a function, as such:

(new Contract).value(wei)(params)
| improve this answer | |
  • 3
    Additionally, the constructor should be payable – pabloruiz55 Dec 15 '17 at 1:46

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.