Comments (4)
That looks to me like the indexer is not set correctly? I believe that @DanBurton will shortly be sending something to elaborate what's going on here
from reach-lang.
I'm working on improving the ergonomics of this. You can do something like the following:
import * as reach from '@reach-sh/stdlib/ALGO';
import algosdk from 'algosdk';
const RANDLABS_PORT = '';
const RANDLABS_BASE = 'https://algoexplorerapi.io';
// const RANDLABS_BASE = 'https://testnet.algoexplorerapi.io';
// const RANDLABS_BASE = 'https://betanet.algoexplorerapi.io';
const ALGO_SERVER = RANDLABS_BASE;
const ALGO_PORT = RANDLABS_PORT;
const ALGO_TOKEN = '';
const ALGO_INDEXER_SERVER = `${RANDLABS_BASE}/idx2`;
const ALGO_INDEXER_PORT = RANDLABS_PORT;
const ALGO_INDEXER_TOKEN = '';
const algodClient = new algosdk.Algodv2(ALGO_TOKEN, ALGO_SERVER, ALGO_PORT);
const indexer = new algosdk.Indexer(ALGO_INDEXER_TOKEN, ALGO_INDEXER_SERVER, ALGO_INDEXER_PORT);
reach.setAlgodClient(algodClient);
reach.setIndexer(indexer);
I use the randlabs APIs in this example, but you can just as easily use PureStake, or any other API provider.
This currently only works with the 'mnemonic'
signing strategy, but I'm working on getting it to work with the 'AlgoSigner'
signing strategy as well.
I'll provide updates on this issue when:
- I have it working w/ AlgoSigner on MainNet/TestNet
- I have finished publishing and documenting the more ergonomic solution
from reach-lang.
Your solution works. Here is a link to the contract running on MainNet. https://algoexplorer.io/application/203455577
Will use this solution until your update has been added.
from reach-lang.
This is now documented:
https://docs.reach.sh/ref-frontends-js-provider.html
The ergonomic solution is:
reach.setProviderByName('MainNet');
And it does work with AlgoSigner. =]
from reach-lang.
Related Issues (20)
- Getting Error("no log for ".concat(o_lab)) when using remote call HOT 3
- "logic eval error: fee too small" when upgrading to latest Reach (f33abc3d) HOT 11
- While creating ASA in algorand using stdlib.launchToken(), opts.metaDataHash value is ignored and not set in the asset. HOT 4
- Feature Request: Add manager address in opts for stdlib.launchToken() for Alogrand network HOT 1
- WalletConnect producing undefined importKey error HOT 2
- Feature Request: Use algod for asset information if reading is allowed. HOT 2
- Reach Compiler Error HOT 2
- Reach seems to produce impossible values for counter-example to failed "check" statement HOT 2
- launchToken does not set manager address in Algorand TestNet HOT 2
- Compiler error when using .fromObject HOT 1
- Pera wallet connect not working HOT 2
- Unable to import stdlib in Vite HOT 1
- Reach run gives error on latest version
- Reach run gives error on latest version HOT 2
- Not able to import modules in versions after 0.1.13rc0 (f79282c4)
- Remote object call triggers an assumption error
- Sqrt fails formal verification HOT 5
- feat: integrate algorand community's use-wallet HOT 1
- fix: please upgrade Reach's Walletconnect from v1 to v2
- test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reach-lang.