@zoralabs/coins 0.7.0 → 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.
- package/.env +1 -0
- package/.turbo/turbo-build.log +114 -109
- package/.turbo/turbo-update-contract-version.log +22 -0
- package/CHANGELOG.md +34 -0
- package/abis/BadImpl.json +15 -0
- package/abis/BalanceDeltaLibrary.json +15 -0
- package/abis/BaseCoin.json +1442 -0
- package/abis/BaseCoinDeployHook.json +78 -0
- package/abis/BaseHook.json +897 -0
- package/abis/BaseTest.json +13 -91
- package/abis/BeforeSwapDeltaLibrary.json +15 -0
- package/abis/BuySupplyWithSwapRouterHook.json +126 -0
- package/abis/Coin.json +48 -92
- package/abis/CoinConstants.json +65 -0
- package/abis/CoinTest.json +27 -91
- package/abis/CoinV4.json +1664 -0
- package/abis/CurrencyLibrary.json +25 -0
- package/abis/DeployHooks.json +9 -0
- package/abis/DopplerUniswapV3Test.json +20 -91
- package/abis/FactoryTest.json +13 -91
- package/abis/FakeHookNoInterface.json +21 -0
- package/abis/HookDeployer.json +68 -0
- package/abis/Hooks.json +28 -0
- package/abis/HooksTest.json +651 -0
- package/abis/IAllowanceTransfer.json +486 -0
- package/abis/ICoin.json +25 -1
- package/abis/ICoinDeployHook.json +31 -0
- package/abis/IContractMetadata.json +28 -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/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/IHookDeployer.json +42 -0
- package/abis/IHooks.json +789 -0
- package/abis/IImmutableState.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/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/ISwapRouter.json +82 -0
- package/abis/IUnorderedNonce.json +44 -0
- package/abis/IV4Router.json +47 -0
- package/abis/IZoraFactory.json +144 -0
- package/abis/IZoraV4CoinHook.json +83 -0
- package/abis/ImmutableState.json +36 -0
- package/abis/LPFeeLibrary.json +65 -0
- package/abis/MultiOwnableTest.json +13 -91
- package/abis/Simulate.json +0 -91
- package/abis/UniV3BuySell.json +12 -0
- package/abis/UniV3Errors.json +32 -0
- package/abis/UpgradeFactoryImpl.json +9 -0
- package/abis/UpgradesTest.json +604 -0
- package/abis/ZoraFactoryImpl.json +111 -0
- package/abis/ZoraV4CoinHook.json +989 -0
- package/addresses/8453.json +2 -1
- package/addresses/84532.json +4 -3
- package/dist/index.cjs +125 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +120 -56
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +212 -464
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/package/wagmiGenerated.ts +122 -66
- package/package.json +4 -4
- package/script/CoinsDeployerBase.sol +32 -0
- package/script/DeployHooks.s.sol +22 -0
- package/script/Simulate.s.sol +3 -2
- package/script/UpgradeCoinImpl.sol +2 -2
- package/script/UpgradeFactoryImpl.s.sol +23 -0
- package/src/Coin.sol +35 -342
- package/src/ZoraFactoryImpl.sol +73 -45
- package/src/hooks/BaseCoinDeployHook.sol +62 -0
- package/src/hooks/BuySupplyWithSwapRouterHook.sol +78 -0
- package/src/interfaces/ICoin.sol +5 -1
- package/src/interfaces/ICoinDeployHook.sol +8 -0
- package/src/interfaces/ISwapRouter.sol +1 -35
- package/src/interfaces/IZoraFactory.sol +52 -0
- package/src/{utils → libs}/CoinConstants.sol +6 -6
- package/src/libs/CoinLegacy.sol +4 -4
- package/src/libs/CoinLegacyMarket.sol +182 -0
- package/src/libs/CoinSetupV3.sol +111 -0
- package/src/libs/UniV3BuySell.sol +449 -0
- package/src/libs/UniV3Errors.sol +11 -0
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/Coin.t.sol +35 -17
- package/test/CoinDopplerUniV3.t.sol +14 -17
- package/test/Factory.t.sol +4 -3
- package/test/Hooks.t.sol +274 -0
- package/test/Upgrades.t.sol +67 -0
- package/test/utils/BaseTest.sol +18 -3
- package/wagmi.config.ts +6 -9
- package/src/libs/CoinSetup.sol +0 -37
- /package/abis/{CoinSetup.json → CoinSetupV3.json} +0 -0
package/addresses/8453.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"BUY_SUPPLY_WITH_SWAP_ROUTER_HOOK": "0x264b731e40691Da5B40aA63AC5c3B7F7DAafA721",
|
|
2
3
|
"COIN_IMPL": "0xbECAe78D441FBa11017bB7A8798D018b0977F76d",
|
|
3
4
|
"COIN_VERSION": "0.7.0",
|
|
4
5
|
"ZORA_FACTORY": "0x777777751622c0d3258f214F9DF38E35BF45baF3",
|
|
5
|
-
"ZORA_FACTORY_IMPL": "
|
|
6
|
+
"ZORA_FACTORY_IMPL": "0x8a6e82268c73174Ff3458B4D91c3669Fb2338b40"
|
|
6
7
|
}
|
package/addresses/84532.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
2
|
+
"BUY_SUPPLY_WITH_SWAP_ROUTER_HOOK": "0x6B78be0808262b1d5E9B1eeDfE448aDCE2C637a8",
|
|
3
|
+
"COIN_IMPL": "0x903Fb6924C8f96226bFDFcf71333578117C33618",
|
|
4
|
+
"COIN_VERSION": "0.8.0",
|
|
4
5
|
"ZORA_FACTORY": "0x777777751622c0d3258f214F9DF38E35BF45baF3",
|
|
5
|
-
"ZORA_FACTORY_IMPL": "
|
|
6
|
+
"ZORA_FACTORY_IMPL": "0x2C256f0464A9e1a4292c87eb455c5601Bcae4436"
|
|
6
7
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -18,89 +18,95 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// package/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
buySupplyWithSwapRouterHookABI: () => buySupplyWithSwapRouterHookABI,
|
|
23
24
|
coinABI: () => coinABI,
|
|
24
25
|
iUniswapV3PoolABI: () => iUniswapV3PoolABI,
|
|
25
|
-
zoraFactoryImplABI: () => zoraFactoryImplABI
|
|
26
|
-
zoraFactoryImplAddress: () => zoraFactoryImplAddress,
|
|
27
|
-
zoraFactoryImplConfig: () => zoraFactoryImplConfig
|
|
26
|
+
zoraFactoryImplABI: () => zoraFactoryImplABI
|
|
28
27
|
});
|
|
29
|
-
module.exports = __toCommonJS(
|
|
28
|
+
module.exports = __toCommonJS(index_exports);
|
|
30
29
|
|
|
31
30
|
// package/wagmiGenerated.ts
|
|
32
|
-
var
|
|
31
|
+
var buySupplyWithSwapRouterHookABI = [
|
|
33
32
|
{
|
|
34
33
|
type: "constructor",
|
|
35
34
|
inputs: [
|
|
36
35
|
{
|
|
37
|
-
name: "
|
|
38
|
-
internalType: "
|
|
36
|
+
name: "_factory",
|
|
37
|
+
internalType: "contract IZoraFactory",
|
|
39
38
|
type: "address"
|
|
40
39
|
},
|
|
41
|
-
{ name: "
|
|
42
|
-
{ name: "_weth", internalType: "address", type: "address" },
|
|
43
|
-
{ name: "_v3Factory", internalType: "address", type: "address" },
|
|
44
|
-
{ name: "_swapRouter", internalType: "address", type: "address" },
|
|
45
|
-
{ name: "_airlock", internalType: "address", type: "address" }
|
|
40
|
+
{ name: "_swapRouter", internalType: "address", type: "address" }
|
|
46
41
|
],
|
|
47
42
|
stateMutability: "nonpayable"
|
|
48
43
|
},
|
|
49
|
-
{ type: "receive", stateMutability: "payable" },
|
|
50
|
-
{
|
|
51
|
-
type: "function",
|
|
52
|
-
inputs: [],
|
|
53
|
-
name: "DOMAIN_SEPARATOR",
|
|
54
|
-
outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
55
|
-
stateMutability: "view"
|
|
56
|
-
},
|
|
57
44
|
{
|
|
58
45
|
type: "function",
|
|
59
|
-
inputs: [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
inputs: [
|
|
47
|
+
{ name: "sender", internalType: "address", type: "address" },
|
|
48
|
+
{ name: "coin", internalType: "contract ICoin", type: "address" },
|
|
49
|
+
{ name: "hookData", internalType: "bytes", type: "bytes" }
|
|
50
|
+
],
|
|
51
|
+
name: "afterCoinDeploy",
|
|
52
|
+
outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
|
|
53
|
+
stateMutability: "payable"
|
|
63
54
|
},
|
|
64
55
|
{
|
|
65
56
|
type: "function",
|
|
66
57
|
inputs: [],
|
|
67
|
-
name: "
|
|
68
|
-
outputs: [
|
|
58
|
+
name: "factory",
|
|
59
|
+
outputs: [
|
|
60
|
+
{ name: "", internalType: "contract IZoraFactory", type: "address" }
|
|
61
|
+
],
|
|
69
62
|
stateMutability: "view"
|
|
70
63
|
},
|
|
71
64
|
{
|
|
72
65
|
type: "function",
|
|
73
|
-
inputs: [],
|
|
74
|
-
name: "
|
|
75
|
-
outputs: [{ name: "", internalType: "
|
|
76
|
-
stateMutability: "
|
|
66
|
+
inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }],
|
|
67
|
+
name: "supportsInterface",
|
|
68
|
+
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
69
|
+
stateMutability: "pure"
|
|
77
70
|
},
|
|
71
|
+
{ type: "error", inputs: [], name: "AddressZero" },
|
|
78
72
|
{
|
|
79
|
-
type: "
|
|
80
|
-
inputs: [],
|
|
81
|
-
name: "
|
|
82
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
83
|
-
stateMutability: "view"
|
|
73
|
+
type: "error",
|
|
74
|
+
inputs: [{ name: "balance", internalType: "uint256", type: "uint256" }],
|
|
75
|
+
name: "CoinBalanceNot0"
|
|
84
76
|
},
|
|
77
|
+
{ type: "error", inputs: [], name: "Erc20NotReceived" },
|
|
78
|
+
{ type: "error", inputs: [], name: "HookNotImplemented" },
|
|
79
|
+
{ type: "error", inputs: [], name: "InvalidSwapRouterCall" },
|
|
80
|
+
{ type: "error", inputs: [], name: "NotFactory" },
|
|
85
81
|
{
|
|
86
|
-
type: "
|
|
87
|
-
inputs: [],
|
|
88
|
-
name: "
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
82
|
+
type: "error",
|
|
83
|
+
inputs: [{ name: "error", internalType: "bytes", type: "bytes" }],
|
|
84
|
+
name: "SwapReverted"
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
var coinABI = [
|
|
92
88
|
{
|
|
93
|
-
type: "
|
|
94
|
-
inputs: [
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
type: "constructor",
|
|
90
|
+
inputs: [
|
|
91
|
+
{
|
|
92
|
+
name: "_protocolRewardRecipient",
|
|
93
|
+
internalType: "address",
|
|
94
|
+
type: "address"
|
|
95
|
+
},
|
|
96
|
+
{ name: "_protocolRewards", internalType: "address", type: "address" },
|
|
97
|
+
{ name: "_weth", internalType: "address", type: "address" },
|
|
98
|
+
{ name: "_v3Factory", internalType: "address", type: "address" },
|
|
99
|
+
{ name: "_swapRouter", internalType: "address", type: "address" },
|
|
100
|
+
{ name: "_airlock", internalType: "address", type: "address" }
|
|
101
|
+
],
|
|
102
|
+
stateMutability: "nonpayable"
|
|
98
103
|
},
|
|
104
|
+
{ type: "receive", stateMutability: "payable" },
|
|
99
105
|
{
|
|
100
106
|
type: "function",
|
|
101
107
|
inputs: [],
|
|
102
|
-
name: "
|
|
103
|
-
outputs: [{ name: "", internalType: "
|
|
108
|
+
name: "DOMAIN_SEPARATOR",
|
|
109
|
+
outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
104
110
|
stateMutability: "view"
|
|
105
111
|
},
|
|
106
112
|
{
|
|
@@ -255,6 +261,20 @@ var coinABI = [
|
|
|
255
261
|
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
256
262
|
stateMutability: "view"
|
|
257
263
|
},
|
|
264
|
+
{
|
|
265
|
+
type: "function",
|
|
266
|
+
inputs: [],
|
|
267
|
+
name: "market",
|
|
268
|
+
outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
|
|
269
|
+
stateMutability: "view"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
type: "function",
|
|
273
|
+
inputs: [],
|
|
274
|
+
name: "marketVersion",
|
|
275
|
+
outputs: [{ name: "", internalType: "uint8", type: "uint8" }],
|
|
276
|
+
stateMutability: "view"
|
|
277
|
+
},
|
|
258
278
|
{
|
|
259
279
|
type: "function",
|
|
260
280
|
inputs: [],
|
|
@@ -900,6 +920,7 @@ var coinABI = [
|
|
|
900
920
|
name: "AddressInsufficientBalance"
|
|
901
921
|
},
|
|
902
922
|
{ type: "error", inputs: [], name: "AddressZero" },
|
|
923
|
+
{ type: "error", inputs: [], name: "AddressZero" },
|
|
903
924
|
{ type: "error", inputs: [], name: "AlreadyOwner" },
|
|
904
925
|
{ type: "error", inputs: [], name: "CannotMintZeroLiquidity" },
|
|
905
926
|
{
|
|
@@ -990,6 +1011,7 @@ var coinABI = [
|
|
|
990
1011
|
{ type: "error", inputs: [], name: "InvalidInitialization" },
|
|
991
1012
|
{ type: "error", inputs: [], name: "InvalidMarketType" },
|
|
992
1013
|
{ type: "error", inputs: [], name: "InvalidPoolVersion" },
|
|
1014
|
+
{ type: "error", inputs: [], name: "InvalidPoolVersion" },
|
|
993
1015
|
{
|
|
994
1016
|
type: "error",
|
|
995
1017
|
inputs: [
|
|
@@ -1015,7 +1037,14 @@ var coinABI = [
|
|
|
1015
1037
|
{ type: "error", inputs: [], name: "NumDiscoveryPositionsOutOfRange" },
|
|
1016
1038
|
{ type: "error", inputs: [], name: "OneOwnerRequired" },
|
|
1017
1039
|
{ type: "error", inputs: [], name: "OnlyOwner" },
|
|
1018
|
-
{
|
|
1040
|
+
{
|
|
1041
|
+
type: "error",
|
|
1042
|
+
inputs: [
|
|
1043
|
+
{ name: "sender", internalType: "address", type: "address" },
|
|
1044
|
+
{ name: "pool", internalType: "address", type: "address" }
|
|
1045
|
+
],
|
|
1046
|
+
name: "OnlyPool"
|
|
1047
|
+
},
|
|
1019
1048
|
{ type: "error", inputs: [], name: "OnlyWeth" },
|
|
1020
1049
|
{ type: "error", inputs: [], name: "OwnerCannotBeAddressZero" },
|
|
1021
1050
|
{ type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" },
|
|
@@ -1178,6 +1207,20 @@ var zoraFactoryImplABI = [
|
|
|
1178
1207
|
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
1179
1208
|
stateMutability: "view"
|
|
1180
1209
|
},
|
|
1210
|
+
{
|
|
1211
|
+
type: "function",
|
|
1212
|
+
inputs: [],
|
|
1213
|
+
name: "contractName",
|
|
1214
|
+
outputs: [{ name: "", internalType: "string", type: "string" }],
|
|
1215
|
+
stateMutability: "pure"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
type: "function",
|
|
1219
|
+
inputs: [],
|
|
1220
|
+
name: "contractVersion",
|
|
1221
|
+
outputs: [{ name: "", internalType: "string", type: "string" }],
|
|
1222
|
+
stateMutability: "pure"
|
|
1223
|
+
},
|
|
1181
1224
|
{
|
|
1182
1225
|
type: "function",
|
|
1183
1226
|
inputs: [
|
|
@@ -1217,6 +1260,26 @@ var zoraFactoryImplABI = [
|
|
|
1217
1260
|
],
|
|
1218
1261
|
stateMutability: "payable"
|
|
1219
1262
|
},
|
|
1263
|
+
{
|
|
1264
|
+
type: "function",
|
|
1265
|
+
inputs: [
|
|
1266
|
+
{ name: "payoutRecipient", internalType: "address", type: "address" },
|
|
1267
|
+
{ name: "owners", internalType: "address[]", type: "address[]" },
|
|
1268
|
+
{ name: "uri", internalType: "string", type: "string" },
|
|
1269
|
+
{ name: "name", internalType: "string", type: "string" },
|
|
1270
|
+
{ name: "symbol", internalType: "string", type: "string" },
|
|
1271
|
+
{ name: "poolConfig", internalType: "bytes", type: "bytes" },
|
|
1272
|
+
{ name: "platformReferrer", internalType: "address", type: "address" },
|
|
1273
|
+
{ name: "hook", internalType: "address", type: "address" },
|
|
1274
|
+
{ name: "hookData", internalType: "bytes", type: "bytes" }
|
|
1275
|
+
],
|
|
1276
|
+
name: "deployWithHook",
|
|
1277
|
+
outputs: [
|
|
1278
|
+
{ name: "coin", internalType: "address", type: "address" },
|
|
1279
|
+
{ name: "hookDataOut", internalType: "bytes", type: "bytes" }
|
|
1280
|
+
],
|
|
1281
|
+
stateMutability: "payable"
|
|
1282
|
+
},
|
|
1220
1283
|
{
|
|
1221
1284
|
type: "function",
|
|
1222
1285
|
inputs: [],
|
|
@@ -1395,6 +1458,7 @@ var zoraFactoryImplABI = [
|
|
|
1395
1458
|
{ type: "error", inputs: [], name: "ERC20TransferAmountMismatch" },
|
|
1396
1459
|
{ type: "error", inputs: [], name: "EthTransferInvalid" },
|
|
1397
1460
|
{ type: "error", inputs: [], name: "FailedInnerCall" },
|
|
1461
|
+
{ type: "error", inputs: [], name: "InvalidHook" },
|
|
1398
1462
|
{ type: "error", inputs: [], name: "InvalidInitialization" },
|
|
1399
1463
|
{ type: "error", inputs: [], name: "NotInitializing" },
|
|
1400
1464
|
{
|
|
@@ -1418,22 +1482,21 @@ var zoraFactoryImplABI = [
|
|
|
1418
1482
|
type: "error",
|
|
1419
1483
|
inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }],
|
|
1420
1484
|
name: "UUPSUnsupportedProxiableUUID"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
type: "error",
|
|
1488
|
+
inputs: [
|
|
1489
|
+
{ name: "currentName", internalType: "string", type: "string" },
|
|
1490
|
+
{ name: "newName", internalType: "string", type: "string" }
|
|
1491
|
+
],
|
|
1492
|
+
name: "UpgradeToMismatchedContractName"
|
|
1421
1493
|
}
|
|
1422
1494
|
];
|
|
1423
|
-
var zoraFactoryImplAddress = {
|
|
1424
|
-
8453: "0x02B2705500096Ff83F9eF78873ca5DFB06C00Ddc",
|
|
1425
|
-
84532: "0x777777751622c0d3258f214F9DF38E35BF45baF3"
|
|
1426
|
-
};
|
|
1427
|
-
var zoraFactoryImplConfig = {
|
|
1428
|
-
address: zoraFactoryImplAddress,
|
|
1429
|
-
abi: zoraFactoryImplABI
|
|
1430
|
-
};
|
|
1431
1495
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1432
1496
|
0 && (module.exports = {
|
|
1497
|
+
buySupplyWithSwapRouterHookABI,
|
|
1433
1498
|
coinABI,
|
|
1434
1499
|
iUniswapV3PoolABI,
|
|
1435
|
-
zoraFactoryImplABI
|
|
1436
|
-
zoraFactoryImplAddress,
|
|
1437
|
-
zoraFactoryImplConfig
|
|
1500
|
+
zoraFactoryImplABI
|
|
1438
1501
|
});
|
|
1439
1502
|
//# sourceMappingURL=index.cjs.map
|