https://github.com/davidatwhiletrue/cep18distribution
https://github.com/davidatwhiletrue/cep18distribution
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/davidatwhiletrue/cep18distribution
- Owner: davidatwhiletrue
- Created: 2024-12-15T11:23:29.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-15T20:14:53.000Z (over 1 year ago)
- Last Synced: 2025-02-12T08:19:54.489Z (over 1 year ago)
- Language: C#
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Program to distribute CEP-18 tokens
## Setup
You need .NET 8 SDK to run the program.
If it's not installed in your system, follow the instructions from [here](https://dotnet.microsoft.com/en-us/download/dotnet/8.0).
Access to the program path and restore nuget packages:
```bash
cd AIDistribution
dotnet restore
```
##
Create a `.env` file with following values:
```
NODE_ADDRESS=http://127.0.0.1:7777/rpc
CHAIN_NAME=casper
CONTRACT_HASH=36322350b8d859c3529e81a0e6a8a87819a37f118e776658308de40ef0a8ffa4
PAYMENT_FEE=500000000
USER_1=/path/to/secret_key.pem
```
## Prepare the input file
The input file must be a CSV with ';' as column delimiter.
First column is the account hash of the recipient. Second column is the amount of tokens to send (with all decimals).
## Run the distribution token program
Run the program to start sending the transfers to the configured Casper node:
```
dotnet run --project ./input.csv ./output.csv
```
The program will go through the input file and will create an output file with deploy hash for each transfer sent.
When the program terminates sending the transfers, it starts a process to check if
the transfers have been completed successfully. Pay attention to the console output
to check for any errors that may appear.