0
const op = await contract.methods
        .buy(contractParams?.height, contractParams?.width)
        .send();

I have a buy entrypoint and would like to pass in some parameters and some tez at the same time. How should this be done?

1 Answer 1

0

Need to include the amount in the send call

const op = await contract.methods
        .buy(contractParams?.height, contractParams?.width)
        .send({ amount: 1});
1
  • 1
    You can also send mutez instead of tez, for example, .send({ amount: 1}) is going to send 1 tez but .send({ amount: 1000000, mutez: true}) is going to send 1.000.000 mutez. Apr 6, 2021 at 6:58

Your Answer

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

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