@gooddollar/goodprotocol 2.1.3 → 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/README.md +0 -2
- 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/GoodDollarStaking.sol/GoodDollarStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking.json +2 -2
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IGovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/GoodDollarStaking.sol/IStakingUpgrade.dbg.json +1 -1
- 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/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/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/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/GoodDollarStakingMock.sol/GoodDollarStakingMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodDollarStakingMock.sol/GoodDollarStakingMock.json +2 -2
- 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/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/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/StakingMockFixedAPY.sol/StakingMockFixedAPY.dbg.json +1 -1
- package/artifacts/contracts/mocks/StakingMockFixedAPY.sol/StakingMockFixedAPY.json +2 -2
- 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/staking/utils/StakingRewardsFixedAPY.sol/StakingRewardsFixedAPY.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/LastauthReduction.sol/LastauthReduction.dbg.json +1 -1
- package/artifacts/contracts/utils/LastauthReduction.sol/LastauthReduction.json +2 -2
- 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/artifacts/contracts/utils/ReserveRestore.sol/ReserveRestore.dbg.json +1 -1
- package/artifacts/contracts/utils/ReserveRestore.sol/ReserveRestore.json +2 -2
- 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/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 -2
- package/types/factories/contracts/governance/GoodDollarStaking.sol/GoodDollarStaking__factory.ts +1 -1
- 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/mocks/DistributionBridgeMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/GoodDollarStakingMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/MultichainRouterMock.sol/MultichainRouterMock__factory.ts +1 -1
- package/types/factories/contracts/mocks/StakingMockFixedAPY__factory.ts +1 -1
- package/types/factories/contracts/utils/LastauthReduction__factory.ts +1 -1
- package/types/factories/contracts/utils/ReserveRestore__factory.ts +1 -1
- 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 -1
- package/types/hardhat.d.ts +13 -4
- package/types/index.ts +4 -2
- 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
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/***
|
|
2
|
-
* give genericcall to gaurdian safe, unregister deployer as scheme
|
|
3
|
-
*/
|
|
4
|
-
import { network, ethers, upgrades, run } from "hardhat";
|
|
5
|
-
import { defaultsDeep } from "lodash";
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
deployDeterministic,
|
|
9
|
-
deploySuperGoodDollar,
|
|
10
|
-
executeViaGuardian,
|
|
11
|
-
printDeploy,
|
|
12
|
-
verifyProductionSigner
|
|
13
|
-
} from "../multichain-deploy/helpers";
|
|
14
|
-
import releaser from "../releaser";
|
|
15
|
-
import ProtocolSettings from "../../releases/deploy-settings.json";
|
|
16
|
-
import dao from "../../releases/deployment.json";
|
|
17
|
-
import { Controller } from "../../types";
|
|
18
|
-
|
|
19
|
-
const main = async () => {
|
|
20
|
-
let protocolSettings = defaultsDeep(
|
|
21
|
-
{},
|
|
22
|
-
ProtocolSettings[network.name],
|
|
23
|
-
ProtocolSettings["default"]
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
let release: { [key: string]: any } = dao[network.name];
|
|
27
|
-
const isProduction = network.name.includes("production");
|
|
28
|
-
|
|
29
|
-
let [root] = await ethers.getSigners();
|
|
30
|
-
const daoOwner = root.address;
|
|
31
|
-
if (isProduction) verifyProductionSigner(root);
|
|
32
|
-
|
|
33
|
-
console.log("got signers:", {
|
|
34
|
-
network,
|
|
35
|
-
daoOwner,
|
|
36
|
-
root: root.address,
|
|
37
|
-
balance: await ethers.provider
|
|
38
|
-
.getBalance(root.address)
|
|
39
|
-
.then(_ => _.toString()),
|
|
40
|
-
release
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
if (isProduction) {
|
|
44
|
-
const ctrl = (await ethers.getContractAt(
|
|
45
|
-
"Controller",
|
|
46
|
-
release.Controller
|
|
47
|
-
)) as Controller;
|
|
48
|
-
await ctrl
|
|
49
|
-
.registerScheme(
|
|
50
|
-
protocolSettings.guardiansSafe,
|
|
51
|
-
ethers.constants.HashZero,
|
|
52
|
-
"0x0000001f",
|
|
53
|
-
release.Avatar
|
|
54
|
-
)
|
|
55
|
-
.then(printDeploy);
|
|
56
|
-
await ctrl.unregisterSelf(release.Avatar).then(printDeploy);
|
|
57
|
-
} else {
|
|
58
|
-
console.log("simulating transfer...");
|
|
59
|
-
const ctrl = (await ethers.getContractAt(
|
|
60
|
-
"Controller",
|
|
61
|
-
release.Controller
|
|
62
|
-
)) as Controller;
|
|
63
|
-
console.log(
|
|
64
|
-
"register safe result:",
|
|
65
|
-
await ctrl.callStatic.registerScheme(
|
|
66
|
-
protocolSettings.guardiansSafe,
|
|
67
|
-
ethers.constants.HashZero,
|
|
68
|
-
"0x0000001f",
|
|
69
|
-
release.Avatar
|
|
70
|
-
)
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
console.log(
|
|
74
|
-
"unregister result",
|
|
75
|
-
await ctrl.callStatic.unregisterSelf(release.Avatar)
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
main();
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { network, ethers } from "hardhat";
|
|
2
|
-
import { Contract } from "ethers";
|
|
3
|
-
|
|
4
|
-
import { printDeploy, verifyProductionSigner } from "../multichain-deploy/helpers";
|
|
5
|
-
|
|
6
|
-
import dao from "../../releases/deployment.json";
|
|
7
|
-
import { verifyContract } from "../multichain-deploy/helpers";
|
|
8
|
-
|
|
9
|
-
let { name: networkName } = network;
|
|
10
|
-
|
|
11
|
-
export const upgrade = async () => {
|
|
12
|
-
const isProduction = networkName.includes("production");
|
|
13
|
-
let [root, ...signers] = await ethers.getSigners();
|
|
14
|
-
|
|
15
|
-
if (isProduction) verifyProductionSigner(root);
|
|
16
|
-
|
|
17
|
-
let guardian = root;
|
|
18
|
-
const isCelo = networkName.includes("celo");
|
|
19
|
-
let release: { [key: string]: any } = dao[networkName];
|
|
20
|
-
|
|
21
|
-
const deployed = await ethers.deployContract(isCelo ? "AdminWallet" : "AdminWalletFuse");
|
|
22
|
-
console.log("new impl:", deployed.address);
|
|
23
|
-
await verifyContract(deployed.address, isCelo ? "AdminWallet" : "AdminWalletFuse", networkName);
|
|
24
|
-
const old = await ethers.getContractAt("AdminWallet", release.AdminWallet);
|
|
25
|
-
await old.upgradeTo(deployed.address).then(printDeploy);
|
|
26
|
-
await deployed.attach(release.AdminWallet).upgrade().then(printDeploy);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
upgrade().catch(console.log);
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import hre, { network, ethers } from "hardhat";
|
|
2
|
-
import { Contract } from "ethers";
|
|
3
|
-
|
|
4
|
-
import { deployDeterministic, printDeploy, verifyProductionSigner } from "../multichain-deploy/helpers";
|
|
5
|
-
|
|
6
|
-
import dao from "../../releases/deployment.json";
|
|
7
|
-
import { verifyContract } from "../multichain-deploy/helpers";
|
|
8
|
-
import { Faucet, ProxyAdmin } from "../../types";
|
|
9
|
-
|
|
10
|
-
let { name: networkName } = network;
|
|
11
|
-
|
|
12
|
-
export const upgrade = async () => {
|
|
13
|
-
const isProduction = networkName.includes("production");
|
|
14
|
-
let [root, ...signers] = await ethers.getSigners();
|
|
15
|
-
|
|
16
|
-
if (isProduction) verifyProductionSigner(root);
|
|
17
|
-
|
|
18
|
-
let guardian = root;
|
|
19
|
-
const isNotFuse = networkName.includes("-");
|
|
20
|
-
let release: { [key: string]: any } = dao[networkName];
|
|
21
|
-
|
|
22
|
-
const artifact = await hre.artifacts.readArtifact(isNotFuse ? "Faucet" : "FuseFaucetV2");
|
|
23
|
-
const result = await hre.deployments.deterministic("Faucet", {
|
|
24
|
-
skipIfAlreadyDeployed: true,
|
|
25
|
-
contract: artifact,
|
|
26
|
-
from: root.address
|
|
27
|
-
});
|
|
28
|
-
const deployed = await result.deploy();
|
|
29
|
-
|
|
30
|
-
console.log("new impl:", deployed.address);
|
|
31
|
-
await verifyContract(
|
|
32
|
-
deployed.address,
|
|
33
|
-
isNotFuse ? "contracts/fuseFaucet/Faucet.sol:Faucet" : "contracts/fuseFaucet/FuseFaucetV2.sol:FuseFaucetV2",
|
|
34
|
-
networkName
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
if (isNotFuse) {
|
|
38
|
-
const old = await ethers.getContractAt("Faucet", release.Faucet);
|
|
39
|
-
await old.upgradeTo(deployed.address).then(printDeploy);
|
|
40
|
-
} else {
|
|
41
|
-
const proxyadmin = (await ethers.getContractAt("ProxyAdmin", release.ProxyAdmin)) as ProxyAdmin;
|
|
42
|
-
proxyadmin.upgrade(release.FuseFaucet, deployed.address).then(printDeploy);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
upgrade().catch(console.log);
|
package/scripts/utils.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Contract, Provider, setMulticallAddress } from "ethers-multicall";
|
|
2
|
-
import Identity from "../artifacts/contracts/Interfaces.sol/IIdentity.json";
|
|
3
|
-
import { ethers } from "hardhat";
|
|
4
|
-
|
|
5
|
-
export const bulkIsWhitelisted = async (accounts: Array<String>) => {
|
|
6
|
-
setMulticallAddress(122, "0x3CE6158b7278Bf6792e014FA7B4f3c6c46fe9410");
|
|
7
|
-
setMulticallAddress(42220, "0x75F59534dd892c1f8a7B172D639FA854D529ada3");
|
|
8
|
-
const celoProvider = new ethers.providers.JsonRpcProvider("https://forno.celo.org");
|
|
9
|
-
const ethcallProvider = new Provider(celoProvider, 42220);
|
|
10
|
-
const identityContract = new Contract("0xC361A6E67822a0EDc17D899227dd9FC50BD62F42", Identity.abi);
|
|
11
|
-
const calls = accounts.map(d => identityContract.isWhitelisted(d));
|
|
12
|
-
const result = await ethcallProvider.all(calls);
|
|
13
|
-
const whitelisted = accounts.filter((v, i) => result[i]);
|
|
14
|
-
return whitelisted;
|
|
15
|
-
};
|
|
16
|
-
export const bulkIsWhitelistedFuse = async (accounts: Array<String>) => {
|
|
17
|
-
setMulticallAddress(122, "0x3CE6158b7278Bf6792e014FA7B4f3c6c46fe9410");
|
|
18
|
-
setMulticallAddress(42220, "0x75F59534dd892c1f8a7B172D639FA854D529ada3");
|
|
19
|
-
const provider = new ethers.providers.JsonRpcProvider("https://rpc.fuse.io");
|
|
20
|
-
const ethcallProvider = new Provider(provider, 122);
|
|
21
|
-
const identityContract = new Contract("0x2F9C28de9e6d44b71B91b8BA337A5D82e308E7BE", Identity.abi);
|
|
22
|
-
const calls = accounts.map(d => identityContract.isWhitelisted(d));
|
|
23
|
-
const result = await ethcallProvider.all(calls);
|
|
24
|
-
const whitelisted = accounts.filter((v, i) => result[i]);
|
|
25
|
-
return whitelisted;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const bulkLastAuth = async (accounts: Array<String>) => {
|
|
29
|
-
setMulticallAddress(122, "0x3CE6158b7278Bf6792e014FA7B4f3c6c46fe9410");
|
|
30
|
-
setMulticallAddress(42220, "0x75F59534dd892c1f8a7B172D639FA854D529ada3");
|
|
31
|
-
const fuseProvider = new ethers.providers.JsonRpcProvider("https://rpc.fuse.io");
|
|
32
|
-
const ethcallProvider = new Provider(fuseProvider, 122);
|
|
33
|
-
const identityContract = new Contract("0x2F9C28de9e6d44b71B91b8BA337A5D82e308E7BE", Identity.abi);
|
|
34
|
-
const calls = accounts.map(d => identityContract.lastAuthenticated(d));
|
|
35
|
-
const result = await ethcallProvider.all(calls);
|
|
36
|
-
// console.log({ result });
|
|
37
|
-
const whitelisted = accounts.filter((v, i) => parseInt(result[i]));
|
|
38
|
-
return whitelisted;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const bulkGetLastAuth = async (accounts: Array<String>) => {
|
|
42
|
-
setMulticallAddress(122, "0x3CE6158b7278Bf6792e014FA7B4f3c6c46fe9410");
|
|
43
|
-
setMulticallAddress(42220, "0x75F59534dd892c1f8a7B172D639FA854D529ada3");
|
|
44
|
-
const celoProvider = new ethers.providers.JsonRpcProvider("https://forno.celo.org");
|
|
45
|
-
const ethcallProvider = new Provider(celoProvider, 42220);
|
|
46
|
-
const identityContract = new Contract("0xC361A6E67822a0EDc17D899227dd9FC50BD62F42", Identity.abi);
|
|
47
|
-
const calls = accounts.map(d => identityContract.lastAuthenticated(d));
|
|
48
|
-
const result = await ethcallProvider.all(calls);
|
|
49
|
-
return result;
|
|
50
|
-
};
|
package/scripts/verify.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import { isArray } from "lodash";
|
|
3
|
-
import type EthersT from "ethers";
|
|
4
|
-
import type HreT from "hardhat";
|
|
5
|
-
import { HardhatEthersHelpers } from "@nomiclabs/hardhat-ethers/types";
|
|
6
|
-
import { execSync } from "child_process";
|
|
7
|
-
type Ethers = typeof EthersT.ethers & HardhatEthersHelpers;
|
|
8
|
-
type HRE = typeof HreT;
|
|
9
|
-
|
|
10
|
-
let ethers: Ethers;
|
|
11
|
-
export const verify = async (hre: HRE) => {
|
|
12
|
-
console.log("truffle compiling....");
|
|
13
|
-
const Verify = require("truffle-plugin-verify"); //not imported because of bug
|
|
14
|
-
const truffleOutput = execSync("npx truffle compile").toString("utf8");
|
|
15
|
-
console.log({ truffleOutput });
|
|
16
|
-
ethers = hre.ethers;
|
|
17
|
-
const deployed = JSON.parse(
|
|
18
|
-
fs.readFileSync("releases/deployment.json").toString()
|
|
19
|
-
);
|
|
20
|
-
const contracts = deployed[hre.network.name];
|
|
21
|
-
|
|
22
|
-
const contractPairs = (
|
|
23
|
-
await Promise.all(
|
|
24
|
-
Object.entries(contracts).map(async entry => {
|
|
25
|
-
if (isArray(entry[1])) return;
|
|
26
|
-
if (
|
|
27
|
-
typeof entry[1] !== "string" ||
|
|
28
|
-
(entry[1] as string).startsWith("0x") === false
|
|
29
|
-
)
|
|
30
|
-
return;
|
|
31
|
-
const addr = await getImplementationAddress(entry[1]);
|
|
32
|
-
return entry[0] + "@" + addr;
|
|
33
|
-
})
|
|
34
|
-
)
|
|
35
|
-
).filter(_ => _);
|
|
36
|
-
|
|
37
|
-
contractPairs.unshift();
|
|
38
|
-
|
|
39
|
-
const config = {
|
|
40
|
-
debug: false,
|
|
41
|
-
network_id: hre.network.config.chainId,
|
|
42
|
-
api_keys: {
|
|
43
|
-
etherscan: hre.config.etherscan.apiKey
|
|
44
|
-
},
|
|
45
|
-
working_directory: ".",
|
|
46
|
-
contracts_build_directory: "build/contracts",
|
|
47
|
-
_: contractPairs
|
|
48
|
-
};
|
|
49
|
-
return Verify(config);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const getImplementationAddress = async addr => {
|
|
53
|
-
console.log("finding impl for:", addr);
|
|
54
|
-
let proxy = await ethers.provider.getStorageAt(
|
|
55
|
-
addr,
|
|
56
|
-
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"
|
|
57
|
-
);
|
|
58
|
-
let res = addr;
|
|
59
|
-
if (proxy != ethers.constants.HashZero) res = "0x" + proxy.slice(-40);
|
|
60
|
-
else {
|
|
61
|
-
const code = await ethers.getDefaultProvider().getCode(addr);
|
|
62
|
-
if (code.startsWith("0x363d3d373d3d3d363d73"))
|
|
63
|
-
res = "0x" + code.slice(22, 62);
|
|
64
|
-
}
|
|
65
|
-
console.log("impl address for:", addr, res);
|
|
66
|
-
return res;
|
|
67
|
-
};
|
package/scripts/voltageswaps.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { request, gql } from "graphql-request";
|
|
2
|
-
|
|
3
|
-
let txCount = {};
|
|
4
|
-
const fetchSwaps = async (to, url, pair) => {
|
|
5
|
-
let from = to - 60 * 60 * 24;
|
|
6
|
-
//0xa02ed9fe9e3351fe2cd1f588b23973c1542dcbcc
|
|
7
|
-
//0x8d441c2ff54c015a1be22ad88e5d42efbec6c7ef
|
|
8
|
-
const query = gql`
|
|
9
|
-
{
|
|
10
|
-
swaps(first:1000 where:{pair: "${pair}", timestamp_gt:${from}, timestamp_lte:${to}}) {
|
|
11
|
-
to
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
const { swaps } = await request(
|
|
17
|
-
url,
|
|
18
|
-
// "https://api.thegraph.com/subgraphs/name/fuseio/fuseswap",
|
|
19
|
-
//"https://api.thegraph.com/subgraphs/name/voltfinance/voltage-exchange",
|
|
20
|
-
query
|
|
21
|
-
);
|
|
22
|
-
swaps.forEach(({ to }) => (txCount[to] = (txCount[to] || 0) + 1));
|
|
23
|
-
console.log(swaps.length);
|
|
24
|
-
// if (from < 1646925850) return;
|
|
25
|
-
if (from < 1604823310) return;
|
|
26
|
-
return fetchSwaps(from, url, pair);
|
|
27
|
-
};
|
|
28
|
-
//1652752130
|
|
29
|
-
|
|
30
|
-
const main = async () => {
|
|
31
|
-
await Promise.all([
|
|
32
|
-
fetchSwaps(
|
|
33
|
-
1652755140,
|
|
34
|
-
"https://api.thegraph.com/subgraphs/name/fuseio/fuseswap",
|
|
35
|
-
"0x8d441c2ff54c015a1be22ad88e5d42efbec6c7ef"
|
|
36
|
-
).then(_ => console.log({ txCount, unique: Object.keys(txCount).length })),
|
|
37
|
-
fetchSwaps(
|
|
38
|
-
1652755140,
|
|
39
|
-
"https://api.thegraph.com/subgraphs/name/voltfinance/voltage-exchange",
|
|
40
|
-
"0xa02ed9fe9e3351fe2cd1f588b23973c1542dcbcc"
|
|
41
|
-
).then(_ => console.log({ txCount, unique: Object.keys(txCount).length }))
|
|
42
|
-
]);
|
|
43
|
-
|
|
44
|
-
console.log("final:", { txCount, unique: Object.keys(txCount).length });
|
|
45
|
-
};
|
|
46
|
-
main();
|