0

Is it possible to create a Contract Reference to perform a Cross-Contract call from ink::trait_definition?

If it is, how can I do so?

If it is not, why it is not possible? It seems strange that we can only create a reference to the whole contract and not to a single trait the contract is implementing.

1
  • using this you can create a reference of single trait
    – Ganesh11
    Sep 8, 2023 at 9:21

1 Answer 1

1

There is a macro that based on ink trait creates an associated type for safe cross-contract calls:

https://paritytech.github.io/ink/ink/macro.contract_ref.html

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.