@gooddollar/goodprotocol 1.0.29-beta.3 → 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/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 -94
- 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 -245
- 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 -84
- 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
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/***
|
|
2
|
-
* Deploy helper contracts
|
|
3
|
-
* AdminWallet, Faucet, Invites
|
|
4
|
-
*/
|
|
5
|
-
import { network, ethers, upgrades, run } from "hardhat";
|
|
6
|
-
import { Contract } from "ethers";
|
|
7
|
-
import { defaultsDeep } from "lodash";
|
|
8
|
-
import { deployDeterministic, executeViaGuardian } from "./helpers";
|
|
9
|
-
import releaser from "../releaser";
|
|
10
|
-
import ProtocolSettings from "../../releases/deploy-settings.json";
|
|
11
|
-
import dao from "../../releases/deployment.json";
|
|
12
|
-
import { TransactionResponse } from "@ethersproject/providers";
|
|
13
|
-
import { keccak256, toUtf8Bytes } from "ethers/lib/utils";
|
|
14
|
-
|
|
15
|
-
const { name } = network;
|
|
16
|
-
|
|
17
|
-
const printDeploy = async (
|
|
18
|
-
c: Contract | TransactionResponse
|
|
19
|
-
): Promise<Contract | TransactionResponse> => {
|
|
20
|
-
if (c instanceof Contract) {
|
|
21
|
-
await c.deployed();
|
|
22
|
-
console.log("deployed to: ", c.address);
|
|
23
|
-
}
|
|
24
|
-
if (c.wait) {
|
|
25
|
-
await c.wait();
|
|
26
|
-
console.log("tx done:", c.hash);
|
|
27
|
-
}
|
|
28
|
-
return c;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const deployGov = async () => {
|
|
32
|
-
let protocolSettings = defaultsDeep(
|
|
33
|
-
{},
|
|
34
|
-
ProtocolSettings[network.name],
|
|
35
|
-
ProtocolSettings["default"]
|
|
36
|
-
);
|
|
37
|
-
let release: { [key: string]: any } = dao[network.name];
|
|
38
|
-
|
|
39
|
-
let [root] = await ethers.getSigners();
|
|
40
|
-
const daoOwner = protocolSettings.guardiansSafe || root.address;
|
|
41
|
-
|
|
42
|
-
//generic call permissions
|
|
43
|
-
let schemeMock = root;
|
|
44
|
-
|
|
45
|
-
console.log("got signers:", {
|
|
46
|
-
network,
|
|
47
|
-
root: root.address,
|
|
48
|
-
schemeMock: schemeMock.address,
|
|
49
|
-
balance: await ethers.provider
|
|
50
|
-
.getBalance(root.address)
|
|
51
|
-
.then(_ => _.toString())
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
console.log("deploying voting machine");
|
|
55
|
-
|
|
56
|
-
const VotingMachine = (await deployDeterministic(
|
|
57
|
-
{
|
|
58
|
-
name: "CompoundVotingMachine",
|
|
59
|
-
isUpgradeable: true
|
|
60
|
-
},
|
|
61
|
-
[
|
|
62
|
-
release.NameService,
|
|
63
|
-
protocolSettings.governance.proposalVotingPeriod,
|
|
64
|
-
daoOwner,
|
|
65
|
-
release.GReputation
|
|
66
|
-
]
|
|
67
|
-
).then(printDeploy)) as Contract;
|
|
68
|
-
|
|
69
|
-
console.log("adding genericcall permissions to voting contract.");
|
|
70
|
-
const proposalContracts = [
|
|
71
|
-
release.Controller //nameservice add MinterWrapper
|
|
72
|
-
];
|
|
73
|
-
|
|
74
|
-
const proposalEthValues = proposalContracts.map(_ => 0);
|
|
75
|
-
|
|
76
|
-
const proposalFunctionSignatures = [
|
|
77
|
-
"registerScheme(address,bytes32,bytes4,address)" //make sure compoundvotingmachine has generic call so it can control the DAO
|
|
78
|
-
];
|
|
79
|
-
|
|
80
|
-
const proposalFunctionInputs = [
|
|
81
|
-
ethers.utils.defaultAbiCoder.encode(
|
|
82
|
-
["address", "bytes32", "bytes4", "address"],
|
|
83
|
-
[
|
|
84
|
-
VotingMachine.address,
|
|
85
|
-
ethers.constants.HashZero,
|
|
86
|
-
"0x000000f1",
|
|
87
|
-
release.Avatar
|
|
88
|
-
]
|
|
89
|
-
)
|
|
90
|
-
];
|
|
91
|
-
|
|
92
|
-
await executeViaGuardian(
|
|
93
|
-
proposalContracts,
|
|
94
|
-
proposalEthValues,
|
|
95
|
-
proposalFunctionSignatures,
|
|
96
|
-
proposalFunctionInputs,
|
|
97
|
-
root
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
const Controller = await ethers.getContractAt(
|
|
101
|
-
"Controller",
|
|
102
|
-
release.Controller
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
const votingMachineDaoPermissions = await Controller.getSchemePermissions(
|
|
106
|
-
daoOwner,
|
|
107
|
-
release.Avatar
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
console.log({
|
|
111
|
-
votingMachineDaoPermissions
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
release = {
|
|
115
|
-
CompoundVotingMachine: VotingMachine.address
|
|
116
|
-
};
|
|
117
|
-
await releaser(release, network.name, "deployment", false);
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export const main = async (networkName = name) => {
|
|
121
|
-
await deployGov().catch(console.log);
|
|
122
|
-
};
|
|
123
|
-
main();
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { run, network, ethers } from "hardhat";
|
|
2
|
-
import { omit } from "lodash";
|
|
3
|
-
import dao from "../../releases/deployment.json";
|
|
4
|
-
|
|
5
|
-
const getImplementationAddress = async addr => {
|
|
6
|
-
console.log("finding impl for:", addr);
|
|
7
|
-
let proxy = await ethers.provider.getStorageAt(
|
|
8
|
-
addr,
|
|
9
|
-
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"
|
|
10
|
-
);
|
|
11
|
-
let res = addr;
|
|
12
|
-
if (proxy != ethers.constants.HashZero) res = "0x" + proxy.slice(-40);
|
|
13
|
-
else {
|
|
14
|
-
const code = await ethers.getDefaultProvider().getCode(addr);
|
|
15
|
-
if (code.startsWith("0x363d3d373d3d3d363d73"))
|
|
16
|
-
res = "0x" + code.slice(22, 62);
|
|
17
|
-
}
|
|
18
|
-
console.log("impl address for:", addr, res);
|
|
19
|
-
return res;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const main = async () => {
|
|
23
|
-
const release = dao[network.name];
|
|
24
|
-
// const impl = await getImplementationAddress(release.AdminWallet);
|
|
25
|
-
// console.log({ impl, aw: release.AdminWallet });
|
|
26
|
-
const toVerify = omit(release, [
|
|
27
|
-
"GoodDollar",
|
|
28
|
-
"Avatar",
|
|
29
|
-
"Controller",
|
|
30
|
-
"DAOCreator",
|
|
31
|
-
"AddFounders",
|
|
32
|
-
"FeeFormula"
|
|
33
|
-
]);
|
|
34
|
-
//verify the first proxy
|
|
35
|
-
const identityProxy = toVerify["Identity"];
|
|
36
|
-
await run("verify:verify", {
|
|
37
|
-
address: identityProxy,
|
|
38
|
-
contract: "contracts/utils/ProxyFactory1967.sol:ERC1967Proxy"
|
|
39
|
-
}).catch(e =>
|
|
40
|
-
console.log("failed verifying proxy:", identityProxy, e.message)
|
|
41
|
-
);
|
|
42
|
-
for (let key in toVerify) {
|
|
43
|
-
const address = toVerify[key];
|
|
44
|
-
// }
|
|
45
|
-
// const ps = Object.entries(toVerify).map(([key, address]) => {
|
|
46
|
-
let contract;
|
|
47
|
-
switch (key) {
|
|
48
|
-
case "AdminWallet":
|
|
49
|
-
contract = "contracts/utils/AdminWallet.sol:AdminWallet";
|
|
50
|
-
break;
|
|
51
|
-
case "Faucet":
|
|
52
|
-
contract = "contracts/fuseFaucet/Faucet.sol:Faucet";
|
|
53
|
-
break;
|
|
54
|
-
case "Invites":
|
|
55
|
-
contract = "contracts/invite/InvitesV2.sol:InvitesV2";
|
|
56
|
-
break;
|
|
57
|
-
case "ProxyFactory":
|
|
58
|
-
contract = "contracts/utils/ProxyFactory1967.sol:ProxyFactory1967";
|
|
59
|
-
break;
|
|
60
|
-
case "NameService":
|
|
61
|
-
contract = "contracts/utils/NameService.sol:NameService";
|
|
62
|
-
break;
|
|
63
|
-
case "GReputation":
|
|
64
|
-
contract = "contracts/governance/GReputation.sol:GReputation";
|
|
65
|
-
break;
|
|
66
|
-
case "Identity":
|
|
67
|
-
contract = "contracts/identity/IdentityV2.sol:IdentityV2";
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
contract = undefined;
|
|
71
|
-
}
|
|
72
|
-
console.log("verifying:", address, contract);
|
|
73
|
-
await run("verify", {
|
|
74
|
-
address,
|
|
75
|
-
contract
|
|
76
|
-
}).catch(e =>
|
|
77
|
-
console.log("failed verifying:", address, contract, e.message)
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// await Promise.all(ps);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
main().catch(e => console.log(e));
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/***
|
|
2
|
-
* Upgrade Plan:
|
|
3
|
-
* - deploy Identity (if on production)
|
|
4
|
-
* - give adminWallet admin permissions
|
|
5
|
-
* - revoke deployer permissions
|
|
6
|
-
* - replace pointers to old identity contract in:
|
|
7
|
-
* - GoodDollar token
|
|
8
|
-
* - NameService
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { network, ethers } from "hardhat";
|
|
12
|
-
import { Contract, Signer } from "ethers";
|
|
13
|
-
import {
|
|
14
|
-
deployDeterministic,
|
|
15
|
-
printDeploy,
|
|
16
|
-
executeViaGuardian
|
|
17
|
-
} from "../multichain-deploy/helpers";
|
|
18
|
-
|
|
19
|
-
import releaser from "../../scripts/releaser";
|
|
20
|
-
|
|
21
|
-
import dao from "../../releases/deployment.json";
|
|
22
|
-
import { DistributionHelper, Controller, NameService } from "../../types";
|
|
23
|
-
const { name: networkName } = network;
|
|
24
|
-
|
|
25
|
-
export const upgrade = async () => {
|
|
26
|
-
let release: { [key: string]: any } = dao[networkName];
|
|
27
|
-
const isProduction = networkName.includes("production");
|
|
28
|
-
|
|
29
|
-
let [root, ...signers] = await ethers.getSigners();
|
|
30
|
-
|
|
31
|
-
console.log("got signers:", {
|
|
32
|
-
networkName,
|
|
33
|
-
root: root.address,
|
|
34
|
-
balance: await ethers.provider
|
|
35
|
-
.getBalance(root.address)
|
|
36
|
-
.then(_ => _.toString())
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
let Identity = await ethers.getContractAt("IdentityV2", release.Identity);
|
|
40
|
-
if (isProduction) {
|
|
41
|
-
console.log("deploying new identity on production");
|
|
42
|
-
Identity = (await deployDeterministic(
|
|
43
|
-
{
|
|
44
|
-
name: "IdentityV2",
|
|
45
|
-
salt: "Identity",
|
|
46
|
-
isUpgradeable: true
|
|
47
|
-
},
|
|
48
|
-
[root, release.Identity]
|
|
49
|
-
).then(printDeploy)) as Contract;
|
|
50
|
-
let torelease = {
|
|
51
|
-
Identity: Identity.address,
|
|
52
|
-
IdentityOld: release.Identity
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
await releaser(torelease, networkName, "deployment", false);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
await executeProposal(Identity.address);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const executeProposal = async (identityAddress: string) => {
|
|
62
|
-
console.log("executing identity proposal");
|
|
63
|
-
const isProduction = networkName.includes("production");
|
|
64
|
-
let release: { [key: string]: any } = dao[networkName];
|
|
65
|
-
identityAddress = identityAddress || release.Identity;
|
|
66
|
-
|
|
67
|
-
let [root] = await ethers.getSigners();
|
|
68
|
-
//on celo we dont need voting yet to deploy it.
|
|
69
|
-
//dev env dont use voting for test purposes
|
|
70
|
-
const proposer =
|
|
71
|
-
!networkName.includes("celo") &&
|
|
72
|
-
(isProduction || networkName.includes("staging"))
|
|
73
|
-
? new ethers.Wallet(process.env.PROPOSER_KEY, ethers.provider)
|
|
74
|
-
: root; //need proposer with 0.3% of GOOD tokens
|
|
75
|
-
|
|
76
|
-
const ctrl = (await ethers.getContractAt(
|
|
77
|
-
"Controller",
|
|
78
|
-
release.Controller
|
|
79
|
-
)) as Controller;
|
|
80
|
-
|
|
81
|
-
const ns = (await ethers.getContractAt(
|
|
82
|
-
"NameService",
|
|
83
|
-
release.NameService
|
|
84
|
-
)) as NameService;
|
|
85
|
-
|
|
86
|
-
const GoodDollar = await ethers.getContractAt(
|
|
87
|
-
"IGoodDollar",
|
|
88
|
-
release.GoodDollar
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
const proposalContracts = [
|
|
92
|
-
GoodDollar.address, //controller -> set new identity in G$
|
|
93
|
-
ns.address //nameservice modify to new Identity
|
|
94
|
-
];
|
|
95
|
-
|
|
96
|
-
const proposalEthValues = proposalContracts.map(_ => 0);
|
|
97
|
-
|
|
98
|
-
const proposalFunctionSignatures = [
|
|
99
|
-
"setIdentity(address)", //set Identity on GoodDollar token
|
|
100
|
-
"setAddress(string,address)" //set new identity address in nameservice
|
|
101
|
-
];
|
|
102
|
-
|
|
103
|
-
const proposalFunctionInputs = [
|
|
104
|
-
ethers.utils.defaultAbiCoder.encode(["address"], [identityAddress]),
|
|
105
|
-
ethers.utils.defaultAbiCoder.encode(
|
|
106
|
-
["string", "address"],
|
|
107
|
-
["IDENTITY", identityAddress]
|
|
108
|
-
)
|
|
109
|
-
];
|
|
110
|
-
|
|
111
|
-
if (!isProduction && networkName != "staging") {
|
|
112
|
-
//on fuse staging also use voting for testing
|
|
113
|
-
console.log("upgrading via guardian...");
|
|
114
|
-
|
|
115
|
-
await executeViaGuardian(
|
|
116
|
-
proposalContracts,
|
|
117
|
-
proposalEthValues,
|
|
118
|
-
proposalFunctionSignatures,
|
|
119
|
-
proposalFunctionInputs,
|
|
120
|
-
root
|
|
121
|
-
);
|
|
122
|
-
} else if (isProduction) {
|
|
123
|
-
console.log("creating proposal...");
|
|
124
|
-
//create proposal
|
|
125
|
-
const vm = await ethers.getContractAt(
|
|
126
|
-
"CompoundVotingMachine",
|
|
127
|
-
release.CompoundVotingMachine
|
|
128
|
-
);
|
|
129
|
-
|
|
130
|
-
await vm
|
|
131
|
-
.connect(proposer)
|
|
132
|
-
["propose(address[],uint256[],string[],bytes[],string)"](
|
|
133
|
-
proposalContracts,
|
|
134
|
-
proposalEthValues,
|
|
135
|
-
proposalFunctionSignatures,
|
|
136
|
-
proposalFunctionInputs,
|
|
137
|
-
"upgrade identity"
|
|
138
|
-
)
|
|
139
|
-
.then(printDeploy);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
const gdIdentity = await GoodDollar.identity();
|
|
143
|
-
const nsIdentity = await ns.getAddress("IDENTITY");
|
|
144
|
-
console.log({
|
|
145
|
-
nameService: nsIdentity == identityAddress,
|
|
146
|
-
gdIdentity: gdIdentity == identityAddress
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export const main = async () => {
|
|
151
|
-
await upgrade().catch(console.log);
|
|
152
|
-
};
|
|
153
|
-
main();
|