@gooddollar/goodprotocol 1.0.30-beta.2 → 1.0.30
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/DistributionHelper.min.json +1 -1
- package/artifacts/abis/DistributionHelperTest.min.json +1 -1
- package/artifacts/abis/DistributionHelperTestHelper.min.json +1 -1
- package/artifacts/abis/GoodReserveCDai.min.json +1 -1
- 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/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/FuseFaucet.sol/FuseFaucet.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/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/invite/InvitesV1.sol/InvitesV1.dbg.json +1 -1
- 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/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 +9 -2
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.dbg.json +1 -1
- package/artifacts/contracts/mocks/DistributionHelperTest.sol/DistributionHelperTestHelper.json +9 -2
- 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/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/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 +9 -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 +8 -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/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.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/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/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/MultichainBridgeHelper.sol/MultichainBridgeHelper.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/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/reserve/DistributionHelper.sol +4 -0
- package/contracts/reserve/GoodReserveCDai.sol +14 -4
- package/hardhat.config.ts +27 -2
- package/package.json +10 -5
- package/releases/deployment.json +47 -5
- package/scripts/analytics/activeWalletsStats.ts +4 -0
- package/scripts/analytics/gdinflow.ts +3 -0
- package/scripts/analytics/p2pTxs.ts +582 -0
- package/scripts/analytics/tokenInOutStats.ts +3 -1
- package/scripts/deployGnosisSafe.ts +21 -21
- package/scripts/gdx/gdxAirdropCalculation.ts +1 -1
- package/scripts/multichain-deploy/helpers.ts +141 -5
- package/scripts/multichain-deploy/v3-upgrade.ts +219 -0
- package/scripts/staking/stakersGdRewardsCalculation.ts +57 -46
- package/types/DistributionHelper.ts +27 -0
- package/types/DistributionHelperTest.ts +27 -0
- package/types/DistributionHelperTestHelper.ts +27 -0
- package/types/GoodReserveCDai.ts +12 -6
- package/types/factories/AaveStakingFactory__factory.ts +1 -1
- package/types/factories/CompoundStakingFactory__factory.ts +1 -1
- package/types/factories/DistributionHelperTestHelper__factory.ts +8 -1
- package/types/factories/DistributionHelperTest__factory.ts +8 -1
- package/types/factories/DistributionHelper__factory.ts +8 -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 +7 -1
- package/types/factories/OverMintTesterRegularStake__factory.ts +1 -1
- package/types/factories/StakersDistribution__factory.ts +1 -1
- package/yarn.lock +1114 -550
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { Contract, ContractFactory, Signer } from "ethers";
|
|
2
2
|
import { network, ethers, upgrades, run } from "hardhat";
|
|
3
|
-
import
|
|
3
|
+
import * as safeethers from "ethers";
|
|
4
4
|
import { TransactionResponse } from "@ethersproject/providers";
|
|
5
|
+
import Safe from "@gnosis.pm/safe-core-sdk";
|
|
6
|
+
import EthersAdapter from "@gnosis.pm/safe-ethers-lib";
|
|
7
|
+
import { MetaTransactionData } from "@gnosis.pm/safe-core-sdk-types";
|
|
8
|
+
import SafeClient from "@gnosis.pm/safe-service-client";
|
|
9
|
+
|
|
5
10
|
import dao from "../../releases/deployment.json";
|
|
6
11
|
|
|
7
|
-
const networkName =
|
|
12
|
+
const networkName =
|
|
13
|
+
network.name === "localhost" ? "production-mainnet" : network.name;
|
|
8
14
|
let totalGas = 0;
|
|
9
15
|
const gasUsage = {};
|
|
10
16
|
const GAS_SETTINGS = { gasLimit: 5000000 };
|
|
11
|
-
let release: { [key: string]: any } = dao[
|
|
17
|
+
let release: { [key: string]: any } = dao[networkName];
|
|
12
18
|
|
|
13
19
|
export const printDeploy = async (
|
|
14
20
|
c: Contract | TransactionResponse
|
|
@@ -42,7 +48,7 @@ export const deployDeterministic = async (
|
|
|
42
48
|
) => {
|
|
43
49
|
try {
|
|
44
50
|
let proxyFactory;
|
|
45
|
-
if (
|
|
51
|
+
if (networkName.startsWith("develop")) {
|
|
46
52
|
proxyFactory = await (
|
|
47
53
|
await ethers.getContractFactory("ProxyFactory1967")
|
|
48
54
|
).deploy();
|
|
@@ -152,10 +158,140 @@ export const executeViaGuardian = async (
|
|
|
152
158
|
.sendTransaction({ to: contract, data: encoded })
|
|
153
159
|
.then(printDeploy);
|
|
154
160
|
} else {
|
|
155
|
-
|
|
161
|
+
const simulationResult = await ctrl.callStatic.genericCall(
|
|
162
|
+
contract,
|
|
163
|
+
encoded,
|
|
164
|
+
release.Avatar,
|
|
165
|
+
ethValues[i],
|
|
166
|
+
{ from: await guardian.getAddress() }
|
|
167
|
+
);
|
|
168
|
+
console.log("executing genericCall:", {
|
|
169
|
+
sigHash,
|
|
170
|
+
encoded,
|
|
171
|
+
simulationResult
|
|
172
|
+
});
|
|
156
173
|
await ctrl
|
|
157
174
|
.genericCall(contract, encoded, release.Avatar, ethValues[i])
|
|
158
175
|
.then(printDeploy);
|
|
159
176
|
}
|
|
160
177
|
}
|
|
161
178
|
};
|
|
179
|
+
|
|
180
|
+
export const executeViaSafe = async (
|
|
181
|
+
contracts,
|
|
182
|
+
ethValues,
|
|
183
|
+
functionSigs,
|
|
184
|
+
functionInputs,
|
|
185
|
+
safeAddress: string,
|
|
186
|
+
safeSigner: Signer,
|
|
187
|
+
txServiceUrl = "https://safe-transaction-mainnet.safe.global"
|
|
188
|
+
) => {
|
|
189
|
+
const ethAdapter = new EthersAdapter({
|
|
190
|
+
ethers: safeethers,
|
|
191
|
+
signerOrProvider: safeSigner
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
const safeService = new SafeClient({
|
|
195
|
+
txServiceUrl,
|
|
196
|
+
ethAdapter
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
const safeSdk = await Safe.create({ ethAdapter, safeAddress });
|
|
200
|
+
|
|
201
|
+
let release: { [key: string]: any } = dao[networkName];
|
|
202
|
+
const ctrl = await ethers.getContractAt(
|
|
203
|
+
"Controller",
|
|
204
|
+
release.Controller,
|
|
205
|
+
null
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
const safeTransactionData: MetaTransactionData[] = [];
|
|
209
|
+
|
|
210
|
+
for (let i = 0; i < contracts.length; i++) {
|
|
211
|
+
const contract = contracts[i];
|
|
212
|
+
|
|
213
|
+
const sigHash = ethers.utils
|
|
214
|
+
.keccak256(ethers.utils.toUtf8Bytes(functionSigs[i]))
|
|
215
|
+
.slice(0, 10);
|
|
216
|
+
const encoded = ethers.utils.solidityPack(
|
|
217
|
+
["bytes4", "bytes"],
|
|
218
|
+
[sigHash, functionInputs[i]]
|
|
219
|
+
);
|
|
220
|
+
console.log(
|
|
221
|
+
"creating tx:",
|
|
222
|
+
contracts[i],
|
|
223
|
+
functionSigs[i],
|
|
224
|
+
functionInputs[i],
|
|
225
|
+
encoded
|
|
226
|
+
);
|
|
227
|
+
if (contract === ctrl.address) {
|
|
228
|
+
const simulationResult = await ctrl.callStatic[functionSigs[i]](
|
|
229
|
+
...functionInputs[i],
|
|
230
|
+
{ from: safeAddress, value: ethValues[i] }
|
|
231
|
+
);
|
|
232
|
+
console.log("executing controller call:", {
|
|
233
|
+
sigHash,
|
|
234
|
+
encoded,
|
|
235
|
+
simulationResult
|
|
236
|
+
});
|
|
237
|
+
safeTransactionData.push({
|
|
238
|
+
to: ctrl.address,
|
|
239
|
+
value: ethValues[i],
|
|
240
|
+
data: encoded
|
|
241
|
+
});
|
|
242
|
+
} else {
|
|
243
|
+
console.log("executing genericCall:", {
|
|
244
|
+
sigHash,
|
|
245
|
+
encoded,
|
|
246
|
+
contract,
|
|
247
|
+
avatar: release.Avatar,
|
|
248
|
+
value: ethValues[i]
|
|
249
|
+
});
|
|
250
|
+
const simulationResult = await ctrl.callStatic.genericCall(
|
|
251
|
+
contract,
|
|
252
|
+
encoded,
|
|
253
|
+
release.Avatar,
|
|
254
|
+
ethValues[i],
|
|
255
|
+
{ from: safeAddress }
|
|
256
|
+
);
|
|
257
|
+
console.log("executing genericCall:", {
|
|
258
|
+
sigHash,
|
|
259
|
+
simulationResult
|
|
260
|
+
});
|
|
261
|
+
const genericEncode = ctrl.interface.encodeFunctionData("genericCall", [
|
|
262
|
+
contract,
|
|
263
|
+
encoded,
|
|
264
|
+
release.Avatar,
|
|
265
|
+
ethValues[i]
|
|
266
|
+
]);
|
|
267
|
+
safeTransactionData.push({
|
|
268
|
+
to: ctrl.address,
|
|
269
|
+
value: ethValues[i],
|
|
270
|
+
data: genericEncode
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const safeTransaction = await safeSdk.createTransaction({
|
|
276
|
+
safeTransactionData
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
const safeTxHash = await safeSdk.getTransactionHash(safeTransaction);
|
|
280
|
+
const signedHash = await safeSdk.signTransactionHash(safeTxHash);
|
|
281
|
+
|
|
282
|
+
const senderAddress = await safeSigner.getAddress();
|
|
283
|
+
console.log("propose safe transaction", {
|
|
284
|
+
safeAddress,
|
|
285
|
+
safeTransactionData: safeTransaction.data,
|
|
286
|
+
safeTxHash,
|
|
287
|
+
senderSignature: signedHash,
|
|
288
|
+
senderAddress
|
|
289
|
+
});
|
|
290
|
+
await safeService.proposeTransaction({
|
|
291
|
+
safeAddress,
|
|
292
|
+
safeTransactionData: safeTransaction.data,
|
|
293
|
+
safeTxHash,
|
|
294
|
+
senderSignature: signedHash.data,
|
|
295
|
+
senderAddress
|
|
296
|
+
});
|
|
297
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/***
|
|
2
|
+
* This script will deploy a reserve upgrade and the DistributionHelper so that some of the expansion can be allocated
|
|
3
|
+
* for non-ubi purposes
|
|
4
|
+
* Upgrade process:
|
|
5
|
+
* mainnet:
|
|
6
|
+
* - deploy reserve
|
|
7
|
+
* - deploy distributionHelper
|
|
8
|
+
* - create proposal that:
|
|
9
|
+
* - upgrades the reserve
|
|
10
|
+
* - sets the distributionHelper at reserve with the agreed bps
|
|
11
|
+
* - add to the distributionHelper the contracts addresses to receive part of the UBI
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { network, ethers } from "hardhat";
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
deployDeterministic,
|
|
18
|
+
printDeploy,
|
|
19
|
+
executeViaGuardian,
|
|
20
|
+
executeViaSafe
|
|
21
|
+
} from "../multichain-deploy/helpers";
|
|
22
|
+
|
|
23
|
+
import releaser from "../releaser";
|
|
24
|
+
import dao from "../../releases/deployment.json";
|
|
25
|
+
import {
|
|
26
|
+
CompoundVotingMachine,
|
|
27
|
+
DistributionHelper,
|
|
28
|
+
Controller,
|
|
29
|
+
NameService
|
|
30
|
+
} from "../../types";
|
|
31
|
+
const { name: networkName } = network;
|
|
32
|
+
|
|
33
|
+
export const deployMainnet = async () => {
|
|
34
|
+
let [root, ...signers] = await ethers.getSigners();
|
|
35
|
+
|
|
36
|
+
let executionMethod = "safe";
|
|
37
|
+
let communitySafe = "0x5Eb5f5fE13d1D5e6440DbD5913412299Bc5B5564";
|
|
38
|
+
|
|
39
|
+
const networkKey =
|
|
40
|
+
networkName === "localhost" ? "production-mainnet" : networkName;
|
|
41
|
+
let release: { [key: string]: any } = dao[networkKey];
|
|
42
|
+
|
|
43
|
+
let safeOwner = new ethers.Wallet(
|
|
44
|
+
process.env.SAFEOWNER_PRIVATE_KEY || ethers.constants.HashZero,
|
|
45
|
+
ethers.provider
|
|
46
|
+
);
|
|
47
|
+
//test with guardians safe on hardhat mainnet fork
|
|
48
|
+
if (network.name === "localhost") {
|
|
49
|
+
root = await ethers.getImpersonatedSigner(
|
|
50
|
+
"0xE0c5daa7CC6F88d29505f702a53bb5E67600e7Ec"
|
|
51
|
+
);
|
|
52
|
+
await signers[0].sendTransaction({
|
|
53
|
+
to: root.address,
|
|
54
|
+
value: ethers.constants.WeiPerEther
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
console.log("got signers:", {
|
|
59
|
+
networkName,
|
|
60
|
+
networkKey,
|
|
61
|
+
root: root.address,
|
|
62
|
+
safeOwner: safeOwner.address,
|
|
63
|
+
balance: await ethers.provider
|
|
64
|
+
.getBalance(root.address)
|
|
65
|
+
.then(_ => _.toString())
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
console.log("deploying reserve implementation");
|
|
69
|
+
const reserveImpl = await (
|
|
70
|
+
await ethers.getContractFactory("GoodReserveCDai")
|
|
71
|
+
).deploy();
|
|
72
|
+
|
|
73
|
+
console.log("deploying DistributionHelper");
|
|
74
|
+
|
|
75
|
+
let DHelper: DistributionHelper;
|
|
76
|
+
if (!release.DistributionHelper) {
|
|
77
|
+
DHelper = (await deployDeterministic(
|
|
78
|
+
{
|
|
79
|
+
name: "DistributionHelper",
|
|
80
|
+
salt: "DistributionHelper",
|
|
81
|
+
isUpgradeable: true
|
|
82
|
+
},
|
|
83
|
+
[release.NameService]
|
|
84
|
+
).then(printDeploy)) as DistributionHelper;
|
|
85
|
+
|
|
86
|
+
let torelease = {
|
|
87
|
+
DistributionHelper: DHelper.address
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
await releaser(torelease, networkName, "deployment", false);
|
|
91
|
+
} else {
|
|
92
|
+
DHelper = (await ethers.getContractAt(
|
|
93
|
+
"DistributionHelper",
|
|
94
|
+
release.DistributionHelper
|
|
95
|
+
)) as DistributionHelper;
|
|
96
|
+
}
|
|
97
|
+
DHelper;
|
|
98
|
+
|
|
99
|
+
const ns = (await ethers.getContractAt(
|
|
100
|
+
"NameService",
|
|
101
|
+
release.NameService
|
|
102
|
+
)) as NameService;
|
|
103
|
+
|
|
104
|
+
const proposalContracts = [
|
|
105
|
+
ns.address, //nameservice add DistributionHelper,MultiChainRouter,MultiChain AnyGoodDollar,
|
|
106
|
+
DHelper.address, //update addresses from nameservice
|
|
107
|
+
DHelper.address, //distribution helper -> add fuse community pool as recipient with 100%
|
|
108
|
+
release.GoodReserveCDai, //upgradeTo
|
|
109
|
+
release.GoodReserveCDai, //Reserve -> set distribution helper + non ubi bps
|
|
110
|
+
release.GoodReserveCDai, //Reserve -> set new decline rate
|
|
111
|
+
release.GoodFundManager, //Fundmanager -> set staking rewards compound to 0
|
|
112
|
+
release.GoodFundManager //Fundmanager -> set staking rewards aave to 0
|
|
113
|
+
];
|
|
114
|
+
|
|
115
|
+
const proposalEthValues = proposalContracts.map(_ => 0);
|
|
116
|
+
|
|
117
|
+
const proposalFunctionSignatures = [
|
|
118
|
+
"setAddresses(bytes32[],address[])",
|
|
119
|
+
"updateAddresses()",
|
|
120
|
+
"addOrUpdateRecipient((uint32,uint32,address,uint8))",
|
|
121
|
+
"upgradeTo(address)",
|
|
122
|
+
"setDistributionHelper(address,uint32)",
|
|
123
|
+
"setReserveRatioDailyExpansion(uint256,uint256)",
|
|
124
|
+
"setStakingReward(uint32,address,uint32,uint32,bool)",
|
|
125
|
+
"setStakingReward(uint32,address,uint32,uint32,bool)"
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
const proposalFunctionInputs = [
|
|
129
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
130
|
+
["bytes32[]", "address[]"],
|
|
131
|
+
[
|
|
132
|
+
[
|
|
133
|
+
ethers.utils.keccak256(
|
|
134
|
+
ethers.utils.toUtf8Bytes("DISTRIBUTION_HELPER")
|
|
135
|
+
),
|
|
136
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("MULTICHAIN_ROUTER")),
|
|
137
|
+
ethers.utils.keccak256(
|
|
138
|
+
ethers.utils.toUtf8Bytes("MULTICHAIN_ANYGOODDOLLAR")
|
|
139
|
+
)
|
|
140
|
+
],
|
|
141
|
+
[DHelper.address, release.MultichainRouter, release.AnyGoodDollar]
|
|
142
|
+
]
|
|
143
|
+
), //setAddresses(bytes32[],address[])"
|
|
144
|
+
ethers.utils.defaultAbiCoder.encode([], []), //updateAddresses()
|
|
145
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
146
|
+
["uint32", "uint32", "address", "uint8"],
|
|
147
|
+
[
|
|
148
|
+
10000, //100% bps
|
|
149
|
+
122, //chainid
|
|
150
|
+
communitySafe, //recipient address,
|
|
151
|
+
0 //recipient type via fuse bridge
|
|
152
|
+
]
|
|
153
|
+
), //addOrUpdateRecipient((uint32,uint32,address,uint8))
|
|
154
|
+
ethers.utils.defaultAbiCoder.encode(["address"], [reserveImpl.address]), //upgradeTo(address)
|
|
155
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
156
|
+
["address", "uint32"],
|
|
157
|
+
[DHelper.address, 1000]
|
|
158
|
+
), //setDistributionHelper(address,uint32)
|
|
159
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
160
|
+
["uint256", "uint256"],
|
|
161
|
+
["999554841771249", "1000000000000000"] //15% a year
|
|
162
|
+
), //setReserveRatioDailyExpansion(uint,uint)
|
|
163
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
164
|
+
["uint32", "address", "uint32", "uint32", "bool"],
|
|
165
|
+
[
|
|
166
|
+
"0",
|
|
167
|
+
"0x7b7246c78e2f900d17646ff0cb2ec47d6ba10754",
|
|
168
|
+
"14338692",
|
|
169
|
+
"4294967295",
|
|
170
|
+
false
|
|
171
|
+
]
|
|
172
|
+
), //setstakingrewards to 0
|
|
173
|
+
ethers.utils.defaultAbiCoder.encode(
|
|
174
|
+
["uint32", "address", "uint32", "uint32", "bool"],
|
|
175
|
+
[
|
|
176
|
+
"0",
|
|
177
|
+
"0x3ff2d8eb2573819a9ef7167d2ba6fd6d31b17f4f",
|
|
178
|
+
"14338692",
|
|
179
|
+
"4294967295",
|
|
180
|
+
false
|
|
181
|
+
]
|
|
182
|
+
) //setstakingrewards to 0
|
|
183
|
+
];
|
|
184
|
+
|
|
185
|
+
//make sure rewards accumulated before we set them to 0
|
|
186
|
+
const staking = await ethers.getContractAt(
|
|
187
|
+
"SimpleStakingV2",
|
|
188
|
+
"0x7b7246c78e2f900d17646ff0cb2ec47d6ba10754"
|
|
189
|
+
);
|
|
190
|
+
(await staking.withdrawRewards()).wait();
|
|
191
|
+
staking.attach("0x3ff2d8eb2573819a9ef7167d2ba6fd6d31b17f4f");
|
|
192
|
+
(await staking.withdrawRewards()).wait();
|
|
193
|
+
|
|
194
|
+
if (executionMethod === "safe") {
|
|
195
|
+
return executeViaSafe(
|
|
196
|
+
proposalContracts,
|
|
197
|
+
proposalEthValues,
|
|
198
|
+
proposalFunctionSignatures,
|
|
199
|
+
proposalFunctionInputs,
|
|
200
|
+
networkName === "localhost"
|
|
201
|
+
? "0xE0c5daa7CC6F88d29505f702a53bb5E67600e7Ec"
|
|
202
|
+
: release.GuardiansSafe,
|
|
203
|
+
safeOwner
|
|
204
|
+
);
|
|
205
|
+
} else {
|
|
206
|
+
return executeViaGuardian(
|
|
207
|
+
proposalContracts,
|
|
208
|
+
proposalEthValues,
|
|
209
|
+
proposalFunctionSignatures,
|
|
210
|
+
proposalFunctionInputs,
|
|
211
|
+
root
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export const main = async () => {
|
|
217
|
+
await deployMainnet().catch(console.log);
|
|
218
|
+
};
|
|
219
|
+
if (process.argv[1].includes("v3-upgrade")) main();
|
|
@@ -2,52 +2,63 @@ import { range, chunk } from "lodash";
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import stakingContracts from "../../releases/deployment.json";
|
|
4
4
|
import { ethers as Ethers } from "hardhat";
|
|
5
|
-
import { BigNumber } from "
|
|
5
|
+
import { BigNumber } from "ethers";
|
|
6
6
|
|
|
7
|
-
const ZERO = BigNumber.from("0");
|
|
7
|
+
const ZERO = BigNumber.from("0");
|
|
8
8
|
|
|
9
9
|
export const sumStakersGdRewards = (ethers: typeof Ethers) => {
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
10
|
+
const getStakersGdRewards = async (stakersToGdRewards = {}) => {
|
|
11
|
+
const provider = new ethers.providers.InfuraProvider();
|
|
12
|
+
|
|
13
|
+
let goodFundManager = await ethers.getContractAt(
|
|
14
|
+
"GoodFundManager",
|
|
15
|
+
stakingContracts["production-mainnet-bug"].GoodFundManager
|
|
16
|
+
);
|
|
17
|
+
goodFundManager = goodFundManager.connect(provider);
|
|
18
|
+
const filter = goodFundManager.filters.StakingRewardMinted();
|
|
19
|
+
|
|
20
|
+
const step = 100000;
|
|
21
|
+
const ETH_START_BLOCK = 14291923;
|
|
22
|
+
const ETH_END_BLOCK = await provider.getBlockNumber();
|
|
23
|
+
const blocks = range(ETH_START_BLOCK, ETH_END_BLOCK, step);
|
|
24
|
+
|
|
25
|
+
for (let blockChunk of chunk(blocks, 10)) {
|
|
26
|
+
const processedChunks = blockChunk.map(async bc => {
|
|
27
|
+
const stakingRewardsEvents = await goodFundManager
|
|
28
|
+
.queryFilter(filter, bc, Math.min(bc + step - 1, ETH_END_BLOCK))
|
|
29
|
+
.catch(e => {
|
|
30
|
+
console.log("block transfer logs failed retrying...", bc);
|
|
31
|
+
return goodFundManager.queryFilter(
|
|
32
|
+
filter,
|
|
33
|
+
bc,
|
|
34
|
+
Math.min(bc + step - 1, ETH_END_BLOCK)
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const stakingRewardsEventsMapped = stakingRewardsEvents.map(
|
|
39
|
+
async log => {
|
|
40
|
+
const initBalance = stakersToGdRewards[log.args.staker] || ZERO;
|
|
41
|
+
stakersToGdRewards[log.args.staker] = initBalance.add(
|
|
42
|
+
log.args.gdReward
|
|
43
|
+
);
|
|
44
|
+
// console.log(`TransactionHash:\t${log.transactionHash}`);
|
|
45
|
+
// console.log(`Staking contract:\t${log.args.stakingContract}`);
|
|
46
|
+
// console.log(`Previous Balance:\t${initBalance.toString()} for address ${log.args.staker}`);
|
|
47
|
+
// console.log(`Addition:\t\t${log.args.gdReward.toString()} for address ${log.args.staker}`);
|
|
48
|
+
// console.log(`New Balance:\t\t${stakersToGdRewards[log.args.staker].toString()} for address ${log.args.staker}\n`);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
await Promise.all([...stakingRewardsEventsMapped]);
|
|
52
|
+
});
|
|
53
|
+
await Promise.all(processedChunks);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
console.log(`All stakers minted rewards:\n`);
|
|
57
|
+
Object.entries(stakersToGdRewards).forEach(a => {
|
|
58
|
+
console.log(`${a[0].toString()}:${BigNumber.from(a[1]).toString()}\n`);
|
|
59
|
+
});
|
|
60
|
+
// fs.writeFileSync("scripts/staking/stakersToGdRewards.json", JSON.stringify(stakersToGdRewards))
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return { getStakersGdRewards };
|
|
64
|
+
};
|
|
@@ -61,6 +61,7 @@ export interface DistributionHelperInterface extends ethers.utils.Interface {
|
|
|
61
61
|
"renounceRole(bytes32,address)": FunctionFragment;
|
|
62
62
|
"revokeRole(bytes32,address)": FunctionFragment;
|
|
63
63
|
"supportsInterface(bytes4)": FunctionFragment;
|
|
64
|
+
"updateAddresses()": FunctionFragment;
|
|
64
65
|
"updateAvatar()": FunctionFragment;
|
|
65
66
|
"upgradeTo(address)": FunctionFragment;
|
|
66
67
|
"upgradeToAndCall(address,bytes)": FunctionFragment;
|
|
@@ -137,6 +138,10 @@ export interface DistributionHelperInterface extends ethers.utils.Interface {
|
|
|
137
138
|
functionFragment: "supportsInterface",
|
|
138
139
|
values: [BytesLike]
|
|
139
140
|
): string;
|
|
141
|
+
encodeFunctionData(
|
|
142
|
+
functionFragment: "updateAddresses",
|
|
143
|
+
values?: undefined
|
|
144
|
+
): string;
|
|
140
145
|
encodeFunctionData(
|
|
141
146
|
functionFragment: "updateAvatar",
|
|
142
147
|
values?: undefined
|
|
@@ -206,6 +211,10 @@ export interface DistributionHelperInterface extends ethers.utils.Interface {
|
|
|
206
211
|
functionFragment: "supportsInterface",
|
|
207
212
|
data: BytesLike
|
|
208
213
|
): Result;
|
|
214
|
+
decodeFunctionResult(
|
|
215
|
+
functionFragment: "updateAddresses",
|
|
216
|
+
data: BytesLike
|
|
217
|
+
): Result;
|
|
209
218
|
decodeFunctionResult(
|
|
210
219
|
functionFragment: "updateAvatar",
|
|
211
220
|
data: BytesLike
|
|
@@ -415,6 +424,10 @@ export interface DistributionHelper extends BaseContract {
|
|
|
415
424
|
overrides?: CallOverrides
|
|
416
425
|
): Promise<[boolean]>;
|
|
417
426
|
|
|
427
|
+
updateAddresses(
|
|
428
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
429
|
+
): Promise<ContractTransaction>;
|
|
430
|
+
|
|
418
431
|
updateAvatar(
|
|
419
432
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
420
433
|
): Promise<ContractTransaction>;
|
|
@@ -516,6 +529,10 @@ export interface DistributionHelper extends BaseContract {
|
|
|
516
529
|
overrides?: CallOverrides
|
|
517
530
|
): Promise<boolean>;
|
|
518
531
|
|
|
532
|
+
updateAddresses(
|
|
533
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
534
|
+
): Promise<ContractTransaction>;
|
|
535
|
+
|
|
519
536
|
updateAvatar(
|
|
520
537
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
521
538
|
): Promise<ContractTransaction>;
|
|
@@ -614,6 +631,8 @@ export interface DistributionHelper extends BaseContract {
|
|
|
614
631
|
overrides?: CallOverrides
|
|
615
632
|
): Promise<boolean>;
|
|
616
633
|
|
|
634
|
+
updateAddresses(overrides?: CallOverrides): Promise<void>;
|
|
635
|
+
|
|
617
636
|
updateAvatar(overrides?: CallOverrides): Promise<void>;
|
|
618
637
|
|
|
619
638
|
upgradeTo(
|
|
@@ -790,6 +809,10 @@ export interface DistributionHelper extends BaseContract {
|
|
|
790
809
|
overrides?: CallOverrides
|
|
791
810
|
): Promise<BigNumber>;
|
|
792
811
|
|
|
812
|
+
updateAddresses(
|
|
813
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
814
|
+
): Promise<BigNumber>;
|
|
815
|
+
|
|
793
816
|
updateAvatar(
|
|
794
817
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
795
818
|
): Promise<BigNumber>;
|
|
@@ -890,6 +913,10 @@ export interface DistributionHelper extends BaseContract {
|
|
|
890
913
|
overrides?: CallOverrides
|
|
891
914
|
): Promise<PopulatedTransaction>;
|
|
892
915
|
|
|
916
|
+
updateAddresses(
|
|
917
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
918
|
+
): Promise<PopulatedTransaction>;
|
|
919
|
+
|
|
893
920
|
updateAvatar(
|
|
894
921
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
895
922
|
): Promise<PopulatedTransaction>;
|
|
@@ -62,6 +62,7 @@ export interface DistributionHelperTestInterface
|
|
|
62
62
|
"renounceRole(bytes32,address)": FunctionFragment;
|
|
63
63
|
"revokeRole(bytes32,address)": FunctionFragment;
|
|
64
64
|
"supportsInterface(bytes4)": FunctionFragment;
|
|
65
|
+
"updateAddresses()": FunctionFragment;
|
|
65
66
|
"updateAvatar()": FunctionFragment;
|
|
66
67
|
"upgradeTo(address)": FunctionFragment;
|
|
67
68
|
"upgradeToAndCall(address,bytes)": FunctionFragment;
|
|
@@ -138,6 +139,10 @@ export interface DistributionHelperTestInterface
|
|
|
138
139
|
functionFragment: "supportsInterface",
|
|
139
140
|
values: [BytesLike]
|
|
140
141
|
): string;
|
|
142
|
+
encodeFunctionData(
|
|
143
|
+
functionFragment: "updateAddresses",
|
|
144
|
+
values?: undefined
|
|
145
|
+
): string;
|
|
141
146
|
encodeFunctionData(
|
|
142
147
|
functionFragment: "updateAvatar",
|
|
143
148
|
values?: undefined
|
|
@@ -207,6 +212,10 @@ export interface DistributionHelperTestInterface
|
|
|
207
212
|
functionFragment: "supportsInterface",
|
|
208
213
|
data: BytesLike
|
|
209
214
|
): Result;
|
|
215
|
+
decodeFunctionResult(
|
|
216
|
+
functionFragment: "updateAddresses",
|
|
217
|
+
data: BytesLike
|
|
218
|
+
): Result;
|
|
210
219
|
decodeFunctionResult(
|
|
211
220
|
functionFragment: "updateAvatar",
|
|
212
221
|
data: BytesLike
|
|
@@ -416,6 +425,10 @@ export interface DistributionHelperTest extends BaseContract {
|
|
|
416
425
|
overrides?: CallOverrides
|
|
417
426
|
): Promise<[boolean]>;
|
|
418
427
|
|
|
428
|
+
updateAddresses(
|
|
429
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
430
|
+
): Promise<ContractTransaction>;
|
|
431
|
+
|
|
419
432
|
updateAvatar(
|
|
420
433
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
421
434
|
): Promise<ContractTransaction>;
|
|
@@ -517,6 +530,10 @@ export interface DistributionHelperTest extends BaseContract {
|
|
|
517
530
|
overrides?: CallOverrides
|
|
518
531
|
): Promise<boolean>;
|
|
519
532
|
|
|
533
|
+
updateAddresses(
|
|
534
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
535
|
+
): Promise<ContractTransaction>;
|
|
536
|
+
|
|
520
537
|
updateAvatar(
|
|
521
538
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
522
539
|
): Promise<ContractTransaction>;
|
|
@@ -615,6 +632,8 @@ export interface DistributionHelperTest extends BaseContract {
|
|
|
615
632
|
overrides?: CallOverrides
|
|
616
633
|
): Promise<boolean>;
|
|
617
634
|
|
|
635
|
+
updateAddresses(overrides?: CallOverrides): Promise<void>;
|
|
636
|
+
|
|
618
637
|
updateAvatar(overrides?: CallOverrides): Promise<void>;
|
|
619
638
|
|
|
620
639
|
upgradeTo(
|
|
@@ -791,6 +810,10 @@ export interface DistributionHelperTest extends BaseContract {
|
|
|
791
810
|
overrides?: CallOverrides
|
|
792
811
|
): Promise<BigNumber>;
|
|
793
812
|
|
|
813
|
+
updateAddresses(
|
|
814
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
815
|
+
): Promise<BigNumber>;
|
|
816
|
+
|
|
794
817
|
updateAvatar(
|
|
795
818
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
796
819
|
): Promise<BigNumber>;
|
|
@@ -891,6 +914,10 @@ export interface DistributionHelperTest extends BaseContract {
|
|
|
891
914
|
overrides?: CallOverrides
|
|
892
915
|
): Promise<PopulatedTransaction>;
|
|
893
916
|
|
|
917
|
+
updateAddresses(
|
|
918
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
919
|
+
): Promise<PopulatedTransaction>;
|
|
920
|
+
|
|
894
921
|
updateAvatar(
|
|
895
922
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
896
923
|
): Promise<PopulatedTransaction>;
|