@gooddollar/goodprotocol 2.0.5-beta.1 → 2.0.5-beta.3
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/OneTimePaymentsV2.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/SuperGoodDollar.sol/SuperGoodDollar.json +2 -2
- 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/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/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/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 +4 -0
- package/artifacts/contracts/utils/OneTimePaymentsV2.sol/OneTimePaymentsV2.json +316 -0
- 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/token/superfluid/SuperGoodDollar.sol +16 -22
- package/contracts/utils/OneTimePaymentsV2.sol +172 -0
- package/hardhat.config.ts +11 -1
- package/package.json +3 -3
- package/releases/deploy-settings.json +6 -0
- package/releases/deployment.json +18 -2
- package/scripts/multichain-deploy/1_basicdao-deploy.ts +34 -94
- package/scripts/multichain-deploy/2b_otp-deploy.ts +4 -4
- package/scripts/multichain-deploy/helpers.ts +4 -4
- package/truffle-config.js +6 -0
- package/types/OneTimePaymentsV2.ts +456 -0
- package/types/factories/OneTimePaymentsV2__factory.ts +369 -0
- package/types/factories/SuperGoodDollar__factory.ts +1 -1
- package/types/hardhat.d.ts +9 -0
- package/types/index.ts +2 -0
- package/yarn.lock +360 -249
package/hardhat.config.ts
CHANGED
|
@@ -35,6 +35,13 @@ const ethplorer_key = process.env.ETHPLORER_KEY;
|
|
|
35
35
|
|
|
36
36
|
const MAINNET_URL = "https://mainnet.infura.io/v3/" + infura_api;
|
|
37
37
|
|
|
38
|
+
const goerli = {
|
|
39
|
+
accounts: { mnemonic },
|
|
40
|
+
url: "https://rpc.ankr.com/eth_goerli",
|
|
41
|
+
gas: 3000000,
|
|
42
|
+
chainId: 5
|
|
43
|
+
};
|
|
44
|
+
|
|
38
45
|
// console.log({ mnemonic: sha3(mnemonic) });
|
|
39
46
|
const hhconfig: HardhatUserConfig = {
|
|
40
47
|
solidity: {
|
|
@@ -216,7 +223,10 @@ const hhconfig: HardhatUserConfig = {
|
|
|
216
223
|
gas: 3000000,
|
|
217
224
|
gasPrice: 500000000,
|
|
218
225
|
chainId: 100
|
|
219
|
-
}
|
|
226
|
+
},
|
|
227
|
+
goerli,
|
|
228
|
+
"development-goerli": goerli,
|
|
229
|
+
"staging-goerli": goerli
|
|
220
230
|
},
|
|
221
231
|
mocha: {
|
|
222
232
|
timeout: 6000000
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddollar/goodprotocol",
|
|
3
|
-
"version": "2.0.5-beta.
|
|
3
|
+
"version": "2.0.5-beta.3",
|
|
4
4
|
"description": "GoodDollar Protocol",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepack": "npm run minimize",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@openzeppelin/contracts-upgradeable": "^4.8.0",
|
|
63
63
|
"@superfluid-finance/ethereum-contracts": "^1.4.3",
|
|
64
64
|
"@superfluid-finance/sdk-core": "^0.5.8",
|
|
65
|
-
"@typechain/hardhat": "^6.1.
|
|
65
|
+
"@typechain/hardhat": "^6.1.5",
|
|
66
66
|
"async-promise-pool": "^1.0.4",
|
|
67
67
|
"openzeppelin-solidity": "^4.3.2",
|
|
68
68
|
"patch-package": "latest",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"fs-extra": "9.0.0",
|
|
104
104
|
"graphql": "^15.5.0",
|
|
105
105
|
"graphql-request": "^3.4.0",
|
|
106
|
-
"hardhat": "^2.
|
|
106
|
+
"hardhat": "^2.13.0",
|
|
107
107
|
"hardhat-contract-sizer": "^2.6.1",
|
|
108
108
|
"hardhat-gas-reporter": "^1.0.8",
|
|
109
109
|
"hardhat-storage-layout": "^0.1.7",
|
|
@@ -207,6 +207,12 @@
|
|
|
207
207
|
},
|
|
208
208
|
"uniswapRouter": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
|
|
209
209
|
},
|
|
210
|
+
"development-goerli": {
|
|
211
|
+
"superfluidHost": "0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9"
|
|
212
|
+
},
|
|
213
|
+
"staging-goerli": {
|
|
214
|
+
"superfluidHost": "0x22ff293e14F1EC3A09B137e9e06084AFd63adDF9"
|
|
215
|
+
},
|
|
210
216
|
"production": {
|
|
211
217
|
"governance": {
|
|
212
218
|
"gdaoAirdrop": "0x2feece0e9bc03b54e63e6eb7abb81a128f6bc7ce9a3bafd5ca2bea0c40e3634b",
|
package/releases/deployment.json
CHANGED
|
@@ -159,6 +159,7 @@
|
|
|
159
159
|
"FuseFaucet": "0x09Ad3430D146aa662eA8c20cBEBceBC0bbB3FB0a",
|
|
160
160
|
"Invites": "0x187fc9fB37DF0fbf75149913a97B17c968Fc90d0",
|
|
161
161
|
"OneTimePayments": "0x184C1F83b3eB75a2dac483D4a6b9FBD59Df961f8",
|
|
162
|
+
"OneTimePaymentsV2": "0x140A43d46F5445cdfC38E8C6f40F0a4541Fe933f",
|
|
162
163
|
"AdminWallet": "0xC1526892198796d30D33355cfF9Af10EED5B86A0",
|
|
163
164
|
"AdminWalletOld": "0x14204288286823042263156146334B1a4d61227c",
|
|
164
165
|
"network": "fuse",
|
|
@@ -267,6 +268,7 @@
|
|
|
267
268
|
"AdminWalletOld": "0x2961a6C2Fe39F0FFC4f4b1D9E037CD95f4e9C993",
|
|
268
269
|
"UpgradeScheme": "0xfC9F6F5E3ff7BAAB3fEf82e66f56917D625ba38B",
|
|
269
270
|
"OneTimePayments": "0x7912636D68E5d92708862b38698f764BF1EC297C",
|
|
271
|
+
"OneTimePaymentsV2": "0xEa6E73f5Ef1EC677FE2551128a22cDf27667a5Cd",
|
|
270
272
|
"network": "staging",
|
|
271
273
|
"networkId": 122,
|
|
272
274
|
"ProxyFactory": "0x240d844AdA767bE0AB08F9BcCcB6D8a04aE370EC",
|
|
@@ -501,7 +503,8 @@
|
|
|
501
503
|
"ClaimersDistribution": "0x6e3c0ad79FA7ccDFa27bE14C2630511415A2F635",
|
|
502
504
|
"CompoundVotingMachine": "0xC2C303131939370ed75c95686F691f290b56Be66",
|
|
503
505
|
"GuardiansSafe": "0x84C10B45fE51bfB4f86c19A47Fdbc187d4572Fb8",
|
|
504
|
-
"OneTimePayments": "0xB23e54fd8c2f35F9d38884Fc1611F5e9004f10ea"
|
|
506
|
+
"OneTimePayments": "0xB23e54fd8c2f35F9d38884Fc1611F5e9004f10ea",
|
|
507
|
+
"OneTimePaymentsV2": "0x2cb1c7d50371e277d7a36B171c0ACe9B157518EE"
|
|
505
508
|
},
|
|
506
509
|
"staging-celo": {
|
|
507
510
|
"network": "staging-celo",
|
|
@@ -524,6 +527,19 @@
|
|
|
524
527
|
"ClaimersDistribution": "0x671123F1c7a5B5445467Ff765a5E2Bc86878B245",
|
|
525
528
|
"CompoundVotingMachine": "0xCd25fB84AB22582F1034bcd80c399a3126f2E775",
|
|
526
529
|
"GuardiansSafe": "0x84C10B45fE51bfB4f86c19A47Fdbc187d4572Fb8",
|
|
527
|
-
"OneTimePayments": "0x514820Af2DaE5F537dE16E576471528176318113"
|
|
530
|
+
"OneTimePayments": "0x514820Af2DaE5F537dE16E576471528176318113",
|
|
531
|
+
"OneTimePaymentsV2": "0x963E7B4c970626Bb103c61fA16b002AFf6E6c2C7"
|
|
532
|
+
},
|
|
533
|
+
"development-goerli": {
|
|
534
|
+
"ProxyFactory": "0x65D8eACBCd9618b8780C4b444081915a5D54D611",
|
|
535
|
+
"GoodDollar": "0x70044867217EC9C46ecDe49C1f7fCA3b5Ed2f5C4",
|
|
536
|
+
"Avatar": "0xE0e3BFb1A1850bdFe36ED1563CC2abB6A8B6De78",
|
|
537
|
+
"Controller": "0x6717A1948328C8eCCb5C933Fae90e0631C2486fE",
|
|
538
|
+
"Identity": "0x53A537b6917fAFC6bFE1Ae0d54874A225Ce25bA1",
|
|
539
|
+
"NameService": "0xbd8297847F9De15409Dc0441560b2114c5e7b662",
|
|
540
|
+
"GReputation": "0x0abF3D20fCb33FC03bdF25b042E77edfAeDBBDD3",
|
|
541
|
+
"FeeFormula": "0x5fAA779cF74a1Ba51909DEeaA0e8900474DA77Cf",
|
|
542
|
+
"DAOCreator": "0xc66c970a6d99da587a7d7fa7d5383b401c3e87f4",
|
|
543
|
+
"OneTimePaymentsV2": "0x4E8112430974b4CE87283221a11BDC52097e7e2e"
|
|
528
544
|
}
|
|
529
545
|
}
|
|
@@ -12,19 +12,13 @@ import DAOCreatorABI from "@gooddollar/goodcontracts/build/contracts/DaoCreatorG
|
|
|
12
12
|
// import IdentityABI from "@gooddollar/goodcontracts/build/contracts/Identity.json";
|
|
13
13
|
import FeeFormulaABI from "@gooddollar/goodcontracts/build/contracts/FeeFormula.json";
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
deployDeterministic,
|
|
17
|
-
deploySuperGoodDollar,
|
|
18
|
-
verifyProductionSigner
|
|
19
|
-
} from "./helpers";
|
|
15
|
+
import { deployDeterministic, deploySuperGoodDollar, verifyProductionSigner } from "./helpers";
|
|
20
16
|
import releaser from "../releaser";
|
|
21
17
|
import ProtocolSettings from "../../releases/deploy-settings.json";
|
|
22
18
|
import dao from "../../releases/deployment.json";
|
|
23
19
|
import { TransactionResponse } from "@ethersproject/providers";
|
|
24
20
|
|
|
25
|
-
const printDeploy = async (
|
|
26
|
-
c: Contract | TransactionResponse
|
|
27
|
-
): Promise<Contract | TransactionResponse> => {
|
|
21
|
+
const printDeploy = async (c: Contract | TransactionResponse): Promise<Contract | TransactionResponse> => {
|
|
28
22
|
if (c instanceof Contract) {
|
|
29
23
|
await c.deployed();
|
|
30
24
|
console.log("deployed to: ", c.address);
|
|
@@ -37,11 +31,7 @@ const printDeploy = async (
|
|
|
37
31
|
};
|
|
38
32
|
|
|
39
33
|
export const createDAO = async () => {
|
|
40
|
-
let protocolSettings = defaultsDeep(
|
|
41
|
-
{},
|
|
42
|
-
ProtocolSettings[network.name],
|
|
43
|
-
ProtocolSettings["default"]
|
|
44
|
-
);
|
|
34
|
+
let protocolSettings = defaultsDeep({}, ProtocolSettings[network.name], ProtocolSettings["default"]);
|
|
45
35
|
|
|
46
36
|
let release: { [key: string]: any } = dao[network.name];
|
|
47
37
|
const isProduction = network.name.includes("production");
|
|
@@ -54,34 +44,17 @@ export const createDAO = async () => {
|
|
|
54
44
|
network,
|
|
55
45
|
daoOwner,
|
|
56
46
|
root: root.address,
|
|
57
|
-
balance: await ethers.provider
|
|
58
|
-
.getBalance(root.address)
|
|
59
|
-
.then(_ => _.toString()),
|
|
47
|
+
balance: await ethers.provider.getBalance(root.address).then(_ => _.toString()),
|
|
60
48
|
release
|
|
61
49
|
});
|
|
62
50
|
|
|
63
|
-
const DAOCreatorFactory = new ethers.ContractFactory(
|
|
64
|
-
DAOCreatorABI.abi,
|
|
65
|
-
DAOCreatorABI.bytecode,
|
|
66
|
-
root
|
|
67
|
-
);
|
|
51
|
+
const DAOCreatorFactory = new ethers.ContractFactory(DAOCreatorABI.abi, DAOCreatorABI.bytecode, root);
|
|
68
52
|
|
|
69
|
-
const FeeFormulaFactory = new ethers.ContractFactory(
|
|
70
|
-
FeeFormulaABI.abi,
|
|
71
|
-
FeeFormulaABI.bytecode,
|
|
72
|
-
root
|
|
73
|
-
);
|
|
53
|
+
const FeeFormulaFactory = new ethers.ContractFactory(FeeFormulaABI.abi, FeeFormulaABI.bytecode, root);
|
|
74
54
|
|
|
75
|
-
const proxyFactory = await ethers.getContractAt(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
);
|
|
79
|
-
const salt = ethers.BigNumber.from(
|
|
80
|
-
ethers.utils.keccak256(ethers.utils.toUtf8Bytes("NameService"))
|
|
81
|
-
);
|
|
82
|
-
const nameserviceFutureAddress = await proxyFactory[
|
|
83
|
-
"getDeploymentAddress(uint256,address)"
|
|
84
|
-
](salt, root.address);
|
|
55
|
+
const proxyFactory = await ethers.getContractAt("ProxyFactory1967", release.ProxyFactory);
|
|
56
|
+
const salt = ethers.BigNumber.from(ethers.utils.keccak256(ethers.utils.toUtf8Bytes("NameService")));
|
|
57
|
+
const nameserviceFutureAddress = await proxyFactory["getDeploymentAddress(uint256,address)"](salt, root.address);
|
|
85
58
|
console.log("deploying identity", { nameserviceFutureAddress });
|
|
86
59
|
const Identity = (await deployDeterministic(
|
|
87
60
|
{
|
|
@@ -92,12 +65,11 @@ export const createDAO = async () => {
|
|
|
92
65
|
[root.address, ethers.constants.AddressZero]
|
|
93
66
|
).then(printDeploy)) as Contract;
|
|
94
67
|
|
|
95
|
-
const daoCreator = await DAOCreatorFactory.deploy();
|
|
68
|
+
const daoCreator = (await DAOCreatorFactory.deploy().then(printDeploy)) as Contract;
|
|
96
69
|
|
|
97
|
-
const FeeFormula = (await deployDeterministic(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
).then(printDeploy)) as Contract;
|
|
70
|
+
const FeeFormula = (await deployDeterministic({ name: "FeeFormula", factory: FeeFormulaFactory }, [0]).then(
|
|
71
|
+
printDeploy
|
|
72
|
+
)) as Contract;
|
|
101
73
|
|
|
102
74
|
let GoodDollar;
|
|
103
75
|
if (protocolSettings.superfluidHost) {
|
|
@@ -115,8 +87,7 @@ export const createDAO = async () => {
|
|
|
115
87
|
{
|
|
116
88
|
name: "GoodDollar",
|
|
117
89
|
isUpgradeable: true,
|
|
118
|
-
initializer:
|
|
119
|
-
"initialize(string, string, uint256, address, address, address,address)"
|
|
90
|
+
initializer: "initialize(string, string, uint256, address, address, address,address)"
|
|
120
91
|
},
|
|
121
92
|
[
|
|
122
93
|
isProduction ? "GoodDollar" : "GoodDollar Dev",
|
|
@@ -148,16 +119,11 @@ export const createDAO = async () => {
|
|
|
148
119
|
// await Identity.setAuthenticationPeriod(365).then(printDeploy);
|
|
149
120
|
|
|
150
121
|
console.log("creating dao");
|
|
151
|
-
await daoCreator
|
|
152
|
-
.forgeOrg(GoodDollar.address, GReputation.address, [], 0, [])
|
|
153
|
-
.then(printDeploy);
|
|
122
|
+
await daoCreator.forgeOrg(GoodDollar.address, GReputation.address, [], 0, []).then(printDeploy);
|
|
154
123
|
console.log("forgeOrg done ");
|
|
155
124
|
const Avatar = new ethers.Contract(
|
|
156
125
|
await daoCreator.avatar(),
|
|
157
|
-
[
|
|
158
|
-
"function owner() view returns (address)",
|
|
159
|
-
"function nativeToken() view returns (address)"
|
|
160
|
-
],
|
|
126
|
+
["function owner() view returns (address)", "function nativeToken() view returns (address)"],
|
|
161
127
|
root
|
|
162
128
|
);
|
|
163
129
|
|
|
@@ -181,16 +147,13 @@ export const createDAO = async () => {
|
|
|
181
147
|
)
|
|
182
148
|
.then(printDeploy);
|
|
183
149
|
|
|
184
|
-
const NameService = await deployDeterministic(
|
|
185
|
-
|
|
186
|
-
[
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
[controller, Avatar.address, Identity.address, gd, GReputation.address]
|
|
192
|
-
]
|
|
193
|
-
);
|
|
150
|
+
const NameService = await deployDeterministic({ name: "NameService", isUpgradeable: true }, [
|
|
151
|
+
controller,
|
|
152
|
+
["CONTROLLER", "AVATAR", "IDENTITY", "GOODDOLLAR", "REPUTATION"].map(_ =>
|
|
153
|
+
ethers.utils.keccak256(ethers.utils.toUtf8Bytes(_))
|
|
154
|
+
),
|
|
155
|
+
[controller, Avatar.address, Identity.address, gd, GReputation.address]
|
|
156
|
+
]);
|
|
194
157
|
|
|
195
158
|
console.log("set GRep nameservice..");
|
|
196
159
|
await (await GReputation.updateDAO(NameService.address)).wait();
|
|
@@ -206,54 +169,31 @@ export const createDAO = async () => {
|
|
|
206
169
|
await GoodDollar.renounceMinter().then(printDeploy);
|
|
207
170
|
}
|
|
208
171
|
|
|
209
|
-
const daoOwnerDaoPermissions = await Controller.getSchemePermissions(
|
|
210
|
-
daoOwner,
|
|
211
|
-
Avatar.address
|
|
212
|
-
);
|
|
172
|
+
const daoOwnerDaoPermissions = await Controller.getSchemePermissions(daoOwner, Avatar.address);
|
|
213
173
|
|
|
214
|
-
const deployerIsNotGDMinter =
|
|
215
|
-
(await GoodDollar.isMinter(root.address)) === false;
|
|
174
|
+
const deployerIsNotGDMinter = (await GoodDollar.isMinter(root.address)) === false;
|
|
216
175
|
|
|
217
176
|
const avatarIsGDMinter = await GoodDollar.isMinter(Avatar.address);
|
|
218
177
|
|
|
219
|
-
const deployerIsNotGDPauser =
|
|
220
|
-
(await GoodDollar.isPauser(root.address)) === false;
|
|
178
|
+
const deployerIsNotGDPauser = (await GoodDollar.isPauser(root.address)) === false;
|
|
221
179
|
|
|
222
|
-
const deployerIsNotRepMinter =
|
|
223
|
-
|
|
224
|
-
false;
|
|
225
|
-
const avatarIsRepMinter = await GReputation.hasRole(
|
|
226
|
-
GReputation.MINTER_ROLE(),
|
|
227
|
-
Avatar.address
|
|
228
|
-
);
|
|
180
|
+
const deployerIsNotRepMinter = (await GReputation.hasRole(GReputation.MINTER_ROLE(), root.address)) === false;
|
|
181
|
+
const avatarIsRepMinter = await GReputation.hasRole(GReputation.MINTER_ROLE(), Avatar.address);
|
|
229
182
|
|
|
230
|
-
const deployerIsIdentityOwner = await Identity.hasRole(
|
|
231
|
-
ethers.constants.HashZero,
|
|
232
|
-
root.address
|
|
233
|
-
);
|
|
183
|
+
const deployerIsIdentityOwner = await Identity.hasRole(ethers.constants.HashZero, root.address);
|
|
234
184
|
|
|
235
|
-
const avatarIsIdentityOwner = await Identity.hasRole(
|
|
236
|
-
ethers.constants.HashZero,
|
|
237
|
-
Avatar.address
|
|
238
|
-
);
|
|
185
|
+
const avatarIsIdentityOwner = await Identity.hasRole(ethers.constants.HashZero, Avatar.address);
|
|
239
186
|
|
|
240
187
|
//try to modify DAO -> should not succeed
|
|
241
188
|
await (await GReputation.updateDAO(ethers.constants.AddressZero)).wait();
|
|
242
189
|
|
|
243
|
-
const grepHasDAOSet =
|
|
244
|
-
(await GReputation.nameService()) === NameService.address;
|
|
190
|
+
const grepHasDAOSet = (await GReputation.nameService()) === NameService.address;
|
|
245
191
|
|
|
246
|
-
const factoryIsNotGoodOwner =
|
|
247
|
-
(await GReputation.hasRole(
|
|
248
|
-
ethers.constants.HashZero,
|
|
249
|
-
proxyFactory.address
|
|
250
|
-
)) === false;
|
|
192
|
+
const factoryIsNotGoodOwner = (await GReputation.hasRole(ethers.constants.HashZero, proxyFactory.address)) === false;
|
|
251
193
|
|
|
252
|
-
const factoryIsNotGDMinter =
|
|
253
|
-
(await GoodDollar.isMinter(proxyFactory.address)) === false;
|
|
194
|
+
const factoryIsNotGDMinter = (await GoodDollar.isMinter(proxyFactory.address)) === false;
|
|
254
195
|
|
|
255
|
-
const factoryIsNotGDPauser =
|
|
256
|
-
(await GoodDollar.isPauser(root.address)) === false;
|
|
196
|
+
const factoryIsNotGDPauser = (await GoodDollar.isPauser(root.address)) === false;
|
|
257
197
|
|
|
258
198
|
console.log({
|
|
259
199
|
daoOwnerDaoPermissions,
|
|
@@ -49,8 +49,8 @@ export const deployHelpers = async () => {
|
|
|
49
49
|
console.log("deploying onetime payments", { gasprice: protocolSettings.gasPrice });
|
|
50
50
|
const OTP = (await deployDeterministic(
|
|
51
51
|
{
|
|
52
|
-
name: "
|
|
53
|
-
salt: "
|
|
52
|
+
name: "OneTimePaymentsV2",
|
|
53
|
+
salt: "OneTimePaymentsV2",
|
|
54
54
|
isUpgradeable: false
|
|
55
55
|
},
|
|
56
56
|
[release.NameService]
|
|
@@ -59,12 +59,12 @@ export const deployHelpers = async () => {
|
|
|
59
59
|
// const OTP = await ethers.getContractAt("OneTimePayments", release.OneTimePayments);
|
|
60
60
|
|
|
61
61
|
const torelease = {
|
|
62
|
-
|
|
62
|
+
OneTimePaymentsV2: OTP.address
|
|
63
63
|
};
|
|
64
64
|
await releaser(torelease, network.name, "deployment", false);
|
|
65
65
|
|
|
66
66
|
const constructorArgs = ethers.utils.defaultAbiCoder.encode(["address"], [release.NameService]);
|
|
67
|
-
await verifyContract(OTP.address, "
|
|
67
|
+
await verifyContract(OTP.address, "OneTimePaymentsV2", network.name, undefined, constructorArgs);
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
export const main = async () => {
|
|
@@ -65,11 +65,11 @@ export const deploySuperGoodDollar = async (superfluidHost, tokenArgs) => {
|
|
|
65
65
|
[]
|
|
66
66
|
).then(printDeploy)) as Contract;
|
|
67
67
|
|
|
68
|
-
await GoodDollarProxy.initializeProxy(SuperGoodDollar.address);
|
|
68
|
+
await GoodDollarProxy.initializeProxy(SuperGoodDollar.address).then(printDeploy);
|
|
69
69
|
|
|
70
|
-
await SuperGoodDollar.attach(GoodDollarProxy.address)
|
|
71
|
-
"initialize(string,string,uint256,address,address,address,address)"
|
|
72
|
-
|
|
70
|
+
await SuperGoodDollar.attach(GoodDollarProxy.address)
|
|
71
|
+
["initialize(string,string,uint256,address,address,address,address)"](...tokenArgs)
|
|
72
|
+
.then(printDeploy);
|
|
73
73
|
|
|
74
74
|
const GoodDollar = await ethers.getContractAt("ISuperGoodDollar", GoodDollarProxy.address);
|
|
75
75
|
return GoodDollar;
|
package/truffle-config.js
CHANGED
|
@@ -74,6 +74,12 @@ module.exports = {
|
|
|
74
74
|
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
|
|
75
75
|
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
76
76
|
},
|
|
77
|
+
goerli: {
|
|
78
|
+
provider: () => new Web3.providers.HttpProvider(`https://rpc.ankr.io/eth_goerli`),
|
|
79
|
+
network_id: 5, // Ropsten's id
|
|
80
|
+
gas: 3000000, // Ropsten has a lower block limit than mainnet
|
|
81
|
+
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
|
|
82
|
+
},
|
|
77
83
|
fuse: {
|
|
78
84
|
provider: () => new Web3.providers.HttpProvider(`https://rpc.fuse.io`),
|
|
79
85
|
network_id: 122, // Ropsten's id
|