- Points.sol
- ribbonVault.sol
| contract | Address |
|---|---|
| Points | 0x28B841ab4C9fAD21ee837a66d8F533FF97CecaFF |
| WorldcoinVault | 0x19DDd4cD2880f7521a60F1B30c3e558DC0630c98 |
OS - linux
curl -L https://foundry.paradigm.xyz | bash
foundryup
ℹ️ Note
If you’re on Windows, you will need to install and use Git BASH or WSL, as your terminal, since Foundryup currently does not support Powershell or Cmd.
Clone the repository:
git clone https://github.com/RibbonBlockchain/RibbonSmartContract.git
cd RibbonSmartContract
code .
To run tests:
cd test
forge test -vvvv
- create a .env
- add rpc in the .env SEPOLIA_OPTIMISM_RPC ℹ️ Note : you can get rpc from alchemy
- add your private key in your .env file
SEPOLIA_OPTIMISM_RPC =
DEV_PRIVATE_KEY = 0x83b446
run this command for deployment:
source .env
forge script script/points.s.sol:PointScript --rpc-url $SEPOLIA_OPTIMISM_RPC --broadcast
ℹ️ Note : reward token == worldcoin token
For vault creation for different reward partners where points token and reward token are deposited into for claiming
function createVault(string memory vaultName,address vaultOwner,address paymentAddress,uint pointsAmountForVault)public returns(bool){
//...
}The name of the vault to be created
The admin of the vault to be created
The contract address of the reward token to be transfered into the vault
The Amount of points to be transfered in to the vault
function permitClaimPoints(address user,uint amount,uint256 deadline,uint8 v,bytes32 r,bytes32 s)public {
//...
}The address of the user claiming points
The amount of points the user is claiming
The signature of the admin
The signature deadline
function permitSwapToPaymentCoin(address user,uint pointToSwap,uint256 deadline,uint8 v,bytes32 r,bytes32 s)public {
//...
}The address of the user swapping onchain points to reward token
The amount of points the user is claiming
The signature of the admin
The signature deadline