@gooddollar/goodprotocol 2.1.4 → 2.2.0-beta.1
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/IdentityV4.min.json +1 -0
- 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/IUniswapV3.sol/INonfungiblePositionManager.dbg.json +1 -1
- package/artifacts/contracts/IUniswapV3.sol/IUniswapV3Pool.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/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/IIdentityV2.dbg.json +1 -1
- 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/IQuoterV2.dbg.json +1 -1
- package/artifacts/contracts/Interfaces.sol/ISwapRouter.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/MentoInterfaces.sol/IBancorExchangeProvider.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IBroker.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExchangeProvider.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IGoodDollarExpansionController.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/IMentoReserve.dbg.json +1 -1
- package/artifacts/contracts/MentoInterfaces.sol/ITradingLimits.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/Faucet.sol/Faucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/FuseFaucetV2.sol/FuseFaucetV2.dbg.json +1 -1
- package/artifacts/contracts/fuseFaucet/SuperfluidFacuet.sol/SuperfluidFaucet.dbg.json +1 -1
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
- package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
- package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
- 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/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV3.sol/IdentityV3.dbg.json +1 -1
- package/artifacts/contracts/identity/IdentityV3.sol/IdentityV3.json +2 -2
- package/artifacts/contracts/identity/IdentityV4.sol/IdentityV4.dbg.json +4 -0
- package/artifacts/contracts/identity/IdentityV4.sol/IdentityV4.json +1162 -0
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV2.sol/InvitesV2.dbg.json +1 -1
- package/artifacts/contracts/invite/OneTimeReward.sol/OneTimeReward.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/AaveUSDMockOracle.sol/AaveUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/BatUSDMockOracle.sol/BatUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/CeloDistributionHelperTest.sol/CeloDistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/CompUsdMockOracle.sol/CompUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DaiEthPriceMockOracle.sol/DaiEthPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/EthUSDMockOracle.sol/EthUSDMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/FeesFormularMock.sol/FeesFormulaMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GasPriceMockOracle.sol/GasPriceMockOracle.dbg.json +1 -1
- package/artifacts/contracts/mocks/GenericDistributionHelperTest.sol/GenericDistributionHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GenericDistributionHelperTest.sol/GenericDistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/IdentityMock.sol/IdentityMock.dbg.json +1 -1
- 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/OverMintTester.sol/IGoodDollarStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
- package/artifacts/contracts/mocks/PayableMock.sol/PayableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
- 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/UpgradableMock2.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
- 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/CeloDistributionHelper.sol/CeloDistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/DistributionHelper.sol/DistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/ExchangeHelper.sol/ExchangeHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/GenericDistributionHelper.sol/GenericDistributionHelper.dbg.json +1 -1
- package/artifacts/contracts/reserve/GoodMarketMaker.sol/GoodMarketMaker.dbg.json +1 -1
- 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/staking/BaseShareField.sol/BaseShareField.dbg.json +1 -1
- package/artifacts/contracts/staking/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
- package/artifacts/contracts/staking/DonationsStaking.sol/DonationsStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.dbg.json +1 -1
- 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/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/aave/AaveStakingFactory.sol/AaveStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStaking.sol/GoodAaveStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/aave/GoodAaveStakingV2.sol/GoodAaveStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/CompoundStakingFactory.sol/CompoundStakingFactory.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStaking.sol/GoodCompoundStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/compound/GoodCompoundStakingV2.sol/GoodCompoundStakingV2.dbg.json +1 -1
- package/artifacts/contracts/staking/utils/Math64X64.sol/Math64x64.dbg.json +1 -1
- package/artifacts/contracts/token/ERC20PresetMinterPauserUpgradeable.sol/ERC20PresetMinterPauserUpgradeable.dbg.json +1 -1
- package/artifacts/contracts/token/ERC677.sol/ERC677.dbg.json +1 -1
- package/artifacts/contracts/token/ERC677.sol/ERC677Receiver.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar2.sol/GoodDollar2.dbg.json +1 -1
- package/artifacts/contracts/token/IFeesFormula.sol/IFeesFormula.dbg.json +1 -1
- package/artifacts/contracts/token/MultichainFeeFormula.sol/MultichainFeeFormula.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperToken.sol/ISuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
- 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/BulkWhitelist.sol/BulkWhitelist.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyFromReserveHelper.sol/BuyFromReserveHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOContract.sol/DAOContract.dbg.json +1 -1
- package/artifacts/contracts/utils/DAOUpgradeableContract.sol/DAOUpgradeableContract.dbg.json +1 -1
- 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/FuseOldBridgeKill.sol/EternalStorage.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/FuseOldBridgeKill.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/IUpgradeabilityOwnerStorage.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Initializable.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Ownable.dbg.json +1 -1
- package/artifacts/contracts/utils/FuseOldBridgeKill.sol/Upgradeable.dbg.json +1 -1
- package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.dbg.json +1 -1
- package/artifacts/contracts/utils/GoodDollarMintBurnWrapper.sol/GoodDollarMintBurnWrapper.dbg.json +1 -1
- 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/IdentityFix.sol/IdentityFix.dbg.json +1 -1
- package/artifacts/contracts/utils/MultiCall.sol/Multicall.dbg.json +1 -1
- package/artifacts/contracts/utils/MultichainBridgeHelper.sol/MultichainBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/NameService.sol/NameService.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePayments.sol/OneTimePayments.dbg.json +1 -1
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/MentoExchange.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtoclUpgradeV4Mento.sol/ProtocolUpgradeV4Mento.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/ProtocolUpgradeFuse.sol/ProtocolUpgradeFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeFuseRecover.sol/ProtocolUpgradeFuseRecover.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgradeRecover.sol/ProtocolUpgradeRecover.dbg.json +1 -1
- 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/contracts/identity/IdentityV3.sol +0 -3
- package/contracts/identity/IdentityV4.sol +578 -0
- package/hardhat.config.ts +3 -4
- package/package.json +8 -4
- package/releases/deployment.json +691 -1
- package/test/governance/ClaimersDistribution.test.ts +1 -1
- package/test/governance/CompoundVotingMachine.castvote.test.ts +30 -30
- package/test/helpers.ts +76 -195
- package/test/identity/IdentityV3.test.ts +53 -129
- package/test/identity/IdentityV4.test.ts +454 -0
- package/test/reserve/GenericDistributionHelper.e2e.test.ts +445 -0
- package/test/utils/AdminWallet.test.ts +14 -15
- package/types/contracts/identity/IdentityV4.ts +2001 -0
- package/types/contracts/identity/index.ts +1 -0
- package/types/contracts/utils/UpdateReserveRatio.sol/MentoExchange.ts +81 -0
- package/types/contracts/utils/UpdateReserveRatio.sol/UpdateReserveRatio.ts +134 -0
- package/types/contracts/utils/UpdateReserveRatio.sol/index.ts +5 -0
- package/types/contracts/utils/UpdateReserveRatioAfterXDC.sol/UpdateReserveRatioAfterXDC.ts +7 -2
- package/types/contracts/utils/index.ts +2 -0
- package/types/factories/contracts/identity/IdentityV3__factory.ts +1 -1
- package/types/factories/contracts/identity/IdentityV4__factory.ts +1213 -0
- package/types/factories/contracts/identity/index.ts +1 -0
- package/types/factories/contracts/utils/UpdateReserveRatio.sol/MentoExchange__factory.ts +39 -0
- package/types/factories/contracts/utils/UpdateReserveRatio.sol/UpdateReserveRatio__factory.ts +113 -0
- package/types/factories/contracts/utils/UpdateReserveRatio.sol/index.ts +5 -0
- package/types/factories/contracts/utils/UpdateReserveRatioAfterXDC.sol/UpdateReserveRatioAfterXDC__factory.ts +9 -15
- package/types/factories/contracts/utils/index.ts +1 -0
- package/types/hardhat.d.ts +27 -0
- package/types/index.ts +4 -0
- package/scripts/ProxyFactory.json +0 -4425
- package/scripts/analytics/activeGDStakers.ts +0 -188
- package/scripts/analytics/activeStakers.ts +0 -25
- package/scripts/analytics/activeUsersCount.ts +0 -156
- package/scripts/analytics/activeWalletsStats.ts +0 -301
- package/scripts/analytics/checkActiveWallets.ts +0 -60
- package/scripts/analytics/checkBridgeBalances.ts +0 -442
- package/scripts/analytics/claimIncidentStats.ts +0 -98
- package/scripts/analytics/faucetStats.ts +0 -130
- package/scripts/analytics/gdinflow.ts +0 -57
- package/scripts/analytics/goodHolders.ts +0 -46
- package/scripts/analytics/goodgiveback.ts +0 -64
- package/scripts/analytics/p2pTxs.ts +0 -564
- package/scripts/analytics/stuckgd.ts +0 -70
- package/scripts/analytics/tokenInOutStats.ts +0 -48
- package/scripts/analytics/whitelistsyncIssue.ts +0 -87
- package/scripts/bulkProof.ts +0 -202
- package/scripts/bulkWhitelist.ts +0 -31
- package/scripts/deployGnosisSafe.ts +0 -111
- package/scripts/fetchOrDeployProxyFactory.ts +0 -46
- package/scripts/fv.ts +0 -263
- package/scripts/gdx/gdxAirdropCalculation.ts +0 -479
- package/scripts/getFounders.ts +0 -32
- package/scripts/governance/README.md +0 -70
- package/scripts/governance/airdropCalculation.ts +0 -1119
- package/scripts/governance/airdropCalculationRecover.ts +0 -416
- package/scripts/governance/airdropCalculationSorted.ts +0 -438
- package/scripts/governance/goodCheckpointSorted.ts +0 -300
- package/scripts/keeper/fishInactive.ts +0 -47
- package/scripts/minimize.sh +0 -17
- package/scripts/multichain-deploy/0_proxyFactory-deploy.ts +0 -131
- package/scripts/multichain-deploy/1_basicdao-deploy.ts +0 -294
- package/scripts/multichain-deploy/2_helpers-deploy.ts +0 -152
- package/scripts/multichain-deploy/2b_otp-deploy.ts +0 -73
- package/scripts/multichain-deploy/3_gdSavings-deploy.ts +0 -190
- package/scripts/multichain-deploy/4_ubi-deploy.ts +0 -129
- package/scripts/multichain-deploy/5_gov-deploy.ts +0 -179
- package/scripts/multichain-deploy/6_testnetFaucet.ts +0 -85
- package/scripts/multichain-deploy/7_superfluidfaucet-deploy.ts +0 -123
- package/scripts/multichain-deploy/8_disthelper-deploy.ts +0 -152
- package/scripts/multichain-deploy/createUniswapTestPools.ts +0 -163
- package/scripts/multichain-deploy/flattened/Avatar.sol +0 -913
- package/scripts/multichain-deploy/flattened/Controller.sol +0 -1891
- package/scripts/multichain-deploy/flattened/FeeFormula.sol +0 -1290
- package/scripts/multichain-deploy/fulldeploy.sh +0 -26
- package/scripts/multichain-deploy/helpers.ts +0 -647
- package/scripts/multichain-deploy/multichainWrapper-deploy.ts +0 -59
- package/scripts/multichain-deploy/verifyEtherscan.ts +0 -177
- package/scripts/proposals/gip-14_1.ts +0 -251
- package/scripts/proposals/gip-15.ts +0 -427
- package/scripts/proposals/gip-25-xdc-upgrade-ubi.ts +0 -746
- package/scripts/proposals/gips-14_1.md +0 -29
- package/scripts/proposals/hack-ubi-recovery.ts +0 -414
- package/scripts/proposals/identityAuthPeriod.ts +0 -229
- package/scripts/proposals/reserveRestore.ts +0 -474
- package/scripts/proposals/updateDistHelper.ts +0 -180
- package/scripts/proposals/v4Upgrade.ts +0 -845
- package/scripts/releaser.js +0 -24
- package/scripts/staking/stakersGdRewardsCalculation.ts +0 -64
- package/scripts/upgradeScheme.ts +0 -97
- package/scripts/upgradeToV2/upgradeToV2.ts +0 -853
- package/scripts/upgradeToV2/upgradeToV2Recover.ts +0 -939
- package/scripts/upgradeToV3/v3-fix.ts +0 -120
- package/scripts/upgradeToV3/v3-fuse-multichain.ts +0 -117
- package/scripts/upgradeToV3/v3-upgrade.ts +0 -219
- package/scripts/upgrades/celo-defi-ubi-deploy.ts +0 -184
- package/scripts/upgrades/identity-upgrade.ts +0 -126
- package/scripts/upgrades/multichain-formula-upgrade.ts +0 -143
- package/scripts/upgrades/multichain-temp-fix.ts +0 -129
- package/scripts/upgrades/restoreFunds.ts +0 -91
- package/scripts/upgrades/superfluid-nft-celo-gas-token.ts +0 -159
- package/scripts/upgrades/transferDaoToGuardians.ts +0 -80
- package/scripts/upgrades/upgradeAdminWallet.ts +0 -29
- package/scripts/upgrades/upgradeFaucet.ts +0 -46
- package/scripts/utils.ts +0 -50
- package/scripts/verify.ts +0 -67
- package/scripts/voltageswaps.ts +0 -46
package/scripts/fv.ts
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import { chunk, uniqBy } from "lodash";
|
|
3
|
-
import delay from "delay";
|
|
4
|
-
import { bulkIsWhitelisted, bulkLastAuth } from "./utils";
|
|
5
|
-
|
|
6
|
-
//create tunnel to fv server ssh -L 9090:server:8080 -N user@server -i sshkey
|
|
7
|
-
|
|
8
|
-
const saveImage = async (id, idx) => {
|
|
9
|
-
const age = await fetch("http://localhost:9090/estimate-age-3d-v2", {
|
|
10
|
-
method: "POST",
|
|
11
|
-
body: JSON.stringify({ externalDatabaseRefID: id }),
|
|
12
|
-
headers: { "content-type": "applcation/json" }
|
|
13
|
-
}).then(_ => _.json());
|
|
14
|
-
console.log({ age });
|
|
15
|
-
const i1 = await fetch("http://localhost:9090/enrollment-3d/" + id).then(_ => _.json());
|
|
16
|
-
console.log(i1);
|
|
17
|
-
fs.writeFileSync("fvimages/" + id + "_" + idx + ".jpg", i1.auditTrailBase64, {
|
|
18
|
-
encoding: "base64"
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
const saveImages = async a => {
|
|
22
|
-
const i1 = await fetch("http://localhost:9090/enrollment-3d/" + a[1]).then(_ => _.json());
|
|
23
|
-
const i2 = await fetch("http://localhost:9090/enrollment-3d/" + a[2]).then(_ => _.json());
|
|
24
|
-
if (i1.auditTrailBase64 && i2.auditTrailBase64) {
|
|
25
|
-
fs.writeFileSync("fvimages/" + a.join("_") + "-a.jpg", i1.auditTrailBase64, {
|
|
26
|
-
encoding: "base64"
|
|
27
|
-
});
|
|
28
|
-
fs.writeFileSync("fvimages/" + a.join("_") + "-b.jpg", i2.auditTrailBase64, {
|
|
29
|
-
encoding: "base64"
|
|
30
|
-
});
|
|
31
|
-
} else console.log("not found", a, !!i1.auditTrailBase64, !!i2.auditTrailBase64);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const main = async () => {
|
|
35
|
-
const data = JSON.parse(fs.readFileSync("fvtriplets2.txt").toString());
|
|
36
|
-
const triplets = uniqBy(chunk(data, 3), _ => _.join("_"));
|
|
37
|
-
|
|
38
|
-
const accounts = triplets.map(_ => _[0]);
|
|
39
|
-
const whitelisted = await bulkIsWhitelisted(accounts);
|
|
40
|
-
const failed = triplets.filter(_ => whitelisted.includes(_[0]) === false);
|
|
41
|
-
|
|
42
|
-
console.log("Total accounts:", accounts.length);
|
|
43
|
-
console.log("Total whitelisted:", whitelisted.length);
|
|
44
|
-
console.log("Total failed re-auth:", failed.length);
|
|
45
|
-
const notfetched = triplets.filter(a => {
|
|
46
|
-
const key = "fvimages/" + a.join("_") + "-a.jpg";
|
|
47
|
-
return fs.existsSync(key) === false;
|
|
48
|
-
});
|
|
49
|
-
console.log({ notfetched });
|
|
50
|
-
const ps = notfetched.map(saveImages);
|
|
51
|
-
|
|
52
|
-
await Promise.all(ps);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// check which ids have been indexed, if not then make sure they are whitelisted
|
|
56
|
-
const checkIndexedOrDelete = async () => {
|
|
57
|
-
const data = JSON.parse(
|
|
58
|
-
"[" + fs.readFileSync("fvids.json").toString().replace(/\n$/, "").replaceAll(/\n/g, ",\n") + "]"
|
|
59
|
-
);
|
|
60
|
-
const triplets = uniqBy(data, _ => _["wallet"]);
|
|
61
|
-
|
|
62
|
-
const accounts = triplets.map(_ => _["wallet"]);
|
|
63
|
-
console.log("Total accounts:", accounts.length, accounts[0]);
|
|
64
|
-
let whitelisted = [];
|
|
65
|
-
for (let batch of chunk(accounts, 200)) {
|
|
66
|
-
whitelisted.push(...(await bulkIsWhitelistedFuse(batch)));
|
|
67
|
-
}
|
|
68
|
-
const failed = triplets.filter(_ => whitelisted.includes(_["wallet"]) === false);
|
|
69
|
-
|
|
70
|
-
console.log("Total whitelisted:", whitelisted.length);
|
|
71
|
-
console.log("Total not whitelisted:", failed.length);
|
|
72
|
-
let ps = [];
|
|
73
|
-
|
|
74
|
-
ps = [];
|
|
75
|
-
for (let record of triplets) {
|
|
76
|
-
const isEnrolled = fetch("http://localhost:9090/enrollment-3d/" + record["identifier"].slice(0, 42))
|
|
77
|
-
.then(_ => _.json())
|
|
78
|
-
.then(_ => _.success);
|
|
79
|
-
// const isEnrolled = "unknown";
|
|
80
|
-
const isIndexed = fetch("http://localhost:9090/3d-db/get", {
|
|
81
|
-
method: "POST",
|
|
82
|
-
body: JSON.stringify({ identifier: record["identifier"].slice(0, 42), groupName: "GoodDollar" })
|
|
83
|
-
})
|
|
84
|
-
.then(_ => _.json())
|
|
85
|
-
.then(_ => _.success);
|
|
86
|
-
|
|
87
|
-
ps.push(
|
|
88
|
-
Promise.all([isEnrolled, isIndexed]).then(_ => ({
|
|
89
|
-
...record,
|
|
90
|
-
isEnrolled: _[0],
|
|
91
|
-
isIndexed: _[1],
|
|
92
|
-
isWhitelisted: whitelisted.includes(record.wallet)
|
|
93
|
-
}))
|
|
94
|
-
);
|
|
95
|
-
if (ps.length % 50 === 0) {
|
|
96
|
-
console.log("waiting...", ps.length);
|
|
97
|
-
await Promise.all(ps);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
console.log("waiting...", ps.length);
|
|
101
|
-
const r = await Promise.all(ps);
|
|
102
|
-
const toDelete = r.filter(
|
|
103
|
-
_ => (_.isWhitelisted && (!_.isEnrolled || !_.isIndexed)) || (!_.isWhitelisted && _.isIndexed && !_.isEnrolled)
|
|
104
|
-
);
|
|
105
|
-
const toWhitelist = r.filter(_ => !_.isWhitelisted && _.isEnrolled && _.isIndexed);
|
|
106
|
-
|
|
107
|
-
console.log("toDelete:", toDelete.length);
|
|
108
|
-
|
|
109
|
-
console.log("toWhitelist:", toWhitelist.length);
|
|
110
|
-
fs.writeFileSync("fvIndexedOrEnrolled.json", JSON.stringify(r));
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
const fixInvalidIndexed = async () => {
|
|
114
|
-
const indexedOrEnrolled = JSON.parse(fs.readFileSync("fvIndexedOrEnrolled.json").toString());
|
|
115
|
-
const toDelete = indexedOrEnrolled.filter(
|
|
116
|
-
_ => (_.isWhitelisted && (!_.isEnrolled || !_.isIndexed)) || (!_.isWhitelisted && _.isIndexed && !_.isEnrolled)
|
|
117
|
-
);
|
|
118
|
-
const toWhitelist = indexedOrEnrolled.filter(_ => !_.isWhitelisted && _.isEnrolled && _.isIndexed);
|
|
119
|
-
|
|
120
|
-
console.log("toDelete:", toDelete.length);
|
|
121
|
-
|
|
122
|
-
console.log("toWhitelist:", toWhitelist.length);
|
|
123
|
-
|
|
124
|
-
console.log(toWhitelist);
|
|
125
|
-
return;
|
|
126
|
-
let ps = [];
|
|
127
|
-
for (let record of toWhitelist) {
|
|
128
|
-
ps.push(fetch(`https://goodserver.gooddollar.org/syncWhitelist/${record.wallet}`).then(_ => _.json()));
|
|
129
|
-
if (ps.length > 0 && ps.length % 3 === 0) {
|
|
130
|
-
console.log("waiting...", ps.length);
|
|
131
|
-
await Promise.all(ps).catch(e => console.log(e));
|
|
132
|
-
console.log("waiting 60 seconds for rate limit");
|
|
133
|
-
await delay(50000);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
if (ps.length > 0) {
|
|
137
|
-
console.log("waiting...", ps.length);
|
|
138
|
-
await Promise.all(ps).catch(e => console.log(e));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const removeWhitelist = toDelete.filter(_ => _.isWhitelisted).map(_ => _.wallet);
|
|
142
|
-
// removeWhitelist.push(...toWhitelist.map(_ => _.wallet));
|
|
143
|
-
ps = [];
|
|
144
|
-
for (let record of toDelete) {
|
|
145
|
-
if (record.isIndexed) {
|
|
146
|
-
// console.log("removing record from index and queuing for whitelist removal", record.wallet);
|
|
147
|
-
const isIndexed = fetch("http://localhost:9090/3d-db/delete", {
|
|
148
|
-
method: "POST",
|
|
149
|
-
body: JSON.stringify({ identifier: record["identifier"].slice(0, 42), groupName: "GoodDollar" })
|
|
150
|
-
}).then(_ => _.json());
|
|
151
|
-
|
|
152
|
-
ps.push(
|
|
153
|
-
isIndexed.then(_ => {
|
|
154
|
-
if (!_.success) throw new Error(`delete index failed: ${record.wallet}`);
|
|
155
|
-
})
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
if (ps.length > 0 && ps.length % 10 === 0) {
|
|
159
|
-
console.log("waiting...", ps.length);
|
|
160
|
-
await Promise.all(ps).catch(e => console.log(e));
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
console.log("waiting...", ps.length);
|
|
164
|
-
await Promise.all(ps).catch(e => console.log(e));
|
|
165
|
-
console.log({ removeWhitelist }, removeWhitelist.length);
|
|
166
|
-
fs.writeFileSync("removeWhitelist.json", JSON.stringify(removeWhitelist));
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
const deleteIdentifiers = async password => {
|
|
170
|
-
const data = JSON.parse(fs.readFileSync("fvtriplets2.txt").toString());
|
|
171
|
-
const triplets = uniqBy(chunk(data, 3), _ => _.join("_"));
|
|
172
|
-
const accounts = triplets.map(_ => _[0]);
|
|
173
|
-
const whitelisted = await bulkIsWhitelisted(accounts);
|
|
174
|
-
const lastAuth = await bulkLastAuth(accounts);
|
|
175
|
-
console.log(
|
|
176
|
-
"no last auth",
|
|
177
|
-
Object.entries(lastAuth).filter(_ => _[1] === 0)
|
|
178
|
-
);
|
|
179
|
-
const dateYearsAgo = new Date();
|
|
180
|
-
dateYearsAgo.setFullYear(dateYearsAgo.getFullYear() - 3);
|
|
181
|
-
const failed = triplets.filter(
|
|
182
|
-
_ => whitelisted.includes(_[0]) === false && lastAuth[_[0]] > 0 && lastAuth[_[0]] < dateYearsAgo.getTime() / 1000
|
|
183
|
-
);
|
|
184
|
-
|
|
185
|
-
let ps = [];
|
|
186
|
-
console.log("old lastauth:", failed.length, "out of:", triplets.length);
|
|
187
|
-
for (let record of failed) {
|
|
188
|
-
ps.push(
|
|
189
|
-
fetch("https://goodserver.gooddollar.org/admin/verify/face/delete", {
|
|
190
|
-
method: "POST",
|
|
191
|
-
headers: { "content-type": "application/json" },
|
|
192
|
-
body: JSON.stringify({
|
|
193
|
-
password,
|
|
194
|
-
enrollmentIdentifier: record[1]
|
|
195
|
-
})
|
|
196
|
-
})
|
|
197
|
-
.then(_ => _.json())
|
|
198
|
-
.catch(_ => record[1])
|
|
199
|
-
);
|
|
200
|
-
ps.push(
|
|
201
|
-
fetch("https://goodserver.gooddollar.org/admin/verify/face/delete", {
|
|
202
|
-
method: "POST",
|
|
203
|
-
headers: { "content-type": "application/json" },
|
|
204
|
-
body: JSON.stringify({
|
|
205
|
-
password,
|
|
206
|
-
enrollmentIdentifier: record[2]
|
|
207
|
-
})
|
|
208
|
-
})
|
|
209
|
-
.then(_ => _.json())
|
|
210
|
-
.catch(_ => record[2])
|
|
211
|
-
);
|
|
212
|
-
if (ps.length % 10 === 0) {
|
|
213
|
-
console.log("waiting...", ps.length);
|
|
214
|
-
const r = await Promise.all(ps);
|
|
215
|
-
console.log(r);
|
|
216
|
-
ps = [];
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
const res = await Promise.all(ps);
|
|
220
|
-
console.log(res);
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
const exportScans = async ids => {
|
|
224
|
-
console.log(ids.length, "unique:", uniqBy(ids).length);
|
|
225
|
-
const exports = ids.map(async (_, idx) => {
|
|
226
|
-
if (fs.existsSync("fvimages/" + idx + ".jpg")) return;
|
|
227
|
-
const { faceMapBase64, auditTrailBase64 } = await fetch("http://localhost:9090/enrollment-3d/" + _).then(_ =>
|
|
228
|
-
_.json()
|
|
229
|
-
);
|
|
230
|
-
const { exportedFaceTecDataForDebugBase64 } = await fetch("http://localhost:9090/export-for-facetec/", {
|
|
231
|
-
method: "POST",
|
|
232
|
-
headers: { "content-type": "application/json" },
|
|
233
|
-
body: JSON.stringify({ faceScanOrFaceMapOrIDScan: faceMapBase64 })
|
|
234
|
-
}).then(_ => _.json());
|
|
235
|
-
console.log(_, exportedFaceTecDataForDebugBase64.length);
|
|
236
|
-
fs.writeFileSync("fvimages/export_" + idx + ".txt", exportedFaceTecDataForDebugBase64);
|
|
237
|
-
fs.writeFileSync("fvimages/" + idx + ".jpg", auditTrailBase64, {
|
|
238
|
-
encoding: "base64"
|
|
239
|
-
});
|
|
240
|
-
});
|
|
241
|
-
await Promise.all(exports);
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
const deleteIdentifier = async (id, walletAddress) => {
|
|
245
|
-
const res = await fetch("https://goodserver.gooddollar.org/admin/verify/face/delete", {
|
|
246
|
-
method: "POST",
|
|
247
|
-
headers: { "content-type": "application/json" },
|
|
248
|
-
body: JSON.stringify({
|
|
249
|
-
password: process.env.ADMIN_PASSWORD,
|
|
250
|
-
enrollmentIdentifier: id,
|
|
251
|
-
walletAddress
|
|
252
|
-
})
|
|
253
|
-
})
|
|
254
|
-
.then(_ => _.json())
|
|
255
|
-
.catch(_ => _);
|
|
256
|
-
console.log(res);
|
|
257
|
-
};
|
|
258
|
-
// checkIndexedOrDelete();
|
|
259
|
-
// fixInvalidIndexed();
|
|
260
|
-
// console.log(process.env.ADMIN_PASSWORD);
|
|
261
|
-
// deleteIdentifiers(process.env.ADMIN_PASSWORD);
|
|
262
|
-
// main();
|
|
263
|
-
// saveImages(["", "", ""]);
|