@zoralabs/coins 0.7.1 → 1.0.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/.turbo/turbo-build.log +106 -84
- package/CHANGELOG.md +68 -0
- package/abis/BadImpl.json +15 -0
- package/abis/BalanceDeltaLibrary.json +15 -0
- package/abis/BaseCoin.json +1350 -0
- package/abis/BaseCoinDeployHook.json +78 -0
- package/abis/BaseHook.json +897 -0
- package/abis/BaseTest.json +60 -91
- package/abis/BeforeSwapDeltaLibrary.json +15 -0
- package/abis/BuySupplyWithSwapRouterHook.json +126 -0
- package/abis/Coin.json +214 -150
- package/abis/CoinConstants.json +65 -0
- package/abis/CoinDopplerMultiCurve.json +38 -0
- package/abis/CoinRewardsV4.json +54 -0
- package/abis/CoinTest.json +66 -111
- package/abis/CoinUniV4Test.json +1053 -0
- package/abis/CoinV4.json +1687 -0
- package/abis/CurrencyLibrary.json +25 -0
- package/abis/DeployHooks.json +9 -0
- package/abis/DeployScript.json +47 -0
- package/abis/DeployedCoinVersionLookup.json +21 -0
- package/abis/DeployedCoinVersionLookupTest.json +716 -0
- package/abis/DifferentNamespaceVersionLookup.json +39 -0
- package/abis/DopplerUniswapV3Test.json +62 -184
- package/abis/ERC20.json +310 -0
- package/abis/FactoryTest.json +98 -98
- package/abis/FakeHookNoInterface.json +21 -0
- package/abis/FeeEstimatorHook.json +1528 -0
- package/abis/Hooks.json +28 -0
- package/abis/HooksDeployment.json +23 -0
- package/abis/HooksTest.json +698 -0
- package/abis/IAllowanceTransfer.json +486 -0
- package/abis/ICoin.json +62 -69
- package/abis/ICoinDeployHook.json +31 -0
- package/abis/ICoinV3.json +879 -0
- package/abis/ICoinV4.json +915 -0
- package/abis/IContractMetadata.json +28 -0
- package/abis/IDeployedCoinVersionLookup.json +21 -0
- package/abis/IEIP712.json +15 -0
- package/abis/IEIP712_v4.json +15 -0
- package/abis/IERC20Minimal.json +172 -0
- package/abis/IERC6909Claims.json +288 -0
- package/abis/IERC721.json +36 -36
- package/abis/IERC721Permit_v4.json +88 -0
- package/abis/IExtsload.json +64 -0
- package/abis/IExttload.json +40 -0
- package/abis/IHasAfterCoinDeploy.json +31 -0
- package/abis/IHasContractName.json +15 -0
- package/abis/IHasPoolKey.json +42 -0
- package/abis/IHasRewardsRecipients.json +54 -0
- package/abis/IHasSwapPath.json +60 -0
- package/abis/IHooks.json +789 -0
- package/abis/IImmutableState.json +15 -0
- package/abis/IMsgSender.json +15 -0
- package/abis/IMulticall_v4.json +21 -0
- package/abis/INotifier.json +187 -0
- package/abis/IPermit2.json +865 -0
- package/abis/IPermit2Forwarder.json +138 -0
- package/abis/IPoolConfigEncoding.json +46 -0
- package/abis/IPoolInitializer_v4.json +53 -0
- package/abis/IPoolManager.json +1286 -0
- package/abis/IPositionManager.json +712 -0
- package/abis/IProtocolFees.json +174 -0
- package/abis/ISignatureTransfer.json +394 -0
- package/abis/ISubscriber.json +89 -0
- package/abis/ISwapPathRouter.json +92 -0
- package/abis/ISwapRouter.json +82 -0
- package/abis/IUniversalRouter.json +61 -0
- package/abis/IUnlockCallback.json +21 -0
- package/abis/IUnorderedNonce.json +44 -0
- package/abis/IV4Quoter.json +310 -0
- package/abis/IV4Router.json +47 -0
- package/abis/IZoraFactory.json +328 -4
- package/abis/IZoraV4CoinHook.json +427 -0
- package/abis/ImmutableState.json +36 -0
- package/abis/LPFeeLibrary.json +65 -0
- package/abis/MockERC20.json +21 -0
- package/abis/MultiOwnableTest.json +60 -91
- package/abis/{CoinConfigurationVersions.json → Position.json} +1 -1
- package/abis/PrintUpgradeCommand.json +9 -0
- package/abis/ProxyShim.json +24 -0
- package/abis/Simulate.json +0 -91
- package/abis/StateLibrary.json +80 -0
- package/abis/TestDeployedCoinVersionLookupImplementation.json +39 -0
- package/abis/TestV4Swap.json +9 -0
- package/abis/{CoinSetup.json → UniV3BuySell.json} +5 -0
- package/abis/UniV3Errors.json +32 -0
- package/abis/UpgradeCoinImpl.json +47 -0
- package/abis/UpgradeFactoryImpl.json +9 -0
- package/abis/UpgradesTest.json +671 -0
- package/abis/Vm.json +1482 -111
- package/abis/VmSafe.json +856 -32
- package/abis/ZoraFactoryImpl.json +450 -1
- package/abis/ZoraV4CoinHook.json +1439 -0
- package/addresses/8453.json +8 -3
- package/addresses/84532.json +8 -3
- package/dist/index.cjs +1998 -184
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1989 -178
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +2852 -688
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/package/wagmiGenerated.ts +1992 -173
- package/package.json +7 -2
- package/remappings.txt +6 -1
- package/script/CoinsDeployerBase.sol +105 -10
- package/script/DeployDevFactory.s.sol +21 -0
- package/script/DeployHooks.s.sol +22 -0
- package/script/PrintUpgradeCommand.s.sol +13 -0
- package/script/Simulate.s.sol +4 -12
- package/script/TestBackingCoinSwap.s.sol +146 -0
- package/script/TestV4Swap.s.sol +136 -0
- package/script/UpgradeCoinImpl.sol +2 -2
- package/script/UpgradeFactoryImpl.s.sol +23 -0
- package/src/BaseCoin.sol +176 -0
- package/src/Coin.sol +93 -515
- package/src/CoinV4.sol +121 -0
- package/src/ZoraFactoryImpl.sol +257 -57
- package/src/hooks/ZoraV4CoinHook.sol +195 -0
- package/src/hooks/deployment/BaseCoinDeployHook.sol +62 -0
- package/src/hooks/deployment/BuySupplyWithSwapRouterHook.sol +80 -0
- package/src/interfaces/ICoin.sol +35 -39
- package/src/interfaces/ICoinDeployHook.sol +8 -0
- package/src/interfaces/ICoinV3.sol +71 -0
- package/src/interfaces/ICoinV4.sol +69 -0
- package/src/interfaces/IDeployedCoinVersionLookup.sol +11 -0
- package/src/interfaces/IMsgSender.sol +9 -0
- package/src/interfaces/IPoolConfigEncoding.sol +14 -0
- package/src/interfaces/ISwapPathRouter.sol +14 -0
- package/src/interfaces/ISwapRouter.sol +1 -35
- package/src/interfaces/IZoraFactory.sol +97 -7
- package/src/interfaces/IZoraV4CoinHook.sol +116 -0
- package/src/libs/CoinCommon.sol +15 -0
- package/src/libs/CoinConfigurationVersions.sol +116 -1
- package/src/{utils → libs}/CoinConstants.sol +11 -6
- package/src/libs/CoinDopplerMultiCurve.sol +134 -0
- package/src/libs/CoinDopplerUniV3.sol +19 -171
- package/src/libs/CoinRewards.sol +195 -0
- package/src/libs/CoinRewardsV4.sol +180 -0
- package/src/libs/CoinSetup.sol +40 -20
- package/src/libs/CoinSetupV3.sol +50 -0
- package/src/libs/DopplerMath.sol +156 -0
- package/src/libs/HooksDeployment.sol +84 -0
- package/src/libs/MarketConstants.sol +4 -0
- package/src/libs/PoolStateReader.sol +22 -0
- package/src/libs/UniV3BuySell.sol +231 -0
- package/src/libs/UniV3Errors.sol +11 -0
- package/src/libs/UniV4SwapHelper.sol +65 -0
- package/src/libs/UniV4SwapToCurrency.sol +109 -0
- package/src/libs/V4Liquidity.sol +129 -0
- package/src/types/PoolConfiguration.sol +15 -0
- package/src/utils/DeployedCoinVersionLookup.sol +52 -0
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/Coin.t.sol +94 -101
- package/test/CoinDopplerUniV3.t.sol +35 -184
- package/test/CoinUniV4.t.sol +752 -0
- package/test/DeploymentHooks.t.sol +270 -0
- package/test/Factory.t.sol +84 -50
- package/test/MultiOwnable.t.sol +6 -3
- package/test/Upgrades.t.sol +68 -0
- package/test/mocks/MockERC20.sol +12 -0
- package/test/utils/BaseTest.sol +124 -59
- package/test/utils/DeployedCoinVersionLookup.t.sol +127 -0
- package/test/utils/FeeEstimatorHook.sol +84 -0
- package/test/utils/ProxyShim.sol +17 -0
- package/wagmi.config.ts +10 -9
- package/src/libs/CoinLegacy.sol +0 -48
package/abis/FactoryTest.json
CHANGED
|
@@ -12,97 +12,6 @@
|
|
|
12
12
|
],
|
|
13
13
|
"stateMutability": "view"
|
|
14
14
|
},
|
|
15
|
-
{
|
|
16
|
-
"type": "function",
|
|
17
|
-
"name": "MAX_TOTAL_SUPPLY",
|
|
18
|
-
"inputs": [],
|
|
19
|
-
"outputs": [
|
|
20
|
-
{
|
|
21
|
-
"name": "",
|
|
22
|
-
"type": "uint256",
|
|
23
|
-
"internalType": "uint256"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"stateMutability": "view"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"type": "function",
|
|
30
|
-
"name": "MIN_ORDER_SIZE",
|
|
31
|
-
"inputs": [],
|
|
32
|
-
"outputs": [
|
|
33
|
-
{
|
|
34
|
-
"name": "",
|
|
35
|
-
"type": "uint256",
|
|
36
|
-
"internalType": "uint256"
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
"stateMutability": "view"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "function",
|
|
43
|
-
"name": "PLATFORM_REFERRER_FEE_BPS",
|
|
44
|
-
"inputs": [],
|
|
45
|
-
"outputs": [
|
|
46
|
-
{
|
|
47
|
-
"name": "",
|
|
48
|
-
"type": "uint256",
|
|
49
|
-
"internalType": "uint256"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"stateMutability": "view"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"type": "function",
|
|
56
|
-
"name": "PROTOCOL_FEE_BPS",
|
|
57
|
-
"inputs": [],
|
|
58
|
-
"outputs": [
|
|
59
|
-
{
|
|
60
|
-
"name": "",
|
|
61
|
-
"type": "uint256",
|
|
62
|
-
"internalType": "uint256"
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"stateMutability": "view"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"type": "function",
|
|
69
|
-
"name": "TOKEN_CREATOR_FEE_BPS",
|
|
70
|
-
"inputs": [],
|
|
71
|
-
"outputs": [
|
|
72
|
-
{
|
|
73
|
-
"name": "",
|
|
74
|
-
"type": "uint256",
|
|
75
|
-
"internalType": "uint256"
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
"stateMutability": "view"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"type": "function",
|
|
82
|
-
"name": "TOTAL_FEE_BPS",
|
|
83
|
-
"inputs": [],
|
|
84
|
-
"outputs": [
|
|
85
|
-
{
|
|
86
|
-
"name": "",
|
|
87
|
-
"type": "uint256",
|
|
88
|
-
"internalType": "uint256"
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
"stateMutability": "view"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"type": "function",
|
|
95
|
-
"name": "TRADE_REFERRER_FEE_BPS",
|
|
96
|
-
"inputs": [],
|
|
97
|
-
"outputs": [
|
|
98
|
-
{
|
|
99
|
-
"name": "",
|
|
100
|
-
"type": "uint256",
|
|
101
|
-
"internalType": "uint256"
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"stateMutability": "view"
|
|
105
|
-
},
|
|
106
15
|
{
|
|
107
16
|
"type": "function",
|
|
108
17
|
"name": "excludeArtifacts",
|
|
@@ -187,6 +96,19 @@
|
|
|
187
96
|
"outputs": [],
|
|
188
97
|
"stateMutability": "nonpayable"
|
|
189
98
|
},
|
|
99
|
+
{
|
|
100
|
+
"type": "function",
|
|
101
|
+
"name": "setUpWithBlockNumber",
|
|
102
|
+
"inputs": [
|
|
103
|
+
{
|
|
104
|
+
"name": "forkBlockNumber",
|
|
105
|
+
"type": "uint256",
|
|
106
|
+
"internalType": "uint256"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"outputs": [],
|
|
110
|
+
"stateMutability": "nonpayable"
|
|
111
|
+
},
|
|
190
112
|
{
|
|
191
113
|
"type": "function",
|
|
192
114
|
"name": "targetArtifactSelectors",
|
|
@@ -301,6 +223,44 @@
|
|
|
301
223
|
],
|
|
302
224
|
"stateMutability": "view"
|
|
303
225
|
},
|
|
226
|
+
{
|
|
227
|
+
"type": "function",
|
|
228
|
+
"name": "test_coinAddress_canBePredicted",
|
|
229
|
+
"inputs": [
|
|
230
|
+
{
|
|
231
|
+
"name": "msgSenderChanged",
|
|
232
|
+
"type": "bool",
|
|
233
|
+
"internalType": "bool"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "saltChanged",
|
|
237
|
+
"type": "bool",
|
|
238
|
+
"internalType": "bool"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "poolConfigChanged",
|
|
242
|
+
"type": "bool",
|
|
243
|
+
"internalType": "bool"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "platformReferrerChanged",
|
|
247
|
+
"type": "bool",
|
|
248
|
+
"internalType": "bool"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "nameChanged",
|
|
252
|
+
"type": "bool",
|
|
253
|
+
"internalType": "bool"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "symbolChanged",
|
|
257
|
+
"type": "bool",
|
|
258
|
+
"internalType": "bool"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
"outputs": [],
|
|
262
|
+
"stateMutability": "nonpayable"
|
|
263
|
+
},
|
|
304
264
|
{
|
|
305
265
|
"type": "function",
|
|
306
266
|
"name": "test_constructor",
|
|
@@ -404,13 +364,6 @@
|
|
|
404
364
|
"outputs": [],
|
|
405
365
|
"stateMutability": "view"
|
|
406
366
|
},
|
|
407
|
-
{
|
|
408
|
-
"type": "function",
|
|
409
|
-
"name": "test_revert_deploy_with_invalid_currency_tick",
|
|
410
|
-
"inputs": [],
|
|
411
|
-
"outputs": [],
|
|
412
|
-
"stateMutability": "nonpayable"
|
|
413
|
-
},
|
|
414
367
|
{
|
|
415
368
|
"type": "function",
|
|
416
369
|
"name": "test_revert_invalid_owner",
|
|
@@ -845,5 +798,52 @@
|
|
|
845
798
|
}
|
|
846
799
|
],
|
|
847
800
|
"anonymous": false
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"type": "error",
|
|
804
|
+
"name": "Create2EmptyBytecode",
|
|
805
|
+
"inputs": []
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"type": "error",
|
|
809
|
+
"name": "Create2FailedDeployment",
|
|
810
|
+
"inputs": []
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"type": "error",
|
|
814
|
+
"name": "Create2InsufficientBalance",
|
|
815
|
+
"inputs": [
|
|
816
|
+
{
|
|
817
|
+
"name": "balance",
|
|
818
|
+
"type": "uint256",
|
|
819
|
+
"internalType": "uint256"
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"name": "needed",
|
|
823
|
+
"type": "uint256",
|
|
824
|
+
"internalType": "uint256"
|
|
825
|
+
}
|
|
826
|
+
]
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"type": "error",
|
|
830
|
+
"name": "HookNotDeployed",
|
|
831
|
+
"inputs": []
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"type": "error",
|
|
835
|
+
"name": "InvalidHookAddress",
|
|
836
|
+
"inputs": [
|
|
837
|
+
{
|
|
838
|
+
"name": "expected",
|
|
839
|
+
"type": "address",
|
|
840
|
+
"internalType": "address"
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"name": "actual",
|
|
844
|
+
"type": "address",
|
|
845
|
+
"internalType": "address"
|
|
846
|
+
}
|
|
847
|
+
]
|
|
848
848
|
}
|
|
849
849
|
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "supportsInterface",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "",
|
|
8
|
+
"type": "bytes4",
|
|
9
|
+
"internalType": "bytes4"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "",
|
|
15
|
+
"type": "bool",
|
|
16
|
+
"internalType": "bool"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"stateMutability": "pure"
|
|
20
|
+
}
|
|
21
|
+
]
|