HOW TO MAKE A REACH CONTRACT RECOGNIZE AND USE A NON-NETWORK TOKEN LAUNCHED OUTSIDE THE CONTRACT #1060
-
Hello Reach Fam, There is something I am trying to figure out. I have not been able to see any Reach examples where the Reach program lets the participants interact with a non-network token that was launched outside the Reach Contract, and is also not a test token. I am still looking for an example or solution. I want the program(from its frontend - .mjs file and RPC) to read a real token's(ASA) info from the network, without a participant being required to provide that token or any token info. This then allows a second participant to provide some amount of this ASA to the contract, and then the contract sends an amount of this ASA to the first participant once this first participant provides the amount he wants. Is this possible? Could sm help here? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
"I want the program to read a real token's info from the network, without a participant being required to provide that token or any token info" This is not possible. Programs cannot learn anything that doesn't come from participants. You need to have a participant publish a |
Beta Was this translation helpful? Give feedback.
-
What about on the frontend? How would I declare the USDC Token, for example, or some new token I created using the Reach standard library? @jeapostrophe |
Beta Was this translation helpful? Give feedback.
-
Is there like a standard schema e.g |
Beta Was this translation helpful? Give feedback.
"I want the program to read a real token's info from the network, without a participant being required to provide that token or any token info"
This is not possible. Programs cannot learn anything that doesn't come from participants. You need to have a participant publish a
Token
value. That value doesn't have to be a "test" token. You could give it31566704
if you wanted to use USDC --- https://algoexplorer.io/asset/31566704