2023-11-23 03:20:15 +03:00
|
|
|
# Proposal 39 - Project expenses one year reimbursement
|
2023-11-23 01:43:23 +03:00
|
|
|
|
2023-11-23 03:20:15 +03:00
|
|
|
### Description
|
2023-11-23 01:43:23 +03:00
|
|
|
|
2023-11-23 03:20:15 +03:00
|
|
|
- Send reimbursement amount in TORN tokens to developer and immediately convert it in any stablecoin
|
2023-11-23 01:43:23 +03:00
|
|
|
|
|
|
|
### Requirements
|
|
|
|
|
|
|
|
- Rust ([Need only for Windows](https://doc.rust-lang.org/cargo/getting-started/installation.html))
|
|
|
|
- Foundryup ([Windows](https://github.com/altugbakan/foundryup-windows), [Linux](https://book.getfoundry.sh/getting-started/installation))
|
2023-11-23 03:20:15 +03:00
|
|
|
- Node 16 or higher ([Windows](https://github.com/coreybutler/nvm-windows), [Linux](https://github.com/nvm-sh/nvm))
|
2023-11-23 01:43:23 +03:00
|
|
|
|
|
|
|
### Installation
|
|
|
|
|
|
|
|
```text
|
2023-11-23 03:20:15 +03:00
|
|
|
git clone --recurse-submodules https://git.tornado.ws/Theo/proposal-39-one-year-reimbursement
|
|
|
|
cd proposal-39-one-year-reimbursement
|
2023-11-23 01:43:23 +03:00
|
|
|
npm install
|
|
|
|
```
|
|
|
|
|
|
|
|
### Testing
|
|
|
|
|
|
|
|
```text
|
|
|
|
npm run test:windows
|
|
|
|
```
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
```text
|
|
|
|
npm run test:linux
|
|
|
|
```
|
|
|
|
|
|
|
|
##### Test with gas
|
|
|
|
|
|
|
|
```text
|
|
|
|
npm run test:gas:windows
|
|
|
|
```
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
```text
|
|
|
|
npm run test:gas:linux
|
|
|
|
```
|
2023-11-23 03:20:15 +03:00
|
|
|
|
|
|
|
### Verification
|
|
|
|
|
|
|
|
Amount of tokens is calculated in this [script](scripts/calculateReimbursement.ts) using Binance 7-day average price
|
|
|
|
|
|
|
|
Test yourself:
|
|
|
|
|
|
|
|
```
|
|
|
|
npm run calculateReimbursementAmount
|
|
|
|
```
|
|
|
|
|
|
|
|
### Contract
|
|
|
|
|
|
|
|
Proposal deployed contract code:
|