@gooddollar/goodprotocol 2.0.17 → 2.0.19
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/BuyGDCloneFactory.min.json +1 -1
- package/artifacts/abis/DonateGDClone.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/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/BuyGDClone.json +2 -2
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.json +112 -2
- package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.dbg.json +4 -0
- package/artifacts/contracts/utils/BuyGDClone.sol/DonateGDClone.json +358 -0
- 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/utils/BuyGDClone.sol +138 -9
- package/package.json +10 -4
- package/releases/deployment.json +11 -3
- package/types/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory.ts +162 -0
- package/types/contracts/utils/BuyGDClone.sol/DonateGDClone.ts +529 -0
- package/types/contracts/utils/BuyGDClone.sol/index.ts +1 -0
- package/types/factories/contracts/utils/BuyGDClone.sol/BuyGDCloneFactory__factory.ts +111 -1
- package/types/factories/contracts/utils/BuyGDClone.sol/BuyGDClone__factory.ts +1 -1
- package/types/factories/contracts/utils/BuyGDClone.sol/DonateGDClone__factory.ts +429 -0
- package/types/factories/contracts/utils/BuyGDClone.sol/index.ts +1 -0
- package/types/hardhat.d.ts +9 -0
- package/types/index.ts +2 -0
- package/yarn.lock +67 -78
|
@@ -125,10 +125,7 @@ contract BuyGDClone is Initializable {
|
|
|
125
125
|
* @dev If the contract has a balance of cUSD, it will swap cUSD for GD tokens.
|
|
126
126
|
* @param _minAmount The minimum amount of GD tokens to receive from the swap.
|
|
127
127
|
*/
|
|
128
|
-
function swap(
|
|
129
|
-
uint256 _minAmount,
|
|
130
|
-
address payable refundGas
|
|
131
|
-
) external payable {
|
|
128
|
+
function swap(uint256 _minAmount, address payable refundGas) public payable {
|
|
132
129
|
uint256 balance = address(this).balance;
|
|
133
130
|
if (balance > 0) return swapCelo(_minAmount, refundGas);
|
|
134
131
|
|
|
@@ -235,7 +232,7 @@ contract BuyGDClone is Initializable {
|
|
|
235
232
|
* @notice Recovers tokens accidentally sent to the contract.
|
|
236
233
|
* @param token The address of the token to recover. Use address(0) to recover ETH.
|
|
237
234
|
*/
|
|
238
|
-
function recover(address token) external {
|
|
235
|
+
function recover(address token) external virtual {
|
|
239
236
|
if (token == address(0)) {
|
|
240
237
|
(bool sent, ) = payable(owner).call{ value: address(this).balance }("");
|
|
241
238
|
if (!sent) revert REFUND_FAILED(address(this).balance);
|
|
@@ -245,12 +242,89 @@ contract BuyGDClone is Initializable {
|
|
|
245
242
|
}
|
|
246
243
|
}
|
|
247
244
|
|
|
245
|
+
contract DonateGDClone is BuyGDClone {
|
|
246
|
+
error EXEC_FAILED(bytes error);
|
|
247
|
+
|
|
248
|
+
address public recoverTo;
|
|
249
|
+
bytes public callData;
|
|
250
|
+
|
|
251
|
+
constructor(
|
|
252
|
+
ISwapRouter _router,
|
|
253
|
+
address _cusd,
|
|
254
|
+
address _gd,
|
|
255
|
+
IStaticOracle _oracle
|
|
256
|
+
) BuyGDClone(_router, _cusd, _gd, _oracle) {}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* @notice Initializes the contract with the owner's address.
|
|
260
|
+
* @param _recoverTo The address of the owner of the contract that can recover stuck funds
|
|
261
|
+
* @param _donateTo The address of the funds target
|
|
262
|
+
*/
|
|
263
|
+
function initialize(
|
|
264
|
+
address _recoverTo,
|
|
265
|
+
address _donateTo,
|
|
266
|
+
bytes memory _callData
|
|
267
|
+
) external initializer {
|
|
268
|
+
owner = _donateTo;
|
|
269
|
+
recoverTo = _recoverTo;
|
|
270
|
+
callData = _callData;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
function exec(
|
|
274
|
+
uint256 _minAmount,
|
|
275
|
+
address payable refundGas,
|
|
276
|
+
bool withSwap
|
|
277
|
+
) public payable {
|
|
278
|
+
// in case we need to swap and call a contract, we redirect funds here
|
|
279
|
+
address tempOwner = owner;
|
|
280
|
+
if (withSwap && callData.length > 0) {
|
|
281
|
+
owner = address(this);
|
|
282
|
+
}
|
|
283
|
+
//no perform swap
|
|
284
|
+
if (withSwap) {
|
|
285
|
+
swap(_minAmount, refundGas);
|
|
286
|
+
owner = tempOwner;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
//now exec
|
|
290
|
+
if (callData.length > 0) {
|
|
291
|
+
// approve spend of the different possible tokens, before calling the target contract
|
|
292
|
+
uint256 cusdBalance = ERC20(cusd).balanceOf(address(this));
|
|
293
|
+
uint256 gdBalance = ERC20(gd).balanceOf(address(this));
|
|
294
|
+
uint256 celoBalance = address(this).balance;
|
|
295
|
+
|
|
296
|
+
if (cusdBalance > 0) ERC20(cusd).approve(address(owner), cusdBalance);
|
|
297
|
+
if (gdBalance > 0) ERC20(gd).approve(address(owner), gdBalance);
|
|
298
|
+
if (celoBalance > 0) ERC20(celo).approve(address(owner), celoBalance);
|
|
299
|
+
|
|
300
|
+
(bool success, bytes memory data) = owner.call{ value: 0 }(callData);
|
|
301
|
+
if (!success) revert EXEC_FAILED(data);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @notice Recovers tokens accidentally sent to the contract.
|
|
307
|
+
* @param token The address of the token to recover. Use address(0) to recover ETH.
|
|
308
|
+
*/
|
|
309
|
+
function recover(address token) external virtual override {
|
|
310
|
+
if (token == address(0)) {
|
|
311
|
+
(bool sent, ) = payable(recoverTo).call{ value: address(this).balance }(
|
|
312
|
+
""
|
|
313
|
+
);
|
|
314
|
+
if (!sent) revert REFUND_FAILED(address(this).balance);
|
|
315
|
+
} else {
|
|
316
|
+
ERC20(token).transfer(recoverTo, ERC20(token).balanceOf(address(this)));
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
248
321
|
/**
|
|
249
322
|
* @title BuyGDCloneFactory
|
|
250
323
|
* @notice Factory contract for creating clones of BuyGDClone contract
|
|
251
324
|
*/
|
|
252
325
|
contract BuyGDCloneFactory {
|
|
253
326
|
address public immutable impl;
|
|
327
|
+
address public immutable donateImpl;
|
|
254
328
|
|
|
255
329
|
/**
|
|
256
330
|
* @notice Initializes the BuyGDCloneFactory contract with the provided parameters.
|
|
@@ -266,6 +340,8 @@ contract BuyGDCloneFactory {
|
|
|
266
340
|
IStaticOracle _oracle
|
|
267
341
|
) {
|
|
268
342
|
impl = address(new BuyGDClone(_router, _cusd, _gd, _oracle));
|
|
343
|
+
donateImpl = address(new DonateGDClone(_router, _cusd, _gd, _oracle));
|
|
344
|
+
|
|
269
345
|
_oracle.prepareAllAvailablePoolsWithTimePeriod(_gd, _cusd, 600);
|
|
270
346
|
}
|
|
271
347
|
|
|
@@ -274,24 +350,57 @@ contract BuyGDCloneFactory {
|
|
|
274
350
|
* @param owner The address of the owner of the new BuyGDClone contract.
|
|
275
351
|
* @return The address of the new BuyGDClone contract.
|
|
276
352
|
*/
|
|
277
|
-
function create(address owner)
|
|
353
|
+
function create(address owner) public returns (address) {
|
|
278
354
|
bytes32 salt = keccak256(abi.encode(owner));
|
|
279
355
|
address clone = ClonesUpgradeable.cloneDeterministic(impl, salt);
|
|
280
356
|
BuyGDClone(payable(clone)).initialize(owner);
|
|
281
357
|
return clone;
|
|
282
358
|
}
|
|
283
359
|
|
|
360
|
+
/**
|
|
361
|
+
* @notice Creates a new clone of the BuyGDClone contract with the provided owner address.
|
|
362
|
+
* @param owner The address of the owner of the new DoanteGDClone contract that can recover funds.
|
|
363
|
+
* @param donateOrExecTo The address of the target for funds
|
|
364
|
+
* @param callData a payload to execute on the target donateOrExecTo instead of simple transfers (using approve instead)
|
|
365
|
+
*
|
|
366
|
+
* @return The address of the new BuyGDClone contract.
|
|
367
|
+
*/
|
|
368
|
+
function createDonation(
|
|
369
|
+
address owner,
|
|
370
|
+
address donateOrExecTo,
|
|
371
|
+
bytes memory callData
|
|
372
|
+
) public returns (address) {
|
|
373
|
+
bytes32 salt = keccak256(abi.encode(owner, donateOrExecTo, callData));
|
|
374
|
+
address clone = ClonesUpgradeable.cloneDeterministic(donateImpl, salt);
|
|
375
|
+
DonateGDClone(payable(clone)).initialize(owner, donateOrExecTo, callData);
|
|
376
|
+
return clone;
|
|
377
|
+
}
|
|
378
|
+
|
|
284
379
|
function createAndSwap(
|
|
285
380
|
address owner,
|
|
286
381
|
uint256 minAmount
|
|
287
382
|
) external returns (address) {
|
|
288
|
-
|
|
289
|
-
address clone = ClonesUpgradeable.cloneDeterministic(impl, salt);
|
|
290
|
-
BuyGDClone(payable(clone)).initialize(owner);
|
|
383
|
+
address clone = create(owner);
|
|
291
384
|
BuyGDClone(payable(clone)).swap(minAmount, payable(msg.sender));
|
|
292
385
|
return clone;
|
|
293
386
|
}
|
|
294
387
|
|
|
388
|
+
function createDonationAndSwap(
|
|
389
|
+
address owner,
|
|
390
|
+
address donateOrExecTo,
|
|
391
|
+
bool withSwap,
|
|
392
|
+
uint256 minAmount,
|
|
393
|
+
bytes memory callData
|
|
394
|
+
) external returns (address) {
|
|
395
|
+
address clone = createDonation(owner, donateOrExecTo, callData);
|
|
396
|
+
DonateGDClone(payable(clone)).exec(
|
|
397
|
+
minAmount,
|
|
398
|
+
payable(msg.sender),
|
|
399
|
+
withSwap
|
|
400
|
+
);
|
|
401
|
+
return clone;
|
|
402
|
+
}
|
|
403
|
+
|
|
295
404
|
/**
|
|
296
405
|
* @notice Predicts the address of a new clone of the BuyGDClone contract with the provided owner address.
|
|
297
406
|
* @param owner The address of the owner of the new BuyGDClone contract.
|
|
@@ -304,6 +413,26 @@ contract BuyGDCloneFactory {
|
|
|
304
413
|
ClonesUpgradeable.predictDeterministicAddress(impl, salt, address(this));
|
|
305
414
|
}
|
|
306
415
|
|
|
416
|
+
/**
|
|
417
|
+
* @notice Predicts the address of a new clone of the BuyGDClone contract with the provided owner address.
|
|
418
|
+
* @param owner The address of the owner of the new BuyGDClone contract.
|
|
419
|
+
* @return The predicted address of the new BuyGDClone contract.
|
|
420
|
+
*/
|
|
421
|
+
function predictDonation(
|
|
422
|
+
address owner,
|
|
423
|
+
address donateOrExecTo,
|
|
424
|
+
bytes memory callData
|
|
425
|
+
) external view returns (address) {
|
|
426
|
+
bytes32 salt = keccak256(abi.encode(owner, donateOrExecTo, callData));
|
|
427
|
+
|
|
428
|
+
return
|
|
429
|
+
ClonesUpgradeable.predictDeterministicAddress(
|
|
430
|
+
donateImpl,
|
|
431
|
+
salt,
|
|
432
|
+
address(this)
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
|
|
307
436
|
function getBaseFee() external view returns (uint256) {
|
|
308
437
|
return block.basefee;
|
|
309
438
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddollar/goodprotocol",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.19",
|
|
4
4
|
"description": "GoodDollar Protocol",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": "
|
|
6
|
+
"node": ">=16.x"
|
|
7
7
|
},
|
|
8
8
|
"main": "dist/test-sdk/index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@nomiclabs/hardhat-ethers": "^2.2.1",
|
|
94
94
|
"@nomiclabs/hardhat-etherscan": "^3.1.0",
|
|
95
95
|
"@nomiclabs/hardhat-waffle": "^2.0.3",
|
|
96
|
-
"@swc/core": "
|
|
96
|
+
"@swc/core": "1.3.96",
|
|
97
97
|
"@swc/helpers": "^0.3.16",
|
|
98
98
|
"@typechain/ethers-v5": "^11.1.1",
|
|
99
99
|
"@types/mocha": "*",
|
|
@@ -133,5 +133,11 @@
|
|
|
133
133
|
"typechain": "^8.3.1",
|
|
134
134
|
"typescript": "^5.2.2"
|
|
135
135
|
},
|
|
136
|
-
"packageManager": "yarn@3.6.0"
|
|
136
|
+
"packageManager": "yarn@3.6.0",
|
|
137
|
+
"resolutions": {
|
|
138
|
+
"@swc/core": "1.3.96"
|
|
139
|
+
},
|
|
140
|
+
"overrides": {
|
|
141
|
+
"@swc/core": "1.3.96"
|
|
142
|
+
}
|
|
137
143
|
}
|
package/releases/deployment.json
CHANGED
|
@@ -486,7 +486,8 @@
|
|
|
486
486
|
"CommunitySafe": "0x437C699887779D0A95aD6349CFDE7DFA716C005D",
|
|
487
487
|
"MpbBridge": "0xa3247276DbCC76Dd7705273f766eB3E8a5ecF4a5",
|
|
488
488
|
"StaticOracle": "0x00851A91a3c4E9a4c1B48df827Bacc1f884bdE28",
|
|
489
|
-
"BuyGDFactory": "0x00e533B7d6255D05b7f15034B1c989c21F51b91C"
|
|
489
|
+
"BuyGDFactory": "0x00e533B7d6255D05b7f15034B1c989c21F51b91C",
|
|
490
|
+
"BuyGDFactoryV2": "0x513927BE0b48D3134716D09f1a23983F6E201e95"
|
|
490
491
|
},
|
|
491
492
|
"gnosis": {
|
|
492
493
|
"GuardiansSafe": "0x84c10b45fe51bfb4f86c19a47fdbc187d4572fb8"
|
|
@@ -514,7 +515,9 @@
|
|
|
514
515
|
"GuardiansSafe": "0x84C10B45fE51bfB4f86c19A47Fdbc187d4572Fb8",
|
|
515
516
|
"OneTimePayments": "0xB23e54fd8c2f35F9d38884Fc1611F5e9004f10ea",
|
|
516
517
|
"OneTimePaymentsV2": "0x2cb1c7d50371e277d7a36B171c0ACe9B157518EE",
|
|
517
|
-
"UniswapV3Router": "0x5615CDAb10dc425a742d643d949a7F474C01abc4"
|
|
518
|
+
"UniswapV3Router": "0x5615CDAb10dc425a742d643d949a7F474C01abc4",
|
|
519
|
+
"BuyGDFactory": "0x00e533B7d6255D05b7f15034B1c989c21F51b91C",
|
|
520
|
+
"BuyGDFactoryV2": "0x513927BE0b48D3134716D09f1a23983F6E201e95"
|
|
518
521
|
},
|
|
519
522
|
"staging-celo": {
|
|
520
523
|
"network": "staging-celo",
|
|
@@ -539,7 +542,9 @@
|
|
|
539
542
|
"GuardiansSafe": "0x84C10B45fE51bfB4f86c19A47Fdbc187d4572Fb8",
|
|
540
543
|
"OneTimePayments": "0x514820Af2DaE5F537dE16E576471528176318113",
|
|
541
544
|
"OneTimePaymentsV2": "0x963E7B4c970626Bb103c61fA16b002AFf6E6c2C7",
|
|
542
|
-
"UniswapV3Router": "0x5615CDAb10dc425a742d643d949a7F474C01abc4"
|
|
545
|
+
"UniswapV3Router": "0x5615CDAb10dc425a742d643d949a7F474C01abc4",
|
|
546
|
+
"BuyGDFactory": "0x00e533B7d6255D05b7f15034B1c989c21F51b91C",
|
|
547
|
+
"BuyGDFactoryV2": "0x513927BE0b48D3134716D09f1a23983F6E201e95"
|
|
543
548
|
},
|
|
544
549
|
"development-goerli": {
|
|
545
550
|
"ProxyFactory": "0x65D8eACBCd9618b8780C4b444081915a5D54D611",
|
|
@@ -588,5 +593,8 @@
|
|
|
588
593
|
"GReputation": "0x3647469733C01713A7d9bdf6834bd4aBd59D66fa",
|
|
589
594
|
"GoodDollarMintBurnWrapper": "0x69d9c8d240E282a4ec0058CF0AC4E9D8ac7a11ac",
|
|
590
595
|
"GoodDollarStaking": "0xC9a3DdadC753e6a7675Aa125991096623d06c437"
|
|
596
|
+
},
|
|
597
|
+
"development-mainnet": {
|
|
598
|
+
"networkId": 1
|
|
591
599
|
}
|
|
592
600
|
}
|
|
@@ -26,18 +26,26 @@ export interface BuyGDCloneFactoryInterface extends utils.Interface {
|
|
|
26
26
|
functions: {
|
|
27
27
|
"create(address)": FunctionFragment;
|
|
28
28
|
"createAndSwap(address,uint256)": FunctionFragment;
|
|
29
|
+
"createDonation(address,address,bytes)": FunctionFragment;
|
|
30
|
+
"createDonationAndSwap(address,address,bool,uint256,bytes)": FunctionFragment;
|
|
31
|
+
"donateImpl()": FunctionFragment;
|
|
29
32
|
"getBaseFee()": FunctionFragment;
|
|
30
33
|
"impl()": FunctionFragment;
|
|
31
34
|
"predict(address)": FunctionFragment;
|
|
35
|
+
"predictDonation(address,address,bytes)": FunctionFragment;
|
|
32
36
|
};
|
|
33
37
|
|
|
34
38
|
getFunction(
|
|
35
39
|
nameOrSignatureOrTopic:
|
|
36
40
|
| "create"
|
|
37
41
|
| "createAndSwap"
|
|
42
|
+
| "createDonation"
|
|
43
|
+
| "createDonationAndSwap"
|
|
44
|
+
| "donateImpl"
|
|
38
45
|
| "getBaseFee"
|
|
39
46
|
| "impl"
|
|
40
47
|
| "predict"
|
|
48
|
+
| "predictDonation"
|
|
41
49
|
): FunctionFragment;
|
|
42
50
|
|
|
43
51
|
encodeFunctionData(functionFragment: "create", values: [string]): string;
|
|
@@ -45,21 +53,50 @@ export interface BuyGDCloneFactoryInterface extends utils.Interface {
|
|
|
45
53
|
functionFragment: "createAndSwap",
|
|
46
54
|
values: [string, BigNumberish]
|
|
47
55
|
): string;
|
|
56
|
+
encodeFunctionData(
|
|
57
|
+
functionFragment: "createDonation",
|
|
58
|
+
values: [string, string, BytesLike]
|
|
59
|
+
): string;
|
|
60
|
+
encodeFunctionData(
|
|
61
|
+
functionFragment: "createDonationAndSwap",
|
|
62
|
+
values: [string, string, boolean, BigNumberish, BytesLike]
|
|
63
|
+
): string;
|
|
64
|
+
encodeFunctionData(
|
|
65
|
+
functionFragment: "donateImpl",
|
|
66
|
+
values?: undefined
|
|
67
|
+
): string;
|
|
48
68
|
encodeFunctionData(
|
|
49
69
|
functionFragment: "getBaseFee",
|
|
50
70
|
values?: undefined
|
|
51
71
|
): string;
|
|
52
72
|
encodeFunctionData(functionFragment: "impl", values?: undefined): string;
|
|
53
73
|
encodeFunctionData(functionFragment: "predict", values: [string]): string;
|
|
74
|
+
encodeFunctionData(
|
|
75
|
+
functionFragment: "predictDonation",
|
|
76
|
+
values: [string, string, BytesLike]
|
|
77
|
+
): string;
|
|
54
78
|
|
|
55
79
|
decodeFunctionResult(functionFragment: "create", data: BytesLike): Result;
|
|
56
80
|
decodeFunctionResult(
|
|
57
81
|
functionFragment: "createAndSwap",
|
|
58
82
|
data: BytesLike
|
|
59
83
|
): Result;
|
|
84
|
+
decodeFunctionResult(
|
|
85
|
+
functionFragment: "createDonation",
|
|
86
|
+
data: BytesLike
|
|
87
|
+
): Result;
|
|
88
|
+
decodeFunctionResult(
|
|
89
|
+
functionFragment: "createDonationAndSwap",
|
|
90
|
+
data: BytesLike
|
|
91
|
+
): Result;
|
|
92
|
+
decodeFunctionResult(functionFragment: "donateImpl", data: BytesLike): Result;
|
|
60
93
|
decodeFunctionResult(functionFragment: "getBaseFee", data: BytesLike): Result;
|
|
61
94
|
decodeFunctionResult(functionFragment: "impl", data: BytesLike): Result;
|
|
62
95
|
decodeFunctionResult(functionFragment: "predict", data: BytesLike): Result;
|
|
96
|
+
decodeFunctionResult(
|
|
97
|
+
functionFragment: "predictDonation",
|
|
98
|
+
data: BytesLike
|
|
99
|
+
): Result;
|
|
63
100
|
|
|
64
101
|
events: {};
|
|
65
102
|
}
|
|
@@ -102,11 +139,36 @@ export interface BuyGDCloneFactory extends BaseContract {
|
|
|
102
139
|
overrides?: Overrides & { from?: string }
|
|
103
140
|
): Promise<ContractTransaction>;
|
|
104
141
|
|
|
142
|
+
createDonation(
|
|
143
|
+
owner: string,
|
|
144
|
+
donateOrExecTo: string,
|
|
145
|
+
callData: BytesLike,
|
|
146
|
+
overrides?: Overrides & { from?: string }
|
|
147
|
+
): Promise<ContractTransaction>;
|
|
148
|
+
|
|
149
|
+
createDonationAndSwap(
|
|
150
|
+
owner: string,
|
|
151
|
+
donateOrExecTo: string,
|
|
152
|
+
withSwap: boolean,
|
|
153
|
+
minAmount: BigNumberish,
|
|
154
|
+
callData: BytesLike,
|
|
155
|
+
overrides?: Overrides & { from?: string }
|
|
156
|
+
): Promise<ContractTransaction>;
|
|
157
|
+
|
|
158
|
+
donateImpl(overrides?: CallOverrides): Promise<[string]>;
|
|
159
|
+
|
|
105
160
|
getBaseFee(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
106
161
|
|
|
107
162
|
impl(overrides?: CallOverrides): Promise<[string]>;
|
|
108
163
|
|
|
109
164
|
predict(owner: string, overrides?: CallOverrides): Promise<[string]>;
|
|
165
|
+
|
|
166
|
+
predictDonation(
|
|
167
|
+
owner: string,
|
|
168
|
+
donateOrExecTo: string,
|
|
169
|
+
callData: BytesLike,
|
|
170
|
+
overrides?: CallOverrides
|
|
171
|
+
): Promise<[string]>;
|
|
110
172
|
};
|
|
111
173
|
|
|
112
174
|
create(
|
|
@@ -120,12 +182,37 @@ export interface BuyGDCloneFactory extends BaseContract {
|
|
|
120
182
|
overrides?: Overrides & { from?: string }
|
|
121
183
|
): Promise<ContractTransaction>;
|
|
122
184
|
|
|
185
|
+
createDonation(
|
|
186
|
+
owner: string,
|
|
187
|
+
donateOrExecTo: string,
|
|
188
|
+
callData: BytesLike,
|
|
189
|
+
overrides?: Overrides & { from?: string }
|
|
190
|
+
): Promise<ContractTransaction>;
|
|
191
|
+
|
|
192
|
+
createDonationAndSwap(
|
|
193
|
+
owner: string,
|
|
194
|
+
donateOrExecTo: string,
|
|
195
|
+
withSwap: boolean,
|
|
196
|
+
minAmount: BigNumberish,
|
|
197
|
+
callData: BytesLike,
|
|
198
|
+
overrides?: Overrides & { from?: string }
|
|
199
|
+
): Promise<ContractTransaction>;
|
|
200
|
+
|
|
201
|
+
donateImpl(overrides?: CallOverrides): Promise<string>;
|
|
202
|
+
|
|
123
203
|
getBaseFee(overrides?: CallOverrides): Promise<BigNumber>;
|
|
124
204
|
|
|
125
205
|
impl(overrides?: CallOverrides): Promise<string>;
|
|
126
206
|
|
|
127
207
|
predict(owner: string, overrides?: CallOverrides): Promise<string>;
|
|
128
208
|
|
|
209
|
+
predictDonation(
|
|
210
|
+
owner: string,
|
|
211
|
+
donateOrExecTo: string,
|
|
212
|
+
callData: BytesLike,
|
|
213
|
+
overrides?: CallOverrides
|
|
214
|
+
): Promise<string>;
|
|
215
|
+
|
|
129
216
|
callStatic: {
|
|
130
217
|
create(owner: string, overrides?: CallOverrides): Promise<string>;
|
|
131
218
|
|
|
@@ -135,11 +222,36 @@ export interface BuyGDCloneFactory extends BaseContract {
|
|
|
135
222
|
overrides?: CallOverrides
|
|
136
223
|
): Promise<string>;
|
|
137
224
|
|
|
225
|
+
createDonation(
|
|
226
|
+
owner: string,
|
|
227
|
+
donateOrExecTo: string,
|
|
228
|
+
callData: BytesLike,
|
|
229
|
+
overrides?: CallOverrides
|
|
230
|
+
): Promise<string>;
|
|
231
|
+
|
|
232
|
+
createDonationAndSwap(
|
|
233
|
+
owner: string,
|
|
234
|
+
donateOrExecTo: string,
|
|
235
|
+
withSwap: boolean,
|
|
236
|
+
minAmount: BigNumberish,
|
|
237
|
+
callData: BytesLike,
|
|
238
|
+
overrides?: CallOverrides
|
|
239
|
+
): Promise<string>;
|
|
240
|
+
|
|
241
|
+
donateImpl(overrides?: CallOverrides): Promise<string>;
|
|
242
|
+
|
|
138
243
|
getBaseFee(overrides?: CallOverrides): Promise<BigNumber>;
|
|
139
244
|
|
|
140
245
|
impl(overrides?: CallOverrides): Promise<string>;
|
|
141
246
|
|
|
142
247
|
predict(owner: string, overrides?: CallOverrides): Promise<string>;
|
|
248
|
+
|
|
249
|
+
predictDonation(
|
|
250
|
+
owner: string,
|
|
251
|
+
donateOrExecTo: string,
|
|
252
|
+
callData: BytesLike,
|
|
253
|
+
overrides?: CallOverrides
|
|
254
|
+
): Promise<string>;
|
|
143
255
|
};
|
|
144
256
|
|
|
145
257
|
filters: {};
|
|
@@ -156,11 +268,36 @@ export interface BuyGDCloneFactory extends BaseContract {
|
|
|
156
268
|
overrides?: Overrides & { from?: string }
|
|
157
269
|
): Promise<BigNumber>;
|
|
158
270
|
|
|
271
|
+
createDonation(
|
|
272
|
+
owner: string,
|
|
273
|
+
donateOrExecTo: string,
|
|
274
|
+
callData: BytesLike,
|
|
275
|
+
overrides?: Overrides & { from?: string }
|
|
276
|
+
): Promise<BigNumber>;
|
|
277
|
+
|
|
278
|
+
createDonationAndSwap(
|
|
279
|
+
owner: string,
|
|
280
|
+
donateOrExecTo: string,
|
|
281
|
+
withSwap: boolean,
|
|
282
|
+
minAmount: BigNumberish,
|
|
283
|
+
callData: BytesLike,
|
|
284
|
+
overrides?: Overrides & { from?: string }
|
|
285
|
+
): Promise<BigNumber>;
|
|
286
|
+
|
|
287
|
+
donateImpl(overrides?: CallOverrides): Promise<BigNumber>;
|
|
288
|
+
|
|
159
289
|
getBaseFee(overrides?: CallOverrides): Promise<BigNumber>;
|
|
160
290
|
|
|
161
291
|
impl(overrides?: CallOverrides): Promise<BigNumber>;
|
|
162
292
|
|
|
163
293
|
predict(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
294
|
+
|
|
295
|
+
predictDonation(
|
|
296
|
+
owner: string,
|
|
297
|
+
donateOrExecTo: string,
|
|
298
|
+
callData: BytesLike,
|
|
299
|
+
overrides?: CallOverrides
|
|
300
|
+
): Promise<BigNumber>;
|
|
164
301
|
};
|
|
165
302
|
|
|
166
303
|
populateTransaction: {
|
|
@@ -175,6 +312,24 @@ export interface BuyGDCloneFactory extends BaseContract {
|
|
|
175
312
|
overrides?: Overrides & { from?: string }
|
|
176
313
|
): Promise<PopulatedTransaction>;
|
|
177
314
|
|
|
315
|
+
createDonation(
|
|
316
|
+
owner: string,
|
|
317
|
+
donateOrExecTo: string,
|
|
318
|
+
callData: BytesLike,
|
|
319
|
+
overrides?: Overrides & { from?: string }
|
|
320
|
+
): Promise<PopulatedTransaction>;
|
|
321
|
+
|
|
322
|
+
createDonationAndSwap(
|
|
323
|
+
owner: string,
|
|
324
|
+
donateOrExecTo: string,
|
|
325
|
+
withSwap: boolean,
|
|
326
|
+
minAmount: BigNumberish,
|
|
327
|
+
callData: BytesLike,
|
|
328
|
+
overrides?: Overrides & { from?: string }
|
|
329
|
+
): Promise<PopulatedTransaction>;
|
|
330
|
+
|
|
331
|
+
donateImpl(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
332
|
+
|
|
178
333
|
getBaseFee(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
179
334
|
|
|
180
335
|
impl(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
@@ -183,5 +338,12 @@ export interface BuyGDCloneFactory extends BaseContract {
|
|
|
183
338
|
owner: string,
|
|
184
339
|
overrides?: CallOverrides
|
|
185
340
|
): Promise<PopulatedTransaction>;
|
|
341
|
+
|
|
342
|
+
predictDonation(
|
|
343
|
+
owner: string,
|
|
344
|
+
donateOrExecTo: string,
|
|
345
|
+
callData: BytesLike,
|
|
346
|
+
overrides?: CallOverrides
|
|
347
|
+
): Promise<PopulatedTransaction>;
|
|
186
348
|
};
|
|
187
349
|
}
|