From 19700faee9fdc7cbe41b7231169223ee8e6ccfbf Mon Sep 17 00:00:00 2001 From: Mikhailo Shabodyash Date: Tue, 20 Aug 2024 13:27:26 +0300 Subject: [PATCH] feat: add config for votes distribution --- .../1722358576_launch_franchaisers.ts | 32 ++++++++++++------- scenario/constraints/ProposalConstraint.ts | 6 ++-- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/deployments/mainnet/usdc/migrations/1722358576_launch_franchaisers.ts b/deployments/mainnet/usdc/migrations/1722358576_launch_franchaisers.ts index 572a18094..664b1390b 100644 --- a/deployments/mainnet/usdc/migrations/1722358576_launch_franchaisers.ts +++ b/deployments/mainnet/usdc/migrations/1722358576_launch_franchaisers.ts @@ -6,19 +6,25 @@ import { expect } from 'chai'; const FRANCHAISER_FACTORY = '0xcd94088b74391dc0a22f0a9611a66dc44f70da72'; const chosenAddresses = [ - '0x4Ac0Dbce527bcb60787CEF10053348B146C6b5e3', - '0xE13C54214267675428Adf7E0af9DA433F5Ead460', - '0xb55a948763e0d386b6dEfcD8070a522216AE42b1', - '0x3FB19771947072629C8EEE7995a2eF23B72d4C8A', - '0x7B3c54e17d618CC94daDFe7671c1e2F50C4Ecc33', + '0x3FB19771947072629C8EEE7995a2eF23B72d4C8A', // PGov + '0x070341aA5Ed571f0FB2c4a5641409B1A46b4961b', // Franklin DAO + '0x0579A616689f7ed748dC07692A3F150D44b0CA09', // Arana Digital + '0x13BDaE8c5F0fC40231F0E6A4ad70196F59138548', // Michigan Blockchain + '0x66cD62c6F8A4BB0Cd8720488BCBd1A6221B765F9', // Allthecolors + '0xB49f8b8613bE240213C1827e2E576044fFEC7948', // Avantgarde Finance + '0xb35659cbac913D5E4119F2Af47fD490A45e2c826', // Event Horizon + '0x72C58877ef744b86F6ef416a3bE26Ec19d587708', // sharp ]; const amounts = [ - exp(5_000, 18), - exp(10_000, 18), - exp(15_000, 18), - exp(20_000, 18), - exp(25_000, 18), + exp(34_450, 18), + exp(9_999.76, 18), + exp(50_000, 18), + exp(29_999.88, 18), + exp(44_371.81, 18), + exp(29_999.85, 18), + exp(50_000, 18), + exp(1_178.7, 18), ]; const votesBefore: bigint[] = []; @@ -44,7 +50,7 @@ export default migration('1722358576_launch_franchaisers', { 'function fundMany(address[] calldata delegatees, uint256[] calldata amounts) external returns (address[] memory franchisers)', 'function getFranchiser(address owner, address delegatee) public view returns (address)', ], - ethers.getDefaultProvider(1) + deploymentManager.hre.ethers.provider ); const totalAmount = amounts.reduce((accumulator, currentValue) => accumulator + currentValue, 0n); @@ -102,8 +108,10 @@ export default migration('1722358576_launch_franchaisers', { 'function fundMany(address[] calldata delegatees, uint256[] calldata amounts) external returns(address[] memory franchisers)', 'function getFranchiser(address,address) external view returns(address)', ], - ethers.getDefaultProvider() + deploymentManager.hre.ethers.provider ); + const totalAmount = amounts.reduce((accumulator, currentValue) => accumulator + currentValue, 0n); + expect(totalAmount).to.be.equal(exp(250_000, 18)); for (let i = 0; i < chosenAddresses.length; i++) { const franchaiserAddress = await deploymentManager.retry( diff --git a/scenario/constraints/ProposalConstraint.ts b/scenario/constraints/ProposalConstraint.ts index 02ccc7407..141df1d66 100644 --- a/scenario/constraints/ProposalConstraint.ts +++ b/scenario/constraints/ProposalConstraint.ts @@ -62,9 +62,9 @@ export class ProposalConstraint implements StaticConstra ); } - // temporary hack to skip proposal 259 - if (proposal.id.eq(259)) { - console.log('Skipping proposal 259'); + // temporary hack to skip proposal 307 + if (proposal.id.eq(307)) { + console.log('Skipping proposal 307'); continue; }