A simple web application that allows users to connect their Pelagus wallet and check for any vested tokens they may have available to claim from a MultiBeneficiaryVesting contract.
- Connect Pelagus wallet to check vesting schedules
- View total allocation, released amount, and currently claimable tokens
- See vesting schedule details (start block, duration, etc.)
- Claim vested tokens with a single click
- Automatically refreshes vesting data
- Node.js (v20.x or later)
- Yarn package manager (v1.22+)
- Pelagus wallet extension installed in your browser
- Git
- Clone the repository:
git clone https://github.com/dominant-strategies/token-vesting-claim-site.git
cd token-vesting-claim-site- Install dependencies:
yarn install-
Set up environment variables:
a. Copy the example environment file:
cp .env.example .env.local
b. Update the following required variables in
.env.local:# Network and Provider Constants NEXT_PUBLIC_RPC_URL=https://orchard.rpc.quai.network # Vesting Contract Constants NEXT_PUBLIC_VESTING_CONTRACT_ADDRESS=0x006ec74887Ec9c0226F2b446af886f20A6e7845B # UI Constants NEXT_PUBLIC_APP_TITLE=Quai Token Claims NEXT_PUBLIC_APP_DESCRIPTION=Check and claim your vested Quai tokens # Formatting Constants NEXT_PUBLIC_TOKEN_SYMBOL=QUAI NEXT_PUBLIC_TOKEN_DECIMALS=18 -
Start the development server:
yarn dev- Open http://localhost:3000 in your browser.
-
Set up environment variables in your hosting platform (e.g., Vercel):
- Copy all variables from
.env.example - Update the values for your production environment
- Update
NEXT_PUBLIC_VESTING_CONTRACT_ADDRESSto your production contract address
- Copy all variables from
-
Deploy the application:
yarn build yarn start
| Variable | Description | Example |
|---|---|---|
NEXT_PUBLIC_RPC_URL |
Quai Network RPC endpoint | https://orchard.rpc.quai.network |
NEXT_PUBLIC_VESTING_CONTRACT_ADDRESS |
Address of the vesting contract | 0x006ec74887Ec9c0226F2b446af886f20A6e7845B |
NEXT_PUBLIC_APP_TITLE |
Application title | Quai Token Claims |
NEXT_PUBLIC_APP_DESCRIPTION |
Application description | Check and claim your vested Quai tokens |
NEXT_PUBLIC_TOKEN_SYMBOL |
Token symbol | QUAI |
NEXT_PUBLIC_TOKEN_DECIMALS |
Token decimals | 18 |
The site interacts with a MultiBeneficiaryVesting contract that has the following key functions:
beneficiaries(address): Returns vesting schedule for a given addressgetClaimableAmount(address): Returns the amount of tokens currently available for claimingrelease(): Allows a beneficiary to claim their vested tokens
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue in the GitHub repository or contact the development team.