1

I have deployed a smart contract on carthagenet.

The contract only has a single entry point.

Taquito is not able to find that single entry point. I tried both default and root methods and it doesn't work.

const op = await contract.methods.default(contractAddress).send()
const op = await contract.methods.root(contractAddress).send()

Error message

contract.methods.default is not a function
contract.methods.root is not a function
  • 1
    The contract you point to takes a single parameter of type address. Thus, as you write, it only has the default entrypoint. It might be that taquito does not recognize the default entry point as an entrypoint. After talking with the taquito authors, seems like you should try contract.methods.main(contractAddress).send(). In otherwords, main = default in taquito. – arvidj Feb 26 at 13:26
  • It works. Thank you! – Zack Feb 27 at 5:26
3

The contract you point to takes a single parameter of type address. Thus, as you write, it only has the default entrypoint. In taquito, the main entry point can be call through contract.methods.main. So your call should be:

contract.methods.main(contractAddress).send()
| improve this answer | |

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.