@zoralabs/coins 0.7.1 → 0.9.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.
Files changed (104) hide show
  1. package/.env +1 -0
  2. package/.turbo/turbo-build.log +114 -109
  3. package/.turbo/turbo-update-contract-version.log +22 -0
  4. package/CHANGELOG.md +28 -0
  5. package/abis/BadImpl.json +15 -0
  6. package/abis/BalanceDeltaLibrary.json +15 -0
  7. package/abis/BaseCoin.json +1442 -0
  8. package/abis/BaseCoinDeployHook.json +78 -0
  9. package/abis/BaseHook.json +897 -0
  10. package/abis/BaseTest.json +13 -91
  11. package/abis/BeforeSwapDeltaLibrary.json +15 -0
  12. package/abis/BuySupplyWithSwapRouterHook.json +126 -0
  13. package/abis/Coin.json +48 -92
  14. package/abis/CoinConstants.json +65 -0
  15. package/abis/CoinTest.json +13 -91
  16. package/abis/CoinV4.json +1664 -0
  17. package/abis/CurrencyLibrary.json +25 -0
  18. package/abis/DeployHooks.json +9 -0
  19. package/abis/DopplerUniswapV3Test.json +13 -91
  20. package/abis/FactoryTest.json +13 -91
  21. package/abis/FakeHookNoInterface.json +21 -0
  22. package/abis/HookDeployer.json +68 -0
  23. package/abis/Hooks.json +28 -0
  24. package/abis/HooksTest.json +651 -0
  25. package/abis/IAllowanceTransfer.json +486 -0
  26. package/abis/ICoin.json +25 -1
  27. package/abis/ICoinDeployHook.json +31 -0
  28. package/abis/IContractMetadata.json +28 -0
  29. package/abis/IEIP712.json +15 -0
  30. package/abis/IEIP712_v4.json +15 -0
  31. package/abis/IERC20Minimal.json +172 -0
  32. package/abis/IERC6909Claims.json +288 -0
  33. package/abis/IERC721Permit_v4.json +88 -0
  34. package/abis/IExtsload.json +64 -0
  35. package/abis/IExttload.json +40 -0
  36. package/abis/IHasAfterCoinDeploy.json +31 -0
  37. package/abis/IHasContractName.json +15 -0
  38. package/abis/IHookDeployer.json +42 -0
  39. package/abis/IHooks.json +789 -0
  40. package/abis/IImmutableState.json +15 -0
  41. package/abis/IMulticall_v4.json +21 -0
  42. package/abis/INotifier.json +187 -0
  43. package/abis/IPermit2.json +865 -0
  44. package/abis/IPermit2Forwarder.json +138 -0
  45. package/abis/IPoolInitializer_v4.json +53 -0
  46. package/abis/IPoolManager.json +1286 -0
  47. package/abis/IPositionManager.json +712 -0
  48. package/abis/IProtocolFees.json +174 -0
  49. package/abis/ISignatureTransfer.json +394 -0
  50. package/abis/ISubscriber.json +89 -0
  51. package/abis/ISwapRouter.json +82 -0
  52. package/abis/IUnorderedNonce.json +44 -0
  53. package/abis/IV4Router.json +47 -0
  54. package/abis/IZoraFactory.json +144 -0
  55. package/abis/IZoraV4CoinHook.json +83 -0
  56. package/abis/ImmutableState.json +36 -0
  57. package/abis/LPFeeLibrary.json +65 -0
  58. package/abis/MultiOwnableTest.json +13 -91
  59. package/abis/Simulate.json +0 -91
  60. package/abis/UniV3BuySell.json +12 -0
  61. package/abis/UniV3Errors.json +32 -0
  62. package/abis/UpgradeFactoryImpl.json +9 -0
  63. package/abis/UpgradesTest.json +604 -0
  64. package/abis/ZoraFactoryImpl.json +111 -0
  65. package/abis/ZoraV4CoinHook.json +989 -0
  66. package/addresses/8453.json +2 -1
  67. package/addresses/84532.json +4 -3
  68. package/dist/index.cjs +125 -62
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/index.js +120 -56
  71. package/dist/index.js.map +1 -1
  72. package/dist/wagmiGenerated.d.ts +212 -464
  73. package/dist/wagmiGenerated.d.ts.map +1 -1
  74. package/package/wagmiGenerated.ts +122 -66
  75. package/package.json +4 -4
  76. package/script/CoinsDeployerBase.sol +32 -0
  77. package/script/DeployHooks.s.sol +22 -0
  78. package/script/Simulate.s.sol +3 -2
  79. package/script/UpgradeCoinImpl.sol +2 -2
  80. package/script/UpgradeFactoryImpl.s.sol +23 -0
  81. package/src/Coin.sol +35 -342
  82. package/src/ZoraFactoryImpl.sol +73 -45
  83. package/src/hooks/BaseCoinDeployHook.sol +62 -0
  84. package/src/hooks/BuySupplyWithSwapRouterHook.sol +78 -0
  85. package/src/interfaces/ICoin.sol +5 -1
  86. package/src/interfaces/ICoinDeployHook.sol +8 -0
  87. package/src/interfaces/ISwapRouter.sol +1 -35
  88. package/src/interfaces/IZoraFactory.sol +52 -0
  89. package/src/{utils → libs}/CoinConstants.sol +6 -6
  90. package/src/libs/CoinLegacy.sol +4 -4
  91. package/src/libs/CoinLegacyMarket.sol +182 -0
  92. package/src/libs/CoinSetupV3.sol +111 -0
  93. package/src/libs/UniV3BuySell.sol +449 -0
  94. package/src/libs/UniV3Errors.sol +11 -0
  95. package/src/version/ContractVersionBase.sol +1 -1
  96. package/test/Coin.t.sol +20 -17
  97. package/test/CoinDopplerUniV3.t.sol +7 -17
  98. package/test/Factory.t.sol +4 -3
  99. package/test/Hooks.t.sol +274 -0
  100. package/test/Upgrades.t.sol +67 -0
  101. package/test/utils/BaseTest.sol +18 -3
  102. package/wagmi.config.ts +6 -9
  103. package/src/libs/CoinSetup.sol +0 -37
  104. /package/abis/{CoinSetup.json → CoinSetupV3.json} +0 -0
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "poolManager",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "address",
10
+ "internalType": "contract IPoolManager"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ }
15
+ ]
@@ -0,0 +1,21 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "multicall",
5
+ "inputs": [
6
+ {
7
+ "name": "data",
8
+ "type": "bytes[]",
9
+ "internalType": "bytes[]"
10
+ }
11
+ ],
12
+ "outputs": [
13
+ {
14
+ "name": "results",
15
+ "type": "bytes[]",
16
+ "internalType": "bytes[]"
17
+ }
18
+ ],
19
+ "stateMutability": "payable"
20
+ }
21
+ ]
@@ -0,0 +1,187 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "subscribe",
5
+ "inputs": [
6
+ {
7
+ "name": "tokenId",
8
+ "type": "uint256",
9
+ "internalType": "uint256"
10
+ },
11
+ {
12
+ "name": "newSubscriber",
13
+ "type": "address",
14
+ "internalType": "address"
15
+ },
16
+ {
17
+ "name": "data",
18
+ "type": "bytes",
19
+ "internalType": "bytes"
20
+ }
21
+ ],
22
+ "outputs": [],
23
+ "stateMutability": "payable"
24
+ },
25
+ {
26
+ "type": "function",
27
+ "name": "subscriber",
28
+ "inputs": [
29
+ {
30
+ "name": "tokenId",
31
+ "type": "uint256",
32
+ "internalType": "uint256"
33
+ }
34
+ ],
35
+ "outputs": [
36
+ {
37
+ "name": "subscriber",
38
+ "type": "address",
39
+ "internalType": "contract ISubscriber"
40
+ }
41
+ ],
42
+ "stateMutability": "view"
43
+ },
44
+ {
45
+ "type": "function",
46
+ "name": "unsubscribe",
47
+ "inputs": [
48
+ {
49
+ "name": "tokenId",
50
+ "type": "uint256",
51
+ "internalType": "uint256"
52
+ }
53
+ ],
54
+ "outputs": [],
55
+ "stateMutability": "payable"
56
+ },
57
+ {
58
+ "type": "function",
59
+ "name": "unsubscribeGasLimit",
60
+ "inputs": [],
61
+ "outputs": [
62
+ {
63
+ "name": "",
64
+ "type": "uint256",
65
+ "internalType": "uint256"
66
+ }
67
+ ],
68
+ "stateMutability": "view"
69
+ },
70
+ {
71
+ "type": "event",
72
+ "name": "Subscription",
73
+ "inputs": [
74
+ {
75
+ "name": "tokenId",
76
+ "type": "uint256",
77
+ "indexed": true,
78
+ "internalType": "uint256"
79
+ },
80
+ {
81
+ "name": "subscriber",
82
+ "type": "address",
83
+ "indexed": true,
84
+ "internalType": "address"
85
+ }
86
+ ],
87
+ "anonymous": false
88
+ },
89
+ {
90
+ "type": "event",
91
+ "name": "Unsubscription",
92
+ "inputs": [
93
+ {
94
+ "name": "tokenId",
95
+ "type": "uint256",
96
+ "indexed": true,
97
+ "internalType": "uint256"
98
+ },
99
+ {
100
+ "name": "subscriber",
101
+ "type": "address",
102
+ "indexed": true,
103
+ "internalType": "address"
104
+ }
105
+ ],
106
+ "anonymous": false
107
+ },
108
+ {
109
+ "type": "error",
110
+ "name": "AlreadySubscribed",
111
+ "inputs": [
112
+ {
113
+ "name": "tokenId",
114
+ "type": "uint256",
115
+ "internalType": "uint256"
116
+ },
117
+ {
118
+ "name": "subscriber",
119
+ "type": "address",
120
+ "internalType": "address"
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "type": "error",
126
+ "name": "BurnNotificationReverted",
127
+ "inputs": [
128
+ {
129
+ "name": "subscriber",
130
+ "type": "address",
131
+ "internalType": "address"
132
+ },
133
+ {
134
+ "name": "reason",
135
+ "type": "bytes",
136
+ "internalType": "bytes"
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ "type": "error",
142
+ "name": "GasLimitTooLow",
143
+ "inputs": []
144
+ },
145
+ {
146
+ "type": "error",
147
+ "name": "ModifyLiquidityNotificationReverted",
148
+ "inputs": [
149
+ {
150
+ "name": "subscriber",
151
+ "type": "address",
152
+ "internalType": "address"
153
+ },
154
+ {
155
+ "name": "reason",
156
+ "type": "bytes",
157
+ "internalType": "bytes"
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ "type": "error",
163
+ "name": "NoCodeSubscriber",
164
+ "inputs": []
165
+ },
166
+ {
167
+ "type": "error",
168
+ "name": "NotSubscribed",
169
+ "inputs": []
170
+ },
171
+ {
172
+ "type": "error",
173
+ "name": "SubscriptionReverted",
174
+ "inputs": [
175
+ {
176
+ "name": "subscriber",
177
+ "type": "address",
178
+ "internalType": "address"
179
+ },
180
+ {
181
+ "name": "reason",
182
+ "type": "bytes",
183
+ "internalType": "bytes"
184
+ }
185
+ ]
186
+ }
187
+ ]