Skip to content

allo-protocol/impact-stream-scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Impact Stream Scripts

Various admininistative scripts to help with the Impact Stream.

Installation

  1. Clone the repository:
git clone https://github.com/0xPrimordia/impact-stream-scripts.git
  1. Install dependencies:
yarn install
  1. 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
  1. Run the build command:
pnpm build

Scripts

  1. Deploy the QV Impact stream strategy. (Verify the contract if it's not auto verified)
pnpm run deploy-strategy
  1. Update ALLO_STRATEGY_ADDRESS in .env with the deployed contract
  2. Update pool.data.json with the init data for pool creation. (verify the timstamps and allo strategy address)
  3. Create pool on Allo using deployed strategy
pnpm run create-pool
  1. Update ALLO_POOL_ID in .env with the pool Id
  2. Head over to impact-stream-app and update allo.config.ts with the right addresses and poolId
  3. Create Profiles from the Proposals in impact stream. (Each proposal has a profile on the registry)
pnpm run create-profiles
  1. 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
  2. Deploy Safe for the users
pnpm run deploy-safes
  1. Now we register the recipients
pnpm run register-recipients
  1. Now we register the allocators
pnpm run register-allocators
  1. Once the allocations have started, to get the payouts, run
pnpm run calculate-payouts
  1. Once the allocations has ended, to set the payouts on chain, run
pnpm run set-payouts
  1. To distribute payouts, run
pnpm run distribute-payouts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%