0
  1. Imported the Abi (smart contract Json metadata, as shown in the image below of contract.tx console log) enter image description here

  2. But when I call the methods using contract.tx.symbol (I have an error, as shown in the image below) enter image description here

How can I call my events/messages/methods in my smart contract if it doesn't accept the metadata provided?

1
  • You seem to need static/augmented types in your editor. These are not available - I'm guessing that like for the normal API augmentation it would need a specific augmentation import to make available (there is no tool atm for that takes an ABI and converts to TypeScript definitions for editors to use). As per your screenshot, the ABI is injected at runtime. Jul 3, 2022 at 6:45

1 Answer 1

1

We solved the problem using the following code:

const options = { storageDepositLimit: null, gasLimit: -1 }
const { gasRequired, storageDeposit, result, output } = await apiContract.query["getSymbol"](address, options);

console.log(output);
1
  • Can you elaborate on why/how this solved your issue?
    – HCastano
    Jul 5, 2022 at 19:26

Your Answer

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

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