Skip to content

How to use the ABI of a Reach program from outside Reach? #1159

Answered by DanBurton
DanBurton asked this question in Q&A
Discussion options

You must be logged in to vote

examples/remote-rsh shows how to it within Reach.
https://github.com/reach-sh/reach-lang/blob/master/examples/remote-rsh/index.rsh

When you ask for an example "where Reach creates the spec for the contract", the way you create the ABI spec is through Reach's API and View features.

Any APIs you create in Reach are compliant with the Algorand ABI.
https://docs.reach.sh/rsh/appinit/#ref-programs-appinit-api

When you create a remote(addr, interface) object in Reach, it uses the ABI according to the function names and types as specified in interface. This works whether the remote contract is a Reach contract or not, because Reach uses the same ABI standards as everyone else to implement its API

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DanBurton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant