@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
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "permit",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "owner",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"internalType": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "permitSingle",
|
|
13
|
+
"type": "tuple",
|
|
14
|
+
"internalType": "struct IAllowanceTransfer.PermitSingle",
|
|
15
|
+
"components": [
|
|
16
|
+
{
|
|
17
|
+
"name": "details",
|
|
18
|
+
"type": "tuple",
|
|
19
|
+
"internalType": "struct IAllowanceTransfer.PermitDetails",
|
|
20
|
+
"components": [
|
|
21
|
+
{
|
|
22
|
+
"name": "token",
|
|
23
|
+
"type": "address",
|
|
24
|
+
"internalType": "address"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "amount",
|
|
28
|
+
"type": "uint160",
|
|
29
|
+
"internalType": "uint160"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "expiration",
|
|
33
|
+
"type": "uint48",
|
|
34
|
+
"internalType": "uint48"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "nonce",
|
|
38
|
+
"type": "uint48",
|
|
39
|
+
"internalType": "uint48"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "spender",
|
|
45
|
+
"type": "address",
|
|
46
|
+
"internalType": "address"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "sigDeadline",
|
|
50
|
+
"type": "uint256",
|
|
51
|
+
"internalType": "uint256"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "signature",
|
|
57
|
+
"type": "bytes",
|
|
58
|
+
"internalType": "bytes"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"outputs": [
|
|
62
|
+
{
|
|
63
|
+
"name": "err",
|
|
64
|
+
"type": "bytes",
|
|
65
|
+
"internalType": "bytes"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"stateMutability": "payable"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "function",
|
|
72
|
+
"name": "permitBatch",
|
|
73
|
+
"inputs": [
|
|
74
|
+
{
|
|
75
|
+
"name": "owner",
|
|
76
|
+
"type": "address",
|
|
77
|
+
"internalType": "address"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "_permitBatch",
|
|
81
|
+
"type": "tuple",
|
|
82
|
+
"internalType": "struct IAllowanceTransfer.PermitBatch",
|
|
83
|
+
"components": [
|
|
84
|
+
{
|
|
85
|
+
"name": "details",
|
|
86
|
+
"type": "tuple[]",
|
|
87
|
+
"internalType": "struct IAllowanceTransfer.PermitDetails[]",
|
|
88
|
+
"components": [
|
|
89
|
+
{
|
|
90
|
+
"name": "token",
|
|
91
|
+
"type": "address",
|
|
92
|
+
"internalType": "address"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "amount",
|
|
96
|
+
"type": "uint160",
|
|
97
|
+
"internalType": "uint160"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "expiration",
|
|
101
|
+
"type": "uint48",
|
|
102
|
+
"internalType": "uint48"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "nonce",
|
|
106
|
+
"type": "uint48",
|
|
107
|
+
"internalType": "uint48"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "spender",
|
|
113
|
+
"type": "address",
|
|
114
|
+
"internalType": "address"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "sigDeadline",
|
|
118
|
+
"type": "uint256",
|
|
119
|
+
"internalType": "uint256"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "signature",
|
|
125
|
+
"type": "bytes",
|
|
126
|
+
"internalType": "bytes"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"outputs": [
|
|
130
|
+
{
|
|
131
|
+
"name": "err",
|
|
132
|
+
"type": "bytes",
|
|
133
|
+
"internalType": "bytes"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"stateMutability": "payable"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "initializePool",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "key",
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"internalType": "struct PoolKey",
|
|
10
|
+
"components": [
|
|
11
|
+
{
|
|
12
|
+
"name": "currency0",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "Currency"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "currency1",
|
|
18
|
+
"type": "address",
|
|
19
|
+
"internalType": "Currency"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "fee",
|
|
23
|
+
"type": "uint24",
|
|
24
|
+
"internalType": "uint24"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "tickSpacing",
|
|
28
|
+
"type": "int24",
|
|
29
|
+
"internalType": "int24"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "hooks",
|
|
33
|
+
"type": "address",
|
|
34
|
+
"internalType": "contract IHooks"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "sqrtPriceX96",
|
|
40
|
+
"type": "uint160",
|
|
41
|
+
"internalType": "uint160"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"outputs": [
|
|
45
|
+
{
|
|
46
|
+
"name": "",
|
|
47
|
+
"type": "int24",
|
|
48
|
+
"internalType": "int24"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"stateMutability": "payable"
|
|
52
|
+
}
|
|
53
|
+
]
|