@gooddollar/goodprotocol 1.0.29-beta.1 → 1.0.29-beta.3
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/Faucet.min.json +1 -0
- 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/IGovernanceStaking.min.json +1 -0
- package/artifacts/abis/IIdentity.min.json +1 -1
- package/artifacts/abis/IIdentityV2.min.json +1 -0
- package/artifacts/abis/IdentityV2.min.json +1 -0
- package/artifacts/abis/InvitesV2.min.json +1 -0
- 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 +39 -0
- 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 +51 -0
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.dbg.json +4 -0
- package/artifacts/contracts/Interfaces.sol/IIdentityV2.json +281 -0
- 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/Faucet.sol/Faucet.dbg.json +4 -0
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.json +684 -0
- 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 +15 -2
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +4 -0
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.json +24 -0
- 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/identity/IdentityV2.sol/IdentityV2.dbg.json +4 -0
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.json +1000 -0
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.json +2 -2
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +4 -0
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.json +586 -0
- 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 +15 -2
- 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 +15 -22
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.json +76 -56
- 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 -2
- 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 +26 -0
- package/contracts/fuseFaucet/Faucet.sol +245 -0
- package/contracts/governance/GoodDollarStaking.sol +23 -9
- package/contracts/identity/IdentityV2.sol +434 -0
- package/contracts/invite/InvitesV2.sol +316 -0
- package/contracts/ubi/UBIScheme.sol +45 -40
- package/contracts/utils/AdminWallet.sol +42 -11
- package/hardhat.config.ts +16 -2
- package/package.json +3 -2
- package/releases/deploy-settings.json +36 -1
- package/releases/deployment.json +93 -52
- package/scripts/deployFullDAO.ts +39 -19
- package/scripts/multichain-deploy/0_proxyFactory-deploy.ts +45 -0
- package/scripts/multichain-deploy/{basicdao-deploy.ts → 1_basicdao-deploy.ts} +56 -52
- package/scripts/multichain-deploy/2_helpers-deploy.ts +143 -0
- package/scripts/multichain-deploy/{gdSavings-deploy.ts → 3_gdSavings-deploy.ts} +90 -76
- package/scripts/multichain-deploy/4_ubi-deploy.ts +121 -0
- package/scripts/multichain-deploy/5_gov-deploy.ts +123 -0
- package/scripts/multichain-deploy/helpers.ts +0 -1
- package/scripts/multichain-deploy/verifyEtherscan.ts +84 -0
- package/scripts/test/localOldDaoDeploy.ts +10 -3
- package/scripts/upgrades/identity-upgrade.ts +153 -0
- package/scripts/{multichain-deploy → upgrades}/nonubiDistribution-deploy.ts +2 -5
- package/test/helpers.ts +12 -8
- package/test/ubi/UBIScheme.test.ts +30 -30
- package/test/ubi/UBISchemeCycle.test.ts +9 -7
- package/test/utils/AdminWallet.test.ts +33 -11
- package/types/AdminWallet.ts +124 -113
- package/types/Faucet.ts +1014 -0
- package/types/GoodDollarStaking.ts +34 -0
- package/types/GoodDollarStakingMock.ts +34 -0
- package/types/IERC1271.ts +109 -0
- package/types/IGoodDollar.ts +54 -0
- package/types/IGovernanceStaking.ts +98 -0
- package/types/IIdentity.ts +75 -0
- package/types/IIdentityV2.ts +526 -0
- package/types/IdentityV2.ts +1612 -0
- package/types/InvitesV2.ts +933 -0
- package/types/UBIScheme.ts +19 -40
- package/types/factories/AaveStakingFactory__factory.ts +1 -1
- package/types/factories/AdminWallet__factory.ts +75 -55
- 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/Faucet__factory.ts +729 -0
- 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 -1
- package/types/factories/GoodDollarStakingMock__factory.ts +14 -1
- package/types/factories/GoodDollarStaking__factory.ts +14 -1
- 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/IERC1271__factory.ts +47 -0
- package/types/factories/IGoodDollar__factory.ts +39 -0
- package/types/factories/IGovernanceStaking__factory.ts +39 -0
- package/types/factories/IIdentityV2__factory.ts +293 -0
- package/types/factories/IIdentity__factory.ts +51 -0
- package/types/factories/IdentityV2__factory.ts +1048 -0
- package/types/factories/InvitesV1__factory.ts +1 -1
- package/types/factories/InvitesV2__factory.ts +634 -0
- 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 +14 -21
- 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 +54 -0
- package/types/index.ts +12 -0
- package/yarn.lock +4 -4
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"default": {
|
|
3
3
|
"governance": {
|
|
4
|
+
"gdaoAirdrop": "0x2feece0e9bc03b54e63e6eb7abb81a128f6bc7ce9a3bafd5ca2bea0c40e3634b",
|
|
5
|
+
"gdaoTotalSupply": "24000000000000000000000000",
|
|
4
6
|
"proposalVotingPeriod": 241920
|
|
5
7
|
},
|
|
8
|
+
"guardiansSafe": null,
|
|
9
|
+
"walletAdminsCount": 10,
|
|
10
|
+
"gasPrice": 100000000,
|
|
6
11
|
"compound": {},
|
|
7
12
|
"aave": {},
|
|
8
13
|
"expansionRatio": {
|
|
@@ -20,6 +25,14 @@
|
|
|
20
25
|
"GoodAaveStaking": {
|
|
21
26
|
"stkAaveClaimCost": 50000,
|
|
22
27
|
"CollectInterestGasCost": 250000
|
|
28
|
+
},
|
|
29
|
+
"savings": {
|
|
30
|
+
"blockAPY": "1000000007735630000",
|
|
31
|
+
"daysUntilUpgrade": "7",
|
|
32
|
+
"blocksPerYear": "6307200"
|
|
33
|
+
},
|
|
34
|
+
"ubi": {
|
|
35
|
+
"maxInactiveDays": 14
|
|
23
36
|
}
|
|
24
37
|
},
|
|
25
38
|
"develop": {
|
|
@@ -47,7 +60,9 @@
|
|
|
47
60
|
"gdaoAirdrop": "0x2feece0e9bc03b54e63e6eb7abb81a128f6bc7ce9a3bafd5ca2bea0c40e3634b",
|
|
48
61
|
"gdaoTotalSupply": "24000000000000000000000000",
|
|
49
62
|
"proposalVotingPeriod": 241920
|
|
50
|
-
}
|
|
63
|
+
},
|
|
64
|
+
"walletAdminsCount": 10,
|
|
65
|
+
"gasPrice": 1000000000
|
|
51
66
|
},
|
|
52
67
|
"dapptest-mainnet": {
|
|
53
68
|
"gdxAirdrop": "0x707f775d730a9b17ee62c21e00188da4dff26602a58c338269cd115f30acbe2f",
|
|
@@ -84,6 +99,9 @@
|
|
|
84
99
|
"gdaoAirdrop": "0x2feece0e9bc03b54e63e6eb7abb81a128f6bc7ce9a3bafd5ca2bea0c40e3634b",
|
|
85
100
|
"gdaoTotalSupply": "24000000000000000000000000",
|
|
86
101
|
"proposalVotingPeriod": 241920
|
|
102
|
+
},
|
|
103
|
+
"savings": {
|
|
104
|
+
"daysUntilUpgrade": "7"
|
|
87
105
|
}
|
|
88
106
|
},
|
|
89
107
|
"fuse-mainnet": {
|
|
@@ -193,6 +211,9 @@
|
|
|
193
211
|
"gdaoTotalSupply": "96000000000000000000000000",
|
|
194
212
|
"proposalVotingPeriod": 241920,
|
|
195
213
|
"guardian": "0x914dA3B2508634998d244059dAb5488D9bA1814f"
|
|
214
|
+
},
|
|
215
|
+
"savings": {
|
|
216
|
+
"daysUntilUpgrade": 30
|
|
196
217
|
}
|
|
197
218
|
},
|
|
198
219
|
"production-mainnet": {
|
|
@@ -224,5 +245,19 @@
|
|
|
224
245
|
"eth_usd": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419"
|
|
225
246
|
},
|
|
226
247
|
"uniswapRouter": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
|
|
248
|
+
},
|
|
249
|
+
"staging-celo": {
|
|
250
|
+
"guardiansSafe": "0xdF3e980a175904a26A7BA627048a789Ae6A141cD",
|
|
251
|
+
"gasPrice": 150000000
|
|
252
|
+
},
|
|
253
|
+
"production-celo": {
|
|
254
|
+
"governance": {
|
|
255
|
+
"gdaoAirdrop": "0x2feece0e9bc03b54e63e6eb7abb81a128f6bc7ce9a3bafd5ca2bea0c40e3634b",
|
|
256
|
+
"gdaoTotalSupply": "96000000000000000000000000",
|
|
257
|
+
"proposalVotingPeriod": 241920,
|
|
258
|
+
"guardian": "0x914dA3B2508634998d244059dAb5488D9bA1814f"
|
|
259
|
+
},
|
|
260
|
+
"gasPrice": 150000000,
|
|
261
|
+
"guardiansSafe": "0xC9D09BA972B4EB6Bb7347F2229FB6d50434fFCa6"
|
|
227
262
|
}
|
|
228
263
|
}
|
package/releases/deployment.json
CHANGED
|
@@ -198,74 +198,77 @@
|
|
|
198
198
|
"FeeFormula": "0x416B5A5e12235De6838D62Fd053e7Ce59E944426"
|
|
199
199
|
},
|
|
200
200
|
"dapptest": {
|
|
201
|
-
"NameService": "
|
|
202
|
-
"GReputation": "
|
|
203
|
-
"CompoundVotingMachine": "
|
|
204
|
-
"ClaimersDistribution": "
|
|
205
|
-
"GovernanceStaking": "
|
|
206
|
-
"UBIScheme": "
|
|
207
|
-
"ProtocolUpgradeFuse": "
|
|
208
|
-
"HomeBridge": "
|
|
209
|
-
"AdminWallet": "
|
|
210
|
-
"Identity": "
|
|
211
|
-
"GoodDollar": "
|
|
212
|
-
"Controller": "
|
|
213
|
-
"Avatar": "
|
|
214
|
-
"FirstClaimPool": "
|
|
215
|
-
"BancorFormula": "
|
|
201
|
+
"NameService": "0xb239f127ec7e3972e7D119A28C7133EA2Da1E48B",
|
|
202
|
+
"GReputation": "0xB002b01194a459a8177eff2E962455F92ac389cc",
|
|
203
|
+
"CompoundVotingMachine": "0xa5cA8E6C1071A32fe951aA5b1c9580624dA91e9d",
|
|
204
|
+
"ClaimersDistribution": "0xFb1a81A9907deE3719C6caB552dAD568097eF990",
|
|
205
|
+
"GovernanceStaking": "0x8ac87219a0F5639BC01b470F87BA2b26356CB2B9",
|
|
206
|
+
"UBIScheme": "0x209C0bD29eBbc2b29cc7D14749B1C0405FBe752c",
|
|
207
|
+
"ProtocolUpgradeFuse": "0xdF46e54aAadC1d55198A4a8b4674D7a4c927097A",
|
|
208
|
+
"HomeBridge": "0xb932C8342106776E73E39D695F3FFC3A9624eCE0",
|
|
209
|
+
"AdminWallet": "0xd9fEc8238711935D6c8d79Bef2B9546ef23FC046",
|
|
210
|
+
"Identity": "0xb185E9f6531BA9877741022C92CE858cDCc5760E",
|
|
211
|
+
"GoodDollar": "0xd04Fe2BB71024dAae0FB7Eb72983ffE2287EE6c6",
|
|
212
|
+
"Controller": "0x2fd807D24be2c4F06Edf4351AF78c4b6984A15c1",
|
|
213
|
+
"Avatar": "0x2E571dc3F27343Bcd3c7d69aA213543EE3551812",
|
|
214
|
+
"FirstClaimPool": "0x3C1Cb427D20F15563aDa8C249E71db76d7183B6c",
|
|
215
|
+
"BancorFormula": "0x0fe4223AD99dF788A6Dcad148eB4086E6389cEB6",
|
|
216
216
|
"DAI": "0x0000000000000000000000000000000000000000",
|
|
217
217
|
"cDAI": "0x0000000000000000000000000000000000000000",
|
|
218
218
|
"COMP": "0x0000000000000000000000000000000000000000",
|
|
219
219
|
"networkId": 4447,
|
|
220
220
|
"network": "dapptest",
|
|
221
|
-
"FeeFormula": "
|
|
222
|
-
"OneTimePayments": "
|
|
223
|
-
"Invites": "
|
|
224
|
-
"FuseFaucet": "
|
|
225
|
-
"ProxyFactory": "
|
|
221
|
+
"FeeFormula": "0x193521C8934bCF3473453AF4321911E7A89E0E12",
|
|
222
|
+
"OneTimePayments": "0x22a9B82A6c3D2BFB68F324B2e8367f346Dd6f32a",
|
|
223
|
+
"Invites": "0x547382C0D1b23f707918D3c83A77317B71Aa8470",
|
|
224
|
+
"FuseFaucet": "0x7C8BaafA542c57fF9B2B90612bf8aB9E86e22C09",
|
|
225
|
+
"ProxyFactory": "0xaC47e91215fb80462139756f43438402998E4A3a",
|
|
226
|
+
"Faucet": "0x7bEf5612eC11446539C55ffD43B625b3472Cb7df",
|
|
227
|
+
"GoodDollarMintBurnWrapper": "0x214a2cCD52eC9c1A0e0E4719C3c5115aa297A9c5",
|
|
228
|
+
"GoodDollarStaking": "0x29be9D4e2aEe72C6Edbd6231f276A544296cc4F9"
|
|
226
229
|
},
|
|
227
230
|
"dapptest-mainnet": {
|
|
228
|
-
"NameService": "
|
|
229
|
-
"GReputation": "
|
|
230
|
-
"CompoundVotingMachine": "
|
|
231
|
-
"GoodMarketMaker": "
|
|
232
|
-
"GoodReserveCDai": "
|
|
233
|
-
"ExchangeHelper": "
|
|
234
|
-
"GoodFundManager": "
|
|
235
|
-
"StakersDistribution": "
|
|
236
|
-
"ProtocolUpgrade": "
|
|
237
|
-
"CompoundStakingFactory": "
|
|
238
|
-
"AaveStakingFactory": "
|
|
239
|
-
"ForeignBridge": "
|
|
240
|
-
"Contribution": "
|
|
231
|
+
"NameService": "0xA2c7592B4247006E41E8a0886Db287f6BA3DC049",
|
|
232
|
+
"GReputation": "0xEce03a3bCE02D078fE865f3325fd494a6824825F",
|
|
233
|
+
"CompoundVotingMachine": "0xb22B8BF2513009a3DE34c660e1E47ad088BE80e3",
|
|
234
|
+
"GoodMarketMaker": "0x57397a279Ac60DE40064B1ff19bc81bBB8F9f3bD",
|
|
235
|
+
"GoodReserveCDai": "0x142D861B73c5C844DAC197b8d39Aeb2e4A3E71b3",
|
|
236
|
+
"ExchangeHelper": "0x0a0007808320f9370320600aeEe6C86215dd4F34",
|
|
237
|
+
"GoodFundManager": "0xe72EF6746EB1aD74b75fe7c416569043322AaC5d",
|
|
238
|
+
"StakersDistribution": "0xf9AF73432e5c668Cf19fc344eD6F6C43BCf96282",
|
|
239
|
+
"ProtocolUpgrade": "0x4951A1C579039EbfCBA0BE33D2cd3A6D30b0f802",
|
|
240
|
+
"CompoundStakingFactory": "0xb007167714e2940013EC3bb551584130B7497E22",
|
|
241
|
+
"AaveStakingFactory": "0x6b39b761b1b64C8C095BF0e3Bb0c6a74705b4788",
|
|
242
|
+
"ForeignBridge": "0xa4E00CB342B36eC9fDc4B50b3d527c3643D4C49e",
|
|
243
|
+
"Contribution": "0x2A590C461Db46bca129E8dBe5C3998A8fF402e76",
|
|
241
244
|
"StakingContracts": [
|
|
242
245
|
[
|
|
243
|
-
"
|
|
246
|
+
"0x0ACd281Ae4afcfD9Be74F196b3B9577DAcC2ba62",
|
|
244
247
|
13888
|
|
245
248
|
]
|
|
246
249
|
],
|
|
247
|
-
"DonationsStaking": "
|
|
248
|
-
"Identity": "
|
|
249
|
-
"GoodDollar": "
|
|
250
|
-
"Controller": "
|
|
251
|
-
"Avatar": "
|
|
250
|
+
"DonationsStaking": "0x2F5557fE53429e50511f836AE65A9E89AEF57e93",
|
|
251
|
+
"Identity": "0xA9e6Bfa2BF53dE88FEb19761D9b2eE2e821bF1Bf",
|
|
252
|
+
"GoodDollar": "0x74C33AFBa5a1fA6473dadA1b1976b105a4ab391A",
|
|
253
|
+
"Controller": "0xe5B6b170AB9a28C516b375465D11D77683A26550",
|
|
254
|
+
"Avatar": "0xa5875EdD032eFbe7773084ae23C588daC243bc01",
|
|
252
255
|
"FirstClaimPool": "0xe3963EF7CC3044B64842d0AAe7F2Bf1543D341Ec",
|
|
253
|
-
"BancorFormula": "
|
|
254
|
-
"DAI": "
|
|
255
|
-
"cDAI": "
|
|
256
|
-
"COMP": "
|
|
256
|
+
"BancorFormula": "0x742489F22807ebB4C36ca6cD95c3e1C044B7B6c8",
|
|
257
|
+
"DAI": "0x33E45b187da34826aBCEDA1039231Be46f1b05Af",
|
|
258
|
+
"cDAI": "0xA21DDc1f17dF41589BC6A5209292AED2dF61Cc94",
|
|
259
|
+
"COMP": "0x0c626FC4A447b01554518550e30600136864640B",
|
|
257
260
|
"networkId": 4447,
|
|
258
261
|
"network": "dapptest-mainnet",
|
|
259
|
-
"FeeFormula": "
|
|
262
|
+
"FeeFormula": "0x3fdc08D815cc4ED3B7F69Ee246716f2C8bCD6b07",
|
|
260
263
|
"ProxyFactory": "0xF47e3B0A1952A81F1afc41172762CB7CE8700133",
|
|
261
|
-
"UniswapV2SwapHelper": "
|
|
262
|
-
"ETHUsdOracle": "
|
|
263
|
-
"DAIEthOracle": "
|
|
264
|
-
"DAIUsdOracle": "
|
|
265
|
-
"COMPUsdOracle": "
|
|
266
|
-
"USDCUsdOracle": "
|
|
267
|
-
"AAVEUsdOracle": "
|
|
268
|
-
"GasPriceOracle": "
|
|
264
|
+
"UniswapV2SwapHelper": "0x2e8880cAdC08E9B438c6052F5ce3869FBd6cE513",
|
|
265
|
+
"ETHUsdOracle": "0x2F54D1563963fC04770E85AF819c89Dc807f6a06",
|
|
266
|
+
"DAIEthOracle": "0x158d291D8b47F056751cfF47d1eEcd19FDF9B6f8",
|
|
267
|
+
"DAIUsdOracle": "0x70E5370b8981Abc6e14C91F4AcE823954EFC8eA3",
|
|
268
|
+
"COMPUsdOracle": "0x9338CA7d556248055f5751d85cDA7aD6eF254433",
|
|
269
|
+
"USDCUsdOracle": "0x4000F8820522AC96C4221b299876e3e53bCc8525",
|
|
270
|
+
"AAVEUsdOracle": "0x9c65f85425c619A6cB6D29fF8d57ef696323d188",
|
|
271
|
+
"GasPriceOracle": "0x7Cf4be31f546c04787886358b9486ca3d62B9acf"
|
|
269
272
|
},
|
|
270
273
|
"staging-mainnet": {
|
|
271
274
|
"NameService": "0xC87FAb8A8CDD346079ca6177e47408Ba18066104",
|
|
@@ -552,6 +555,7 @@
|
|
|
552
555
|
"production-celo": {
|
|
553
556
|
"ProxyFactory": "0x99C22e78A579e2176311c736C4c9F0b0D5A47806",
|
|
554
557
|
"GoodDollar": "0xf2283840cE37DAe0a06B40a9A80603977f36fA3F",
|
|
558
|
+
"FeeFormula": "0xb25de92ce16127ebf6659a7a30a9f395c7bbf182",
|
|
555
559
|
"Avatar": "0xCD5e8a81B1e02c1837A674f87dF327C14f4e5748",
|
|
556
560
|
"Controller": "0x3D0bacBdC06A28971855275D511e6249bE67112d",
|
|
557
561
|
"Identity": "0x96B81f82A29e78C5ba9E2034Ce8490fd641a24eb",
|
|
@@ -562,5 +566,42 @@
|
|
|
562
566
|
"networkId": 42220,
|
|
563
567
|
"GoodDollarMintBurnWrapper": "0x5566b6E4962BA83e05a426Ad89031ec18e9CadD3",
|
|
564
568
|
"MultichainRouter": "0xf27Ee99622C3C9b264583dACB2cCE056e194494f"
|
|
569
|
+
},
|
|
570
|
+
"development-celo": {
|
|
571
|
+
"ProxyFactory": "0xA441cd89b0964B51d23201d65E037DA7aF8F74E9",
|
|
572
|
+
"GoodDollar": "0xAB89A70d1Af04ED8badf915Ba1f5b28E9F322624",
|
|
573
|
+
"Avatar": "0xE0e3BFb1A1850bdFe36ED1563CC2abB6A8B6De78",
|
|
574
|
+
"Controller": "0x6717A1948328C8eCCb5C933Fae90e0631C2486fE",
|
|
575
|
+
"Identity": "0xec97ee6d70C626044224998192B96fEF05949De1",
|
|
576
|
+
"NameService": "0x266E5a0931E52229CC241376bC701Ab6199Aec4D",
|
|
577
|
+
"GReputation": "0x6614823763EAd52aCc4952b9634624439B738683",
|
|
578
|
+
"AdminWallet": "0xb7b543bfd9e2E0AD1d0aA68f56c883Dd377E3D24",
|
|
579
|
+
"Faucet": "0x256AFcfEcB5C7f62CE46b54492Bb8ac38163672f",
|
|
580
|
+
"Invites": "0xdC8F0da3f29A3C419a8EEf36665ba2a3EF737B8f",
|
|
581
|
+
"GoodDollarMintBurnWrapper": "0x3fa553a5a044D5c4f5C70878148568410305f953",
|
|
582
|
+
"GoodDollarStaking": "0xCfa54Ad5a00b0AAd3873B4E269Feb331e6293682",
|
|
583
|
+
"UBIScheme": "0x2d42e6220af2485d1e6E5B4d3661A74671AA9a79",
|
|
584
|
+
"ClaimersDistribution": "0x80018e6Dd79f6B892Fca6b592746136a3aa5ef6d",
|
|
585
|
+
"CompoundVotingMachine": "0x00e44d746F3931cAB775099F4C6451f893BB9378"
|
|
586
|
+
},
|
|
587
|
+
"staging-celo": {
|
|
588
|
+
"ProxyFactory": "0x7e8292481EA8EbEb49e486B7e99c00C50fBa2689",
|
|
589
|
+
"GoodDollar": "0x33265D74abd5ae87cA02A4Fb0C30B7405C8b0682",
|
|
590
|
+
"Avatar": "0x2FD18f9de3F581Ca492A485D2b32E361EeAE2e63",
|
|
591
|
+
"Controller": "0xa229BdD05436362484b10586dAa79a316e3080C5",
|
|
592
|
+
"Identity": "0xc82d50c667F389906aCA4B72D577fA56Bf7F8910",
|
|
593
|
+
"NameService": "0x8d0b621796445454180e7DD25f96B1782848338B",
|
|
594
|
+
"GReputation": "0x759a03326df90b740f6b8b6D31e12a3F95D64C28",
|
|
595
|
+
"FeeFormula": "0xcf08461E5bAd9C508D482329Eae0f1b4c4D4c489",
|
|
596
|
+
"DAOCreator": "0xA614d2641c21FEa4c73A2D6e71C6ad341349808B",
|
|
597
|
+
"AddFounders": "0x558fA360988601601ac410678963Bf785156076D",
|
|
598
|
+
"AdminWallet": "0x822590F8baf606b1e18dC1FA8Ca39D5C66C20981",
|
|
599
|
+
"Faucet": "0x9803B5811260Bfd1F5b0b0c9eC9aD4bF96D7ea94",
|
|
600
|
+
"Invites": "0x4E094c2e35e57c90667AbD6D8FE25CE63F4ae00B",
|
|
601
|
+
"GoodDollarMintBurnWrapper": "0x156Fd9563973EFB94a297B76CFac32CdC92a8d1A",
|
|
602
|
+
"GoodDollarStaking": "0xDcB36664440937E4f11002C2471a456AEeD9b7DC",
|
|
603
|
+
"UBIScheme": "0x04f2Cf8865e2ddfEf0047FdfA7A1b05ade614288",
|
|
604
|
+
"ClaimersDistribution": "0x83186CE77ef296BA6561096447938AE05D1F026e",
|
|
605
|
+
"CompoundVotingMachine": "0xEdde78b850a08B6b8AB3E84f61cD6dC70Cc7f156"
|
|
565
606
|
}
|
|
566
607
|
}
|
package/scripts/deployFullDAO.ts
CHANGED
|
@@ -6,13 +6,11 @@ import { network, ethers, upgrades } from "hardhat";
|
|
|
6
6
|
import { Contract } from "ethers";
|
|
7
7
|
import { range } from "lodash";
|
|
8
8
|
import DAOCreatorABI from "@gooddollar/goodcontracts/build/contracts/DaoCreatorGoodDollar.json";
|
|
9
|
-
import IdentityABI from "@gooddollar/goodcontracts/build/contracts/Identity.json";
|
|
10
9
|
import FeeFormulaABI from "@gooddollar/goodcontracts/build/contracts/FeeFormula.json";
|
|
11
10
|
import AddFoundersABI from "@gooddollar/goodcontracts/build/contracts/AddFoundersGoodDollar.json";
|
|
12
11
|
import ContributionCalculation from "@gooddollar/goodcontracts/stakingModel/build/contracts/ContributionCalculation.json";
|
|
13
12
|
import FirstClaimPool from "@gooddollar/goodcontracts/stakingModel/build/contracts/FirstClaimPool.json";
|
|
14
13
|
import BridgeMock from "@gooddollar/goodcontracts/stakingModel/build/contracts/BridgeMock.json";
|
|
15
|
-
import AdminWalletABI from "@gooddollar/goodcontracts/build/contracts/AdminWallet.json";
|
|
16
14
|
import OTPABI from "@gooddollar/goodcontracts/build/contracts/OneTimePayments.json";
|
|
17
15
|
import HomeBridgeABI from "@gooddollar/goodcontracts/build/contracts/DeployHomeBridge.json";
|
|
18
16
|
import ForeignBridgeABI from "@gooddollar/goodcontracts/build/contracts/DeployForeignBridge.json";
|
|
@@ -65,11 +63,14 @@ export const createDAO = async () => {
|
|
|
65
63
|
root
|
|
66
64
|
);
|
|
67
65
|
|
|
68
|
-
const IdentityFactory = new ethers.ContractFactory(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
);
|
|
66
|
+
// const IdentityFactory = new ethers.ContractFactory(
|
|
67
|
+
// IdentityABI.abi,
|
|
68
|
+
// IdentityABI.bytecode,
|
|
69
|
+
// root
|
|
70
|
+
// );
|
|
71
|
+
|
|
72
|
+
const IdentityFactory = await ethers.getContractFactory("IdentityV2");
|
|
73
|
+
|
|
73
74
|
const FeeFormulaFactory = new ethers.ContractFactory(
|
|
74
75
|
FeeFormulaABI.abi,
|
|
75
76
|
FeeFormulaABI.bytecode,
|
|
@@ -95,9 +96,15 @@ export const createDAO = async () => {
|
|
|
95
96
|
// "0x6F1BAbfF5E119d61F0c6d8653d84E8B284B87091"
|
|
96
97
|
// );
|
|
97
98
|
|
|
98
|
-
const Identity = (await IdentityFactory.deploy().then(
|
|
99
|
-
|
|
100
|
-
)) as Contract;
|
|
99
|
+
// const Identity = (await IdentityFactory.deploy().then(
|
|
100
|
+
// printDeploy
|
|
101
|
+
// )) as Contract;
|
|
102
|
+
|
|
103
|
+
const Identity = await upgrades.deployProxy(
|
|
104
|
+
IdentityFactory,
|
|
105
|
+
[root.address, ethers.constants.AddressZero],
|
|
106
|
+
{ kind: "uups" }
|
|
107
|
+
);
|
|
101
108
|
// const Identity = await ethers.getContractAt(
|
|
102
109
|
// IdentityABI.abi,
|
|
103
110
|
// release.Identity
|
|
@@ -111,8 +118,8 @@ export const createDAO = async () => {
|
|
|
111
118
|
printDeploy
|
|
112
119
|
)) as Contract;
|
|
113
120
|
|
|
114
|
-
await Identity.setAuthenticationPeriod(365).then(printDeploy);
|
|
115
|
-
console.log("setAuthPeriod");
|
|
121
|
+
// await Identity.setAuthenticationPeriod(365).then(printDeploy);
|
|
122
|
+
// console.log("setAuthPeriod");
|
|
116
123
|
await daoCreator
|
|
117
124
|
.forgeOrg(
|
|
118
125
|
"GoodDollar",
|
|
@@ -144,7 +151,7 @@ export const createDAO = async () => {
|
|
|
144
151
|
// root
|
|
145
152
|
// );
|
|
146
153
|
|
|
147
|
-
await Identity.setAvatar(Avatar.address).then(printDeploy);
|
|
154
|
+
// await Identity.setAvatar(Avatar.address).then(printDeploy);
|
|
148
155
|
|
|
149
156
|
console.log("Done deploying DAO, setting schemes permissions");
|
|
150
157
|
|
|
@@ -201,9 +208,7 @@ export const createDAO = async () => {
|
|
|
201
208
|
gd
|
|
202
209
|
);
|
|
203
210
|
schemes.push(sidechain.OneTimePayments.address);
|
|
204
|
-
const adminWallet = await deployAdminWallet(Identity.address);
|
|
205
211
|
Object.entries(sidechain).forEach(([k, v]) => (release[k] = v.address));
|
|
206
|
-
release["AdminWallet"] = adminWallet.address;
|
|
207
212
|
}
|
|
208
213
|
|
|
209
214
|
await releaser(release, network.name);
|
|
@@ -242,7 +247,17 @@ export const createDAO = async () => {
|
|
|
242
247
|
UpgradeScheme: ethers.constants.AddressZero
|
|
243
248
|
};
|
|
244
249
|
|
|
250
|
+
console.log("deploying v2...");
|
|
245
251
|
const v2 = await deployV2(network.name, false, olddao);
|
|
252
|
+
console.log("deploying adminWallet...");
|
|
253
|
+
const adminWallet = await deployAdminWallet(Identity.address, v2.NameService);
|
|
254
|
+
console.log("setting up identity:", {
|
|
255
|
+
ns: v2.NameService,
|
|
256
|
+
identity: Identity.address
|
|
257
|
+
});
|
|
258
|
+
await Identity.initDAO(v2.NameService);
|
|
259
|
+
release["AdminWallet"] = adminWallet.address;
|
|
260
|
+
|
|
246
261
|
release = { ...v2, ...release };
|
|
247
262
|
await releaser(release, network.name);
|
|
248
263
|
// await pressAnyKey();
|
|
@@ -329,6 +344,7 @@ const deployBridge = async (Avatar, gd, setSchemes, isMainnet) => {
|
|
|
329
344
|
};
|
|
330
345
|
|
|
331
346
|
const deployMainnet = async (Avatar, Identity) => {
|
|
347
|
+
console.log("deploying mainnet...");
|
|
332
348
|
const [root] = await ethers.getSigners();
|
|
333
349
|
|
|
334
350
|
const cdaiFactory = await ethers.getContractFactory("cDAIMock");
|
|
@@ -415,6 +431,7 @@ export const deploySidechain = async (
|
|
|
415
431
|
identity,
|
|
416
432
|
gd
|
|
417
433
|
) => {
|
|
434
|
+
console.log("deploying sidechain...");
|
|
418
435
|
const root = (await ethers.getSigners())[0];
|
|
419
436
|
const fcFactory = new ethers.ContractFactory(
|
|
420
437
|
FirstClaimPool.abi,
|
|
@@ -502,7 +519,7 @@ export const deploySidechain = async (
|
|
|
502
519
|
};
|
|
503
520
|
};
|
|
504
521
|
|
|
505
|
-
const deployAdminWallet = async identity => {
|
|
522
|
+
const deployAdminWallet = async (identity, ns) => {
|
|
506
523
|
const root = (await ethers.getSigners())[0];
|
|
507
524
|
const hdNode = ethers.utils.HDNode.fromMnemonic(process.env.ADMIN_MNEMONIC);
|
|
508
525
|
const admins = range(0, 50).map(i =>
|
|
@@ -512,8 +529,9 @@ const deployAdminWallet = async identity => {
|
|
|
512
529
|
const adminWallet = (await upgrades
|
|
513
530
|
.deployProxy(await ethers.getContractFactory("AdminWallet"), [
|
|
514
531
|
admins.slice(0, 20).map(_ => _.address),
|
|
532
|
+
ns,
|
|
515
533
|
root.address,
|
|
516
|
-
|
|
534
|
+
1e9
|
|
517
535
|
])
|
|
518
536
|
.then(printDeploy)) as Contract;
|
|
519
537
|
|
|
@@ -530,8 +548,10 @@ const deployAdminWallet = async identity => {
|
|
|
530
548
|
// )
|
|
531
549
|
// .then(printDeploy)) as Contract;
|
|
532
550
|
|
|
533
|
-
const id = await ethers.getContractAt("
|
|
534
|
-
await id
|
|
551
|
+
const id = await ethers.getContractAt("IdentityV2", identity);
|
|
552
|
+
await id
|
|
553
|
+
.grantRole(await id.IDENTITY_ADMIN_ROLE(), adminWallet.address)
|
|
554
|
+
.then(printDeploy);
|
|
535
555
|
await root
|
|
536
556
|
.sendTransaction({
|
|
537
557
|
to: adminWallet.address,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { network, ethers, upgrades, run } from "hardhat";
|
|
2
|
+
import { Contract } from "ethers";
|
|
3
|
+
|
|
4
|
+
import { deployDeterministic, printDeploy } from "./helpers";
|
|
5
|
+
import releaser from "../../scripts/releaser";
|
|
6
|
+
import dao from "../../releases/deployment.json";
|
|
7
|
+
|
|
8
|
+
const { name } = network;
|
|
9
|
+
|
|
10
|
+
export const deployProxy = async (defaultAdmin = null) => {
|
|
11
|
+
let release: { [key: string]: any } = dao[network.name] || {};
|
|
12
|
+
|
|
13
|
+
if (network.name.match(/production|staging|fuse/) && release.ProxyFactory) {
|
|
14
|
+
throw new Error("ProxyFactory already exists for env");
|
|
15
|
+
}
|
|
16
|
+
let [root] = await ethers.getSigners();
|
|
17
|
+
//generic call permissions
|
|
18
|
+
let schemeMock = root;
|
|
19
|
+
|
|
20
|
+
console.log("got signers:", {
|
|
21
|
+
network,
|
|
22
|
+
root: root.address,
|
|
23
|
+
schemeMock: schemeMock.address,
|
|
24
|
+
balance: await ethers.provider
|
|
25
|
+
.getBalance(root.address)
|
|
26
|
+
.then(_ => _.toString())
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const proxyFactory = await (
|
|
30
|
+
await ethers.getContractFactory("ProxyFactory1967")
|
|
31
|
+
).deploy();
|
|
32
|
+
|
|
33
|
+
release = {
|
|
34
|
+
ProxyFactory: proxyFactory.address
|
|
35
|
+
};
|
|
36
|
+
await releaser(release, network.name, "deployment", false);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const main = async (networkName = name) => {
|
|
40
|
+
await deployProxy().catch(console.log);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
if (process.argv[1].includes("proxyFactory-deploy")) {
|
|
44
|
+
main();
|
|
45
|
+
}
|