1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

Add docs: how to request Ocean Tokens in testnets

This commit is contained in:
Troy McConaghy 2019-04-01 16:48:37 +02:00
parent f5e8f87d9b
commit a4f2e57a22
2 changed files with 13 additions and 1 deletions

View File

@ -18,7 +18,7 @@ Plecos can be used in a microservice to facilitate data onboarding, as described
### squid-py Examples
- [The squid-py tutorials in Jupyter notebooks](/tutorials/jupyter-notebooks/)
- [The squid_py/examples/ directory of the squid-py repository](https://github.com/oceanprotocol/squid-py/tree/develop/squid_py/examples)
- [The squid_py/examples/ directory of the squid-py repository](https://github.com/oceanprotocol/squid-py/tree/develop/examples)
- [The squid-py tests](https://github.com/oceanprotocol/squid-py/tree/develop/tests)
### squid-js Examples

View File

@ -70,3 +70,15 @@ There are several ways to acquire some of the Ocean Tokens in the initial circul
- completion of a [bounty](/concepts/bounties/)
In the future, it will become possible to earn Mainnet Ocean Tokens as network rewards. The [Ocean Protocol Technical Whitepaper](https://oceanprotocol.com/tech-whitepaper.pdf) explains that in more detail.
### Get Testnet Ocean Tokens
All Squid libraries have methods to request Ocean Tokens. They work by calling the "Dispenser" keeper contract, a contract which is only deployed to testnets. Therefore they will only work in testnets. They're documented in the following places:
- [The squid-js docs for Account.requestTokens()](/references/squid-js/#Account-requestTokens)
- The squid-py docs for:
- [the squid\_py.ocean.ocean\_tokens module](https://squid-py.readthedocs.io/en/develop/api/squid_py.ocean.ocean_tokens.html): see the `request()` method.
- [the squid\_py.ocean.ocean\_accounts module](https://squid-py.readthedocs.io/en/develop/api/squid_py.ocean.ocean_accounts.html): see the `request_tokens()` method.
- [The squid-java docs](https://www.javadoc.io/doc/com.oceanprotocol/squid/): click "All Classes" then "AccountsManager" then scroll to the bottom of the Class AccountsManager page where you'll find the `requestTokens()` method.
The [Tools & Examples page](/concepts/tools/#examples) has links to example Squid code (in all of the languages), including examples of using the above methods.