@gooddollar/goodprotocol 1.0.24 → 1.0.26
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/FuseFaucet.min.json +1 -0
- package/artifacts/abis/FuseStakingV3.min.json +1 -0
- package/artifacts/abis/IConsensus.min.json +1 -0
- package/artifacts/abis/InvitesV1.min.json +1 -0
- package/artifacts/abis/PegSwap.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/ILendingPool.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/FuseFaucet.sol/FuseFaucet.dbg.json +4 -0
- package/artifacts/contracts/fuseFaucet/FuseFaucet.sol/FuseFaucet.json +325 -0
- package/artifacts/contracts/governance/ClaimersDistribution.sol/ClaimersDistribution.dbg.json +1 -1
- package/artifacts/contracts/governance/CompoundVotingMachine.sol/CompoundVotingMachine.dbg.json +1 -1
- package/artifacts/contracts/governance/GReputation.sol/GReputation.dbg.json +1 -1
- package/artifacts/contracts/governance/GovernanceStaking.sol/GovernanceStaking.dbg.json +1 -1
- package/artifacts/contracts/governance/MultiBaseGovernanceShareField.sol/MultiBaseGovernanceShareField.dbg.json +1 -1
- package/artifacts/contracts/governance/Reputation.sol/Reputation.dbg.json +1 -1
- package/artifacts/contracts/governance/StakersDistribution.sol/StakersDistribution.dbg.json +1 -1
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.dbg.json +4 -0
- package/artifacts/contracts/invite/InvitesV1.sol/InvitesV1.json +492 -0
- package/artifacts/contracts/mocks/AaveMock.sol/AaveMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DAIMock.sol/DAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/DecimalsMock.sol/DecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodCompoundStakingTest.sol/GoodCompoundStakingTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/GoodFundManagerTest.sol/GoodFundManagerTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/IncentiveControllerMock.sol/IncentiveControllerMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/LendingPoolMock.sol/LendingPoolMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTester.sol/OverMintTester.dbg.json +1 -1
- package/artifacts/contracts/mocks/OverMintTesterRegularStake.sol/OverMintTesterRegularStake.dbg.json +1 -1
- package/artifacts/contracts/mocks/SixteenDecimalsTokenMock.sol/SixteenDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/SwapHelperTest.sol/SwapHelperTest.dbg.json +1 -1
- package/artifacts/contracts/mocks/TwentyDecimalsTokenMock.sol/TwentyDecimalsTokenMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock2.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock3.dbg.json +1 -1
- package/artifacts/contracts/mocks/UpgradableMocks.sol/UpgradableMock4.dbg.json +1 -1
- package/artifacts/contracts/mocks/UsdcMock.sol/USDCMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cBATMock.sol/cBATMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAILowWorthMock.sol/cDAILowWorthMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAIMock.sol/cDAIMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDAINonMintableMock.sol/cDAINonMintableMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cDecimalsMock.sol/cDecimalsMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cSDTMock.sol/cSDTMock.dbg.json +1 -1
- package/artifacts/contracts/mocks/cUSDCMock.sol/cUSDCMock.dbg.json +1 -1
- package/artifacts/contracts/reserve/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 +4 -0
- package/artifacts/contracts/staking/FuseStakingV3.sol/FuseStakingV3.json +733 -0
- package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.dbg.json +4 -0
- package/artifacts/contracts/staking/FuseStakingV3.sol/IConsensus.json +104 -0
- package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.dbg.json +4 -0
- package/artifacts/contracts/staking/FuseStakingV3.sol/PegSwap.json +34 -0
- 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/ubi/UBIScheme.sol/UBIScheme.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/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/NameService.sol/NameService.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/OldMarketMaker.dbg.json +1 -1
- package/artifacts/contracts/utils/ProtocolUpgrade.sol/ProtocolUpgrade.dbg.json +1 -1
- package/artifacts/contracts/utils/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/ReputationTestHelper.sol/ReputationTestHelper.dbg.json +1 -1
- package/contracts/fuseFaucet/FuseFaucet.sol +172 -0
- package/contracts/invite/InvitesV1.sol +316 -0
- package/contracts/staking/FuseStakingV3.sol +641 -0
- package/hardhat.config.ts +7 -0
- package/package.json +5 -5
- package/scripts/misc/faucetStats.ts +103 -0
- package/scripts/upgradeToV2/upgradeToV2.ts +22 -7
- package/test/FuseFaucet.test.ts +168 -0
- package/test/InvitesV1.test.ts +354 -0
- package/test/staking/FuseStaking.test.ts +152 -0
- package/types/FuseFaucet.ts +498 -0
- package/types/FuseStakingV3.ts +1234 -0
- package/types/IConsensus.ts +225 -0
- package/types/InvitesV1.ts +797 -0
- package/types/OwnableUpgradeable.ts +166 -0
- package/types/PegSwap.ts +112 -0
- package/types/factories/FuseFaucet__factory.ts +373 -0
- package/types/factories/FuseStakingV3__factory.ts +781 -0
- package/types/factories/IConsensus__factory.ts +116 -0
- package/types/factories/InvitesV1__factory.ts +540 -0
- package/types/factories/OwnableUpgradeable__factory.ts +78 -0
- package/types/factories/PegSwap__factory.ts +46 -0
- package/types/hardhat.d.ts +54 -0
- package/types/index.ts +12 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
ethers,
|
|
7
|
+
EventFilter,
|
|
8
|
+
Signer,
|
|
9
|
+
BigNumber,
|
|
10
|
+
BigNumberish,
|
|
11
|
+
PopulatedTransaction,
|
|
12
|
+
BaseContract,
|
|
13
|
+
ContractTransaction,
|
|
14
|
+
Overrides,
|
|
15
|
+
PayableOverrides,
|
|
16
|
+
CallOverrides,
|
|
17
|
+
} from "ethers";
|
|
18
|
+
import { BytesLike } from "@ethersproject/bytes";
|
|
19
|
+
import { Listener, Provider } from "@ethersproject/providers";
|
|
20
|
+
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
|
|
21
|
+
import type {
|
|
22
|
+
TypedEventFilter,
|
|
23
|
+
TypedEvent,
|
|
24
|
+
TypedListener,
|
|
25
|
+
OnEvent,
|
|
26
|
+
} from "./common";
|
|
27
|
+
|
|
28
|
+
export interface IConsensusInterface extends ethers.utils.Interface {
|
|
29
|
+
functions: {
|
|
30
|
+
"delegate(address)": FunctionFragment;
|
|
31
|
+
"delegatedAmount(address,address)": FunctionFragment;
|
|
32
|
+
"delegators(address)": FunctionFragment;
|
|
33
|
+
"stakeAmount(address)": FunctionFragment;
|
|
34
|
+
"withdraw(address,uint256)": FunctionFragment;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
encodeFunctionData(functionFragment: "delegate", values: [string]): string;
|
|
38
|
+
encodeFunctionData(
|
|
39
|
+
functionFragment: "delegatedAmount",
|
|
40
|
+
values: [string, string]
|
|
41
|
+
): string;
|
|
42
|
+
encodeFunctionData(functionFragment: "delegators", values: [string]): string;
|
|
43
|
+
encodeFunctionData(functionFragment: "stakeAmount", values: [string]): string;
|
|
44
|
+
encodeFunctionData(
|
|
45
|
+
functionFragment: "withdraw",
|
|
46
|
+
values: [string, BigNumberish]
|
|
47
|
+
): string;
|
|
48
|
+
|
|
49
|
+
decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result;
|
|
50
|
+
decodeFunctionResult(
|
|
51
|
+
functionFragment: "delegatedAmount",
|
|
52
|
+
data: BytesLike
|
|
53
|
+
): Result;
|
|
54
|
+
decodeFunctionResult(functionFragment: "delegators", data: BytesLike): Result;
|
|
55
|
+
decodeFunctionResult(
|
|
56
|
+
functionFragment: "stakeAmount",
|
|
57
|
+
data: BytesLike
|
|
58
|
+
): Result;
|
|
59
|
+
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
|
|
60
|
+
|
|
61
|
+
events: {};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface IConsensus extends BaseContract {
|
|
65
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
66
|
+
attach(addressOrName: string): this;
|
|
67
|
+
deployed(): Promise<this>;
|
|
68
|
+
|
|
69
|
+
interface: IConsensusInterface;
|
|
70
|
+
|
|
71
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
72
|
+
event: TypedEventFilter<TEvent>,
|
|
73
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
74
|
+
toBlock?: string | number | undefined
|
|
75
|
+
): Promise<Array<TEvent>>;
|
|
76
|
+
|
|
77
|
+
listeners<TEvent extends TypedEvent>(
|
|
78
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
79
|
+
): Array<TypedListener<TEvent>>;
|
|
80
|
+
listeners(eventName?: string): Array<Listener>;
|
|
81
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
82
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
83
|
+
): this;
|
|
84
|
+
removeAllListeners(eventName?: string): this;
|
|
85
|
+
off: OnEvent<this>;
|
|
86
|
+
on: OnEvent<this>;
|
|
87
|
+
once: OnEvent<this>;
|
|
88
|
+
removeListener: OnEvent<this>;
|
|
89
|
+
|
|
90
|
+
functions: {
|
|
91
|
+
delegate(
|
|
92
|
+
_validator: string,
|
|
93
|
+
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
|
94
|
+
): Promise<ContractTransaction>;
|
|
95
|
+
|
|
96
|
+
delegatedAmount(
|
|
97
|
+
_address: string,
|
|
98
|
+
_validator: string,
|
|
99
|
+
overrides?: CallOverrides
|
|
100
|
+
): Promise<[BigNumber]>;
|
|
101
|
+
|
|
102
|
+
delegators(
|
|
103
|
+
_validator: string,
|
|
104
|
+
overrides?: CallOverrides
|
|
105
|
+
): Promise<[string[]]>;
|
|
106
|
+
|
|
107
|
+
stakeAmount(
|
|
108
|
+
_address: string,
|
|
109
|
+
overrides?: CallOverrides
|
|
110
|
+
): Promise<[BigNumber]>;
|
|
111
|
+
|
|
112
|
+
withdraw(
|
|
113
|
+
_validator: string,
|
|
114
|
+
_amount: BigNumberish,
|
|
115
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
116
|
+
): Promise<ContractTransaction>;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
delegate(
|
|
120
|
+
_validator: string,
|
|
121
|
+
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
|
122
|
+
): Promise<ContractTransaction>;
|
|
123
|
+
|
|
124
|
+
delegatedAmount(
|
|
125
|
+
_address: string,
|
|
126
|
+
_validator: string,
|
|
127
|
+
overrides?: CallOverrides
|
|
128
|
+
): Promise<BigNumber>;
|
|
129
|
+
|
|
130
|
+
delegators(_validator: string, overrides?: CallOverrides): Promise<string[]>;
|
|
131
|
+
|
|
132
|
+
stakeAmount(_address: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
133
|
+
|
|
134
|
+
withdraw(
|
|
135
|
+
_validator: string,
|
|
136
|
+
_amount: BigNumberish,
|
|
137
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
138
|
+
): Promise<ContractTransaction>;
|
|
139
|
+
|
|
140
|
+
callStatic: {
|
|
141
|
+
delegate(_validator: string, overrides?: CallOverrides): Promise<void>;
|
|
142
|
+
|
|
143
|
+
delegatedAmount(
|
|
144
|
+
_address: string,
|
|
145
|
+
_validator: string,
|
|
146
|
+
overrides?: CallOverrides
|
|
147
|
+
): Promise<BigNumber>;
|
|
148
|
+
|
|
149
|
+
delegators(
|
|
150
|
+
_validator: string,
|
|
151
|
+
overrides?: CallOverrides
|
|
152
|
+
): Promise<string[]>;
|
|
153
|
+
|
|
154
|
+
stakeAmount(
|
|
155
|
+
_address: string,
|
|
156
|
+
overrides?: CallOverrides
|
|
157
|
+
): Promise<BigNumber>;
|
|
158
|
+
|
|
159
|
+
withdraw(
|
|
160
|
+
_validator: string,
|
|
161
|
+
_amount: BigNumberish,
|
|
162
|
+
overrides?: CallOverrides
|
|
163
|
+
): Promise<void>;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
filters: {};
|
|
167
|
+
|
|
168
|
+
estimateGas: {
|
|
169
|
+
delegate(
|
|
170
|
+
_validator: string,
|
|
171
|
+
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
|
172
|
+
): Promise<BigNumber>;
|
|
173
|
+
|
|
174
|
+
delegatedAmount(
|
|
175
|
+
_address: string,
|
|
176
|
+
_validator: string,
|
|
177
|
+
overrides?: CallOverrides
|
|
178
|
+
): Promise<BigNumber>;
|
|
179
|
+
|
|
180
|
+
delegators(
|
|
181
|
+
_validator: string,
|
|
182
|
+
overrides?: CallOverrides
|
|
183
|
+
): Promise<BigNumber>;
|
|
184
|
+
|
|
185
|
+
stakeAmount(
|
|
186
|
+
_address: string,
|
|
187
|
+
overrides?: CallOverrides
|
|
188
|
+
): Promise<BigNumber>;
|
|
189
|
+
|
|
190
|
+
withdraw(
|
|
191
|
+
_validator: string,
|
|
192
|
+
_amount: BigNumberish,
|
|
193
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
194
|
+
): Promise<BigNumber>;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
populateTransaction: {
|
|
198
|
+
delegate(
|
|
199
|
+
_validator: string,
|
|
200
|
+
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
|
201
|
+
): Promise<PopulatedTransaction>;
|
|
202
|
+
|
|
203
|
+
delegatedAmount(
|
|
204
|
+
_address: string,
|
|
205
|
+
_validator: string,
|
|
206
|
+
overrides?: CallOverrides
|
|
207
|
+
): Promise<PopulatedTransaction>;
|
|
208
|
+
|
|
209
|
+
delegators(
|
|
210
|
+
_validator: string,
|
|
211
|
+
overrides?: CallOverrides
|
|
212
|
+
): Promise<PopulatedTransaction>;
|
|
213
|
+
|
|
214
|
+
stakeAmount(
|
|
215
|
+
_address: string,
|
|
216
|
+
overrides?: CallOverrides
|
|
217
|
+
): Promise<PopulatedTransaction>;
|
|
218
|
+
|
|
219
|
+
withdraw(
|
|
220
|
+
_validator: string,
|
|
221
|
+
_amount: BigNumberish,
|
|
222
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
223
|
+
): Promise<PopulatedTransaction>;
|
|
224
|
+
};
|
|
225
|
+
}
|