@gooddollar/goodprotocol 2.0.7-beta.1 → 2.0.7-beta.2
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/GDFaucet.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/FeesFormula.sol/IFeesFormula.dbg.json +1 -1
- package/artifacts/contracts/token/GoodDollar.sol/GoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/ERC20Permit.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ERC20Permit.sol/SelfApprove.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/IGoodDollarCustom.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/ISuperGoodDollar.sol/ISuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperGoodDollar.sol/SuperGoodDollar.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperToken.sol/SuperToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/SuperfluidToken.sol/SuperfluidToken.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxiable.sol/UUPSProxiable.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/Proxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSProxy.dbg.json +1 -1
- package/artifacts/contracts/token/superfluid/UUPSProxy.sol/UUPSUtils.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBIScheme.sol/UBIScheme.dbg.json +1 -1
- package/artifacts/contracts/ubi/UBISchemeV2.sol/UBISchemeV2.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWallet.sol/AdminWallet.dbg.json +1 -1
- package/artifacts/contracts/utils/AdminWalletFuse.sol/AdminWalletFuse.dbg.json +1 -1
- package/artifacts/contracts/utils/BancorFormula.sol/BancorFormula.dbg.json +1 -1
- package/artifacts/contracts/utils/BulkProof.sol/BulkProof.dbg.json +1 -1
- package/artifacts/contracts/utils/BuyAndBridgeHelper.sol/BuyAndBridgeHelper.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 +4 -0
- package/artifacts/contracts/utils/GDFaucet.sol/GDFaucet.json +125 -0
- 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/GDFaucet.sol +28 -0
- package/hardhat.config.ts +10 -1
- package/package.json +1 -1
- package/releases/deployment.json +9 -4
- package/scripts/multichain-deploy/6_testnetFaucet.ts +85 -0
- package/scripts/multichain-deploy/helpers.ts +1 -1
- package/truffle-config.js +8 -0
- package/types/GDFaucet.ts +221 -0
- package/types/factories/GDFaucet__factory.ts +188 -0
- package/types/hardhat.d.ts +9 -0
- package/types/index.ts +2 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity >=0.8.0;
|
|
4
|
+
|
|
5
|
+
import "./DAOContract.sol";
|
|
6
|
+
|
|
7
|
+
contract GDFaucet is DAOContract {
|
|
8
|
+
uint256 public dripAmount;
|
|
9
|
+
mapping(address => uint256) public lastDripTime;
|
|
10
|
+
|
|
11
|
+
constructor(INameService _dao, uint256 _dripAmount) {
|
|
12
|
+
setDAO(_dao);
|
|
13
|
+
dripAmount = _dripAmount;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function drip() external {
|
|
17
|
+
require(
|
|
18
|
+
block.timestamp - lastDripTime[msg.sender] >= 24 hours,
|
|
19
|
+
"drip limit"
|
|
20
|
+
);
|
|
21
|
+
lastDripTime[msg.sender] = block.timestamp;
|
|
22
|
+
uint decimals = nativeToken().decimals();
|
|
23
|
+
require(
|
|
24
|
+
dao.mintTokens(dripAmount * (10 ** decimals), msg.sender, dao.avatar()),
|
|
25
|
+
"mint failed"
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
package/hardhat.config.ts
CHANGED
|
@@ -59,7 +59,8 @@ const hhconfig: HardhatUserConfig = {
|
|
|
59
59
|
etherscan: {
|
|
60
60
|
apiKey: {
|
|
61
61
|
mainnet: etherscan_key,
|
|
62
|
-
celo: celoscan_key
|
|
62
|
+
celo: celoscan_key,
|
|
63
|
+
alfajores: celoscan_key
|
|
63
64
|
},
|
|
64
65
|
customChains: [
|
|
65
66
|
{
|
|
@@ -69,6 +70,14 @@ const hhconfig: HardhatUserConfig = {
|
|
|
69
70
|
apiURL: "https://api.celoscan.io/api",
|
|
70
71
|
browserURL: "https://celoscan.io/"
|
|
71
72
|
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
network: "alfajores",
|
|
76
|
+
chainId: 44787,
|
|
77
|
+
urls: {
|
|
78
|
+
apiURL: "https://api.alfajores.celoscan.io/api",
|
|
79
|
+
browserURL: "https://alfajores.celoscan.io/"
|
|
80
|
+
}
|
|
72
81
|
}
|
|
73
82
|
]
|
|
74
83
|
},
|
package/package.json
CHANGED
package/releases/deployment.json
CHANGED
|
@@ -479,7 +479,8 @@
|
|
|
479
479
|
"Invites": "0x36829D1Cda92FFF5782d5d48991620664FC857d3",
|
|
480
480
|
"UBIScheme": "0x43d72Ff17701B2DA814620735C39C620Ce0ea4A1",
|
|
481
481
|
"OneTimePayments": "0xB27D247f5C2a61D2Cb6b6E67FEE51d839447e97d",
|
|
482
|
-
"SwapHelper": "0xE45CaB86609a16dFaDec112FDd61E4EA80EdaA8D"
|
|
482
|
+
"SwapHelper": "0xE45CaB86609a16dFaDec112FDd61E4EA80EdaA8D",
|
|
483
|
+
"UniswapV3Router": "0x5615CDAb10dc425a742d643d949a7F474C01abc4"
|
|
483
484
|
},
|
|
484
485
|
"gnosis": {
|
|
485
486
|
"GuardiansSafe": "0x84c10b45fe51bfb4f86c19a47fdbc187d4572fb8"
|
|
@@ -506,7 +507,8 @@
|
|
|
506
507
|
"CompoundVotingMachine": "0xC2C303131939370ed75c95686F691f290b56Be66",
|
|
507
508
|
"GuardiansSafe": "0x84C10B45fE51bfB4f86c19A47Fdbc187d4572Fb8",
|
|
508
509
|
"OneTimePayments": "0xB23e54fd8c2f35F9d38884Fc1611F5e9004f10ea",
|
|
509
|
-
"OneTimePaymentsV2": "0x2cb1c7d50371e277d7a36B171c0ACe9B157518EE"
|
|
510
|
+
"OneTimePaymentsV2": "0x2cb1c7d50371e277d7a36B171c0ACe9B157518EE",
|
|
511
|
+
"UniswapV3Router": "0x5615CDAb10dc425a742d643d949a7F474C01abc4"
|
|
510
512
|
},
|
|
511
513
|
"staging-celo": {
|
|
512
514
|
"network": "staging-celo",
|
|
@@ -530,7 +532,8 @@
|
|
|
530
532
|
"CompoundVotingMachine": "0xCd25fB84AB22582F1034bcd80c399a3126f2E775",
|
|
531
533
|
"GuardiansSafe": "0x84C10B45fE51bfB4f86c19A47Fdbc187d4572Fb8",
|
|
532
534
|
"OneTimePayments": "0x514820Af2DaE5F537dE16E576471528176318113",
|
|
533
|
-
"OneTimePaymentsV2": "0x963E7B4c970626Bb103c61fA16b002AFf6E6c2C7"
|
|
535
|
+
"OneTimePaymentsV2": "0x963E7B4c970626Bb103c61fA16b002AFf6E6c2C7",
|
|
536
|
+
"UniswapV3Router": "0x5615CDAb10dc425a742d643d949a7F474C01abc4"
|
|
534
537
|
},
|
|
535
538
|
"development-goerli": {
|
|
536
539
|
"ProxyFactory": "0x65D8eACBCd9618b8780C4b444081915a5D54D611",
|
|
@@ -555,6 +558,8 @@
|
|
|
555
558
|
"GReputation": "0x3647469733C01713A7d9bdf6834bd4aBd59D66fa",
|
|
556
559
|
"DAOCreator": "0x35ea7176cfde2D35Dff3E688F7bA45D1d5dF0A76",
|
|
557
560
|
"SuperFluidResolver": "0x6e9CaBE4172344Db81a1E1D735a6AD763700064A",
|
|
558
|
-
"SuperFluidHost": "0x14764E92A63e73a2Dac1fF08F35A64647fB50C91"
|
|
561
|
+
"SuperFluidHost": "0x14764E92A63e73a2Dac1fF08F35A64647fB50C91",
|
|
562
|
+
"UniswapV3Router": "0x5615CDAb10dc425a742d643d949a7F474C01abc4",
|
|
563
|
+
"GDFaucet": "0x8986F9C6b3D0b9A8b92ef7f1eF7EB9e767D414e1"
|
|
559
564
|
}
|
|
560
565
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/***
|
|
2
|
+
* Deploy helper contracts
|
|
3
|
+
* AdminWallet, Faucet, Invites
|
|
4
|
+
*/
|
|
5
|
+
import { network, ethers, upgrades, run } from "hardhat";
|
|
6
|
+
import { Contract } from "ethers";
|
|
7
|
+
import { defaultsDeep } from "lodash";
|
|
8
|
+
import { getImplementationAddress } from "@openzeppelin/upgrades-core";
|
|
9
|
+
import { deployDeterministic, verifyProductionSigner, verifyContract } from "./helpers";
|
|
10
|
+
import releaser from "../releaser";
|
|
11
|
+
import ProtocolSettings from "../../releases/deploy-settings.json";
|
|
12
|
+
import dao from "../../releases/deployment.json";
|
|
13
|
+
import { TransactionResponse } from "@ethersproject/providers";
|
|
14
|
+
|
|
15
|
+
const { name } = network;
|
|
16
|
+
|
|
17
|
+
const printDeploy = async (c: Contract | TransactionResponse): Promise<Contract | TransactionResponse> => {
|
|
18
|
+
if (c instanceof Contract) {
|
|
19
|
+
await c.deployed();
|
|
20
|
+
console.log("deployed to: ", c.address);
|
|
21
|
+
}
|
|
22
|
+
if (c.wait) {
|
|
23
|
+
await c.wait();
|
|
24
|
+
console.log("tx done:", c.hash);
|
|
25
|
+
}
|
|
26
|
+
return c;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const deployHelpers = async () => {
|
|
30
|
+
let protocolSettings = defaultsDeep({}, ProtocolSettings[network.name], ProtocolSettings["default"]);
|
|
31
|
+
|
|
32
|
+
let release: { [key: string]: any } = dao[network.name];
|
|
33
|
+
|
|
34
|
+
let [root] = await ethers.getSigners();
|
|
35
|
+
const isProduction = network.name.includes("production");
|
|
36
|
+
|
|
37
|
+
if (isProduction) verifyProductionSigner(root);
|
|
38
|
+
|
|
39
|
+
//generic call permissions
|
|
40
|
+
let schemeMock = root;
|
|
41
|
+
|
|
42
|
+
console.log("got signers:", {
|
|
43
|
+
network,
|
|
44
|
+
root: root.address,
|
|
45
|
+
schemeMock: schemeMock.address,
|
|
46
|
+
balance: await ethers.provider.getBalance(root.address).then(_ => _.toString())
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const GDFaucet = release.GDFaucet
|
|
50
|
+
? await ethers.getContractAt("GDFaucet", release.GDFaucet)
|
|
51
|
+
: ((await deployDeterministic(
|
|
52
|
+
{
|
|
53
|
+
name: "GDFaucet",
|
|
54
|
+
salt: "GDFaucet",
|
|
55
|
+
isUpgradeable: false
|
|
56
|
+
},
|
|
57
|
+
[release.NameService, 10000]
|
|
58
|
+
).then(printDeploy)) as Contract);
|
|
59
|
+
|
|
60
|
+
const torelease = {
|
|
61
|
+
GDFaucet: GDFaucet.address
|
|
62
|
+
};
|
|
63
|
+
await releaser(torelease, network.name, "deployment", false);
|
|
64
|
+
|
|
65
|
+
const controller = await ethers.getContractAt("Controller", release.Controller);
|
|
66
|
+
|
|
67
|
+
const tx = await controller
|
|
68
|
+
.registerScheme(GDFaucet.address, ethers.constants.HashZero, "0x00000001", release.Avatar)
|
|
69
|
+
.then(printDeploy);
|
|
70
|
+
|
|
71
|
+
console.log("TokenFaucet deployed and registered as a scheme via the controller");
|
|
72
|
+
|
|
73
|
+
await verifyContract(
|
|
74
|
+
GDFaucet.address,
|
|
75
|
+
"GDFaucet",
|
|
76
|
+
network.name,
|
|
77
|
+
undefined,
|
|
78
|
+
ethers.utils.defaultAbiCoder.encode(["address", "uint"], [release.NameService, 10000])
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const main = async () => {
|
|
83
|
+
await deployHelpers();
|
|
84
|
+
};
|
|
85
|
+
if (process.argv[1].includes("6_testnetFaucet")) main();
|
|
@@ -332,7 +332,7 @@ export const verifyContract = async (
|
|
|
332
332
|
proxyName?: string,
|
|
333
333
|
forcedConstructorArguments?: string
|
|
334
334
|
) => {
|
|
335
|
-
let networkProvider = network.name.includes("-") ? network.name.split("-")[1] :
|
|
335
|
+
let networkProvider = network.name.includes("-") ? network.name.split("-")[1] : network.name;
|
|
336
336
|
networkProvider = networkProvider === "mainnet" ? "ethereum" : networkProvider;
|
|
337
337
|
console.log("truffle compile...");
|
|
338
338
|
await exec("npx truffle compile");
|
package/truffle-config.js
CHANGED
|
@@ -103,6 +103,14 @@ module.exports = {
|
|
|
103
103
|
confirmations: 1, // # of confs to wait between deployments. (default: 0)
|
|
104
104
|
timeoutBlocks: 20, // # of blocks before a deployment times out (minimum/default: 50)
|
|
105
105
|
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
106
|
+
},
|
|
107
|
+
alfajores: {
|
|
108
|
+
provider: () => new Web3.providers.HttpProvider(`https://alfajores-forno.celo-testnet.org`),
|
|
109
|
+
network_id: 44787, // Ropsten's id
|
|
110
|
+
gas: 150000, // Ropsten has a lower block limit than mainnet
|
|
111
|
+
confirmations: 1, // # of confs to wait between deployments. (default: 0)
|
|
112
|
+
timeoutBlocks: 20, // # of blocks before a deployment times out (minimum/default: 50)
|
|
113
|
+
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
// Useful for private networks
|
|
@@ -0,0 +1,221 @@
|
|
|
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
|
+
CallOverrides,
|
|
16
|
+
} from "ethers";
|
|
17
|
+
import { BytesLike } from "@ethersproject/bytes";
|
|
18
|
+
import { Listener, Provider } from "@ethersproject/providers";
|
|
19
|
+
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
|
|
20
|
+
import type {
|
|
21
|
+
TypedEventFilter,
|
|
22
|
+
TypedEvent,
|
|
23
|
+
TypedListener,
|
|
24
|
+
OnEvent,
|
|
25
|
+
} from "./common";
|
|
26
|
+
|
|
27
|
+
export interface GDFaucetInterface extends ethers.utils.Interface {
|
|
28
|
+
functions: {
|
|
29
|
+
"avatar()": FunctionFragment;
|
|
30
|
+
"dao()": FunctionFragment;
|
|
31
|
+
"drip()": FunctionFragment;
|
|
32
|
+
"dripAmount()": FunctionFragment;
|
|
33
|
+
"lastDripTime(address)": FunctionFragment;
|
|
34
|
+
"nameService()": FunctionFragment;
|
|
35
|
+
"nativeToken()": FunctionFragment;
|
|
36
|
+
"updateAvatar()": FunctionFragment;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
encodeFunctionData(functionFragment: "avatar", values?: undefined): string;
|
|
40
|
+
encodeFunctionData(functionFragment: "dao", values?: undefined): string;
|
|
41
|
+
encodeFunctionData(functionFragment: "drip", values?: undefined): string;
|
|
42
|
+
encodeFunctionData(
|
|
43
|
+
functionFragment: "dripAmount",
|
|
44
|
+
values?: undefined
|
|
45
|
+
): string;
|
|
46
|
+
encodeFunctionData(
|
|
47
|
+
functionFragment: "lastDripTime",
|
|
48
|
+
values: [string]
|
|
49
|
+
): string;
|
|
50
|
+
encodeFunctionData(
|
|
51
|
+
functionFragment: "nameService",
|
|
52
|
+
values?: undefined
|
|
53
|
+
): string;
|
|
54
|
+
encodeFunctionData(
|
|
55
|
+
functionFragment: "nativeToken",
|
|
56
|
+
values?: undefined
|
|
57
|
+
): string;
|
|
58
|
+
encodeFunctionData(
|
|
59
|
+
functionFragment: "updateAvatar",
|
|
60
|
+
values?: undefined
|
|
61
|
+
): string;
|
|
62
|
+
|
|
63
|
+
decodeFunctionResult(functionFragment: "avatar", data: BytesLike): Result;
|
|
64
|
+
decodeFunctionResult(functionFragment: "dao", data: BytesLike): Result;
|
|
65
|
+
decodeFunctionResult(functionFragment: "drip", data: BytesLike): Result;
|
|
66
|
+
decodeFunctionResult(functionFragment: "dripAmount", data: BytesLike): Result;
|
|
67
|
+
decodeFunctionResult(
|
|
68
|
+
functionFragment: "lastDripTime",
|
|
69
|
+
data: BytesLike
|
|
70
|
+
): Result;
|
|
71
|
+
decodeFunctionResult(
|
|
72
|
+
functionFragment: "nameService",
|
|
73
|
+
data: BytesLike
|
|
74
|
+
): Result;
|
|
75
|
+
decodeFunctionResult(
|
|
76
|
+
functionFragment: "nativeToken",
|
|
77
|
+
data: BytesLike
|
|
78
|
+
): Result;
|
|
79
|
+
decodeFunctionResult(
|
|
80
|
+
functionFragment: "updateAvatar",
|
|
81
|
+
data: BytesLike
|
|
82
|
+
): Result;
|
|
83
|
+
|
|
84
|
+
events: {};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface GDFaucet extends BaseContract {
|
|
88
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
89
|
+
attach(addressOrName: string): this;
|
|
90
|
+
deployed(): Promise<this>;
|
|
91
|
+
|
|
92
|
+
interface: GDFaucetInterface;
|
|
93
|
+
|
|
94
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
95
|
+
event: TypedEventFilter<TEvent>,
|
|
96
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
97
|
+
toBlock?: string | number | undefined
|
|
98
|
+
): Promise<Array<TEvent>>;
|
|
99
|
+
|
|
100
|
+
listeners<TEvent extends TypedEvent>(
|
|
101
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
102
|
+
): Array<TypedListener<TEvent>>;
|
|
103
|
+
listeners(eventName?: string): Array<Listener>;
|
|
104
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
105
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
106
|
+
): this;
|
|
107
|
+
removeAllListeners(eventName?: string): this;
|
|
108
|
+
off: OnEvent<this>;
|
|
109
|
+
on: OnEvent<this>;
|
|
110
|
+
once: OnEvent<this>;
|
|
111
|
+
removeListener: OnEvent<this>;
|
|
112
|
+
|
|
113
|
+
functions: {
|
|
114
|
+
avatar(overrides?: CallOverrides): Promise<[string]>;
|
|
115
|
+
|
|
116
|
+
dao(overrides?: CallOverrides): Promise<[string]>;
|
|
117
|
+
|
|
118
|
+
drip(
|
|
119
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
120
|
+
): Promise<ContractTransaction>;
|
|
121
|
+
|
|
122
|
+
dripAmount(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
123
|
+
|
|
124
|
+
lastDripTime(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
125
|
+
|
|
126
|
+
nameService(overrides?: CallOverrides): Promise<[string]>;
|
|
127
|
+
|
|
128
|
+
nativeToken(overrides?: CallOverrides): Promise<[string]>;
|
|
129
|
+
|
|
130
|
+
updateAvatar(
|
|
131
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
132
|
+
): Promise<ContractTransaction>;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
avatar(overrides?: CallOverrides): Promise<string>;
|
|
136
|
+
|
|
137
|
+
dao(overrides?: CallOverrides): Promise<string>;
|
|
138
|
+
|
|
139
|
+
drip(
|
|
140
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
141
|
+
): Promise<ContractTransaction>;
|
|
142
|
+
|
|
143
|
+
dripAmount(overrides?: CallOverrides): Promise<BigNumber>;
|
|
144
|
+
|
|
145
|
+
lastDripTime(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
146
|
+
|
|
147
|
+
nameService(overrides?: CallOverrides): Promise<string>;
|
|
148
|
+
|
|
149
|
+
nativeToken(overrides?: CallOverrides): Promise<string>;
|
|
150
|
+
|
|
151
|
+
updateAvatar(
|
|
152
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
153
|
+
): Promise<ContractTransaction>;
|
|
154
|
+
|
|
155
|
+
callStatic: {
|
|
156
|
+
avatar(overrides?: CallOverrides): Promise<string>;
|
|
157
|
+
|
|
158
|
+
dao(overrides?: CallOverrides): Promise<string>;
|
|
159
|
+
|
|
160
|
+
drip(overrides?: CallOverrides): Promise<void>;
|
|
161
|
+
|
|
162
|
+
dripAmount(overrides?: CallOverrides): Promise<BigNumber>;
|
|
163
|
+
|
|
164
|
+
lastDripTime(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
165
|
+
|
|
166
|
+
nameService(overrides?: CallOverrides): Promise<string>;
|
|
167
|
+
|
|
168
|
+
nativeToken(overrides?: CallOverrides): Promise<string>;
|
|
169
|
+
|
|
170
|
+
updateAvatar(overrides?: CallOverrides): Promise<void>;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
filters: {};
|
|
174
|
+
|
|
175
|
+
estimateGas: {
|
|
176
|
+
avatar(overrides?: CallOverrides): Promise<BigNumber>;
|
|
177
|
+
|
|
178
|
+
dao(overrides?: CallOverrides): Promise<BigNumber>;
|
|
179
|
+
|
|
180
|
+
drip(
|
|
181
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
182
|
+
): Promise<BigNumber>;
|
|
183
|
+
|
|
184
|
+
dripAmount(overrides?: CallOverrides): Promise<BigNumber>;
|
|
185
|
+
|
|
186
|
+
lastDripTime(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
187
|
+
|
|
188
|
+
nameService(overrides?: CallOverrides): Promise<BigNumber>;
|
|
189
|
+
|
|
190
|
+
nativeToken(overrides?: CallOverrides): Promise<BigNumber>;
|
|
191
|
+
|
|
192
|
+
updateAvatar(
|
|
193
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
194
|
+
): Promise<BigNumber>;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
populateTransaction: {
|
|
198
|
+
avatar(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
199
|
+
|
|
200
|
+
dao(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
201
|
+
|
|
202
|
+
drip(
|
|
203
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
204
|
+
): Promise<PopulatedTransaction>;
|
|
205
|
+
|
|
206
|
+
dripAmount(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
207
|
+
|
|
208
|
+
lastDripTime(
|
|
209
|
+
arg0: string,
|
|
210
|
+
overrides?: CallOverrides
|
|
211
|
+
): Promise<PopulatedTransaction>;
|
|
212
|
+
|
|
213
|
+
nameService(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
214
|
+
|
|
215
|
+
nativeToken(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
216
|
+
|
|
217
|
+
updateAvatar(
|
|
218
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
219
|
+
): Promise<PopulatedTransaction>;
|
|
220
|
+
};
|
|
221
|
+
}
|