Various admininistative scripts to help with the Impact Stream.
- Clone the repository:
git clone https://github.com/0xPrimordia/impact-stream-scripts.git
- Install dependencies:
yarn install
- Create a .env file at the root of the repository and add the following variables:
- INFURA_RPC_URL - Your Infura RPC URL
- SIGNER_PRIVATE_KEY - The private key of the pool manager/address that will call contracts
- IMPACT_STREAM_MULTISIG_ADDRESS - The address of the Impact Stream multisig
- ALLO_REGISTRY_ADDRESS - The address of the Allo Protocol registry
- ALLO_MAIN_ADDRESS - The address of the Allo Protocol main contract
- ALLO_STRATEGY_ADDRESS - The address of the Allo Protocol strategy contract
- ALLO_POOL_ID - The ID of the Allo Protocol pool (once pool has been created) WEB3_STORAGE_TOKEN - The token for the Web3 Storage API
- SUPABASE_URL - The URL for intializing the Supabase Client
- SUPABASE_SERVICE_ROLE_KEY - The service role key for the initializing the Supabase Client
- Run the build command:
pnpm build
- Deploy the QV Impact stream strategy. (Verify the contract if it's not auto verified)
pnpm run deploy-strategy
- Update
ALLO_STRATEGY_ADDRESS
in.env
with the deployed contract - Update
pool.data.json
with the init data for pool creation. (verify the timstamps and allo strategy address) - Create pool on Allo using deployed strategy
pnpm run create-pool
- Update
ALLO_POOL_ID
in.env
with the pool Id - Head over to
impact-stream-app
and update allo.config.ts with the right addresses and poolId - Create Profiles from the Proposals in impact stream. (Each proposal has a profile on the registry)
pnpm run create-profiles
- Next for every user with an approved proposal, we need deploy a safe which owned by the user wallet and impact stream multisig. Update
IMPACT_STREAM_MULTISIG_ADDRESS
in.env
with the wallet that will be the other signer - Deploy Safe for the users
pnpm run deploy-safes
- Now we register the recipients
pnpm run register-recipients
- Now we register the allocators
pnpm run register-allocators
- Once the allocations have started, to get the payouts, run
pnpm run calculate-payouts
- Once the allocations has ended, to set the payouts on chain, run
pnpm run set-payouts
- To distribute payouts, run
pnpm run distribute-payouts