Let’s say I have two canisters with actors A and B respectively.
How can I call A.foo() from B.bar()?
How should I declare a foreign function from another actor to make it work?
Let’s say I have two canisters with actors A and B respectively.
How can I call A.foo() from B.bar()?
How should I declare a foreign function from another actor to make it work?
Hi joinu, There isn’t support for multiple actors yet. But you can create and import modules, see some of enzo’s examples: https://github.com/enzoh/mo-qr
Hi, Ori. This is not what I’m trying to achieve.
Is there a way to say to the compiler: “I know that this function <canister_id>_A.foo() is gonna be there, when you’ll be deployed, trust me. Here is its signature …”?
Thanks joinu. The support for multiple actors will broadly include messaging between them and capabilities, this isn’t in the current release but should be coming up soon for you.
@senior.joinu A good tutorial on the current state of this has been added here:
https://sdk.dfinity.org/developers-guide/tutorials/multiple-actors.html
You can begin to explore this in v0.4.13: https://forum.dfinity.org/t/release-notes-for-v0-4-13/377 but please note the documentation doesn’t reflect this just yet.
Thanks a lot, Ori! Great news.
A simple example here for you, just for reference: Calling another canister's methods