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
4

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 | |
0

As the name main was a bit confusing, it was renamed from main to default in the latest version of Taquito (version v7.0.0-beta).

This is a breaking change for implementations that use the main method for calling the default entrypoint of a contract.

Before version 7:

contract.methods.main(contractAddress).send()

Since version 7:

contract.methods.default(contractAddress).send()

More details can be found on the upgrading guide of Taquito.

| 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.