@gooddollar/goodprotocol 2.0.25-beta.6 → 2.0.25-beta.7
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/OneTimeReward.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/identity/IdentityV2.sol/IdentityV2.dbg.json +1 -1
- 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 +4 -0
- package/artifacts/contracts/invite/OneTimeReward.sol/OneTimeReward.json +291 -0
- 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/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/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- 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/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/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/ExchangeHelper.sol/ExchangeHelper.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/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/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.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/BuyGDClone.sol/IQuoterV2.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/ISwapRouter.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/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/OneTimeReward.sol +87 -0
- package/package.json +1 -1
- package/scripts/deployFullDAO.ts +6 -4
- package/test/helpers.ts +2 -0
- package/test/reserve/GoodReserveCDai.test.ts +2 -1
- package/types/@openzeppelin/contracts/access/Ownable.ts +175 -0
- package/types/@openzeppelin/contracts/access/index.ts +1 -0
- package/types/contracts/invite/OneTimeReward.ts +521 -0
- package/types/contracts/invite/index.ts +1 -0
- package/types/factories/@openzeppelin/contracts/access/Ownable__factory.ts +78 -0
- package/types/factories/@openzeppelin/contracts/access/index.ts +1 -0
- package/types/factories/contracts/invite/OneTimeReward__factory.ts +361 -0
- package/types/factories/contracts/invite/index.ts +1 -0
- package/types/hardhat.d.ts +18 -0
- package/types/index.ts +4 -0
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import {
|
|
5
|
+
Signer,
|
|
6
|
+
utils,
|
|
7
|
+
Contract,
|
|
8
|
+
ContractFactory,
|
|
9
|
+
BigNumberish,
|
|
10
|
+
Overrides,
|
|
11
|
+
} from "ethers";
|
|
12
|
+
import type { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
13
|
+
import type {
|
|
14
|
+
OneTimeReward,
|
|
15
|
+
OneTimeRewardInterface,
|
|
16
|
+
} from "../../../contracts/invite/OneTimeReward";
|
|
17
|
+
|
|
18
|
+
const _abi = [
|
|
19
|
+
{
|
|
20
|
+
inputs: [
|
|
21
|
+
{
|
|
22
|
+
internalType: "uint256",
|
|
23
|
+
name: "_rewardAmount",
|
|
24
|
+
type: "uint256",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
internalType: "contract INameService",
|
|
28
|
+
name: "_nameService",
|
|
29
|
+
type: "address",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
stateMutability: "nonpayable",
|
|
33
|
+
type: "constructor",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
anonymous: false,
|
|
37
|
+
inputs: [
|
|
38
|
+
{
|
|
39
|
+
indexed: true,
|
|
40
|
+
internalType: "address",
|
|
41
|
+
name: "previousOwner",
|
|
42
|
+
type: "address",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
indexed: true,
|
|
46
|
+
internalType: "address",
|
|
47
|
+
name: "newOwner",
|
|
48
|
+
type: "address",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
name: "OwnershipTransferred",
|
|
52
|
+
type: "event",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
anonymous: false,
|
|
56
|
+
inputs: [
|
|
57
|
+
{
|
|
58
|
+
indexed: true,
|
|
59
|
+
internalType: "address",
|
|
60
|
+
name: "user",
|
|
61
|
+
type: "address",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
indexed: false,
|
|
65
|
+
internalType: "uint256",
|
|
66
|
+
name: "amount",
|
|
67
|
+
type: "uint256",
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
name: "RewardClaimed",
|
|
71
|
+
type: "event",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
inputs: [],
|
|
75
|
+
name: "avatar",
|
|
76
|
+
outputs: [
|
|
77
|
+
{
|
|
78
|
+
internalType: "address",
|
|
79
|
+
name: "",
|
|
80
|
+
type: "address",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
stateMutability: "view",
|
|
84
|
+
type: "function",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
inputs: [],
|
|
88
|
+
name: "checkActiveAndBalance",
|
|
89
|
+
outputs: [
|
|
90
|
+
{
|
|
91
|
+
internalType: "bool",
|
|
92
|
+
name: "",
|
|
93
|
+
type: "bool",
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
stateMutability: "view",
|
|
97
|
+
type: "function",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
inputs: [
|
|
101
|
+
{
|
|
102
|
+
internalType: "address",
|
|
103
|
+
name: "_user",
|
|
104
|
+
type: "address",
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
name: "checkCanClaimReward",
|
|
108
|
+
outputs: [
|
|
109
|
+
{
|
|
110
|
+
internalType: "bool",
|
|
111
|
+
name: "",
|
|
112
|
+
type: "bool",
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
stateMutability: "view",
|
|
116
|
+
type: "function",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
inputs: [
|
|
120
|
+
{
|
|
121
|
+
internalType: "address",
|
|
122
|
+
name: "_user",
|
|
123
|
+
type: "address",
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
name: "claimReward",
|
|
127
|
+
outputs: [],
|
|
128
|
+
stateMutability: "nonpayable",
|
|
129
|
+
type: "function",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
inputs: [
|
|
133
|
+
{
|
|
134
|
+
internalType: "address",
|
|
135
|
+
name: "",
|
|
136
|
+
type: "address",
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
name: "claimed",
|
|
140
|
+
outputs: [
|
|
141
|
+
{
|
|
142
|
+
internalType: "bool",
|
|
143
|
+
name: "",
|
|
144
|
+
type: "bool",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
stateMutability: "view",
|
|
148
|
+
type: "function",
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
inputs: [],
|
|
152
|
+
name: "dao",
|
|
153
|
+
outputs: [
|
|
154
|
+
{
|
|
155
|
+
internalType: "contract Controller",
|
|
156
|
+
name: "",
|
|
157
|
+
type: "address",
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
stateMutability: "view",
|
|
161
|
+
type: "function",
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
inputs: [],
|
|
165
|
+
name: "getIdentity",
|
|
166
|
+
outputs: [
|
|
167
|
+
{
|
|
168
|
+
internalType: "contract IIdentityV2",
|
|
169
|
+
name: "",
|
|
170
|
+
type: "address",
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
stateMutability: "view",
|
|
174
|
+
type: "function",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
inputs: [],
|
|
178
|
+
name: "isActive",
|
|
179
|
+
outputs: [
|
|
180
|
+
{
|
|
181
|
+
internalType: "bool",
|
|
182
|
+
name: "",
|
|
183
|
+
type: "bool",
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
stateMutability: "view",
|
|
187
|
+
type: "function",
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
inputs: [],
|
|
191
|
+
name: "nameService",
|
|
192
|
+
outputs: [
|
|
193
|
+
{
|
|
194
|
+
internalType: "contract INameService",
|
|
195
|
+
name: "",
|
|
196
|
+
type: "address",
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
stateMutability: "view",
|
|
200
|
+
type: "function",
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
inputs: [],
|
|
204
|
+
name: "nativeToken",
|
|
205
|
+
outputs: [
|
|
206
|
+
{
|
|
207
|
+
internalType: "contract IGoodDollar",
|
|
208
|
+
name: "",
|
|
209
|
+
type: "address",
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
stateMutability: "view",
|
|
213
|
+
type: "function",
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
inputs: [],
|
|
217
|
+
name: "owner",
|
|
218
|
+
outputs: [
|
|
219
|
+
{
|
|
220
|
+
internalType: "address",
|
|
221
|
+
name: "",
|
|
222
|
+
type: "address",
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
stateMutability: "view",
|
|
226
|
+
type: "function",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
inputs: [],
|
|
230
|
+
name: "renounceOwnership",
|
|
231
|
+
outputs: [],
|
|
232
|
+
stateMutability: "nonpayable",
|
|
233
|
+
type: "function",
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
inputs: [],
|
|
237
|
+
name: "rewardAmount",
|
|
238
|
+
outputs: [
|
|
239
|
+
{
|
|
240
|
+
internalType: "uint256",
|
|
241
|
+
name: "",
|
|
242
|
+
type: "uint256",
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
stateMutability: "view",
|
|
246
|
+
type: "function",
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
inputs: [
|
|
250
|
+
{
|
|
251
|
+
internalType: "address",
|
|
252
|
+
name: "newOwner",
|
|
253
|
+
type: "address",
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
name: "transferOwnership",
|
|
257
|
+
outputs: [],
|
|
258
|
+
stateMutability: "nonpayable",
|
|
259
|
+
type: "function",
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
inputs: [],
|
|
263
|
+
name: "updateAvatar",
|
|
264
|
+
outputs: [],
|
|
265
|
+
stateMutability: "nonpayable",
|
|
266
|
+
type: "function",
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
inputs: [
|
|
270
|
+
{
|
|
271
|
+
internalType: "bool",
|
|
272
|
+
name: "_isActive",
|
|
273
|
+
type: "bool",
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
internalType: "uint256",
|
|
277
|
+
name: "_rewardAmount",
|
|
278
|
+
type: "uint256",
|
|
279
|
+
},
|
|
280
|
+
],
|
|
281
|
+
name: "updateSettings",
|
|
282
|
+
outputs: [],
|
|
283
|
+
stateMutability: "nonpayable",
|
|
284
|
+
type: "function",
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
inputs: [
|
|
288
|
+
{
|
|
289
|
+
internalType: "address",
|
|
290
|
+
name: "_token",
|
|
291
|
+
type: "address",
|
|
292
|
+
},
|
|
293
|
+
],
|
|
294
|
+
name: "withdrawAll",
|
|
295
|
+
outputs: [],
|
|
296
|
+
stateMutability: "nonpayable",
|
|
297
|
+
type: "function",
|
|
298
|
+
},
|
|
299
|
+
] as const;
|
|
300
|
+
|
|
301
|
+
const _bytecode =
|
|
302
|
+
"0x60806040523480156200001157600080fd5b5060405162000d9a38038062000d9a83398101604081905262000034916200021f565b6200003f3362000064565b60378290556036805460ff191660011790556200005c81620000b4565b505062000279565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600380546001600160a01b0319166001600160a01b038316179055620000d9620000dc565b50565b60035460405163bf40fac160e01b815260206004820152600a60248201526921a7a72a2927a62622a960b11b60448201526001600160a01b039091169063bf40fac190606401602060405180830381865afa15801562000140573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000166919062000252565b600180546001600160a01b0319166001600160a01b0392909216918217905560408051632d77bef360e11b81529051635aef7de6916004808201926020929091908290030181865afa158015620001c1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e7919062000252565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381168114620000d957600080fd5b600080604083850312156200023357600080fd5b825191506020830151620002478162000209565b809150509250929050565b6000602082840312156200026557600080fd5b8151620002728162000209565b9392505050565b610b1180620002896000396000f3fe608060405234801561001057600080fd5b50600436106100db5760003560e01c80631b3c90a8146100e057806322f3e2d4146100ea578063247fcf041461010c57806336afc6fa1461011f5780633e6326fc146101345780634162169f1461014757806353fadcfe1461015a5780635aef7de61461016d578063715018a6146101805780638da5cb5b14610188578063bc06847f14610190578063c884ef8314610198578063d279c191146101bb578063e1758bd8146101ce578063f2fde38b146101d6578063f7b2a7be146101e9578063fa09e63014610200575b600080fd5b6100e8610213565b005b6036546100f79060ff1681565b60405190151581526020015b60405180910390f35b6100e861011a3660046109fd565b61033a565b610127610359565b6040516101039190610a29565b600354610127906001600160a01b031681565b600154610127906001600160a01b031681565b6100f7610168366004610a52565b6103e5565b600254610127906001600160a01b031681565b6100e861046e565b610127610482565b6100f7610491565b6100f76101a6366004610a52565b60386020526000908152604090205460ff1681565b6100e86101c9366004610a52565b61052d565b6101276106e1565b6100e86101e4366004610a52565b61072d565b6101f260375481565b604051908152602001610103565b6100e861020e366004610a52565b6107a6565b60035460405163bf40fac160e01b815260206004820152600a60248201526921a7a72a2927a62622a960b11b60448201526001600160a01b039091169063bf40fac190606401602060405180830381865afa158015610276573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029a9190610a6f565b600180546001600160a01b0319166001600160a01b0392909216918217905560408051632d77bef360e11b81529051635aef7de6916004808201926020929091908290030181865afa1580156102f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103189190610a6f565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6103426108de565b6036805460ff191692151592909217909155603755565b60035460405163bf40fac160e01b81526020600482015260086024820152674944454e5449545960c01b60448201526000916001600160a01b03169063bf40fac1906064015b602060405180830381865afa1580156103bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e09190610a6f565b905090565b6000806103f0610359565b6001600160a01b0316632d0e9b46846040518263ffffffff1660e01b815260040161041b9190610a29565b602060405180830381865afa158015610438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045c9190610a6f565b90506104678161093d565b9392505050565b6104766108de565b610480600061099f565b565b6000546001600160a01b031690565b60365460009060ff166104a45750600090565b6037546104af6106e1565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016104da9190610a29565b602060405180830381865afa1580156104f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051b9190610a8c565b10156105275750600090565b50600190565b6000610537610359565b6001600160a01b0316632d0e9b46836040518263ffffffff1660e01b81526004016105629190610a29565b602060405180830381865afa15801561057f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a39190610a6f565b90506105ae8161093d565b6105fa5760405162461bcd60e51b8152602060048201526018602482015277155cd95c8818d85b9b9bdd0818db185a5b481c995dd85c9960421b60448201526064015b60405180910390fd5b6001600160a01b0381166000908152603860205260409020805460ff191660011790556106256106e1565b6001600160a01b031663a9059cbb836037546040518363ffffffff1660e01b8152600401610654929190610aa5565b6020604051808303816000875af1158015610673573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106979190610abe565b50816001600160a01b03167f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f72416037546040516106d591815260200190565b60405180910390a25050565b60035460405163bf40fac160e01b815260206004820152600a60248201526923a7a7a22227a62620a960b11b60448201526000916001600160a01b03169063bf40fac19060640161039f565b6107356108de565b6001600160a01b03811661079a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f1565b6107a38161099f565b50565b6107ae6108de565b6040516370a0823160e01b81526000906001600160a01b038316906370a08231906107dd903090600401610a29565b602060405180830381865afa1580156107fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081e9190610a8c565b9050600081116108685760405162461bcd60e51b81526020600482015260156024820152744e6f20746f6b656e7320746f20776974686472617760581b60448201526064016105f1565b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb906108969033908590600401610aa5565b6020604051808303816000875af11580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d99190610abe565b505050565b336108e7610482565b6001600160a01b0316146104805760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f1565b6000610947610491565b151560000361095857506000919050565b6001600160a01b03821661096e57506000919050565b6001600160a01b03821660009081526038602052604090205460ff161561099757506000919050565b506001919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80151581146107a357600080fd5b60008060408385031215610a1057600080fd5b8235610a1b816109ef565b946020939093013593505050565b6001600160a01b0391909116815260200190565b6001600160a01b03811681146107a357600080fd5b600060208284031215610a6457600080fd5b813561046781610a3d565b600060208284031215610a8157600080fd5b815161046781610a3d565b600060208284031215610a9e57600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b600060208284031215610ad057600080fd5b8151610467816109ef56fea2646970667358221220583798e4f70d1f1472603361c0d4947285243dccbf8b850679e5bed6e9b473e664736f6c63430008130033";
|
|
303
|
+
|
|
304
|
+
type OneTimeRewardConstructorParams =
|
|
305
|
+
| [signer?: Signer]
|
|
306
|
+
| ConstructorParameters<typeof ContractFactory>;
|
|
307
|
+
|
|
308
|
+
const isSuperArgs = (
|
|
309
|
+
xs: OneTimeRewardConstructorParams
|
|
310
|
+
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
|
|
311
|
+
|
|
312
|
+
export class OneTimeReward__factory extends ContractFactory {
|
|
313
|
+
constructor(...args: OneTimeRewardConstructorParams) {
|
|
314
|
+
if (isSuperArgs(args)) {
|
|
315
|
+
super(...args);
|
|
316
|
+
} else {
|
|
317
|
+
super(_abi, _bytecode, args[0]);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
override deploy(
|
|
322
|
+
_rewardAmount: BigNumberish,
|
|
323
|
+
_nameService: string,
|
|
324
|
+
overrides?: Overrides & { from?: string }
|
|
325
|
+
): Promise<OneTimeReward> {
|
|
326
|
+
return super.deploy(
|
|
327
|
+
_rewardAmount,
|
|
328
|
+
_nameService,
|
|
329
|
+
overrides || {}
|
|
330
|
+
) as Promise<OneTimeReward>;
|
|
331
|
+
}
|
|
332
|
+
override getDeployTransaction(
|
|
333
|
+
_rewardAmount: BigNumberish,
|
|
334
|
+
_nameService: string,
|
|
335
|
+
overrides?: Overrides & { from?: string }
|
|
336
|
+
): TransactionRequest {
|
|
337
|
+
return super.getDeployTransaction(
|
|
338
|
+
_rewardAmount,
|
|
339
|
+
_nameService,
|
|
340
|
+
overrides || {}
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
override attach(address: string): OneTimeReward {
|
|
344
|
+
return super.attach(address) as OneTimeReward;
|
|
345
|
+
}
|
|
346
|
+
override connect(signer: Signer): OneTimeReward__factory {
|
|
347
|
+
return super.connect(signer) as OneTimeReward__factory;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
static readonly bytecode = _bytecode;
|
|
351
|
+
static readonly abi = _abi;
|
|
352
|
+
static createInterface(): OneTimeRewardInterface {
|
|
353
|
+
return new utils.Interface(_abi) as OneTimeRewardInterface;
|
|
354
|
+
}
|
|
355
|
+
static connect(
|
|
356
|
+
address: string,
|
|
357
|
+
signerOrProvider: Signer | Provider
|
|
358
|
+
): OneTimeReward {
|
|
359
|
+
return new Contract(address, _abi, signerOrProvider) as OneTimeReward;
|
|
360
|
+
}
|
|
361
|
+
}
|
package/types/hardhat.d.ts
CHANGED
|
@@ -132,6 +132,10 @@ declare module "hardhat/types/runtime" {
|
|
|
132
132
|
name: "IAccessControl",
|
|
133
133
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
134
134
|
): Promise<Contracts.IAccessControl__factory>;
|
|
135
|
+
getContractFactory(
|
|
136
|
+
name: "Ownable",
|
|
137
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
138
|
+
): Promise<Contracts.Ownable__factory>;
|
|
135
139
|
getContractFactory(
|
|
136
140
|
name: "IERC1822Proxiable",
|
|
137
141
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
@@ -480,6 +484,10 @@ declare module "hardhat/types/runtime" {
|
|
|
480
484
|
name: "InvitesV2",
|
|
481
485
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
482
486
|
): Promise<Contracts.InvitesV2__factory>;
|
|
487
|
+
getContractFactory(
|
|
488
|
+
name: "OneTimeReward",
|
|
489
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
490
|
+
): Promise<Contracts.OneTimeReward__factory>;
|
|
483
491
|
getContractFactory(
|
|
484
492
|
name: "AaveMock",
|
|
485
493
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
@@ -1075,6 +1083,11 @@ declare module "hardhat/types/runtime" {
|
|
|
1075
1083
|
address: string,
|
|
1076
1084
|
signer?: ethers.Signer
|
|
1077
1085
|
): Promise<Contracts.IAccessControl>;
|
|
1086
|
+
getContractAt(
|
|
1087
|
+
name: "Ownable",
|
|
1088
|
+
address: string,
|
|
1089
|
+
signer?: ethers.Signer
|
|
1090
|
+
): Promise<Contracts.Ownable>;
|
|
1078
1091
|
getContractAt(
|
|
1079
1092
|
name: "IERC1822Proxiable",
|
|
1080
1093
|
address: string,
|
|
@@ -1510,6 +1523,11 @@ declare module "hardhat/types/runtime" {
|
|
|
1510
1523
|
address: string,
|
|
1511
1524
|
signer?: ethers.Signer
|
|
1512
1525
|
): Promise<Contracts.InvitesV2>;
|
|
1526
|
+
getContractAt(
|
|
1527
|
+
name: "OneTimeReward",
|
|
1528
|
+
address: string,
|
|
1529
|
+
signer?: ethers.Signer
|
|
1530
|
+
): Promise<Contracts.OneTimeReward>;
|
|
1513
1531
|
getContractAt(
|
|
1514
1532
|
name: "AaveMock",
|
|
1515
1533
|
address: string,
|
package/types/index.ts
CHANGED
|
@@ -74,6 +74,8 @@ export type { AccessControl } from "./@openzeppelin/contracts/access/AccessContr
|
|
|
74
74
|
export { AccessControl__factory } from "./factories/@openzeppelin/contracts/access/AccessControl__factory";
|
|
75
75
|
export type { IAccessControl } from "./@openzeppelin/contracts/access/IAccessControl";
|
|
76
76
|
export { IAccessControl__factory } from "./factories/@openzeppelin/contracts/access/IAccessControl__factory";
|
|
77
|
+
export type { Ownable } from "./@openzeppelin/contracts/access/Ownable";
|
|
78
|
+
export { Ownable__factory } from "./factories/@openzeppelin/contracts/access/Ownable__factory";
|
|
77
79
|
export type { IERC1822Proxiable } from "./@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable";
|
|
78
80
|
export { IERC1822Proxiable__factory } from "./factories/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable__factory";
|
|
79
81
|
export type { IBeacon } from "./@openzeppelin/contracts/proxy/beacon/IBeacon";
|
|
@@ -244,6 +246,8 @@ export type { InvitesV1 } from "./contracts/invite/InvitesV1";
|
|
|
244
246
|
export { InvitesV1__factory } from "./factories/contracts/invite/InvitesV1__factory";
|
|
245
247
|
export type { InvitesV2 } from "./contracts/invite/InvitesV2";
|
|
246
248
|
export { InvitesV2__factory } from "./factories/contracts/invite/InvitesV2__factory";
|
|
249
|
+
export type { OneTimeReward } from "./contracts/invite/OneTimeReward";
|
|
250
|
+
export { OneTimeReward__factory } from "./factories/contracts/invite/OneTimeReward__factory";
|
|
247
251
|
export type { AaveMock } from "./contracts/mocks/AaveMock";
|
|
248
252
|
export { AaveMock__factory } from "./factories/contracts/mocks/AaveMock__factory";
|
|
249
253
|
export type { AaveUSDMockOracle } from "./contracts/mocks/AaveUSDMockOracle";
|