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?

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 at 6:58

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.