0

I am trying to call the get method of the coinbase normalizer harbinger price contract (KT1AdbYiPYb5hDuEuVrfxmFehtnBCXv4Np7r).

Is this the correct way to call the get method, as it doesn't seem to be working for me.

const c = await Tezos.wallet.at('KT1AdbYiPYb5hDuEuVrfxmFehtnBCXv4Np7r');

const op = await c.methods.get("XTZ-USD", "<contract_address>%<callback_name>").send();

2 Answers 2

0

At the moment, Taquito doesn't support calling entrypoints that take a value of type contract as a parameter, so it won't be possible to call the get entrypoint of this contract.

1
  • thanks for the clarification!
    – dev
    Sep 17, 2021 at 0:11
1

The lambda view feature allows retrieving data via a contract's view method. Here is a link to the documentation: https://tezostaquito.io/docs/lambda_view

Here is an example with a similar contract on granadanet:

const contract = await Tezos.contract.at('KT1AQuWowr3WKwF69oTGcKaJrMajic3CKwR2');
const response = await contract.views.get('ETH-USD').read();

The returned value is:

{
  "0": "ETH-USD",
  "1": "2021-09-13T16:50:00.000Z",
  "2": "3194778043"
}

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.