-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66a29cb
commit b583b44
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,25 @@ Vocdoni SDK Token-Based Census example | |
|
||
This example shows how to use the SDK to create a token-based census in a Typescript project. | ||
|
||
In order to execute this example, you need to have a token on an ethereum-based blockchain that you would like to use as a census. This can be any of the following token types: | ||
- ERC20 | ||
- ERC721 | ||
- ERC777 | ||
- POAP | ||
- Gitcoin Passport Score | ||
- Gitcoin Passport Shields (coming soon) | ||
- ERC1155 (coming soon) | ||
|
||
You then need to specify the token address and chain number, as well as a list of voter private keys (only use demo accounts created for testing) in index.ts. | ||
|
||
If you do not already have a token to use for testing, you can easily create one for free on a testnet. For more details follow our [setup guide](https://developer.vocdoni.io/sdk/integration-details/census-types/on-chain#creating-a-token). | ||
|
||
To execute this example, use the following steps: | ||
|
||
~~~bash | ||
git clone [email protected]:vocdoni/vocdoni-sdk.git | ||
cd vocdoni-sdk/examples/token-based | ||
# Make sure you have a testing token, add its info to index.ts | ||
yarn | ||
yarn start | ||
~~~ | ||
|