@gooddollar/goodprotocol 2.0.7-beta.2 → 2.0.7-beta.4
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/BuyGDClone.min.json +1 -0
- package/artifacts/abis/BuyGDCloneFactory.min.json +1 -0
- package/artifacts/abis/IStaticOracle.min.json +1 -0
- package/artifacts/abis/ISwapRouter.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/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/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 +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/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/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/governance/StakersDistribution.sol/StakersDistribution.json +2 -2
- package/artifacts/contracts/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesFuseV2.sol/InvitesFuseV2.json +2 -2
- 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/InvitesV2.sol/InvitesV2.json +2 -2
- 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/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/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/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/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/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.json +2 -2
- 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/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/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.json +2 -2
- 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/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/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/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/BaseShareFieldV2.sol/BaseShareFieldV2.dbg.json +1 -1
- 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/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/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/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/FeesFormula.sol/IFeesFormula.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.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/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/BulkProof.sol/BulkProof.json +2 -2
- package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.json +2 -2
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.dbg.json +4 -0
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDClone.json +250 -0
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +4 -0
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.json +75 -0
- package/artifacts/contracts/utils/BuyGDClone.sol/IStaticOracle.dbg.json +4 -0
- package/artifacts/contracts/utils/BuyGDClone.sol/IStaticOracle.json +79 -0
- package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.dbg.json +4 -0
- package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.json +205 -0
- 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/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/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/invite/InvitesFuseV2.sol +5 -3
- package/contracts/invite/InvitesV2.sol +5 -3
- package/contracts/reserve/DistributionHelper.sol +12 -9
- package/contracts/utils/BuyGDClone.sol +309 -0
- package/package.json +1 -1
- package/scripts/upgrades/multichain-temp-fix.ts +129 -0
- package/truffle-config.js +4 -0
- package/types/BuyGDClone.ts +353 -0
- package/types/BuyGDCloneFactory.ts +112 -0
- package/types/IStaticOracle.ts +170 -0
- package/types/ISwapRouter.ts +298 -0
- package/types/factories/AaveStakingFactory__factory.ts +1 -1
- package/types/factories/BuyAndBridgeHelper__factory.ts +1 -1
- package/types/factories/BuyGDCloneFactory__factory.ts +146 -0
- package/types/factories/BuyGDClone__factory.ts +318 -0
- package/types/factories/CompoundStakingFactory__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/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/GoodFundManagerTest__factory.ts +1 -1
- package/types/factories/GoodFundManager__factory.ts +1 -1
- package/types/factories/GoodReserveCDai__factory.ts +1 -1
- package/types/factories/IStaticOracle__factory.ts +91 -0
- package/types/factories/ISwapRouter__factory.ts +217 -0
- package/types/factories/InvitesFuseV2__factory.ts +1 -1
- package/types/factories/InvitesV2__factory.ts +1 -1
- package/types/factories/OverMintTesterRegularStake__factory.ts +1 -1
- package/types/factories/StakersDistribution__factory.ts +1 -1
- package/types/hardhat.d.ts +36 -0
- package/types/index.ts +8 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
|
|
6
|
+
import { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
7
|
+
import type {
|
|
8
|
+
BuyGDCloneFactory,
|
|
9
|
+
BuyGDCloneFactoryInterface,
|
|
10
|
+
} from "../BuyGDCloneFactory";
|
|
11
|
+
|
|
12
|
+
const _abi = [
|
|
13
|
+
{
|
|
14
|
+
inputs: [
|
|
15
|
+
{
|
|
16
|
+
internalType: "contract ISwapRouter",
|
|
17
|
+
name: "_router",
|
|
18
|
+
type: "address",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
internalType: "address",
|
|
22
|
+
name: "_cusd",
|
|
23
|
+
type: "address",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
internalType: "address",
|
|
27
|
+
name: "_gd",
|
|
28
|
+
type: "address",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
internalType: "contract IStaticOracle",
|
|
32
|
+
name: "_oracle",
|
|
33
|
+
type: "address",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
stateMutability: "nonpayable",
|
|
37
|
+
type: "constructor",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
inputs: [
|
|
41
|
+
{
|
|
42
|
+
internalType: "address",
|
|
43
|
+
name: "owner",
|
|
44
|
+
type: "address",
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
name: "create",
|
|
48
|
+
outputs: [
|
|
49
|
+
{
|
|
50
|
+
internalType: "address",
|
|
51
|
+
name: "",
|
|
52
|
+
type: "address",
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
stateMutability: "nonpayable",
|
|
56
|
+
type: "function",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
inputs: [
|
|
60
|
+
{
|
|
61
|
+
internalType: "address",
|
|
62
|
+
name: "owner",
|
|
63
|
+
type: "address",
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
name: "predict",
|
|
67
|
+
outputs: [
|
|
68
|
+
{
|
|
69
|
+
internalType: "address",
|
|
70
|
+
name: "",
|
|
71
|
+
type: "address",
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
stateMutability: "view",
|
|
75
|
+
type: "function",
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
const _bytecode =
|
|
80
|
+
"0x60a060405234801561001057600080fd5b5060405161185a38038061185a83398101604081905261002f916100bf565b8383838360405161003f9061009a565b6001600160a01b039485168152928416602084015290831660408301529091166060820152608001604051809103906000f080158015610083573d6000803e3d6000fd5b506001600160a01b03166080525061011e92505050565b6114208061043a83390190565b6001600160a01b03811681146100bc57600080fd5b50565b600080600080608085870312156100d557600080fd5b84516100e0816100a7565b60208601519094506100f1816100a7565b6040860151909350610102816100a7565b6060860151909250610113816100a7565b939692955090935050565b6080516102fb61013f6000396000818160c2015261015901526102fb6000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063901b96e71461003b5780639ed9331814610064575b600080fd5b61004e610049366004610288565b610077565b60405161005b91906102b1565b60405180910390f35b61004e610072366004610288565b610126565b6000808260405160200161008b91906102b1565b60408051601f198184030181529082905280516020909101203060388301526f5af43d82803e903d91602b57fd5bf3ff60248301527f00000000000000000000000000000000000000000000000000000000000000006014830152733d602d80600a3d3981f3363d3d373d3d3d363d738252605882018190526037600c830120607883015260556043909201919091209091505b9392505050565b6000808260405160200161013a91906102b1565b604051602081830303815290604052805190602001209050600061017e7f0000000000000000000000000000000000000000000000000000000000000000836101e7565b60405163189acdbd60e31b81529091506001600160a01b0382169063c4d66de8906101ad9087906004016102b1565b600060405180830381600087803b1580156101c757600080fd5b505af11580156101db573d6000803e3d6000fd5b50929695505050505050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008360601b60e81c176000526e5af43d82803e903d91602b57fd5bf38360781b1760205281603760096000f590506001600160a01b0381166102825760405162461bcd60e51b8152602060048201526017602482015276115490cc4c4d8dce8818dc99585d194c8819985a5b1959604a1b604482015260640160405180910390fd5b92915050565b60006020828403121561029a57600080fd5b81356001600160a01b038116811461011f57600080fd5b6001600160a01b039190911681526020019056fea2646970667358221220cfa844f49b93c62e4584a4a5b444f64804aa59393ebf3ad00dcc897551aa2c7964736f6c634300081000336101206040523480156200001257600080fd5b506040516200142038038062001420833981016040819052620000359162000078565b6001600160a01b0393841660805291831660c052821660e052166101005261012c60a052620000e0565b6001600160a01b03811681146200007557600080fd5b50565b600080600080608085870312156200008f57600080fd5b84516200009c816200005f565b6020860151909450620000af816200005f565b6040860151909350620000c2816200005f565b6060860151909250620000d5816200005f565b939692955090935050565b60805160a05160c05160e0516101005161126f620001b1600039600081816101a60152818161049e015261057c015260008181610213015281816105cd015281816108860152610c7d015260008181610102015281816104cf015281816105ab015281816106ba0152818161074f0152818161079e0152818161084e015281816109ae01528181610a580152610c4501526000818161027a015281816104f101526105ef0152600081816102c3015281816107cb0152818161090601528181610b9a0152610cfd015261126f6000f3fe6080604052600436106100a65760003560e01c8063051ed8ef146100b25780630c577bdc146100f05780630cd865ec14610124578063130acf441461014657806377e9acd9146101745780637dc0d1d0146101945780638da5cb5b146101c857806394b918de146101ee578063a5e598fc14610201578063c3683d0a14610235578063c4d66de814610248578063f620732614610268578063f887ea40146102b157600080fd5b366100ad57005b600080fd5b3480156100be57600080fd5b506100da73471ece3750da237f93b8e339c536989b8978a43881565b6040516100e79190610f25565b60405180910390f35b3480156100fc57600080fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b34801561013057600080fd5b5061014461013f366004610f4e565b6102e5565b005b34801561015257600080fd5b50610166610161366004610f72565b61045e565b6040519081526020016100e7565b34801561018057600080fd5b5061014461018f366004610fa2565b610681565b3480156101a057600080fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b3480156101d457600080fd5b506000546100da906201000090046001600160a01b031681565b6101446101fc366004610fa2565b610a31565b34801561020d57600080fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b610144610243366004610fa2565b610af8565b34801561025457600080fd5b50610144610263366004610f4e565b610dfa565b34801561027457600080fd5b5061029c7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100e7565b3480156102bd57600080fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b0381166103775760008054604051620100009091046001600160a01b03169047908381818185875af1925050503d8060008114610345576040519150601f19603f3d011682016040523d82523d6000602084013e61034a565b606091505b50509050806103735760405163e2a1cc9160e01b81524760048201526024015b60405180910390fd5b5050565b6000546040516370a0823160e01b81526001600160a01b038084169263a9059cbb92620100009091049091169083906370a08231906103ba903090600401610f25565b602060405180830381865afa1580156103d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fb9190610fbb565b6040518363ffffffff1660e01b8152600401610418929190610fd4565b6020604051808303816000875af1158015610437573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103739190610fed565b50565b6000828173471ece3750da237f93b8e339c536989b8978a437196001600160a01b0385160161056557604051630757bc8160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630757bc819061051990859088907f0000000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009060040161100f565b600060405180830381865afa158015610536573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261055e919081019061106b565b5091508190505b604051630757bc8160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630757bc81906106179085907f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009060040161100f565b600060405180830381865afa158015610634573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261065c919081019061106b565b509050606461066c82605f611153565b6106769190611172565b925050505b92915050565b600080546201000090046001600160a01b031633036106a15760006106ab565b67016345785d8a00005b6001600160401b0316905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016107049190610f25565b602060405180830381865afa158015610721573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190610fbb565b90506000610773827f000000000000000000000000000000000000000000000000000000000000000061045e565b90508084116107825780610784565b835b60405163095ea7b360e01b81529094506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906107f5907f0000000000000000000000000000000000000000000000000000000000000000908690600401610fd4565b6020604051808303816000875af1158015610814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108389190610fed565b50604080516080810182526001600160601b03197f0000000000000000000000000000000000000000000000000000000000000000606090811b821660a084015261027160ec1b60b48401527f0000000000000000000000000000000000000000000000000000000000000000901b1660b7820152815180820360ab01815260cb820183528152600080546201000090046001600160a01b031660208301529181016108e48686611194565b815260200186905260405163b858183f60e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b858183f9061093b9084906004016111a7565b6020604051808303816000875af115801561095a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097e9190610fbb565b506000546201000090046001600160a01b03163314610a2a5760405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906109e59033908890600401610fd4565b6020604051808303816000875af1158015610a04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a289190610fed565b505b5050505050565b478015610a415761037382610af8565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610a8d903090600401610f25565b602060405180830381865afa158015610aaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ace9190610fbb565b90508015610adf5761037382610681565b60405163701b93d160e11b815260040160405180910390fd5b600080546201000090046001600160a01b03163314610b3157610b1f48633b9aca00611226565b610b2c9062061a80611153565b610b34565b60005b9050476000610b578273471ece3750da237f93b8e339c536989b8978a43861045e565b9050808411610b665780610b68565b835b60405163095ea7b360e01b815290945073471ece3750da237f93b8e339c536989b8978a4389063095ea7b390610bc4907f0000000000000000000000000000000000000000000000000000000000000000908690600401610fd4565b6020604051808303816000875af1158015610be3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c079190610fed565b50604080516080810182527308e3d9c6ea1b446ff2771c6738a6d313712f148760631b60a082015261017760eb1b60b48201526001600160601b03197f0000000000000000000000000000000000000000000000000000000000000000606090811b821660b784015261027160ec1b60cb8401527f0000000000000000000000000000000000000000000000000000000000000000901b1660ce820152815180820360c201815260e2820183528152600080546201000090046001600160a01b03166020830152918101610cdb8686611194565b815260200186905260405163b858183f60e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b858183f90610d329084906004016111a7565b6020604051808303816000875af1158015610d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d759190610fbb565b506000546201000090046001600160a01b03163314610a2a57604051600090339086908381818185875af1925050503d8060008114610dd0576040519150601f19603f3d011682016040523d82523d6000602084013e610dd5565b606091505b5050905080610a285760405163e2a1cc9160e01b81526004810186905260240161036a565b600054610100900460ff1615808015610e1a5750600054600160ff909116105b80610e345750303b158015610e34575060005460ff166001145b610e975760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161036a565b6000805460ff191660011790558015610eba576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b038516021790558015610373576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6001600160a01b0391909116815260200190565b6001600160a01b038116811461045b57600080fd5b600060208284031215610f6057600080fd5b8135610f6b81610f39565b9392505050565b60008060408385031215610f8557600080fd5b823591506020830135610f9781610f39565b809150509250929050565b600060208284031215610fb457600080fd5b5035919050565b600060208284031215610fcd57600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b600060208284031215610fff57600080fd5b81518015158114610f6b57600080fd5b6001600160801b039490941684526001600160a01b0392831660208501529116604083015263ffffffff16606082015260800190565b634e487b7160e01b600052604160045260246000fd5b805161106681610f39565b919050565b6000806040838503121561107e57600080fd5b8251602080850151919350906001600160401b038082111561109f57600080fd5b818601915086601f8301126110b357600080fd5b8151818111156110c5576110c5611045565b8060051b604051601f19603f830116810181811085821117156110ea576110ea611045565b60405291825284820192508381018501918983111561110857600080fd5b938501935b8285101561112d5761111e8561105b565b8452938501939285019261110d565b8096505050505050509250929050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561116d5761116d61113d565b500290565b60008261118f57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561067b5761067b61113d565b60006020808352835160808285015280518060a086015260005b818110156111dd5782810184015186820160c0015283016111c1565b50600060c08287010152918501516001600160a01b0381166040860152916040860151606086810191909152909501516080850152505050601f91909101601f19160160c00190565b8082018082111561067b5761067b61113d56fea2646970667358221220ba1dccba0e8d51fbfd40d3cf5d797df82a47de3edf9b7e2205bd7bb17f7eb92864736f6c63430008100033";
|
|
81
|
+
|
|
82
|
+
type BuyGDCloneFactoryConstructorParams =
|
|
83
|
+
| [signer?: Signer]
|
|
84
|
+
| ConstructorParameters<typeof ContractFactory>;
|
|
85
|
+
|
|
86
|
+
const isSuperArgs = (
|
|
87
|
+
xs: BuyGDCloneFactoryConstructorParams
|
|
88
|
+
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
|
|
89
|
+
|
|
90
|
+
export class BuyGDCloneFactory__factory extends ContractFactory {
|
|
91
|
+
constructor(...args: BuyGDCloneFactoryConstructorParams) {
|
|
92
|
+
if (isSuperArgs(args)) {
|
|
93
|
+
super(...args);
|
|
94
|
+
} else {
|
|
95
|
+
super(_abi, _bytecode, args[0]);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
deploy(
|
|
100
|
+
_router: string,
|
|
101
|
+
_cusd: string,
|
|
102
|
+
_gd: string,
|
|
103
|
+
_oracle: string,
|
|
104
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
105
|
+
): Promise<BuyGDCloneFactory> {
|
|
106
|
+
return super.deploy(
|
|
107
|
+
_router,
|
|
108
|
+
_cusd,
|
|
109
|
+
_gd,
|
|
110
|
+
_oracle,
|
|
111
|
+
overrides || {}
|
|
112
|
+
) as Promise<BuyGDCloneFactory>;
|
|
113
|
+
}
|
|
114
|
+
getDeployTransaction(
|
|
115
|
+
_router: string,
|
|
116
|
+
_cusd: string,
|
|
117
|
+
_gd: string,
|
|
118
|
+
_oracle: string,
|
|
119
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
120
|
+
): TransactionRequest {
|
|
121
|
+
return super.getDeployTransaction(
|
|
122
|
+
_router,
|
|
123
|
+
_cusd,
|
|
124
|
+
_gd,
|
|
125
|
+
_oracle,
|
|
126
|
+
overrides || {}
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
attach(address: string): BuyGDCloneFactory {
|
|
130
|
+
return super.attach(address) as BuyGDCloneFactory;
|
|
131
|
+
}
|
|
132
|
+
connect(signer: Signer): BuyGDCloneFactory__factory {
|
|
133
|
+
return super.connect(signer) as BuyGDCloneFactory__factory;
|
|
134
|
+
}
|
|
135
|
+
static readonly bytecode = _bytecode;
|
|
136
|
+
static readonly abi = _abi;
|
|
137
|
+
static createInterface(): BuyGDCloneFactoryInterface {
|
|
138
|
+
return new utils.Interface(_abi) as BuyGDCloneFactoryInterface;
|
|
139
|
+
}
|
|
140
|
+
static connect(
|
|
141
|
+
address: string,
|
|
142
|
+
signerOrProvider: Signer | Provider
|
|
143
|
+
): BuyGDCloneFactory {
|
|
144
|
+
return new Contract(address, _abi, signerOrProvider) as BuyGDCloneFactory;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
|
|
6
|
+
import { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
7
|
+
import type { BuyGDClone, BuyGDCloneInterface } from "../BuyGDClone";
|
|
8
|
+
|
|
9
|
+
const _abi = [
|
|
10
|
+
{
|
|
11
|
+
inputs: [
|
|
12
|
+
{
|
|
13
|
+
internalType: "contract ISwapRouter",
|
|
14
|
+
name: "_router",
|
|
15
|
+
type: "address",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
internalType: "address",
|
|
19
|
+
name: "_cusd",
|
|
20
|
+
type: "address",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
internalType: "address",
|
|
24
|
+
name: "_gd",
|
|
25
|
+
type: "address",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
internalType: "contract IStaticOracle",
|
|
29
|
+
name: "_oracle",
|
|
30
|
+
type: "address",
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
stateMutability: "nonpayable",
|
|
34
|
+
type: "constructor",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
inputs: [],
|
|
38
|
+
name: "NO_BALANCE",
|
|
39
|
+
type: "error",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
inputs: [
|
|
43
|
+
{
|
|
44
|
+
internalType: "uint256",
|
|
45
|
+
name: "",
|
|
46
|
+
type: "uint256",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
name: "REFUND_FAILED",
|
|
50
|
+
type: "error",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
anonymous: false,
|
|
54
|
+
inputs: [
|
|
55
|
+
{
|
|
56
|
+
indexed: false,
|
|
57
|
+
internalType: "uint8",
|
|
58
|
+
name: "version",
|
|
59
|
+
type: "uint8",
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
name: "Initialized",
|
|
63
|
+
type: "event",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
inputs: [],
|
|
67
|
+
name: "celo",
|
|
68
|
+
outputs: [
|
|
69
|
+
{
|
|
70
|
+
internalType: "address",
|
|
71
|
+
name: "",
|
|
72
|
+
type: "address",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
stateMutability: "view",
|
|
76
|
+
type: "function",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
inputs: [],
|
|
80
|
+
name: "cusd",
|
|
81
|
+
outputs: [
|
|
82
|
+
{
|
|
83
|
+
internalType: "address",
|
|
84
|
+
name: "",
|
|
85
|
+
type: "address",
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
stateMutability: "view",
|
|
89
|
+
type: "function",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
inputs: [],
|
|
93
|
+
name: "gd",
|
|
94
|
+
outputs: [
|
|
95
|
+
{
|
|
96
|
+
internalType: "address",
|
|
97
|
+
name: "",
|
|
98
|
+
type: "address",
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
stateMutability: "view",
|
|
102
|
+
type: "function",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
inputs: [
|
|
106
|
+
{
|
|
107
|
+
internalType: "address",
|
|
108
|
+
name: "_owner",
|
|
109
|
+
type: "address",
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
name: "initialize",
|
|
113
|
+
outputs: [],
|
|
114
|
+
stateMutability: "nonpayable",
|
|
115
|
+
type: "function",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
inputs: [
|
|
119
|
+
{
|
|
120
|
+
internalType: "uint256",
|
|
121
|
+
name: "baseAmount",
|
|
122
|
+
type: "uint256",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
internalType: "address",
|
|
126
|
+
name: "baseToken",
|
|
127
|
+
type: "address",
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
name: "minAmountByTWAP",
|
|
131
|
+
outputs: [
|
|
132
|
+
{
|
|
133
|
+
internalType: "uint256",
|
|
134
|
+
name: "minTwap",
|
|
135
|
+
type: "uint256",
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
stateMutability: "view",
|
|
139
|
+
type: "function",
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
inputs: [],
|
|
143
|
+
name: "oracle",
|
|
144
|
+
outputs: [
|
|
145
|
+
{
|
|
146
|
+
internalType: "contract IStaticOracle",
|
|
147
|
+
name: "",
|
|
148
|
+
type: "address",
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
stateMutability: "view",
|
|
152
|
+
type: "function",
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
inputs: [],
|
|
156
|
+
name: "owner",
|
|
157
|
+
outputs: [
|
|
158
|
+
{
|
|
159
|
+
internalType: "address",
|
|
160
|
+
name: "",
|
|
161
|
+
type: "address",
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
stateMutability: "view",
|
|
165
|
+
type: "function",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
inputs: [
|
|
169
|
+
{
|
|
170
|
+
internalType: "address",
|
|
171
|
+
name: "token",
|
|
172
|
+
type: "address",
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
name: "recover",
|
|
176
|
+
outputs: [],
|
|
177
|
+
stateMutability: "nonpayable",
|
|
178
|
+
type: "function",
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
inputs: [],
|
|
182
|
+
name: "router",
|
|
183
|
+
outputs: [
|
|
184
|
+
{
|
|
185
|
+
internalType: "contract ISwapRouter",
|
|
186
|
+
name: "",
|
|
187
|
+
type: "address",
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
stateMutability: "view",
|
|
191
|
+
type: "function",
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
inputs: [
|
|
195
|
+
{
|
|
196
|
+
internalType: "uint256",
|
|
197
|
+
name: "_minAmount",
|
|
198
|
+
type: "uint256",
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
name: "swap",
|
|
202
|
+
outputs: [],
|
|
203
|
+
stateMutability: "payable",
|
|
204
|
+
type: "function",
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
inputs: [
|
|
208
|
+
{
|
|
209
|
+
internalType: "uint256",
|
|
210
|
+
name: "_minAmount",
|
|
211
|
+
type: "uint256",
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
name: "swapCelo",
|
|
215
|
+
outputs: [],
|
|
216
|
+
stateMutability: "payable",
|
|
217
|
+
type: "function",
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
inputs: [
|
|
221
|
+
{
|
|
222
|
+
internalType: "uint256",
|
|
223
|
+
name: "_minAmount",
|
|
224
|
+
type: "uint256",
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
name: "swapCusd",
|
|
228
|
+
outputs: [],
|
|
229
|
+
stateMutability: "nonpayable",
|
|
230
|
+
type: "function",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
inputs: [],
|
|
234
|
+
name: "twapPeriod",
|
|
235
|
+
outputs: [
|
|
236
|
+
{
|
|
237
|
+
internalType: "uint32",
|
|
238
|
+
name: "",
|
|
239
|
+
type: "uint32",
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
stateMutability: "view",
|
|
243
|
+
type: "function",
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
stateMutability: "payable",
|
|
247
|
+
type: "receive",
|
|
248
|
+
},
|
|
249
|
+
];
|
|
250
|
+
|
|
251
|
+
const _bytecode =
|
|
252
|
+
"0x6101206040523480156200001257600080fd5b506040516200142038038062001420833981016040819052620000359162000078565b6001600160a01b0393841660805291831660c052821660e052166101005261012c60a052620000e0565b6001600160a01b03811681146200007557600080fd5b50565b600080600080608085870312156200008f57600080fd5b84516200009c816200005f565b6020860151909450620000af816200005f565b6040860151909350620000c2816200005f565b6060860151909250620000d5816200005f565b939692955090935050565b60805160a05160c05160e0516101005161126f620001b1600039600081816101a60152818161049e015261057c015260008181610213015281816105cd015281816108860152610c7d015260008181610102015281816104cf015281816105ab015281816106ba0152818161074f0152818161079e0152818161084e015281816109ae01528181610a580152610c4501526000818161027a015281816104f101526105ef0152600081816102c3015281816107cb0152818161090601528181610b9a0152610cfd015261126f6000f3fe6080604052600436106100a65760003560e01c8063051ed8ef146100b25780630c577bdc146100f05780630cd865ec14610124578063130acf441461014657806377e9acd9146101745780637dc0d1d0146101945780638da5cb5b146101c857806394b918de146101ee578063a5e598fc14610201578063c3683d0a14610235578063c4d66de814610248578063f620732614610268578063f887ea40146102b157600080fd5b366100ad57005b600080fd5b3480156100be57600080fd5b506100da73471ece3750da237f93b8e339c536989b8978a43881565b6040516100e79190610f25565b60405180910390f35b3480156100fc57600080fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b34801561013057600080fd5b5061014461013f366004610f4e565b6102e5565b005b34801561015257600080fd5b50610166610161366004610f72565b61045e565b6040519081526020016100e7565b34801561018057600080fd5b5061014461018f366004610fa2565b610681565b3480156101a057600080fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b3480156101d457600080fd5b506000546100da906201000090046001600160a01b031681565b6101446101fc366004610fa2565b610a31565b34801561020d57600080fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b610144610243366004610fa2565b610af8565b34801561025457600080fd5b50610144610263366004610f4e565b610dfa565b34801561027457600080fd5b5061029c7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100e7565b3480156102bd57600080fd5b506100da7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b0381166103775760008054604051620100009091046001600160a01b03169047908381818185875af1925050503d8060008114610345576040519150601f19603f3d011682016040523d82523d6000602084013e61034a565b606091505b50509050806103735760405163e2a1cc9160e01b81524760048201526024015b60405180910390fd5b5050565b6000546040516370a0823160e01b81526001600160a01b038084169263a9059cbb92620100009091049091169083906370a08231906103ba903090600401610f25565b602060405180830381865afa1580156103d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fb9190610fbb565b6040518363ffffffff1660e01b8152600401610418929190610fd4565b6020604051808303816000875af1158015610437573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103739190610fed565b50565b6000828173471ece3750da237f93b8e339c536989b8978a437196001600160a01b0385160161056557604051630757bc8160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630757bc819061051990859088907f0000000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009060040161100f565b600060405180830381865afa158015610536573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261055e919081019061106b565b5091508190505b604051630757bc8160e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630757bc81906106179085907f0000000000000000000000000000000000000000000000000000000000000000907f0000000000000000000000000000000000000000000000000000000000000000907f00000000000000000000000000000000000000000000000000000000000000009060040161100f565b600060405180830381865afa158015610634573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261065c919081019061106b565b509050606461066c82605f611153565b6106769190611172565b925050505b92915050565b600080546201000090046001600160a01b031633036106a15760006106ab565b67016345785d8a00005b6001600160401b0316905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016107049190610f25565b602060405180830381865afa158015610721573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190610fbb565b90506000610773827f000000000000000000000000000000000000000000000000000000000000000061045e565b90508084116107825780610784565b835b60405163095ea7b360e01b81529094506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906107f5907f0000000000000000000000000000000000000000000000000000000000000000908690600401610fd4565b6020604051808303816000875af1158015610814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108389190610fed565b50604080516080810182526001600160601b03197f0000000000000000000000000000000000000000000000000000000000000000606090811b821660a084015261027160ec1b60b48401527f0000000000000000000000000000000000000000000000000000000000000000901b1660b7820152815180820360ab01815260cb820183528152600080546201000090046001600160a01b031660208301529181016108e48686611194565b815260200186905260405163b858183f60e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b858183f9061093b9084906004016111a7565b6020604051808303816000875af115801561095a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097e9190610fbb565b506000546201000090046001600160a01b03163314610a2a5760405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906109e59033908890600401610fd4565b6020604051808303816000875af1158015610a04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a289190610fed565b505b5050505050565b478015610a415761037382610af8565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610a8d903090600401610f25565b602060405180830381865afa158015610aaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ace9190610fbb565b90508015610adf5761037382610681565b60405163701b93d160e11b815260040160405180910390fd5b600080546201000090046001600160a01b03163314610b3157610b1f48633b9aca00611226565b610b2c9062061a80611153565b610b34565b60005b9050476000610b578273471ece3750da237f93b8e339c536989b8978a43861045e565b9050808411610b665780610b68565b835b60405163095ea7b360e01b815290945073471ece3750da237f93b8e339c536989b8978a4389063095ea7b390610bc4907f0000000000000000000000000000000000000000000000000000000000000000908690600401610fd4565b6020604051808303816000875af1158015610be3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c079190610fed565b50604080516080810182527308e3d9c6ea1b446ff2771c6738a6d313712f148760631b60a082015261017760eb1b60b48201526001600160601b03197f0000000000000000000000000000000000000000000000000000000000000000606090811b821660b784015261027160ec1b60cb8401527f0000000000000000000000000000000000000000000000000000000000000000901b1660ce820152815180820360c201815260e2820183528152600080546201000090046001600160a01b03166020830152918101610cdb8686611194565b815260200186905260405163b858183f60e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063b858183f90610d329084906004016111a7565b6020604051808303816000875af1158015610d51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d759190610fbb565b506000546201000090046001600160a01b03163314610a2a57604051600090339086908381818185875af1925050503d8060008114610dd0576040519150601f19603f3d011682016040523d82523d6000602084013e610dd5565b606091505b5050905080610a285760405163e2a1cc9160e01b81526004810186905260240161036a565b600054610100900460ff1615808015610e1a5750600054600160ff909116105b80610e345750303b158015610e34575060005460ff166001145b610e975760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161036a565b6000805460ff191660011790558015610eba576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b038516021790558015610373576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6001600160a01b0391909116815260200190565b6001600160a01b038116811461045b57600080fd5b600060208284031215610f6057600080fd5b8135610f6b81610f39565b9392505050565b60008060408385031215610f8557600080fd5b823591506020830135610f9781610f39565b809150509250929050565b600060208284031215610fb457600080fd5b5035919050565b600060208284031215610fcd57600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b600060208284031215610fff57600080fd5b81518015158114610f6b57600080fd5b6001600160801b039490941684526001600160a01b0392831660208501529116604083015263ffffffff16606082015260800190565b634e487b7160e01b600052604160045260246000fd5b805161106681610f39565b919050565b6000806040838503121561107e57600080fd5b8251602080850151919350906001600160401b038082111561109f57600080fd5b818601915086601f8301126110b357600080fd5b8151818111156110c5576110c5611045565b8060051b604051601f19603f830116810181811085821117156110ea576110ea611045565b60405291825284820192508381018501918983111561110857600080fd5b938501935b8285101561112d5761111e8561105b565b8452938501939285019261110d565b8096505050505050509250929050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561116d5761116d61113d565b500290565b60008261118f57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561067b5761067b61113d565b60006020808352835160808285015280518060a086015260005b818110156111dd5782810184015186820160c0015283016111c1565b50600060c08287010152918501516001600160a01b0381166040860152916040860151606086810191909152909501516080850152505050601f91909101601f19160160c00190565b8082018082111561067b5761067b61113d56fea2646970667358221220ba1dccba0e8d51fbfd40d3cf5d797df82a47de3edf9b7e2205bd7bb17f7eb92864736f6c63430008100033";
|
|
253
|
+
|
|
254
|
+
type BuyGDCloneConstructorParams =
|
|
255
|
+
| [signer?: Signer]
|
|
256
|
+
| ConstructorParameters<typeof ContractFactory>;
|
|
257
|
+
|
|
258
|
+
const isSuperArgs = (
|
|
259
|
+
xs: BuyGDCloneConstructorParams
|
|
260
|
+
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
|
|
261
|
+
|
|
262
|
+
export class BuyGDClone__factory extends ContractFactory {
|
|
263
|
+
constructor(...args: BuyGDCloneConstructorParams) {
|
|
264
|
+
if (isSuperArgs(args)) {
|
|
265
|
+
super(...args);
|
|
266
|
+
} else {
|
|
267
|
+
super(_abi, _bytecode, args[0]);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
deploy(
|
|
272
|
+
_router: string,
|
|
273
|
+
_cusd: string,
|
|
274
|
+
_gd: string,
|
|
275
|
+
_oracle: string,
|
|
276
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
277
|
+
): Promise<BuyGDClone> {
|
|
278
|
+
return super.deploy(
|
|
279
|
+
_router,
|
|
280
|
+
_cusd,
|
|
281
|
+
_gd,
|
|
282
|
+
_oracle,
|
|
283
|
+
overrides || {}
|
|
284
|
+
) as Promise<BuyGDClone>;
|
|
285
|
+
}
|
|
286
|
+
getDeployTransaction(
|
|
287
|
+
_router: string,
|
|
288
|
+
_cusd: string,
|
|
289
|
+
_gd: string,
|
|
290
|
+
_oracle: string,
|
|
291
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
292
|
+
): TransactionRequest {
|
|
293
|
+
return super.getDeployTransaction(
|
|
294
|
+
_router,
|
|
295
|
+
_cusd,
|
|
296
|
+
_gd,
|
|
297
|
+
_oracle,
|
|
298
|
+
overrides || {}
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
attach(address: string): BuyGDClone {
|
|
302
|
+
return super.attach(address) as BuyGDClone;
|
|
303
|
+
}
|
|
304
|
+
connect(signer: Signer): BuyGDClone__factory {
|
|
305
|
+
return super.connect(signer) as BuyGDClone__factory;
|
|
306
|
+
}
|
|
307
|
+
static readonly bytecode = _bytecode;
|
|
308
|
+
static readonly abi = _abi;
|
|
309
|
+
static createInterface(): BuyGDCloneInterface {
|
|
310
|
+
return new utils.Interface(_abi) as BuyGDCloneInterface;
|
|
311
|
+
}
|
|
312
|
+
static connect(
|
|
313
|
+
address: string,
|
|
314
|
+
signerOrProvider: Signer | Provider
|
|
315
|
+
): BuyGDClone {
|
|
316
|
+
return new Contract(address, _abi, signerOrProvider) as BuyGDClone;
|
|
317
|
+
}
|
|
318
|
+
}
|