https://github.com/kevincharm/weighted-raffle-submitter
https://github.com/kevincharm/weighted-raffle-submitter
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kevincharm/weighted-raffle-submitter
- Owner: kevincharm
- Created: 2024-10-28T22:00:53.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-10-28T22:01:46.000Z (7 months ago)
- Last Synced: 2024-12-31T19:25:41.213Z (5 months ago)
- Language: TypeScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Weighted Raffle Submitter Script
## Installation
1. Ensure you have `yarn` and `node>=22` installed
1. Install dependencies by running `yarn`## Usage
1. Set the environment variables. See `.env.example` for an example.
- Set the `WEIGHTED_RAFFLE_SUBMITTER_PK` environment variable to the private key of the account that you will use to submit transactions with.
- Set the `BASE_URL` environment variable to a base RPC (defaults to the public one if not set, but may not be reliable enough to send large transactions).
1. Format entries into a csv file with 2 columns: `address` and `weight`. See `input/entries_example.csv` for an example. You will use this file as the `` argument in the next step.
1. Run the script with `yarn start `.
- Double check that you are submitting the correct entries file, as it's not possible to undo adding entries onchain!
- Optionally, you can also specify a batch size with `--batch ` (defaults to 500 entries per batch).
- Note that you must be the raffle owner to submit entries.