@gooddollar/goodprotocol 1.0.29-beta.4 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/abis/AdminWallet.min.json +1 -1
- package/artifacts/abis/GoodDollarMintBurnWrapper.min.json +1 -1
- package/artifacts/abis/GoodDollarStaking.min.json +1 -1
- package/artifacts/abis/GoodDollarStakingMock.min.json +1 -1
- package/artifacts/abis/IGoodDollar.min.json +1 -1
- package/artifacts/abis/IIdentity.min.json +1 -1
- package/artifacts/abis/UBIScheme.min.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/Avatar.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/Controller.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/GlobalConstraintInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/IntVoteInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/ReputationInterface.dbg.json +1 -1
- package/artifacts/contracts/DAOStackInterfaces.sol/SchemeRegistrar.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/AggregatorV3Interface.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ERC20.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAaveIncentivesController.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IAdminWallet.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IDonationStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IERC2917.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IFirstClaimPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IGoodDollar.json +0 -39
- package/artifacts/contracts/Interfaces.sol/IGoodStaking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IHasRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentity.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IIdentity.json +0 -51
- package/artifacts/contracts/Interfaces.sol/ILendingPool.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IMultichainRouter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/INameService.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/IUBIScheme.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ProxyAdmin.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Reserve.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/Uniswap.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapFactory.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/UniswapPair.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/cERC20.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.json +2 -2
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.json +2 -2
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.json +2 -2
- package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
- package/artifacts/contracts/governance/GReputation.sol/GReputation.json +2 -2
- package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.json +2 -15
- package/artifacts/contracts/governance/GoodDollarStaking.sol/RewardsMinter.dbg.json +1 -1
- package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.json +2 -2
- package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
- package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
- package/artifacts/contracts/governance/Reputation.sol/Reputation.json +2 -2
- package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.json +2 -2
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.json +2 -2
- package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionBridgeMock.sol/DistributionBridgeMock.json +2 -2
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.json +2 -2
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.json +2 -2
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.json +2 -2
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.json +2 -15
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.json +2 -2
- package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/IWrapper.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock.json +2 -2
- package/artifacts/contracts/mocks/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.json +2 -2
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.json +2 -2
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.json +2 -2
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.json +2 -2
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.json +2 -2
- package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.json +2 -2
- package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.json +2 -2
- package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.json +2 -2
- package/artifacts/contracts/reserve/GoodReserveCDai.sol/ContributionCalc.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodReserveCDai.sol/GoodReserveCDai.json +2 -2
- package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareField.sol/BaseShareField.json +2 -2
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.json +2 -2
- package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.json +2 -2
- package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.json +2 -2
- package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +1 -1
- package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.dbg.json +1 -1
- package/artifacts/contracts/staking/GoodFundManager.sol/GoodFundManager.json +2 -2
- package/artifacts/contracts/staking/SimpleStaking.sol/SimpleStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/SimpleStakingV2.sol/SimpleStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.dbg.json +1 -1
- package/artifacts/contracts/staking/UniswapV2SwapHelper.sol/UniswapV2SwapHelper.json +2 -2
- package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/AaveStakingFactory.sol/AaveStakingFactory.json +2 -2
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.json +2 -2
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.json +2 -2
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.json +2 -2
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.json +2 -2
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.json +2 -2
- package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
- package/artifacts/contracts/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.json +22 -15
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.json +56 -76
- package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkProof.sol/BulkProof.json +2 -2
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.json +2 -2
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.json +2 -2
- package/artifacts/contracts/utils/DSMath.sol/DSMath.dbg.json +1 -1
- package/artifacts/contracts/utils/DataTypes.sol/DataTypes.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.json +2 -16
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/IRouter.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/PausableControl.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/TokenOperation.json +2 -2
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.json +2 -2
- package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.json +2 -2
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.json +2 -2
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ERC1967Proxy.dbg.json +1 -1
- package/artifacts/contracts/utils/ProxyFactory1967.sol/ProxyFactory1967.dbg.json +1 -1
- package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/ReputationTestHelper.sol/ReputationTestHelper.json +2 -2
- package/contracts/Interfaces.sol +0 -26
- package/contracts/governance/GReputation.sol +6 -19
- package/contracts/governance/GoodDollarStaking.sol +9 -23
- package/contracts/ubi/UBIScheme.sol +40 -45
- package/contracts/utils/AdminWallet.sol +11 -42
- package/contracts/utils/GoodDollarMintBurnWrapper.sol +3 -13
- package/hardhat.config.ts +7 -21
- package/package.json +2 -3
- package/releases/deploy-settings.json +1 -36
- package/releases/deployment.json +53 -98
- package/scripts/analytics/gdinflow.ts +56 -0
- package/scripts/analytics/tokenInOutStats.ts +50 -0
- package/scripts/deployFullDAO.ts +19 -39
- package/scripts/multichain-deploy/{1_basicdao-deploy.ts → basicdao-deploy.ts} +52 -56
- package/scripts/multichain-deploy/{3_gdSavings-deploy.ts → gdSavings-deploy.ts} +76 -90
- package/scripts/multichain-deploy/helpers.ts +1 -0
- package/scripts/{upgrades → multichain-deploy}/nonubiDistribution-deploy.ts +5 -2
- package/scripts/test/localOldDaoDeploy.ts +3 -10
- package/test/helpers.ts +8 -12
- package/test/ubi/UBIScheme.test.ts +30 -30
- package/test/ubi/UBISchemeCycle.test.ts +7 -9
- package/test/utils/AdminWallet.test.ts +11 -33
- package/types/AdminWallet.ts +113 -124
- package/types/GoodDollarMintBurnWrapper.ts +0 -42
- package/types/GoodDollarStaking.ts +0 -34
- package/types/GoodDollarStakingMock.ts +0 -34
- package/types/IGoodDollar.ts +0 -54
- package/types/IIdentity.ts +0 -75
- package/types/UBIScheme.ts +40 -19
- package/types/factories/AaveStakingFactory__factory.ts +1 -1
- package/types/factories/AdminWallet__factory.ts +55 -75
- package/types/factories/BaseShareFieldV2__factory.ts +1 -1
- package/types/factories/BaseShareField__factory.ts +1 -1
- package/types/factories/ClaimersDistribution__factory.ts +1 -1
- package/types/factories/CompoundStakingFactory__factory.ts +1 -1
- package/types/factories/CompoundVotingMachine__factory.ts +1 -1
- package/types/factories/DAOContract__factory.ts +1 -1
- package/types/factories/DAOUpgradeableContract__factory.ts +1 -1
- package/types/factories/DistributionBridgeMock__factory.ts +1 -1
- package/types/factories/DistributionHelperTestHelper__factory.ts +1 -1
- package/types/factories/DistributionHelperTest__factory.ts +1 -1
- package/types/factories/DistributionHelper__factory.ts +1 -1
- package/types/factories/DonationsStaking__factory.ts +1 -1
- package/types/factories/ExchangeHelper__factory.ts +1 -1
- package/types/factories/FuseFaucet__factory.ts +1 -1
- package/types/factories/FuseStakingV3__factory.ts +1 -1
- package/types/factories/GReputation__factory.ts +1 -1
- package/types/factories/GoodAaveStakingV2__factory.ts +1 -1
- package/types/factories/GoodAaveStaking__factory.ts +1 -1
- package/types/factories/GoodCompoundStakingTest__factory.ts +1 -1
- package/types/factories/GoodCompoundStakingV2__factory.ts +1 -1
- package/types/factories/GoodCompoundStaking__factory.ts +1 -1
- package/types/factories/GoodDollarMintBurnWrapper__factory.ts +1 -15
- package/types/factories/GoodDollarStakingMock__factory.ts +1 -14
- package/types/factories/GoodDollarStaking__factory.ts +1 -14
- package/types/factories/GoodFundManagerTest__factory.ts +1 -1
- package/types/factories/GoodFundManager__factory.ts +1 -1
- package/types/factories/GoodMarketMaker__factory.ts +1 -1
- package/types/factories/GoodReserveCDai__factory.ts +1 -1
- package/types/factories/GovernanceStaking__factory.ts +1 -1
- package/types/factories/IGoodDollar__factory.ts +0 -39
- package/types/factories/IIdentity__factory.ts +0 -51
- package/types/factories/InvitesV1__factory.ts +1 -1
- package/types/factories/MultichainBridgeHelper__factory.ts +1 -1
- package/types/factories/MultichainRouterMock__factory.ts +1 -1
- package/types/factories/OverMintTesterRegularStake__factory.ts +1 -1
- package/types/factories/OverMintTester__factory.ts +1 -1
- package/types/factories/ProtocolUpgradeFuseRecover__factory.ts +1 -1
- package/types/factories/ProtocolUpgradeFuse__factory.ts +1 -1
- package/types/factories/ProtocolUpgradeRecover__factory.ts +1 -1
- package/types/factories/ProtocolUpgrade__factory.ts +1 -1
- package/types/factories/ReputationTestHelper__factory.ts +1 -1
- package/types/factories/Reputation__factory.ts +1 -1
- package/types/factories/StakersDistribution__factory.ts +1 -1
- package/types/factories/SwapHelperTest__factory.ts +1 -1
- package/types/factories/UBIScheme__factory.ts +21 -14
- package/types/factories/UniswapV2SwapHelper__factory.ts +1 -1
- package/types/factories/UpgradableMock2__factory.ts +1 -1
- package/types/factories/UpgradableMock3__factory.ts +1 -1
- package/types/factories/UpgradableMock4__factory.ts +1 -1
- package/types/factories/UpgradableMock__factory.ts +1 -1
- package/types/hardhat.d.ts +0 -54
- package/types/index.ts +0 -12
- package/yarn.lock +4 -4
- package/artifacts/abis/Faucet.min.json +0 -1
- package/artifacts/abis/IGovernanceStaking.min.json +0 -1
- package/artifacts/abis/IIdentityV2.min.json +0 -1
- package/artifacts/abis/IdentityV2.min.json +0 -1
- package/artifacts/abis/InvitesV2.min.json +0 -1
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +0 -4
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.json +0 -281
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +0 -4
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.json +0 -684
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +0 -4
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.json +0 -24
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +0 -4
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +0 -1000
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +0 -4
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.json +0 -586
- package/contracts/fuseFaucet/Faucet.sol +0 -247
- package/contracts/identity/IdentityV2.sol +0 -434
- package/contracts/invite/InvitesV2.sol +0 -316
- package/scripts/multichain-deploy/0_proxyFactory-deploy.ts +0 -45
- package/scripts/multichain-deploy/2_helpers-deploy.ts +0 -143
- package/scripts/multichain-deploy/4_ubi-deploy.ts +0 -121
- package/scripts/multichain-deploy/5_gov-deploy.ts +0 -123
- package/scripts/multichain-deploy/verifyEtherscan.ts +0 -112
- package/scripts/upgrades/identity-upgrade.ts +0 -153
- package/types/Faucet.ts +0 -1014
- package/types/IERC1271.ts +0 -109
- package/types/IGovernanceStaking.ts +0 -98
- package/types/IIdentityV2.ts +0 -526
- package/types/IdentityV2.ts +0 -1612
- package/types/InvitesV2.ts +0 -933
- package/types/factories/Faucet__factory.ts +0 -729
- package/types/factories/IERC1271__factory.ts +0 -47
- package/types/factories/IGovernanceStaking__factory.ts +0 -39
- package/types/factories/IIdentityV2__factory.ts +0 -293
- package/types/factories/IdentityV2__factory.ts +0 -1048
- package/types/factories/InvitesV2__factory.ts +0 -634
|
@@ -6,19 +6,21 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { network, ethers, upgrades, run } from "hardhat";
|
|
8
8
|
import { Contract } from "ethers";
|
|
9
|
-
import { defaultsDeep } from "lodash";
|
|
10
9
|
// import DAOCreatorABI from "@gooddollar/goodcontracts/build/contracts/DaoCreatorGoodDollar.json";
|
|
11
10
|
import DAOCreatorABI from "../../../GoodBootstrap/packages/contracts/build/contracts/DaoCreatorGoodDollarWithRep.json";
|
|
12
11
|
// import IdentityABI from "@gooddollar/goodcontracts/build/contracts/Identity.json";
|
|
12
|
+
import IdentityABI from "../../../GoodBootstrap/packages/contracts/build/contracts/IdentityWithOwner.json";
|
|
13
13
|
import FeeFormulaABI from "@gooddollar/goodcontracts/build/contracts/FeeFormula.json";
|
|
14
|
-
import AddFoundersABI from "@gooddollar/goodcontracts/build/contracts/AddFoundersGoodDollarWithRep.json";
|
|
14
|
+
import AddFoundersABI from "@gooddollar/goodcontracts/contracts/build/contracts/AddFoundersGoodDollarWithRep.json";
|
|
15
15
|
|
|
16
16
|
import { deployDeterministic } from "./helpers";
|
|
17
|
-
import releaser from "
|
|
17
|
+
import releaser from "../../scripts/releaser";
|
|
18
18
|
import ProtocolSettings from "../../releases/deploy-settings.json";
|
|
19
19
|
import dao from "../../releases/deployment.json";
|
|
20
20
|
import { TransactionResponse } from "@ethersproject/providers";
|
|
21
21
|
|
|
22
|
+
const { name } = network;
|
|
23
|
+
|
|
22
24
|
const printDeploy = async (
|
|
23
25
|
c: Contract | TransactionResponse
|
|
24
26
|
): Promise<Contract | TransactionResponse> => {
|
|
@@ -34,30 +36,22 @@ const printDeploy = async (
|
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
export const createDAO = async () => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
ProtocolSettings["default"]
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
let release: { [key: string]: any } = dao[network.name];
|
|
39
|
+
const fusedao = dao[network.name.split("-")[0]];
|
|
40
|
+
const protocolSettings = ProtocolSettings["production"];
|
|
41
|
+
let release: { [key: string]: any } = {};
|
|
44
42
|
|
|
45
|
-
let [root] = await ethers.getSigners();
|
|
46
|
-
const daoOwner = protocolSettings.guardiansSafe || root.address;
|
|
47
|
-
if (!daoOwner) throw new Error("missing DAO_OWNER owner in env");
|
|
43
|
+
let [root, ...signers] = await ethers.getSigners();
|
|
48
44
|
//generic call permissions
|
|
49
45
|
let schemeMock = root;
|
|
50
46
|
const isMainnet = network.name.includes("main");
|
|
51
47
|
|
|
52
48
|
console.log("got signers:", {
|
|
53
49
|
network,
|
|
54
|
-
daoOwner,
|
|
55
50
|
root: root.address,
|
|
56
51
|
schemeMock: schemeMock.address,
|
|
57
52
|
balance: await ethers.provider
|
|
58
53
|
.getBalance(root.address)
|
|
59
|
-
.then(_ => _.toString())
|
|
60
|
-
release
|
|
54
|
+
.then(_ => _.toString())
|
|
61
55
|
});
|
|
62
56
|
|
|
63
57
|
if (network.name.includes("production")) {
|
|
@@ -77,6 +71,11 @@ export const createDAO = async () => {
|
|
|
77
71
|
root
|
|
78
72
|
);
|
|
79
73
|
|
|
74
|
+
const IdentityFactory = new ethers.ContractFactory(
|
|
75
|
+
IdentityABI.abi,
|
|
76
|
+
IdentityABI.bytecode,
|
|
77
|
+
root
|
|
78
|
+
);
|
|
80
79
|
const FeeFormulaFactory = new ethers.ContractFactory(
|
|
81
80
|
FeeFormulaABI.abi,
|
|
82
81
|
FeeFormulaABI.bytecode,
|
|
@@ -91,27 +90,24 @@ export const createDAO = async () => {
|
|
|
91
90
|
const AddFounders = (await AddFoundersFactory.deploy().then(
|
|
92
91
|
printDeploy
|
|
93
92
|
)) as Contract;
|
|
93
|
+
// const AddFounders = await ethers.getContractAt(
|
|
94
|
+
// AddFoundersABI.abi,
|
|
95
|
+
// "0x6F1BAbfF5E119d61F0c6d8653d84E8B284B87091"
|
|
96
|
+
// );
|
|
94
97
|
|
|
95
|
-
const proxyFactory = await ethers.getContractAt(
|
|
96
|
-
"ProxyFactory1967",
|
|
97
|
-
release.ProxyFactory
|
|
98
|
-
);
|
|
99
|
-
const salt = ethers.BigNumber.from(
|
|
100
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("NameService"))
|
|
101
|
-
);
|
|
102
|
-
const nameserviceFutureAddress = await proxyFactory[
|
|
103
|
-
"getDeploymentAddress(uint256,address)"
|
|
104
|
-
](salt, root.address);
|
|
105
|
-
console.log("deploying identity", { nameserviceFutureAddress });
|
|
106
98
|
const Identity = (await deployDeterministic(
|
|
107
99
|
{
|
|
108
|
-
name: "
|
|
109
|
-
|
|
110
|
-
isUpgradeable: true
|
|
100
|
+
name: "Identity",
|
|
101
|
+
factory: IdentityFactory
|
|
111
102
|
},
|
|
112
|
-
[
|
|
103
|
+
[root.address]
|
|
113
104
|
).then(printDeploy)) as Contract;
|
|
114
105
|
|
|
106
|
+
// const Identity = await ethers.getContractAt(
|
|
107
|
+
// IdentityABI.abi,
|
|
108
|
+
// release.Identity
|
|
109
|
+
// );
|
|
110
|
+
|
|
115
111
|
const daoCreator = await DAOCreatorFactory.deploy(AddFounders.address);
|
|
116
112
|
|
|
117
113
|
const FeeFormula = (await deployDeterministic(
|
|
@@ -133,8 +129,8 @@ export const createDAO = async () => {
|
|
|
133
129
|
]
|
|
134
130
|
).then(printDeploy)) as Contract;
|
|
135
131
|
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
console.log("setting identity auth period");
|
|
133
|
+
await Identity.setAuthenticationPeriod(365).then(printDeploy);
|
|
138
134
|
|
|
139
135
|
console.log("creating dao");
|
|
140
136
|
await daoCreator
|
|
@@ -160,9 +156,20 @@ export const createDAO = async () => {
|
|
|
160
156
|
root
|
|
161
157
|
);
|
|
162
158
|
|
|
159
|
+
// const Avatar = new ethers.Contract(
|
|
160
|
+
// release.Avatar,
|
|
161
|
+
// [
|
|
162
|
+
// "function owner() view returns (address)",
|
|
163
|
+
// "function nativeToken() view returns (address)"
|
|
164
|
+
// ],
|
|
165
|
+
// root
|
|
166
|
+
// );
|
|
167
|
+
|
|
168
|
+
await Identity.setAvatar(Avatar.address).then(printDeploy);
|
|
169
|
+
|
|
163
170
|
console.log("Done deploying DAO, setting schemes permissions");
|
|
164
171
|
|
|
165
|
-
let schemes = [
|
|
172
|
+
let schemes = [process.env.DAO_OWNER, Identity.address];
|
|
166
173
|
|
|
167
174
|
const gd = await Avatar.nativeToken();
|
|
168
175
|
|
|
@@ -184,30 +191,24 @@ export const createDAO = async () => {
|
|
|
184
191
|
{ name: "NameService", isUpgradeable: true },
|
|
185
192
|
[
|
|
186
193
|
controller,
|
|
187
|
-
["CONTROLLER", "AVATAR", "IDENTITY", "GOODDOLLAR"
|
|
194
|
+
["CONTROLLER", "AVATAR", "IDENTITY", "GOODDOLLAR"].map(_ =>
|
|
188
195
|
ethers.utils.keccak256(ethers.utils.toUtf8Bytes(_))
|
|
189
196
|
),
|
|
190
|
-
[controller, Avatar.address, Identity.address, gd
|
|
197
|
+
[controller, Avatar.address, Identity.address, gd]
|
|
191
198
|
]
|
|
192
199
|
);
|
|
193
200
|
|
|
194
|
-
console.log("GRep nameservice:");
|
|
195
201
|
await (await GReputation.updateDAO(NameService.address)).wait();
|
|
196
|
-
console.log("
|
|
197
|
-
|
|
198
|
-
await Identity.initDAO(NameService.address).then(printDeploy);
|
|
199
|
-
|
|
202
|
+
console.log("GRep nameservice:");
|
|
200
203
|
//verifications
|
|
201
204
|
const Controller = await ethers.getContractAt("Controller", controller);
|
|
202
205
|
const GoodDollar = await ethers.getContractAt("IGoodDollar", gd);
|
|
203
206
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
await GoodDollar.renounceMinter().then(printDeploy);
|
|
207
|
-
}
|
|
207
|
+
await GoodDollar.renounceMinter().then(printDeploy);
|
|
208
|
+
await Identity.transferOwnership(process.env.DAO_OWNER).then(printDeploy);
|
|
208
209
|
|
|
209
210
|
const daoOwnerDaoPermissions = await Controller.getSchemePermissions(
|
|
210
|
-
|
|
211
|
+
process.env.DAO_OWNER,
|
|
211
212
|
Avatar.address
|
|
212
213
|
);
|
|
213
214
|
|
|
@@ -222,10 +223,8 @@ export const createDAO = async () => {
|
|
|
222
223
|
GReputation.MINTER_ROLE(),
|
|
223
224
|
Avatar.address
|
|
224
225
|
);
|
|
225
|
-
const daoOwnerIsIdentityOwner =
|
|
226
|
-
|
|
227
|
-
daoOwner
|
|
228
|
-
);
|
|
226
|
+
const daoOwnerIsIdentityOwner =
|
|
227
|
+
process.env.DAO_OWNER === (await Identity.owner());
|
|
229
228
|
|
|
230
229
|
//try to modify DAO -> should not succeed
|
|
231
230
|
await (await GReputation.updateDAO(ethers.constants.AddressZero)).wait();
|
|
@@ -244,21 +243,18 @@ export const createDAO = async () => {
|
|
|
244
243
|
});
|
|
245
244
|
|
|
246
245
|
release = {
|
|
247
|
-
|
|
246
|
+
ProxyFactory: "0x99C22e78A579e2176311c736C4c9F0b0D5A47806",
|
|
248
247
|
GoodDollar: gd,
|
|
249
248
|
Avatar: Avatar.address,
|
|
250
249
|
Controller: controller,
|
|
251
250
|
Identity: Identity.address,
|
|
252
251
|
NameService: NameService.address,
|
|
253
|
-
GReputation: GReputation.address
|
|
254
|
-
FeeFormula: FeeFormula.address,
|
|
255
|
-
DAOCreator: daoCreator.address,
|
|
256
|
-
AddFounders: AddFounders.address
|
|
252
|
+
GReputation: GReputation.address
|
|
257
253
|
};
|
|
258
254
|
await releaser(release, network.name, "deployment", false);
|
|
259
255
|
};
|
|
260
256
|
|
|
261
|
-
export const main = async () => {
|
|
257
|
+
export const main = async (networkName = name) => {
|
|
262
258
|
await createDAO().catch(console.log);
|
|
263
259
|
};
|
|
264
260
|
main();
|
|
@@ -19,13 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
import { network, ethers, upgrades, run } from "hardhat";
|
|
21
21
|
import { Contract, Signer } from "ethers";
|
|
22
|
-
import { defaultsDeep } from "lodash";
|
|
23
22
|
|
|
24
|
-
import {
|
|
25
|
-
deployDeterministic,
|
|
26
|
-
printDeploy,
|
|
27
|
-
executeViaGuardian
|
|
28
|
-
} from "./helpers";
|
|
23
|
+
import { deployDeterministic, printDeploy } from "./helpers";
|
|
29
24
|
import releaser from "../../scripts/releaser";
|
|
30
25
|
import ProtocolSettings from "../../releases/deploy-settings.json";
|
|
31
26
|
import dao from "../../releases/deployment.json";
|
|
@@ -38,16 +33,18 @@ import {
|
|
|
38
33
|
} from "../../types";
|
|
39
34
|
const { name: networkName } = network;
|
|
40
35
|
|
|
36
|
+
const BLOCKS_PER_YEAR = (12 * 60 * 24 * 365).toString();
|
|
37
|
+
const BLOCK_APY = "1000000007735630000";
|
|
38
|
+
|
|
41
39
|
export const deploySidechain = async () => {
|
|
42
40
|
const isProduction = networkName.includes("production");
|
|
43
41
|
let release: { [key: string]: any } = dao[networkName];
|
|
44
|
-
let settings = defaultsDeep(
|
|
45
|
-
{},
|
|
46
|
-
ProtocolSettings[networkName],
|
|
47
|
-
ProtocolSettings["default"]
|
|
48
|
-
);
|
|
49
42
|
|
|
50
|
-
let [root] = await ethers.getSigners();
|
|
43
|
+
let [root, ...signers] = await ethers.getSigners();
|
|
44
|
+
const proposer =
|
|
45
|
+
networkName !== "fuse"
|
|
46
|
+
? new ethers.Wallet(process.env.PROPOSER_KEY, ethers.provider)
|
|
47
|
+
: root; //need proposer with 0.3% of GOOD tokens
|
|
51
48
|
|
|
52
49
|
console.log("got signers:", {
|
|
53
50
|
networkName,
|
|
@@ -81,9 +78,9 @@ export const deploySidechain = async () => {
|
|
|
81
78
|
},
|
|
82
79
|
[
|
|
83
80
|
release.NameService,
|
|
84
|
-
ethers.BigNumber.from(
|
|
85
|
-
ethers.BigNumber.from(
|
|
86
|
-
|
|
81
|
+
ethers.BigNumber.from(BLOCK_APY),
|
|
82
|
+
ethers.BigNumber.from(BLOCKS_PER_YEAR),
|
|
83
|
+
networkName === "fuse" ? 7 : 30 //days until upgrade
|
|
87
84
|
]
|
|
88
85
|
).then(printDeploy)) as Contract;
|
|
89
86
|
|
|
@@ -98,32 +95,12 @@ export const deploySidechain = async () => {
|
|
|
98
95
|
release.GoodDollarStaking
|
|
99
96
|
);
|
|
100
97
|
}
|
|
101
|
-
if (networkName.includes("production"))
|
|
102
|
-
return console.log(
|
|
103
|
-
"Skipping proposal/upgrade for production, need to perform manually"
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
await executeProposal(GDSavings.address, Wrapper.address);
|
|
107
|
-
};
|
|
108
98
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const isProduction = networkName.includes("production");
|
|
115
|
-
let release: { [key: string]: any } = dao[networkName];
|
|
116
|
-
savingsAddress = savingsAddress || release.GoodDollarStaking;
|
|
117
|
-
wrapperAddress = wrapperAddress || release.GoodDollarMintBurnWrapper;
|
|
118
|
-
|
|
119
|
-
let [root] = await ethers.getSigners();
|
|
120
|
-
//on celo we dont need voting yet to deploy it.
|
|
121
|
-
//dev env dont use voting for test purposes
|
|
122
|
-
const proposer =
|
|
123
|
-
!networkName.includes("celo") &&
|
|
124
|
-
(isProduction || networkName.includes("staging"))
|
|
125
|
-
? new ethers.Wallet(process.env.PROPOSER_KEY, ethers.provider)
|
|
126
|
-
: root; //need proposer with 0.3% of GOOD tokens
|
|
99
|
+
//create proposal
|
|
100
|
+
const vm = (await ethers.getContractAt(
|
|
101
|
+
"CompoundVotingMachine",
|
|
102
|
+
release.CompoundVotingMachine
|
|
103
|
+
)) as CompoundVotingMachine;
|
|
127
104
|
|
|
128
105
|
const ctrl = (await ethers.getContractAt(
|
|
129
106
|
"Controller",
|
|
@@ -136,7 +113,7 @@ const executeProposal = async (
|
|
|
136
113
|
)) as NameService;
|
|
137
114
|
|
|
138
115
|
const proposalContracts = [
|
|
139
|
-
|
|
116
|
+
Wrapper.address, //MinterWrapper -> add GDSavings
|
|
140
117
|
ctrl.address, //controller -> add MinterWrapper as scheme
|
|
141
118
|
ctrl.address, // controller -> add GDSavings as scheme
|
|
142
119
|
ns.address //nameservice add MinterWrapper
|
|
@@ -145,10 +122,10 @@ const executeProposal = async (
|
|
|
145
122
|
const proposalEthValues = proposalContracts.map(_ => 0);
|
|
146
123
|
|
|
147
124
|
const proposalFunctionSignatures = [
|
|
148
|
-
"addMinter(address,uint256,uint256,uint32,uint256,uint256,uint32,bool)",
|
|
149
|
-
"registerScheme(address,bytes32,bytes4,address)",
|
|
150
|
-
"registerScheme(address,bytes32,bytes4,address)",
|
|
151
|
-
"setAddress(string,address)"
|
|
125
|
+
"addMinter(address,uint256,uint256,uint32,uint256,uint256,uint32,bool)",
|
|
126
|
+
"registerScheme(address,bytes32,bytes4,address)",
|
|
127
|
+
"registerScheme(address,bytes32,bytes4,address)",
|
|
128
|
+
"setAddress(string,address)"
|
|
152
129
|
];
|
|
153
130
|
|
|
154
131
|
const proposalFunctionInputs = [
|
|
@@ -163,12 +140,12 @@ const executeProposal = async (
|
|
|
163
140
|
"uint32",
|
|
164
141
|
"bool"
|
|
165
142
|
],
|
|
166
|
-
[
|
|
143
|
+
[GDSavings.address, 0, 0, 30, 0, 0, 0, true]
|
|
167
144
|
), //function addMinter(
|
|
168
145
|
ethers.utils.defaultAbiCoder.encode(
|
|
169
146
|
["address", "bytes32", "bytes4", "address"],
|
|
170
147
|
[
|
|
171
|
-
|
|
148
|
+
Wrapper.address, //scheme
|
|
172
149
|
ethers.constants.HashZero, //paramshash
|
|
173
150
|
"0x00000001", //permissions - minimal
|
|
174
151
|
release.Avatar
|
|
@@ -177,7 +154,7 @@ const executeProposal = async (
|
|
|
177
154
|
ethers.utils.defaultAbiCoder.encode(
|
|
178
155
|
["address", "bytes32", "bytes4", "address"],
|
|
179
156
|
[
|
|
180
|
-
|
|
157
|
+
GDSavings.address, //scheme
|
|
181
158
|
ethers.constants.HashZero, //paramshash
|
|
182
159
|
"0x000000f1", //permissions - genericcall
|
|
183
160
|
release.Avatar
|
|
@@ -185,62 +162,71 @@ const executeProposal = async (
|
|
|
185
162
|
),
|
|
186
163
|
ethers.utils.defaultAbiCoder.encode(
|
|
187
164
|
["string", "address"],
|
|
188
|
-
["MINTBURN_WRAPPER",
|
|
165
|
+
["MINTBURN_WRAPPER", Wrapper.address]
|
|
189
166
|
)
|
|
190
167
|
];
|
|
191
168
|
|
|
192
|
-
if (
|
|
193
|
-
|
|
194
|
-
console.log("upgrading via guardian...");
|
|
195
|
-
|
|
196
|
-
await executeViaGuardian(
|
|
169
|
+
if (networkName === "fuse") {
|
|
170
|
+
return executeViaGuardian(
|
|
197
171
|
proposalContracts,
|
|
198
172
|
proposalEthValues,
|
|
199
173
|
proposalFunctionSignatures,
|
|
200
174
|
proposalFunctionInputs,
|
|
201
175
|
root
|
|
202
176
|
);
|
|
203
|
-
} else if (isProduction) {
|
|
204
|
-
console.log("creating proposal...");
|
|
205
|
-
//create proposal
|
|
206
|
-
const vm = (await ethers.getContractAt(
|
|
207
|
-
"CompoundVotingMachine",
|
|
208
|
-
release.CompoundVotingMachine
|
|
209
|
-
)) as CompoundVotingMachine;
|
|
210
|
-
|
|
211
|
-
await vm
|
|
212
|
-
.connect(proposer)
|
|
213
|
-
["propose(address[],uint256[],string[],bytes[],string)"](
|
|
214
|
-
proposalContracts,
|
|
215
|
-
proposalEthValues,
|
|
216
|
-
proposalFunctionSignatures,
|
|
217
|
-
proposalFunctionInputs,
|
|
218
|
-
"https://discourse.gooddollar.org/t/gip-5-allocating-part-of-ubi-inflation-towards-g-savings-account/114/20"
|
|
219
|
-
)
|
|
220
|
-
.then(printDeploy);
|
|
221
177
|
}
|
|
222
178
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
179
|
+
console.log("creating proposal...");
|
|
180
|
+
await vm
|
|
181
|
+
.connect(proposer)
|
|
182
|
+
["propose(address[],uint256[],string[],bytes[],string)"](
|
|
183
|
+
proposalContracts,
|
|
184
|
+
proposalEthValues,
|
|
185
|
+
proposalFunctionSignatures,
|
|
186
|
+
proposalFunctionInputs,
|
|
187
|
+
"https://discourse.gooddollar.org/t/gip-5-allocating-part-of-ubi-inflation-towards-g-savings-account/114/20"
|
|
188
|
+
)
|
|
189
|
+
.then(printDeploy);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const executeViaGuardian = async (
|
|
193
|
+
contracts,
|
|
194
|
+
ethValues,
|
|
195
|
+
functionSigs,
|
|
196
|
+
functionInputs,
|
|
197
|
+
guardian: Signer
|
|
198
|
+
) => {
|
|
199
|
+
let release: { [key: string]: any } = dao[networkName];
|
|
200
|
+
const ctrl = await (
|
|
201
|
+
await ethers.getContractAt("Controller", release.Controller)
|
|
202
|
+
).connect(guardian);
|
|
203
|
+
|
|
204
|
+
for (let i = 0; i < contracts.length; i++) {
|
|
205
|
+
const contract = contracts[i];
|
|
206
|
+
console.log("executing:", contracts[i], functionSigs[i], functionInputs[i]);
|
|
207
|
+
const sigHash = ethers.utils
|
|
208
|
+
.keccak256(ethers.utils.toUtf8Bytes(functionSigs[i]))
|
|
209
|
+
.slice(0, 10);
|
|
210
|
+
const encoded = ethers.utils.solidityPack(
|
|
211
|
+
["bytes4", "bytes"],
|
|
212
|
+
[sigHash, functionInputs[i]]
|
|
213
|
+
);
|
|
214
|
+
if (contract === ctrl.address) {
|
|
215
|
+
console.log("executing directly on controller:", sigHash, encoded);
|
|
216
|
+
|
|
217
|
+
await guardian
|
|
218
|
+
.sendTransaction({ to: contract, data: encoded })
|
|
219
|
+
.then(printDeploy);
|
|
220
|
+
} else {
|
|
221
|
+
console.log("executing genericCall:", sigHash, encoded);
|
|
222
|
+
await ctrl
|
|
223
|
+
.genericCall(contract, encoded, release.Avatar, ethValues[i])
|
|
224
|
+
.then(printDeploy);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
240
227
|
};
|
|
241
228
|
|
|
242
229
|
export const main = async () => {
|
|
243
230
|
await deploySidechain().catch(console.log);
|
|
244
|
-
// await executeProposal(undefined, undefined);
|
|
245
231
|
};
|
|
246
232
|
if (process.argv[1].includes("gdSavings")) main();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Contract, ContractFactory, Signer } from "ethers";
|
|
2
2
|
import { network, ethers, upgrades, run } from "hardhat";
|
|
3
|
+
import { Contract } from "ethers";
|
|
3
4
|
import { TransactionResponse } from "@ethersproject/providers";
|
|
4
5
|
import dao from "../../releases/deployment.json";
|
|
5
6
|
|
|
@@ -11,15 +11,18 @@
|
|
|
11
11
|
* - add to the distributionHelper the GoodDollarMintBurnWrapper contract address on fuse as recipient with 100% bps
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { network, ethers } from "hardhat";
|
|
14
|
+
import { network, ethers, upgrades, run } from "hardhat";
|
|
15
|
+
import { Contract, Signer } from "ethers";
|
|
15
16
|
|
|
16
17
|
import {
|
|
17
18
|
deployDeterministic,
|
|
18
19
|
printDeploy,
|
|
19
20
|
executeViaGuardian
|
|
20
|
-
} from "
|
|
21
|
+
} from "./helpers";
|
|
21
22
|
import releaser from "../releaser";
|
|
23
|
+
import ProtocolSettings from "../../releases/deploy-settings.json";
|
|
22
24
|
import dao from "../../releases/deployment.json";
|
|
25
|
+
import { deployWrapper } from "./multichainWrapper-deploy";
|
|
23
26
|
import {
|
|
24
27
|
CompoundVotingMachine,
|
|
25
28
|
DistributionHelper,
|
|
@@ -23,7 +23,6 @@ import FundManager from "@gooddollar/goodcontracts/stakingModel/build/contracts/
|
|
|
23
23
|
import SimpleDAIStaking from "@gooddollar/goodcontracts/stakingModel/build/contracts/SimpleDAIStaking.json";
|
|
24
24
|
import BridgeMock from "@gooddollar/goodcontracts/stakingModel/build/contracts/BridgeMock.json";
|
|
25
25
|
import DonationsStaking from "@gooddollar/goodcontracts/upgradables/build/contracts/DonationsStaking.json";
|
|
26
|
-
import AdminWalletABI from "@gooddollar/goodcontracts/build/contracts/AdminWallet.json";
|
|
27
26
|
import OTPABI from "@gooddollar/goodcontracts/build/contracts/OneTimePayments.json";
|
|
28
27
|
|
|
29
28
|
import releaser from "../releaser";
|
|
@@ -107,15 +106,9 @@ export const deploy = async (networkName = name, single = false) => {
|
|
|
107
106
|
|
|
108
107
|
const deployAdminWallet = async dao => {
|
|
109
108
|
const signers = await ethers.getSigners();
|
|
110
|
-
const adminWallet = await
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
signers[0]
|
|
114
|
-
).deploy(
|
|
115
|
-
signers.slice(0, 10).map(_ => _.address),
|
|
116
|
-
ethers.utils.parseUnits("1000000", "gwei"),
|
|
117
|
-
4,
|
|
118
|
-
dao.identity
|
|
109
|
+
const adminWallet = await upgrades.deployProxy(
|
|
110
|
+
await ethers.getContractFactory("AdminWallet"),
|
|
111
|
+
[signers.slice(0, 20).map(_ => _.address), signers[0].address, dao.identity]
|
|
119
112
|
);
|
|
120
113
|
|
|
121
114
|
const id = await ethers.getContractAt("IIdentity", dao.identity);
|
package/test/helpers.ts
CHANGED
|
@@ -55,8 +55,11 @@ export const createDAO = async () => {
|
|
|
55
55
|
root
|
|
56
56
|
);
|
|
57
57
|
|
|
58
|
-
const IdentityFactory =
|
|
59
|
-
|
|
58
|
+
const IdentityFactory = new ethers.ContractFactory(
|
|
59
|
+
IdentityABI.abi,
|
|
60
|
+
IdentityABI.bytecode,
|
|
61
|
+
root
|
|
62
|
+
);
|
|
60
63
|
const FeeFormulaFactory = new ethers.ContractFactory(
|
|
61
64
|
FeeFormulaABI.abi,
|
|
62
65
|
FeeFormulaABI.bytecode,
|
|
@@ -72,16 +75,11 @@ export const createDAO = async () => {
|
|
|
72
75
|
await ethers.getContractFactory("BancorFormula")
|
|
73
76
|
).deploy();
|
|
74
77
|
const AddFounders = await AddFoundersFactory.deploy();
|
|
75
|
-
const Identity = await
|
|
76
|
-
IdentityFactory,
|
|
77
|
-
[root.address, ethers.constants.AddressZero],
|
|
78
|
-
{ kind: "uups" }
|
|
79
|
-
);
|
|
80
|
-
|
|
78
|
+
const Identity = await IdentityFactory.deploy();
|
|
81
79
|
const daoCreator = await DAOCreatorFactory.deploy(AddFounders.address);
|
|
82
80
|
const FeeFormula = await FeeFormulaFactory.deploy(0);
|
|
83
81
|
|
|
84
|
-
|
|
82
|
+
await Identity.setAuthenticationPeriod(365);
|
|
85
83
|
await daoCreator.forgeOrg(
|
|
86
84
|
"GoodDollar",
|
|
87
85
|
"G$",
|
|
@@ -102,7 +100,7 @@ export const createDAO = async () => {
|
|
|
102
100
|
root
|
|
103
101
|
);
|
|
104
102
|
|
|
105
|
-
|
|
103
|
+
await Identity.setAvatar(Avatar.address);
|
|
106
104
|
const controller = await Avatar.owner();
|
|
107
105
|
|
|
108
106
|
const ccFactory = new ethers.ContractFactory(
|
|
@@ -161,8 +159,6 @@ export const createDAO = async () => {
|
|
|
161
159
|
}
|
|
162
160
|
);
|
|
163
161
|
|
|
164
|
-
await Identity.initDAO(nameService.address);
|
|
165
|
-
|
|
166
162
|
console.log("deploying reserve...");
|
|
167
163
|
let goodReserve = await upgrades.deployProxy(
|
|
168
164
|
await ethers.getContractFactory("GoodReserveCDai"),
|