Skip to content

Commit

Permalink
chore: updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Agilulfo1820 committed Jul 23, 2024
1 parent aec30a8 commit cfaae32
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ Unlock the potential of decentralized application development on Vechain with ou

Read more about the implementation and key features of this template in our [Developer Docs](https://docs.vebetterdao.org/developer-guides/integration-examples/pattern-2-use-smart-contracts-and-backend).

This template uses the VeBetterDAO ecosystem to distribute rewards to users. To learn more about VeBetterDAO, visit our [documentation](https://docs.vebetterdao.org/developer-guides/integration-examples).

When using the solo node you can import the following mnemonic into your wallet and have access to 10 pre-funded accounts:

```
denial kitchen pet squirrel other broom bar gas better priority spoil cross
```

## Requirements

Ensure your development environment is set up with the following:
Expand Down Expand Up @@ -122,12 +130,48 @@ yarn dev

### Setting up rewards

## Testnet

Read the [VeBetterDAO documentation](https://docs.vebetterdao.org/developer-guides/test-environmnet) to learn how to set up rewards for your users and use the Testnet environment.

Test environment: [https://dev.testnet.governance.vebetterdao.org/](https://dev.testnet.governance.vebetterdao.org/)

<div style="width: 100%; height: 0px; position: relative; padding-bottom: 57.971%;"><iframe src="https://streamable.com/e/175r1s?quality=highest" frameborder="0" width="100%" height="100%" allowfullscreen style="width: 100%; height: 100%; position: absolute;"></iframe></div>

## Solo Network

Since the Solo network is a local network with mocked VeBetterDAO contracts you can use the following steps to set up available rewards to distribute to users:

0. Ensure you are using a wallet with imported pre-funded accounts mnemonic into your wallet. Mnemoninc:

```
denial kitchen pet squirrel other broom bar gas better priority spoil cross
```

1. Copy the `APP_ID` generated by the `contracts:deploy:solo` script and logged in the console.
2. Run `devpal`, a frontend tool to interact with your contracts:

```bash
npx @vechain/devpal http://localhost:8669
```

3. Open the `Inspector` tab and perform the following actions:
4. Add the B3TR_Mock contract (get the address from the console logs and ABI from the `apps/contracts/artifacts/contracts/mock/B3TR_Mock.sol/B3TR_Mock.json` file)
![image](https://i.ibb.co/6Zrj7Nx/SCR-20240723-jorq.png)
5. Add the X2EarnRewardsPool contract (get the address from the console logs and ABI from the `apps/contracts/artifacts/contracts/mock/X2EarnRewardsPoolMock.sol/X2EarnRewardsPoolMock.json` file)
![image](https://i.ibb.co/yYjLw9v/SCR-20240723-jozk.png)
6. You should now have the following setup:
![image](https://i.ibb.co/w4XWyh9/SCR-20240723-jpbc.png)
7. To recharge the rewards pool you will need to mint some mocked B3TR tokens, then deposit them into the rewards pool. Perform the following actions:
- Mint some tokens by calling the `mint` function on the B3TR_Mock contract
![image](https://i.ibb.co/XCQ7LNR/SCR-20240723-kgll.png)
- Approve the X2EarnRewards contract to spend the tokens by calling the `approve` function on the B3TR_Mock contract
![image](hhttps://i.ibb.co/7WvQL15/SCR-20240723-kedb.png)
- Deposit the tokens into the rewards pool by calling the `deposit` function on the X2EarnRewardsPool contract
![image](https://i.ibb.co/X7Txx7Y/SCR-20240723-keuu.png)

NB: Values are in wei, use this tool to convert to VET: [https://eth-converter.com/](https://eth-converter.com/)

## Disclaimer ⚠️

This template serves as a foundational starting point and should be thoroughly reviewed and customized to suit your project’s specific requirements. Pay special attention to configurations, security settings, and environment variables to ensure a secure and efficient deployment.
Expand Down

0 comments on commit cfaae32

Please sign in to comment.