@superfluid-finance/ethereum-contracts 1.7.2-dev.09f3be3.0 → 1.7.2-dev.2cebc84.0
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/contracts/apps/SuperfluidLoaderLibrary.sol/SuperfluidLoaderLibrary.json +2 -2
- package/build/contracts/AccessControl.json +1 -1
- package/build/contracts/AccessControlEnumerable.json +1 -1
- package/build/contracts/Address.json +1 -1
- package/build/contracts/AgreementBase.json +18 -18
- package/build/contracts/AgreementLibrary.json +165 -165
- package/build/contracts/BaseRelayRecipient.json +57 -57
- package/build/contracts/BatchLiquidator.json +382 -382
- package/build/contracts/BatchOperation.json +614 -614
- package/build/contracts/CFAv1Forwarder.json +1250 -1250
- package/build/contracts/CFAv1ForwarderDeployerLibrary.json +2384 -2384
- package/build/contracts/CFAv1Library.json +389 -389
- package/build/contracts/CallUtils.json +198 -198
- package/build/contracts/ClosingOnUpdateFlowTestApp.json +1525 -1525
- package/build/contracts/ConstantFlowAgreementV1.json +1087 -1087
- package/build/contracts/ConstantInflowNFT.json +402 -402
- package/build/contracts/ConstantOutflowNFT.json +661 -661
- package/build/contracts/Context.json +1 -1
- package/build/contracts/ContextDefinitions.json +614 -614
- package/build/contracts/CustomSuperTokenBase.json +19 -19
- package/build/contracts/ERC165.json +1 -1
- package/build/contracts/ERC1820Implementer.json +1 -1
- package/build/contracts/ERC1820RegistryCompiled.json +22 -22
- package/build/contracts/ERC20.json +1 -1
- package/build/contracts/ERC20WithTokenInfo.json +23 -23
- package/build/contracts/ERC777Helper.json +384 -384
- package/build/contracts/ERC777RecipientDrainingGas.json +863 -863
- package/build/contracts/ERC777RecipientReverting.json +863 -863
- package/build/contracts/EnumerableSet.json +1 -1
- package/build/contracts/EventsEmitter.json +43 -43
- package/build/contracts/ExclusiveInflowTestApp.json +1525 -1525
- package/build/contracts/FixedSizeData.json +200 -200
- package/build/contracts/FlowExchangeTestApp.json +1526 -1526
- package/build/contracts/FlowNFTBase.json +1280 -1280
- package/build/contracts/FlowOperatorDefinitions.json +614 -614
- package/build/contracts/ForwarderBase.json +190 -190
- package/build/contracts/FullUpgradableSuperTokenProxy.json +116 -116
- package/build/contracts/IAccessControl.json +1 -1
- package/build/contracts/IAccessControlEnumerable.json +1 -1
- package/build/contracts/IConstantFlowAgreementV1.json +677 -677
- package/build/contracts/IConstantInflowNFT.json +54 -54
- package/build/contracts/IConstantOutflowNFT.json +107 -107
- package/build/contracts/IDAv1Forwarder.json +912 -912
- package/build/contracts/IDAv1ForwarderDeployerLibrary.json +2384 -2384
- package/build/contracts/IDAv1Library.json +430 -430
- package/build/contracts/IERC165.json +1 -1
- package/build/contracts/IERC1820Implementer.json +1 -1
- package/build/contracts/IERC1820Registry.json +1 -1
- package/build/contracts/IERC20.json +1 -1
- package/build/contracts/IERC20Metadata.json +1 -1
- package/build/contracts/IERC20Permit.json +1 -1
- package/build/contracts/IERC721.json +1 -1
- package/build/contracts/IERC721Metadata.json +1 -1
- package/build/contracts/IERC777.json +1 -1
- package/build/contracts/IERC777Recipient.json +1 -1
- package/build/contracts/IERC777Sender.json +1 -1
- package/build/contracts/IFlowNFTBase.json +115 -115
- package/build/contracts/IInstantDistributionAgreementV1.json +667 -667
- package/build/contracts/IMultiSigWallet.json +31 -31
- package/build/contracts/IPoolAdminNFT.json +7 -7
- package/build/contracts/IPoolMemberNFT.json +7 -7
- package/build/contracts/IPureSuperToken.json +62 -62
- package/build/contracts/IPureSuperTokenCustom.json +62 -62
- package/build/contracts/IRelayRecipient.json +27 -27
- package/build/contracts/IResolver.json +38 -38
- package/build/contracts/ISETH.json +67 -67
- package/build/contracts/ISETHCustom.json +67 -67
- package/build/contracts/ISuperAgreement.json +50 -50
- package/build/contracts/ISuperApp.json +191 -191
- package/build/contracts/ISuperToken.json +695 -695
- package/build/contracts/ISuperTokenFactory.json +225 -225
- package/build/contracts/ISuperfluid.json +904 -904
- package/build/contracts/ISuperfluidGovernance.json +251 -251
- package/build/contracts/ISuperfluidToken.json +407 -407
- package/build/contracts/ITOGAv1.json +1346 -1346
- package/build/contracts/ITOGAv2.json +1346 -1346
- package/build/contracts/ITOGAv3.json +1346 -1346
- package/build/contracts/Initializable.json +1 -1
- package/build/contracts/InstantDistributionAgreementV1.json +594 -594
- package/build/contracts/Math.json +1 -1
- package/build/contracts/NonClosableOutflowTestApp.json +1526 -1526
- package/build/contracts/Ownable.json +1 -1
- package/build/contracts/Proxy.json +1 -1
- package/build/contracts/ProxyDeployerLibrary.json +2382 -2382
- package/build/contracts/PureSuperToken.json +106 -106
- package/build/contracts/Resolver.json +98 -98
- package/build/contracts/SETHProxy.json +224 -224
- package/build/contracts/SafeCast.json +1 -1
- package/build/contracts/SafeERC20.json +1 -1
- package/build/contracts/SafeGasLibrary.json +51 -51
- package/build/contracts/SafeMath.json +1 -1
- package/build/contracts/SelfDeletingFlowTestApp.json +1525 -1525
- package/build/contracts/SlotsBitmapLibrary.json +457 -457
- package/build/contracts/StreamRedirector.json +704 -704
- package/build/contracts/Strings.json +1 -1
- package/build/contracts/SuperAppBase.json +42 -42
- package/build/contracts/SuperAppBaseFlow.json +138 -138
- package/build/contracts/SuperAppDefinitions.json +614 -614
- package/build/contracts/SuperToken.json +2714 -2714
- package/build/contracts/SuperTokenDeployerLibrary.json +2383 -2383
- package/build/contracts/SuperTokenFactory.json +1347 -1347
- package/build/contracts/SuperTokenFactoryBase.json +1329 -1329
- package/build/contracts/SuperTokenV1Library.json +1483 -1483
- package/build/contracts/SuperUpgrader.json +439 -439
- package/build/contracts/Superfluid.json +5196 -5196
- package/build/contracts/SuperfluidCFAv1DeployerLibrary.json +2383 -2383
- package/build/contracts/SuperfluidFrameworkDeployer.json +1260 -1260
- package/build/contracts/SuperfluidFrameworkDeploymentSteps.json +2382 -2382
- package/build/contracts/SuperfluidGovDeployerLibrary.json +2383 -2383
- package/build/contracts/SuperfluidGovernanceBase.json +2449 -2449
- package/build/contracts/SuperfluidGovernanceConfigs.json +614 -614
- package/build/contracts/SuperfluidGovernanceII.json +155 -155
- package/build/contracts/SuperfluidGovernanceIIProxy.json +135 -135
- package/build/contracts/SuperfluidHostDeployerLibrary.json +2382 -2382
- package/build/contracts/SuperfluidIDAv1DeployerLibrary.json +2383 -2383
- package/build/contracts/SuperfluidLoader.json +207 -207
- package/build/contracts/SuperfluidLoaderDeployerLibrary.json +2384 -2384
- package/build/contracts/SuperfluidLoaderLibrary.json +485 -351
- package/build/contracts/SuperfluidNFTLogicDeployerLibrary.json +2387 -2387
- package/build/contracts/SuperfluidPeripheryDeployerLibrary.json +2385 -2385
- package/build/contracts/SuperfluidToken.json +1423 -1423
- package/build/contracts/TOGA.json +1360 -1360
- package/build/contracts/TestGovernance.json +250 -250
- package/build/contracts/TestResolver.json +47 -47
- package/build/contracts/TestToken.json +102 -102
- package/build/contracts/TokenDeployerLibrary.json +2384 -2384
- package/build/contracts/TokenInfo.json +32 -32
- package/build/contracts/UUPSProxiable.json +139 -139
- package/build/contracts/UUPSProxy.json +81 -81
- package/build/contracts/UUPSUtils.json +37 -37
- package/build/contracts-sizes.txt +15 -15
- package/build/typechain/factories/contracts/apps/SuperfluidLoaderLibrary__factory.d.ts +1 -1
- package/build/typechain/factories/contracts/apps/SuperfluidLoaderLibrary__factory.d.ts.map +1 -1
- package/build/typechain/factories/contracts/apps/SuperfluidLoaderLibrary__factory.js +1 -1
- package/build/typechain/factories/contracts/apps/SuperfluidLoaderLibrary__factory.js.map +1 -1
- package/contracts/apps/SuperfluidLoaderLibrary.sol +4 -1
- package/package.json +4 -5
- package/ops-scripts/.eslintrc.js +0 -15
- package/ops-scripts/artifacts/ERC1820Registry.json +0 -5
- package/ops-scripts/deploy-aux-contracts.js +0 -99
- package/ops-scripts/deploy-deterministically.js +0 -169
- package/ops-scripts/deploy-erc1820.js +0 -83
- package/ops-scripts/deploy-framework.js +0 -895
- package/ops-scripts/deploy-mfa.ts +0 -27
- package/ops-scripts/deploy-super-token.js +0 -206
- package/ops-scripts/deploy-test-environment.js +0 -98
- package/ops-scripts/deploy-test-token.js +0 -86
- package/ops-scripts/deploy-unlisted-pure-super-token.js +0 -69
- package/ops-scripts/deploy-unlisted-super-token.js +0 -68
- package/ops-scripts/gov-create-new-app-registration-key.js +0 -75
- package/ops-scripts/gov-create-new-factory-registration.js +0 -49
- package/ops-scripts/gov-set-3Ps-config.js +0 -67
- package/ops-scripts/gov-set-reward-address.js +0 -60
- package/ops-scripts/gov-set-token-min-deposit.js +0 -53
- package/ops-scripts/gov-set-trusted-forwarder.js +0 -80
- package/ops-scripts/gov-transfer-framework-ownership.js +0 -90
- package/ops-scripts/gov-upgrade-governance.js +0 -87
- package/ops-scripts/gov-upgrade-super-token-logic.js +0 -193
- package/ops-scripts/info-inspect-account.js +0 -118
- package/ops-scripts/info-list-apps.js +0 -55
- package/ops-scripts/info-print-contract-addresses.js +0 -136
- package/ops-scripts/info-scan-deployments.js +0 -63
- package/ops-scripts/info-show-protocol.js +0 -400
- package/ops-scripts/libs/common.js +0 -436
- package/ops-scripts/libs/getConfig.js +0 -289
- package/ops-scripts/libs/truffleScriptRunnerFactory.js +0 -97
- package/ops-scripts/resolver-list-super-token.js +0 -73
- package/ops-scripts/resolver-register-token.js +0 -72
- package/ops-scripts/resolver-reset-deployment.js +0 -54
- package/ops-scripts/resolver-set-key-value.js +0 -69
- package/ops-scripts/resolver-unlist-super-token.js +0 -61
- package/ops-scripts/tmp-trigger-token-transfer.js +0 -33
- package/ops-scripts/validate-nft-addresses.ts +0 -49
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
const SuperfluidSDK = require("@superfluid-finance/js-sdk");
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* REFERENCES:
|
|
5
|
-
* - https://docs.biconomy.io/misc/contract-addresses
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
module.exports = function getConfig(chainId) {
|
|
9
|
-
const DEFAULT_CONFIGS = {
|
|
10
|
-
//
|
|
11
|
-
// Local Testing
|
|
12
|
-
//
|
|
13
|
-
4447: {
|
|
14
|
-
// for local testing (truffle internal ganache and TestEnvironment)
|
|
15
|
-
// this is a fake forwarder address, it is to test the deployment script
|
|
16
|
-
biconomyForwarder: "0x3075b4dc7085C48A14A5A39BBa68F58B19545971",
|
|
17
|
-
},
|
|
18
|
-
5777: {
|
|
19
|
-
// for local testing (external ganache)
|
|
20
|
-
// this is a fake forwarder address, it is to test the deployment script
|
|
21
|
-
biconomyForwarder: "0x3075b4dc7085C48A14A5A39BBa68F58B19545971",
|
|
22
|
-
},
|
|
23
|
-
6777: {
|
|
24
|
-
// for coverage testing
|
|
25
|
-
// this is a fake forwarder address, it is to test the deployment script
|
|
26
|
-
biconomyForwarder: "0x3075b4dc7085C48A14A5A39BBa68F58B19545971",
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
//
|
|
30
|
-
// ETHEREUM
|
|
31
|
-
//
|
|
32
|
-
1: {
|
|
33
|
-
// mainnet
|
|
34
|
-
liquidationPeriod: 3600 * 4,
|
|
35
|
-
patricianPeriod: 3600 * 4 * 0.2,
|
|
36
|
-
tokenList: [],
|
|
37
|
-
// governance default configs
|
|
38
|
-
gov_enableAppWhiteListing: true,
|
|
39
|
-
// misc
|
|
40
|
-
disableTestGovernance: true,
|
|
41
|
-
data: {
|
|
42
|
-
initialBlockNumber: 15870000,
|
|
43
|
-
getLogsRange: 10000,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
5: {
|
|
47
|
-
// goerli
|
|
48
|
-
liquidationPeriod: 3600,
|
|
49
|
-
patricianPeriod: 3600 * 0.2,
|
|
50
|
-
biconomyForwarder: "0x3075b4dc7085C48A14A5A39BBa68F58B19545971",
|
|
51
|
-
},
|
|
52
|
-
11155111: {
|
|
53
|
-
// sepolia
|
|
54
|
-
liquidationPeriod: 3600,
|
|
55
|
-
patricianPeriod: 3600 * 0.2,
|
|
56
|
-
},
|
|
57
|
-
4: {
|
|
58
|
-
// rinkeby
|
|
59
|
-
liquidationPeriod: 3600,
|
|
60
|
-
patricianPeriod: 3600 * 0.2,
|
|
61
|
-
biconomyForwarder: "0x1730cAe53340aB01228019618C2b544642f3650A",
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
3: {
|
|
65
|
-
// ropsten
|
|
66
|
-
liquidationPeriod: 3600,
|
|
67
|
-
patricianPeriod: 3600 * 0.2,
|
|
68
|
-
biconomyForwarder: "0x1De6349B96774ed5E3569e47D609C19A8dE15C89",
|
|
69
|
-
},
|
|
70
|
-
42: {
|
|
71
|
-
// kovan
|
|
72
|
-
liquidationPeriod: 3600,
|
|
73
|
-
patricianPeriod: 3600 * 0.2,
|
|
74
|
-
biconomyForwarder: "0xE8Df44bcaedD41586cE73eB85e409bcaa834497B",
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
// MATIC: https://docs.matic.network/docs/develop/network-details/network/
|
|
79
|
-
//
|
|
80
|
-
80001: {
|
|
81
|
-
// (matic) mumbai testnet
|
|
82
|
-
liquidationPeriod: 3600,
|
|
83
|
-
patricianPeriod: 3600 * 0.2,
|
|
84
|
-
biconomyForwarder: "0x2B99251eC9650e507936fa9530D11dE4d6C9C05c",
|
|
85
|
-
},
|
|
86
|
-
137: {
|
|
87
|
-
// (matic) mainnet
|
|
88
|
-
liquidationPeriod: 3600 * 4,
|
|
89
|
-
patricianPeriod: 3600 * 4 * 0.2,
|
|
90
|
-
tokenList: ["DAIx", "USDCx", "ETHx"],
|
|
91
|
-
// governance default configs
|
|
92
|
-
gov_enableAppWhiteListing: true,
|
|
93
|
-
// misc
|
|
94
|
-
disableTestGovernance: true,
|
|
95
|
-
data: {
|
|
96
|
-
initialBlockNumber: 10000000,
|
|
97
|
-
getLogsRange: 10000,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
//
|
|
102
|
-
// xDAI: https://www.xdaichain.com/for-users/wallets/metamask/metamask-setup
|
|
103
|
-
//
|
|
104
|
-
100: {
|
|
105
|
-
liquidationPeriod: 3600 * 4,
|
|
106
|
-
patricianPeriod: 3600 * 4 * 0.2,
|
|
107
|
-
tokenList: ["ETHx"],
|
|
108
|
-
// governance default configs
|
|
109
|
-
gov_enableAppWhiteListing: true,
|
|
110
|
-
// misc
|
|
111
|
-
disableTestGovernance: true,
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
//
|
|
115
|
-
// BSC: https://docs.binance.org/smart-chain/developer/rpc.html
|
|
116
|
-
//
|
|
117
|
-
56: {
|
|
118
|
-
liquidationPeriod: 3600 * 4,
|
|
119
|
-
patricianPeriod: 3600 * 4 * 0.2,
|
|
120
|
-
tokenList: [],
|
|
121
|
-
// governance default configs
|
|
122
|
-
gov_enableAppWhiteListing: true,
|
|
123
|
-
// misc
|
|
124
|
-
disableTestGovernance: true,
|
|
125
|
-
data: {
|
|
126
|
-
initialBlockNumber: 18800000,
|
|
127
|
-
getLogsRange: 5000,
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
97: {
|
|
131
|
-
// BSC chapel testnet
|
|
132
|
-
data: {
|
|
133
|
-
initialBlockNumber: 19437500,
|
|
134
|
-
getLogsRange: 10000,
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
//
|
|
139
|
-
// Optimistic Ethereum: https://community.optimism.io/docs/
|
|
140
|
-
//
|
|
141
|
-
10: {
|
|
142
|
-
// optimism mainnet
|
|
143
|
-
liquidationPeriod: 3600 * 4,
|
|
144
|
-
patricianPeriod: 3600 * 4 * 0.2,
|
|
145
|
-
tokenList: ["DAIx", "USDCx"],
|
|
146
|
-
// governance default configs
|
|
147
|
-
gov_enableAppWhiteListing: true,
|
|
148
|
-
// misc
|
|
149
|
-
disableTestGovernance: true,
|
|
150
|
-
data: {
|
|
151
|
-
initialBlockNumber: 4300000,
|
|
152
|
-
getLogsRange: 50000,
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
69: {
|
|
156
|
-
// optimism testnet (kovan)
|
|
157
|
-
data: {
|
|
158
|
-
initialBlockNumber: 300000,
|
|
159
|
-
getLogsRange: 50000,
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
420: {
|
|
163
|
-
// optimism testnet (goerli)
|
|
164
|
-
data: {
|
|
165
|
-
initialBlockNumber: 340000,
|
|
166
|
-
getLogsRange: 50000,
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
//
|
|
171
|
-
// Arbitrum: https://developer.offchainlabs.com
|
|
172
|
-
//
|
|
173
|
-
42161: {
|
|
174
|
-
// arbitrum one mainnet
|
|
175
|
-
liquidationPeriod: 3600 * 4,
|
|
176
|
-
patricianPeriod: 3600 * 4 * 0.2,
|
|
177
|
-
tokenList: ["DAIx", "USDCx"],
|
|
178
|
-
// governance default configs
|
|
179
|
-
gov_enableAppWhiteListing: true,
|
|
180
|
-
// misc
|
|
181
|
-
disableTestGovernance: true,
|
|
182
|
-
data: {
|
|
183
|
-
initialBlockNumber: 7600000,
|
|
184
|
-
getLogsRange: 50000,
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
421611: {
|
|
188
|
-
// arbitrum testnet (rinkeby)
|
|
189
|
-
data: {
|
|
190
|
-
initialBlockNumber: 7300000,
|
|
191
|
-
getLogsRange: 50000,
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
421613: {
|
|
195
|
-
// arbitrum testnet (goerli)
|
|
196
|
-
data: {
|
|
197
|
-
initialBlockNumber: 93000,
|
|
198
|
-
getLogsRange: 50000,
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
//
|
|
203
|
-
// ARTIS
|
|
204
|
-
//
|
|
205
|
-
0x03c401: {
|
|
206
|
-
// (artis) tau1 testnet
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
//
|
|
210
|
-
// Avalanche C-Chain: https://docs.avax.network/learn/platform-overview#contract-chain-c-chain
|
|
211
|
-
//
|
|
212
|
-
43114: {
|
|
213
|
-
// avalanche mainnet
|
|
214
|
-
liquidationPeriod: 3600 * 4,
|
|
215
|
-
patricianPeriod: 3600 * 4 * 0.2,
|
|
216
|
-
tokenList: [],
|
|
217
|
-
// governance default configs
|
|
218
|
-
gov_enableAppWhiteListing: true,
|
|
219
|
-
// misc
|
|
220
|
-
disableTestGovernance: true,
|
|
221
|
-
data: {
|
|
222
|
-
initialBlockNumber: 14700000,
|
|
223
|
-
getLogsRange: 50000,
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
43113: {
|
|
227
|
-
// avalanche fuji testnet
|
|
228
|
-
data: {
|
|
229
|
-
initialBlockNumber: 21012000,
|
|
230
|
-
getLogsRange: 50000,
|
|
231
|
-
},
|
|
232
|
-
cfaFwd: "0x2CDd45c5182602a36d391F7F16DD9f8386C3bD8D",
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
//
|
|
236
|
-
// Celo: https://github.com/celo-org/celo-monorepo#docs
|
|
237
|
-
//
|
|
238
|
-
42220: {
|
|
239
|
-
// celo mainnet
|
|
240
|
-
liquidationPeriod: 3600 * 4,
|
|
241
|
-
patricianPeriod: 3600 * 4 * 0.2,
|
|
242
|
-
tokenList: [],
|
|
243
|
-
// governance default configs
|
|
244
|
-
gov_enableAppWhiteListing: true,
|
|
245
|
-
// misc
|
|
246
|
-
disableTestGovernance: true,
|
|
247
|
-
data: {
|
|
248
|
-
initialBlockNumber: 16393000,
|
|
249
|
-
getLogsRange: 20000,
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
44787: {
|
|
253
|
-
// Celo alfajores testnet
|
|
254
|
-
data: {
|
|
255
|
-
initialBlockNumber: 11519000,
|
|
256
|
-
getLogsRange: 50000,
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
//
|
|
261
|
-
// Base: https://base.org/
|
|
262
|
-
//
|
|
263
|
-
84531: {
|
|
264
|
-
// base testnet (goerli)
|
|
265
|
-
data: {
|
|
266
|
-
initialBlockNumber: 5249500,
|
|
267
|
-
getLogsRange: 50000,
|
|
268
|
-
},
|
|
269
|
-
},
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
return {
|
|
273
|
-
// global default configs
|
|
274
|
-
...{
|
|
275
|
-
// default liquidation period for the test deployments
|
|
276
|
-
liquidationPeriod: 3600,
|
|
277
|
-
// default patrician period for test deployments
|
|
278
|
-
patricianPeriod: 3600 * 0.2,
|
|
279
|
-
// default token list for the test deployments
|
|
280
|
-
tokenList: ["fDAIx", "fUSDCx", "fTUSDx"],
|
|
281
|
-
data: {},
|
|
282
|
-
cfaFwd: "0xcfA132E353cB4E398080B9700609bb008eceB125",
|
|
283
|
-
},
|
|
284
|
-
// network specific configs
|
|
285
|
-
...DEFAULT_CONFIGS[chainId],
|
|
286
|
-
// SDK provided configs
|
|
287
|
-
...SuperfluidSDK.getConfig(chainId),
|
|
288
|
-
};
|
|
289
|
-
};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @dev Parse colon marked arguments
|
|
3
|
-
*
|
|
4
|
-
* NOTE:
|
|
5
|
-
* Provide arguments to the script through ":" separator
|
|
6
|
-
*/
|
|
7
|
-
function parseColonArgs(argv) {
|
|
8
|
-
const argIndex = argv.indexOf(":");
|
|
9
|
-
if (argIndex < 0) {
|
|
10
|
-
console.log("No colon arguments");
|
|
11
|
-
return [];
|
|
12
|
-
} else {
|
|
13
|
-
const args = argv.slice(argIndex + 1);
|
|
14
|
-
return args;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @dev Script runner for logic function
|
|
20
|
-
*
|
|
21
|
-
* This is development framework dependent, and it's currently for Truffle.
|
|
22
|
-
*
|
|
23
|
-
* runnerOpts.skipArgv:
|
|
24
|
-
* - most scripts supports argv followed by an options, but for compatibility issue
|
|
25
|
-
* some script wants to skip the argv. This option enables the hack.
|
|
26
|
-
*/
|
|
27
|
-
module.exports = function (ctxFn, logicFn, runnerOpts) {
|
|
28
|
-
return async function (cb, argv, options = {}) {
|
|
29
|
-
try {
|
|
30
|
-
const {artifacts, web3, truffleDetected} = ctxFn();
|
|
31
|
-
|
|
32
|
-
let args;
|
|
33
|
-
if (runnerOpts.skipArgv) {
|
|
34
|
-
// skip argv arguments
|
|
35
|
-
options = argv || {};
|
|
36
|
-
} else {
|
|
37
|
-
// Parse colon indicated arguments
|
|
38
|
-
args = parseColonArgs(argv || process.argv);
|
|
39
|
-
runnerOpts.doNotPrintColonArgs ||
|
|
40
|
-
console.log("Colon arguments", args);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// if isTruffle is not set explicitly
|
|
44
|
-
if (!("isTruffle" in options)) {
|
|
45
|
-
if ("DISABLE_NATIVE_TRUFFLE" in process.env) {
|
|
46
|
-
options.isTruffle = !process.env.DISABLE_NATIVE_TRUFFLE;
|
|
47
|
-
} else {
|
|
48
|
-
options.isTruffle = truffleDetected;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// normalize web3 environment
|
|
53
|
-
console.log(
|
|
54
|
-
"use truffle native environment (isTruffle)",
|
|
55
|
-
options.isTruffle
|
|
56
|
-
);
|
|
57
|
-
if (options.isTruffle) {
|
|
58
|
-
if (options.web3) {
|
|
59
|
-
throw Error(
|
|
60
|
-
"Flag 'isTruffle' cannot be 'true' when using a web3 instance."
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
// set these globally so that it's available throughout the executions
|
|
64
|
-
global.web3 = web3;
|
|
65
|
-
global.artifacts = artifacts;
|
|
66
|
-
} else {
|
|
67
|
-
if (!truffleDetected) {
|
|
68
|
-
if (!options.web3) {
|
|
69
|
-
throw Error(
|
|
70
|
-
"A web3 instance is not provided when not using truffle."
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
global.web3 = options.web3;
|
|
74
|
-
} else {
|
|
75
|
-
// use web3 of truffle
|
|
76
|
-
options.web3 = global.web3 = web3;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Use common environment variables
|
|
81
|
-
options.protocolReleaseVersion =
|
|
82
|
-
options.protocolReleaseVersion ||
|
|
83
|
-
process.env.RELEASE_VERSION ||
|
|
84
|
-
"test";
|
|
85
|
-
console.log(
|
|
86
|
-
"protocol release version:",
|
|
87
|
-
options.protocolReleaseVersion
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
const retVal = await logicFn(args, options);
|
|
91
|
-
cb();
|
|
92
|
-
return retVal;
|
|
93
|
-
} catch (err) {
|
|
94
|
-
cb(err);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
const SuperfluidSDK = require("@superfluid-finance/js-sdk");
|
|
2
|
-
const {
|
|
3
|
-
getScriptRunnerFactory: S,
|
|
4
|
-
ZERO_ADDRESS,
|
|
5
|
-
extractWeb3Options,
|
|
6
|
-
builtTruffleContractLoader,
|
|
7
|
-
setResolver,
|
|
8
|
-
} = require("./libs/common");
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @dev List a super token in resolver.
|
|
12
|
-
* @param {Array} argv Overriding command line arguments
|
|
13
|
-
* @param {boolean} options.isTruffle Whether the script is used within native truffle framework
|
|
14
|
-
* @param {Web3} options.web3 Injected web3 instance
|
|
15
|
-
* @param {Address} options.from Address to deploy contracts from
|
|
16
|
-
* @param {string} options.protocolReleaseVersion Specify the protocol release version to be used
|
|
17
|
-
*
|
|
18
|
-
* Usage: npx truffle exec ops-scripts/resolver-list-super-token.js : {SUPER_TOKEN_ADDRESS}
|
|
19
|
-
*/
|
|
20
|
-
module.exports = eval(`(${S.toString()})()`)(async function (
|
|
21
|
-
args,
|
|
22
|
-
options = {}
|
|
23
|
-
) {
|
|
24
|
-
console.log("======== List new super token ========");
|
|
25
|
-
let {resetToken, protocolReleaseVersion} = options;
|
|
26
|
-
|
|
27
|
-
if (args.length !== 1) {
|
|
28
|
-
throw new Error("Wrong number of arguments");
|
|
29
|
-
}
|
|
30
|
-
const superTokenAddress = args.pop();
|
|
31
|
-
console.log("Super Token Address", superTokenAddress);
|
|
32
|
-
|
|
33
|
-
resetToken = resetToken || !!process.env.RESET_TOKEN;
|
|
34
|
-
console.log("protocol release version:", protocolReleaseVersion);
|
|
35
|
-
|
|
36
|
-
const sf = new SuperfluidSDK.Framework({
|
|
37
|
-
...extractWeb3Options(options),
|
|
38
|
-
version: protocolReleaseVersion,
|
|
39
|
-
additionalContracts: [
|
|
40
|
-
"Ownable",
|
|
41
|
-
"IMultiSigWallet",
|
|
42
|
-
"SuperfluidGovernanceBase",
|
|
43
|
-
"SuperToken",
|
|
44
|
-
"Resolver",
|
|
45
|
-
"IAccessControlEnumerable",
|
|
46
|
-
],
|
|
47
|
-
contractLoader: builtTruffleContractLoader,
|
|
48
|
-
});
|
|
49
|
-
await sf.initialize();
|
|
50
|
-
|
|
51
|
-
const superToken = await sf.contracts.SuperToken.at(superTokenAddress);
|
|
52
|
-
if (
|
|
53
|
-
(await superToken.proxiableUUID.call()) !==
|
|
54
|
-
web3.utils.sha3(
|
|
55
|
-
"org.superfluid-finance.contracts.SuperToken.implementation"
|
|
56
|
-
)
|
|
57
|
-
) {
|
|
58
|
-
throw new Error("Not a super token");
|
|
59
|
-
}
|
|
60
|
-
const tokenSymbol = await superToken.symbol.call();
|
|
61
|
-
const superTokenKey = `supertokens.${protocolReleaseVersion}.${tokenSymbol}`;
|
|
62
|
-
console.log("Super token key", superTokenKey);
|
|
63
|
-
|
|
64
|
-
const resolver = await sf.contracts.Resolver.at(sf.resolver.address);
|
|
65
|
-
if (
|
|
66
|
-
(await resolver.get.call(superTokenKey)) !== ZERO_ADDRESS &&
|
|
67
|
-
!resetToken
|
|
68
|
-
) {
|
|
69
|
-
console.error("Super token already listed!");
|
|
70
|
-
console.error("A Transfer event may be needed for indexers to notice.");
|
|
71
|
-
}
|
|
72
|
-
await setResolver(sf, superTokenKey, superTokenAddress);
|
|
73
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
const {web3tx} = require("@decentral.ee/web3-helpers");
|
|
2
|
-
const SuperfluidSDK = require("@superfluid-finance/js-sdk");
|
|
3
|
-
|
|
4
|
-
const getConfig = require("./libs/getConfig");
|
|
5
|
-
|
|
6
|
-
const {
|
|
7
|
-
getScriptRunnerFactory: S,
|
|
8
|
-
extractWeb3Options,
|
|
9
|
-
builtTruffleContractLoader,
|
|
10
|
-
} = require("./libs/common");
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @dev Deploy test token (Mintable ERC20) to the network.
|
|
14
|
-
* @param {Array} argv Overriding command line arguments
|
|
15
|
-
* @param {boolean} options.isTruffle Whether the script is used within native truffle framework
|
|
16
|
-
* @param {Web3} options.web3 Injected web3 instance
|
|
17
|
-
* @param {Address} options.from Address to deploy contracts from
|
|
18
|
-
* @param {boolean} options.resetToken Reset the token deployment
|
|
19
|
-
*
|
|
20
|
-
* Usage: npx truffle exec ops-scripts/resolver-register-token.js : {TOKEN_NAME} {TOKEN_ADDRESS}
|
|
21
|
-
*/
|
|
22
|
-
module.exports = eval(`(${S.toString()})()`)(async function (
|
|
23
|
-
args,
|
|
24
|
-
options = {}
|
|
25
|
-
) {
|
|
26
|
-
console.log("======== Register test token ========");
|
|
27
|
-
let {resetToken} = options;
|
|
28
|
-
|
|
29
|
-
if (args.length !== 2) {
|
|
30
|
-
throw new Error("Wrong number of arguments");
|
|
31
|
-
}
|
|
32
|
-
const tokenAddress = args.pop();
|
|
33
|
-
const tokenName = args.pop();
|
|
34
|
-
console.log("Token name", tokenName);
|
|
35
|
-
console.log("Token address", tokenAddress);
|
|
36
|
-
|
|
37
|
-
const networkType = await web3.eth.net.getNetworkType();
|
|
38
|
-
const networkId = await web3.eth.net.getId();
|
|
39
|
-
const chainId = await web3.eth.getChainId();
|
|
40
|
-
console.log("network Type: ", networkType);
|
|
41
|
-
console.log("network ID: ", networkId);
|
|
42
|
-
console.log("chain ID: ", chainId);
|
|
43
|
-
const config = getConfig(chainId);
|
|
44
|
-
|
|
45
|
-
resetToken = resetToken || !!process.env.RESET_TOKEN;
|
|
46
|
-
console.log("reset token: ", resetToken);
|
|
47
|
-
console.log("chain ID: ", chainId);
|
|
48
|
-
|
|
49
|
-
const {Resolver} = await SuperfluidSDK.loadContracts({
|
|
50
|
-
...extractWeb3Options(options),
|
|
51
|
-
additionalContracts: ["Resolver"],
|
|
52
|
-
contractLoader: builtTruffleContractLoader,
|
|
53
|
-
networkId,
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const resolver = await Resolver.at(config.resolverAddress);
|
|
57
|
-
console.log("Resolver address", resolver.address);
|
|
58
|
-
|
|
59
|
-
const name = `tokens.${tokenName}`;
|
|
60
|
-
let testTokenAddress = await resolver.get(name);
|
|
61
|
-
|
|
62
|
-
if (
|
|
63
|
-
resetToken ||
|
|
64
|
-
testTokenAddress === "0x0000000000000000000000000000000000000000"
|
|
65
|
-
) {
|
|
66
|
-
await web3tx(resolver.set, `Resolver set ${name}`)(name, tokenAddress);
|
|
67
|
-
} else {
|
|
68
|
-
console.log("Token already set");
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
console.log("======== Test token registered ======");
|
|
72
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
const {web3tx} = require("@decentral.ee/web3-helpers");
|
|
2
|
-
const {setWeb3Provider} = require("@decentral.ee/web3-helpers/src/config");
|
|
3
|
-
const Resolver = artifacts.require("Resolver");
|
|
4
|
-
const getConfig = require("./libs/getConfig");
|
|
5
|
-
|
|
6
|
-
const {getScriptRunnerFactory: S, rl} = require("./libs/common");
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @dev Reset the superfluid framework deployment.
|
|
10
|
-
* @param {Array} args Overriding command line arguments
|
|
11
|
-
*
|
|
12
|
-
* Usage: npx truffle exec ops-scripts/resolver-reset-deployment.js : {VERSION}
|
|
13
|
-
*/
|
|
14
|
-
module.exports = eval(`(${S.toString()})()`)(async function (args) {
|
|
15
|
-
if (args.length !== 1) {
|
|
16
|
-
throw new Error("Wrong number of arguments");
|
|
17
|
-
}
|
|
18
|
-
const version = args.pop();
|
|
19
|
-
|
|
20
|
-
if (version != (await rl("Please confirm the version: "))) {
|
|
21
|
-
console.error("Mismatched versions");
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const networkType = await web3.eth.net.getNetworkType();
|
|
26
|
-
const networkId = await web3.eth.net.getId();
|
|
27
|
-
const chainId = await web3.eth.getChainId();
|
|
28
|
-
console.log("network Type: ", networkType);
|
|
29
|
-
console.log("network ID: ", networkId);
|
|
30
|
-
console.log("chain ID: ", chainId);
|
|
31
|
-
const config = getConfig(chainId);
|
|
32
|
-
|
|
33
|
-
// make sure that we are using the same web3 provider in the helpers
|
|
34
|
-
setWeb3Provider(web3.currentProvider);
|
|
35
|
-
|
|
36
|
-
let resolver;
|
|
37
|
-
if (config.resolverAddress) {
|
|
38
|
-
resolver = await Resolver.at(config.resolverAddress);
|
|
39
|
-
} else {
|
|
40
|
-
resolver = await web3tx(Resolver.new, "Resolver.new")();
|
|
41
|
-
// make it available for the sdk for testing purpose
|
|
42
|
-
process.env.RESOLVER_ADDRESS = resolver.address;
|
|
43
|
-
}
|
|
44
|
-
console.log("Resolver address", resolver.address);
|
|
45
|
-
|
|
46
|
-
await web3tx(resolver.set, "Clear Superfluid deployment")(
|
|
47
|
-
`Superfluid.${version}`,
|
|
48
|
-
"0x" + "0".repeat(40)
|
|
49
|
-
);
|
|
50
|
-
await web3tx(resolver.set, "Clear TestGovernance deployment")(
|
|
51
|
-
`TestGovernance.${version}`,
|
|
52
|
-
"0x" + "0".repeat(40)
|
|
53
|
-
);
|
|
54
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
const SuperfluidSDK = require("@superfluid-finance/js-sdk");
|
|
2
|
-
const {
|
|
3
|
-
getScriptRunnerFactory: S,
|
|
4
|
-
ZERO_ADDRESS,
|
|
5
|
-
extractWeb3Options,
|
|
6
|
-
builtTruffleContractLoader,
|
|
7
|
-
setResolver,
|
|
8
|
-
} = require("./libs/common");
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @dev Set a given value for a given key in resolver
|
|
12
|
-
* @param {Array} argv Overriding command line arguments
|
|
13
|
-
* @param {boolean} options.isTruffle Whether the script is used within native truffle framework
|
|
14
|
-
* @param {Web3} options.web3 Injected web3 instance
|
|
15
|
-
* @param {Address} options.from Address to deploy contracts from
|
|
16
|
-
* @param {string} options.protocolReleaseVersion Specify the protocol release version to be used
|
|
17
|
-
*
|
|
18
|
-
* Usage: npx truffle exec ops-scripts/resolver-set-key-value.js : {KEY} {VALUE}
|
|
19
|
-
*
|
|
20
|
-
* ENV vars:
|
|
21
|
-
* ALLOW_UPDATE: only if set will existing values be overwritten
|
|
22
|
-
* RESOLVER_ADMIN_TYPE: needs to be set to MULTISIG for networks with multisig owner
|
|
23
|
-
*/
|
|
24
|
-
module.exports = eval(`(${S.toString()})()`)(async function (
|
|
25
|
-
args,
|
|
26
|
-
options = {}
|
|
27
|
-
) {
|
|
28
|
-
console.log("======== Set key with value ========");
|
|
29
|
-
let {protocolReleaseVersion} = options;
|
|
30
|
-
|
|
31
|
-
if (args.length !== 2) {
|
|
32
|
-
throw new Error("Wrong number of arguments");
|
|
33
|
-
}
|
|
34
|
-
const value = args.pop();
|
|
35
|
-
const key = args.pop();
|
|
36
|
-
|
|
37
|
-
console.log("Key", key);
|
|
38
|
-
console.log("Value", value);
|
|
39
|
-
|
|
40
|
-
console.log("protocol release version:", protocolReleaseVersion);
|
|
41
|
-
|
|
42
|
-
const sf = new SuperfluidSDK.Framework({
|
|
43
|
-
...extractWeb3Options(options),
|
|
44
|
-
version: protocolReleaseVersion,
|
|
45
|
-
additionalContracts: [
|
|
46
|
-
"Ownable",
|
|
47
|
-
"IMultiSigWallet",
|
|
48
|
-
"SuperfluidGovernanceBase",
|
|
49
|
-
"Resolver",
|
|
50
|
-
"IAccessControlEnumerable",
|
|
51
|
-
],
|
|
52
|
-
contractLoader: builtTruffleContractLoader,
|
|
53
|
-
});
|
|
54
|
-
await sf.initialize();
|
|
55
|
-
|
|
56
|
-
const resolver = await sf.contracts.Resolver.at(sf.resolver.address);
|
|
57
|
-
|
|
58
|
-
const prevVal = await resolver.get.call(key);
|
|
59
|
-
if (prevVal !== ZERO_ADDRESS) {
|
|
60
|
-
console.log("Key already has a value", prevVal);
|
|
61
|
-
if (!process.env.ALLOW_UPDATE) {
|
|
62
|
-
throw new Error(
|
|
63
|
-
"ALLOW_UPDATE not set, can't override existing value"
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
await setResolver(sf, key, value);
|
|
69
|
-
});
|