@zoralabs/coins 2.3.0 → 2.3.1
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$colon$js.log +116 -97
- package/CHANGELOG.md +7 -1
- package/README.md +1 -0
- package/abis/AddressConstants.json +7 -0
- package/abis/BaseTest.json +62 -0
- package/abis/BuySupplyWithV4SwapHook.json +429 -0
- package/abis/IUniswapV4Router04.json +484 -0
- package/abis/MockAirlock.json +39 -0
- package/abis/SimpleERC20.json +326 -0
- package/addresses/8453.json +7 -9
- package/audits/report-cantinacode-zora-1021.pdf +0 -0
- package/dist/index.cjs +140 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +139 -18
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +205 -28
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/package/wagmiGenerated.ts +139 -18
- package/package.json +1 -1
- package/script/DeployPostDeploymentHooks.s.sol +1 -3
- package/src/deployment/CoinsDeployerBase.sol +9 -8
- package/src/hooks/deployment/BuySupplyWithV4SwapHook.sol +310 -0
- package/src/utils/AutoSwapper.sol +1 -1
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/BuySupplyWithV4SwapHook.t.sol +509 -0
- package/test/Coin.t.sol +21 -9
- package/test/CoinUniV4.t.sol +1 -2
- package/test/ContentCoinRewards.t.sol +1 -3
- package/test/CreatorCoin.t.sol +1 -4
- package/test/CreatorCoinRewards.t.sol +1 -3
- package/test/Factory.t.sol +3 -3
- package/test/MultiOwnable.t.sol +4 -4
- package/test/Upgrades.t.sol +26 -17
- package/test/ZoraHookRegistry.t.sol +19 -9
- package/test/mocks/MockAirlock.sol +22 -0
- package/test/mocks/SimpleERC20.sol +8 -0
- package/test/utils/BaseTest.sol +155 -2
- package/test/utils/hookmate/README.md +50 -0
- package/test/utils/hookmate/artifacts/DeployHelper.sol +20 -0
- package/test/utils/hookmate/artifacts/Permit2.sol +16 -0
- package/test/utils/hookmate/artifacts/UniversalRouter.sol +29 -0
- package/test/utils/hookmate/artifacts/V4PoolManager.sol +17 -0
- package/test/utils/hookmate/artifacts/V4PositionManager.sol +23 -0
- package/test/utils/hookmate/artifacts/V4Quoter.sol +17 -0
- package/test/utils/hookmate/artifacts/V4Router.sol +18 -0
- package/test/utils/hookmate/constants/AddressConstants.sol +193 -0
- package/test/utils/hookmate/interfaces/router/IUniswapV4Router04.sol +173 -0
- package/test/utils/hookmate/interfaces/router/PathKey.sol +34 -0
- package/test/utils/hookmate/test/utils/SwapFeeEventAsserter.sol +24 -0
- package/wagmi.config.ts +1 -1
- package/src/utils/uniswap/BytesLib.sol +0 -35
- package/src/utils/uniswap/Path.sol +0 -31
- /package/abis/{VmContractHelper226.json → VmContractHelper239.json} +0 -0
package/dist/wagmiGenerated.d.ts
CHANGED
|
@@ -1573,7 +1573,7 @@ export declare const baseCoinABI: readonly [{
|
|
|
1573
1573
|
readonly inputs: readonly [];
|
|
1574
1574
|
readonly name: "UseRevokeOwnershipToRemoveSelf";
|
|
1575
1575
|
}];
|
|
1576
|
-
export declare const
|
|
1576
|
+
export declare const buySupplyWithV4SwapHookABI: readonly [{
|
|
1577
1577
|
readonly type: "constructor";
|
|
1578
1578
|
readonly inputs: readonly [{
|
|
1579
1579
|
readonly name: "_factory";
|
|
@@ -1611,6 +1611,105 @@ export declare const buySupplyWithSwapRouterHookABI: readonly [{
|
|
|
1611
1611
|
readonly type: "bytes";
|
|
1612
1612
|
}];
|
|
1613
1613
|
readonly stateMutability: "payable";
|
|
1614
|
+
}, {
|
|
1615
|
+
readonly type: "function";
|
|
1616
|
+
readonly inputs: readonly [{
|
|
1617
|
+
readonly name: "data";
|
|
1618
|
+
readonly internalType: "bytes";
|
|
1619
|
+
readonly type: "bytes";
|
|
1620
|
+
}];
|
|
1621
|
+
readonly name: "decodeV4RouteData";
|
|
1622
|
+
readonly outputs: readonly [{
|
|
1623
|
+
readonly name: "v4Route";
|
|
1624
|
+
readonly internalType: "struct PoolKey[]";
|
|
1625
|
+
readonly type: "tuple[]";
|
|
1626
|
+
readonly components: readonly [{
|
|
1627
|
+
readonly name: "currency0";
|
|
1628
|
+
readonly internalType: "Currency";
|
|
1629
|
+
readonly type: "address";
|
|
1630
|
+
}, {
|
|
1631
|
+
readonly name: "currency1";
|
|
1632
|
+
readonly internalType: "Currency";
|
|
1633
|
+
readonly type: "address";
|
|
1634
|
+
}, {
|
|
1635
|
+
readonly name: "fee";
|
|
1636
|
+
readonly internalType: "uint24";
|
|
1637
|
+
readonly type: "uint24";
|
|
1638
|
+
}, {
|
|
1639
|
+
readonly name: "tickSpacing";
|
|
1640
|
+
readonly internalType: "int24";
|
|
1641
|
+
readonly type: "int24";
|
|
1642
|
+
}, {
|
|
1643
|
+
readonly name: "hooks";
|
|
1644
|
+
readonly internalType: "contract IHooks";
|
|
1645
|
+
readonly type: "address";
|
|
1646
|
+
}];
|
|
1647
|
+
}, {
|
|
1648
|
+
readonly name: "startAmount";
|
|
1649
|
+
readonly internalType: "uint256";
|
|
1650
|
+
readonly type: "uint256";
|
|
1651
|
+
}];
|
|
1652
|
+
readonly stateMutability: "pure";
|
|
1653
|
+
}, {
|
|
1654
|
+
readonly type: "function";
|
|
1655
|
+
readonly inputs: readonly [{
|
|
1656
|
+
readonly name: "params";
|
|
1657
|
+
readonly internalType: "struct BuySupplyWithV4SwapHook.InitialSupplyParams";
|
|
1658
|
+
readonly type: "tuple";
|
|
1659
|
+
readonly components: readonly [{
|
|
1660
|
+
readonly name: "buyRecipient";
|
|
1661
|
+
readonly internalType: "address";
|
|
1662
|
+
readonly type: "address";
|
|
1663
|
+
}, {
|
|
1664
|
+
readonly name: "v3Route";
|
|
1665
|
+
readonly internalType: "bytes";
|
|
1666
|
+
readonly type: "bytes";
|
|
1667
|
+
}, {
|
|
1668
|
+
readonly name: "v4Route";
|
|
1669
|
+
readonly internalType: "struct PoolKey[]";
|
|
1670
|
+
readonly type: "tuple[]";
|
|
1671
|
+
readonly components: readonly [{
|
|
1672
|
+
readonly name: "currency0";
|
|
1673
|
+
readonly internalType: "Currency";
|
|
1674
|
+
readonly type: "address";
|
|
1675
|
+
}, {
|
|
1676
|
+
readonly name: "currency1";
|
|
1677
|
+
readonly internalType: "Currency";
|
|
1678
|
+
readonly type: "address";
|
|
1679
|
+
}, {
|
|
1680
|
+
readonly name: "fee";
|
|
1681
|
+
readonly internalType: "uint24";
|
|
1682
|
+
readonly type: "uint24";
|
|
1683
|
+
}, {
|
|
1684
|
+
readonly name: "tickSpacing";
|
|
1685
|
+
readonly internalType: "int24";
|
|
1686
|
+
readonly type: "int24";
|
|
1687
|
+
}, {
|
|
1688
|
+
readonly name: "hooks";
|
|
1689
|
+
readonly internalType: "contract IHooks";
|
|
1690
|
+
readonly type: "address";
|
|
1691
|
+
}];
|
|
1692
|
+
}, {
|
|
1693
|
+
readonly name: "inputCurrency";
|
|
1694
|
+
readonly internalType: "address";
|
|
1695
|
+
readonly type: "address";
|
|
1696
|
+
}, {
|
|
1697
|
+
readonly name: "inputAmount";
|
|
1698
|
+
readonly internalType: "uint256";
|
|
1699
|
+
readonly type: "uint256";
|
|
1700
|
+
}, {
|
|
1701
|
+
readonly name: "minAmountOut";
|
|
1702
|
+
readonly internalType: "uint256";
|
|
1703
|
+
readonly type: "uint256";
|
|
1704
|
+
}];
|
|
1705
|
+
}];
|
|
1706
|
+
readonly name: "encodeBuySupplyWithV4SwapHookData";
|
|
1707
|
+
readonly outputs: readonly [{
|
|
1708
|
+
readonly name: "";
|
|
1709
|
+
readonly internalType: "bytes";
|
|
1710
|
+
readonly type: "bytes";
|
|
1711
|
+
}];
|
|
1712
|
+
readonly stateMutability: "pure";
|
|
1614
1713
|
}, {
|
|
1615
1714
|
readonly type: "function";
|
|
1616
1715
|
readonly inputs: readonly [];
|
|
@@ -1621,6 +1720,16 @@ export declare const buySupplyWithSwapRouterHookABI: readonly [{
|
|
|
1621
1720
|
readonly type: "address";
|
|
1622
1721
|
}];
|
|
1623
1722
|
readonly stateMutability: "view";
|
|
1723
|
+
}, {
|
|
1724
|
+
readonly type: "function";
|
|
1725
|
+
readonly inputs: readonly [];
|
|
1726
|
+
readonly name: "poolManager";
|
|
1727
|
+
readonly outputs: readonly [{
|
|
1728
|
+
readonly name: "";
|
|
1729
|
+
readonly internalType: "contract IPoolManager";
|
|
1730
|
+
readonly type: "address";
|
|
1731
|
+
}];
|
|
1732
|
+
readonly stateMutability: "view";
|
|
1624
1733
|
}, {
|
|
1625
1734
|
readonly type: "function";
|
|
1626
1735
|
readonly inputs: readonly [{
|
|
@@ -1635,6 +1744,16 @@ export declare const buySupplyWithSwapRouterHookABI: readonly [{
|
|
|
1635
1744
|
readonly type: "bool";
|
|
1636
1745
|
}];
|
|
1637
1746
|
readonly stateMutability: "pure";
|
|
1747
|
+
}, {
|
|
1748
|
+
readonly type: "function";
|
|
1749
|
+
readonly inputs: readonly [];
|
|
1750
|
+
readonly name: "swapRouter";
|
|
1751
|
+
readonly outputs: readonly [{
|
|
1752
|
+
readonly name: "";
|
|
1753
|
+
readonly internalType: "contract ISwapRouter";
|
|
1754
|
+
readonly type: "address";
|
|
1755
|
+
}];
|
|
1756
|
+
readonly stateMutability: "view";
|
|
1638
1757
|
}, {
|
|
1639
1758
|
readonly type: "function";
|
|
1640
1759
|
readonly inputs: readonly [{
|
|
@@ -1649,6 +1768,72 @@ export declare const buySupplyWithSwapRouterHookABI: readonly [{
|
|
|
1649
1768
|
readonly type: "bytes";
|
|
1650
1769
|
}];
|
|
1651
1770
|
readonly stateMutability: "nonpayable";
|
|
1771
|
+
}, {
|
|
1772
|
+
readonly type: "event";
|
|
1773
|
+
readonly anonymous: false;
|
|
1774
|
+
readonly inputs: readonly [{
|
|
1775
|
+
readonly name: "coin";
|
|
1776
|
+
readonly internalType: "address";
|
|
1777
|
+
readonly type: "address";
|
|
1778
|
+
readonly indexed: true;
|
|
1779
|
+
}, {
|
|
1780
|
+
readonly name: "recipient";
|
|
1781
|
+
readonly internalType: "address";
|
|
1782
|
+
readonly type: "address";
|
|
1783
|
+
readonly indexed: true;
|
|
1784
|
+
}, {
|
|
1785
|
+
readonly name: "coinsPurchased";
|
|
1786
|
+
readonly internalType: "uint256";
|
|
1787
|
+
readonly type: "uint256";
|
|
1788
|
+
readonly indexed: true;
|
|
1789
|
+
}, {
|
|
1790
|
+
readonly name: "v3Route";
|
|
1791
|
+
readonly internalType: "bytes";
|
|
1792
|
+
readonly type: "bytes";
|
|
1793
|
+
readonly indexed: false;
|
|
1794
|
+
}, {
|
|
1795
|
+
readonly name: "v4Route";
|
|
1796
|
+
readonly internalType: "struct PoolKey[]";
|
|
1797
|
+
readonly type: "tuple[]";
|
|
1798
|
+
readonly components: readonly [{
|
|
1799
|
+
readonly name: "currency0";
|
|
1800
|
+
readonly internalType: "Currency";
|
|
1801
|
+
readonly type: "address";
|
|
1802
|
+
}, {
|
|
1803
|
+
readonly name: "currency1";
|
|
1804
|
+
readonly internalType: "Currency";
|
|
1805
|
+
readonly type: "address";
|
|
1806
|
+
}, {
|
|
1807
|
+
readonly name: "fee";
|
|
1808
|
+
readonly internalType: "uint24";
|
|
1809
|
+
readonly type: "uint24";
|
|
1810
|
+
}, {
|
|
1811
|
+
readonly name: "tickSpacing";
|
|
1812
|
+
readonly internalType: "int24";
|
|
1813
|
+
readonly type: "int24";
|
|
1814
|
+
}, {
|
|
1815
|
+
readonly name: "hooks";
|
|
1816
|
+
readonly internalType: "contract IHooks";
|
|
1817
|
+
readonly type: "address";
|
|
1818
|
+
}];
|
|
1819
|
+
readonly indexed: false;
|
|
1820
|
+
}, {
|
|
1821
|
+
readonly name: "inputCurrency";
|
|
1822
|
+
readonly internalType: "address";
|
|
1823
|
+
readonly type: "address";
|
|
1824
|
+
readonly indexed: false;
|
|
1825
|
+
}, {
|
|
1826
|
+
readonly name: "inputAmount";
|
|
1827
|
+
readonly internalType: "uint256";
|
|
1828
|
+
readonly type: "uint256";
|
|
1829
|
+
readonly indexed: false;
|
|
1830
|
+
}, {
|
|
1831
|
+
readonly name: "v4SwapInput";
|
|
1832
|
+
readonly internalType: "uint256";
|
|
1833
|
+
readonly type: "uint256";
|
|
1834
|
+
readonly indexed: false;
|
|
1835
|
+
}];
|
|
1836
|
+
readonly name: "BuyInitialSupply";
|
|
1652
1837
|
}, {
|
|
1653
1838
|
readonly type: "error";
|
|
1654
1839
|
readonly inputs: readonly [{
|
|
@@ -1669,26 +1854,6 @@ export declare const buySupplyWithSwapRouterHookABI: readonly [{
|
|
|
1669
1854
|
readonly type: "error";
|
|
1670
1855
|
readonly inputs: readonly [];
|
|
1671
1856
|
readonly name: "AddressZero";
|
|
1672
|
-
}, {
|
|
1673
|
-
readonly type: "error";
|
|
1674
|
-
readonly inputs: readonly [{
|
|
1675
|
-
readonly name: "balance";
|
|
1676
|
-
readonly internalType: "uint256";
|
|
1677
|
-
readonly type: "uint256";
|
|
1678
|
-
}];
|
|
1679
|
-
readonly name: "CoinBalanceNot0";
|
|
1680
|
-
}, {
|
|
1681
|
-
readonly type: "error";
|
|
1682
|
-
readonly inputs: readonly [{
|
|
1683
|
-
readonly name: "balance";
|
|
1684
|
-
readonly internalType: "uint256";
|
|
1685
|
-
readonly type: "uint256";
|
|
1686
|
-
}];
|
|
1687
|
-
readonly name: "CurrencyBalanceNot0";
|
|
1688
|
-
}, {
|
|
1689
|
-
readonly type: "error";
|
|
1690
|
-
readonly inputs: readonly [];
|
|
1691
|
-
readonly name: "Erc20NotReceived";
|
|
1692
1857
|
}, {
|
|
1693
1858
|
readonly type: "error";
|
|
1694
1859
|
readonly inputs: readonly [];
|
|
@@ -1697,10 +1862,22 @@ export declare const buySupplyWithSwapRouterHookABI: readonly [{
|
|
|
1697
1862
|
readonly type: "error";
|
|
1698
1863
|
readonly inputs: readonly [];
|
|
1699
1864
|
readonly name: "HookNotImplemented";
|
|
1865
|
+
}, {
|
|
1866
|
+
readonly type: "error";
|
|
1867
|
+
readonly inputs: readonly [{
|
|
1868
|
+
readonly name: "inputAmount";
|
|
1869
|
+
readonly internalType: "uint256";
|
|
1870
|
+
readonly type: "uint256";
|
|
1871
|
+
}, {
|
|
1872
|
+
readonly name: "availableAmount";
|
|
1873
|
+
readonly internalType: "uint256";
|
|
1874
|
+
readonly type: "uint256";
|
|
1875
|
+
}];
|
|
1876
|
+
readonly name: "InsufficientInputCurrency";
|
|
1700
1877
|
}, {
|
|
1701
1878
|
readonly type: "error";
|
|
1702
1879
|
readonly inputs: readonly [];
|
|
1703
|
-
readonly name: "
|
|
1880
|
+
readonly name: "InsufficientOutputAmount";
|
|
1704
1881
|
}, {
|
|
1705
1882
|
readonly type: "error";
|
|
1706
1883
|
readonly inputs: readonly [];
|
|
@@ -1719,12 +1896,12 @@ export declare const buySupplyWithSwapRouterHookABI: readonly [{
|
|
|
1719
1896
|
readonly name: "SafeERC20FailedOperation";
|
|
1720
1897
|
}, {
|
|
1721
1898
|
readonly type: "error";
|
|
1722
|
-
readonly inputs: readonly [
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
readonly name: "
|
|
1899
|
+
readonly inputs: readonly [];
|
|
1900
|
+
readonly name: "V3RouteCannotStartWithInputCurrency";
|
|
1901
|
+
}, {
|
|
1902
|
+
readonly type: "error";
|
|
1903
|
+
readonly inputs: readonly [];
|
|
1904
|
+
readonly name: "V3RouteDoesNotConnectToV4RouteStart";
|
|
1728
1905
|
}];
|
|
1729
1906
|
export declare const contentCoinABI: readonly [{
|
|
1730
1907
|
readonly type: "constructor";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wagmiGenerated.d.ts","sourceRoot":"","sources":["../package/wagmiGenerated.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2FjB,CAAA;AAMV,e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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAimBrB,CAAA"}
|
|
@@ -1179,10 +1179,10 @@ export const baseCoinABI = [
|
|
|
1179
1179
|
] as const
|
|
1180
1180
|
|
|
1181
1181
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1182
|
-
//
|
|
1182
|
+
// BuySupplyWithV4SwapHook
|
|
1183
1183
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1184
1184
|
|
|
1185
|
-
export const
|
|
1185
|
+
export const buySupplyWithV4SwapHookABI = [
|
|
1186
1186
|
{
|
|
1187
1187
|
type: 'constructor',
|
|
1188
1188
|
inputs: [
|
|
@@ -1207,6 +1207,63 @@ export const buySupplyWithSwapRouterHookABI = [
|
|
|
1207
1207
|
outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
|
|
1208
1208
|
stateMutability: 'payable',
|
|
1209
1209
|
},
|
|
1210
|
+
{
|
|
1211
|
+
type: 'function',
|
|
1212
|
+
inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
|
|
1213
|
+
name: 'decodeV4RouteData',
|
|
1214
|
+
outputs: [
|
|
1215
|
+
{
|
|
1216
|
+
name: 'v4Route',
|
|
1217
|
+
internalType: 'struct PoolKey[]',
|
|
1218
|
+
type: 'tuple[]',
|
|
1219
|
+
components: [
|
|
1220
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
1221
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
1222
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
1223
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
1224
|
+
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
|
|
1225
|
+
],
|
|
1226
|
+
},
|
|
1227
|
+
{ name: 'startAmount', internalType: 'uint256', type: 'uint256' },
|
|
1228
|
+
],
|
|
1229
|
+
stateMutability: 'pure',
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
type: 'function',
|
|
1233
|
+
inputs: [
|
|
1234
|
+
{
|
|
1235
|
+
name: 'params',
|
|
1236
|
+
internalType: 'struct BuySupplyWithV4SwapHook.InitialSupplyParams',
|
|
1237
|
+
type: 'tuple',
|
|
1238
|
+
components: [
|
|
1239
|
+
{ name: 'buyRecipient', internalType: 'address', type: 'address' },
|
|
1240
|
+
{ name: 'v3Route', internalType: 'bytes', type: 'bytes' },
|
|
1241
|
+
{
|
|
1242
|
+
name: 'v4Route',
|
|
1243
|
+
internalType: 'struct PoolKey[]',
|
|
1244
|
+
type: 'tuple[]',
|
|
1245
|
+
components: [
|
|
1246
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
1247
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
1248
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
1249
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
1250
|
+
{
|
|
1251
|
+
name: 'hooks',
|
|
1252
|
+
internalType: 'contract IHooks',
|
|
1253
|
+
type: 'address',
|
|
1254
|
+
},
|
|
1255
|
+
],
|
|
1256
|
+
},
|
|
1257
|
+
{ name: 'inputCurrency', internalType: 'address', type: 'address' },
|
|
1258
|
+
{ name: 'inputAmount', internalType: 'uint256', type: 'uint256' },
|
|
1259
|
+
{ name: 'minAmountOut', internalType: 'uint256', type: 'uint256' },
|
|
1260
|
+
],
|
|
1261
|
+
},
|
|
1262
|
+
],
|
|
1263
|
+
name: 'encodeBuySupplyWithV4SwapHookData',
|
|
1264
|
+
outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
|
|
1265
|
+
stateMutability: 'pure',
|
|
1266
|
+
},
|
|
1210
1267
|
{
|
|
1211
1268
|
type: 'function',
|
|
1212
1269
|
inputs: [],
|
|
@@ -1216,6 +1273,15 @@ export const buySupplyWithSwapRouterHookABI = [
|
|
|
1216
1273
|
],
|
|
1217
1274
|
stateMutability: 'view',
|
|
1218
1275
|
},
|
|
1276
|
+
{
|
|
1277
|
+
type: 'function',
|
|
1278
|
+
inputs: [],
|
|
1279
|
+
name: 'poolManager',
|
|
1280
|
+
outputs: [
|
|
1281
|
+
{ name: '', internalType: 'contract IPoolManager', type: 'address' },
|
|
1282
|
+
],
|
|
1283
|
+
stateMutability: 'view',
|
|
1284
|
+
},
|
|
1219
1285
|
{
|
|
1220
1286
|
type: 'function',
|
|
1221
1287
|
inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }],
|
|
@@ -1223,6 +1289,15 @@ export const buySupplyWithSwapRouterHookABI = [
|
|
|
1223
1289
|
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
1224
1290
|
stateMutability: 'pure',
|
|
1225
1291
|
},
|
|
1292
|
+
{
|
|
1293
|
+
type: 'function',
|
|
1294
|
+
inputs: [],
|
|
1295
|
+
name: 'swapRouter',
|
|
1296
|
+
outputs: [
|
|
1297
|
+
{ name: '', internalType: 'contract ISwapRouter', type: 'address' },
|
|
1298
|
+
],
|
|
1299
|
+
stateMutability: 'view',
|
|
1300
|
+
},
|
|
1226
1301
|
{
|
|
1227
1302
|
type: 'function',
|
|
1228
1303
|
inputs: [{ name: 'data', internalType: 'bytes', type: 'bytes' }],
|
|
@@ -1230,6 +1305,58 @@ export const buySupplyWithSwapRouterHookABI = [
|
|
|
1230
1305
|
outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
|
|
1231
1306
|
stateMutability: 'nonpayable',
|
|
1232
1307
|
},
|
|
1308
|
+
{
|
|
1309
|
+
type: 'event',
|
|
1310
|
+
anonymous: false,
|
|
1311
|
+
inputs: [
|
|
1312
|
+
{ name: 'coin', internalType: 'address', type: 'address', indexed: true },
|
|
1313
|
+
{
|
|
1314
|
+
name: 'recipient',
|
|
1315
|
+
internalType: 'address',
|
|
1316
|
+
type: 'address',
|
|
1317
|
+
indexed: true,
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
name: 'coinsPurchased',
|
|
1321
|
+
internalType: 'uint256',
|
|
1322
|
+
type: 'uint256',
|
|
1323
|
+
indexed: true,
|
|
1324
|
+
},
|
|
1325
|
+
{ name: 'v3Route', internalType: 'bytes', type: 'bytes', indexed: false },
|
|
1326
|
+
{
|
|
1327
|
+
name: 'v4Route',
|
|
1328
|
+
internalType: 'struct PoolKey[]',
|
|
1329
|
+
type: 'tuple[]',
|
|
1330
|
+
components: [
|
|
1331
|
+
{ name: 'currency0', internalType: 'Currency', type: 'address' },
|
|
1332
|
+
{ name: 'currency1', internalType: 'Currency', type: 'address' },
|
|
1333
|
+
{ name: 'fee', internalType: 'uint24', type: 'uint24' },
|
|
1334
|
+
{ name: 'tickSpacing', internalType: 'int24', type: 'int24' },
|
|
1335
|
+
{ name: 'hooks', internalType: 'contract IHooks', type: 'address' },
|
|
1336
|
+
],
|
|
1337
|
+
indexed: false,
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
name: 'inputCurrency',
|
|
1341
|
+
internalType: 'address',
|
|
1342
|
+
type: 'address',
|
|
1343
|
+
indexed: false,
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
name: 'inputAmount',
|
|
1347
|
+
internalType: 'uint256',
|
|
1348
|
+
type: 'uint256',
|
|
1349
|
+
indexed: false,
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
name: 'v4SwapInput',
|
|
1353
|
+
internalType: 'uint256',
|
|
1354
|
+
type: 'uint256',
|
|
1355
|
+
indexed: false,
|
|
1356
|
+
},
|
|
1357
|
+
],
|
|
1358
|
+
name: 'BuyInitialSupply',
|
|
1359
|
+
},
|
|
1233
1360
|
{
|
|
1234
1361
|
type: 'error',
|
|
1235
1362
|
inputs: [{ name: 'target', internalType: 'address', type: 'address' }],
|
|
@@ -1241,20 +1368,17 @@ export const buySupplyWithSwapRouterHookABI = [
|
|
|
1241
1368
|
name: 'AddressInsufficientBalance',
|
|
1242
1369
|
},
|
|
1243
1370
|
{ type: 'error', inputs: [], name: 'AddressZero' },
|
|
1371
|
+
{ type: 'error', inputs: [], name: 'FailedInnerCall' },
|
|
1372
|
+
{ type: 'error', inputs: [], name: 'HookNotImplemented' },
|
|
1244
1373
|
{
|
|
1245
1374
|
type: 'error',
|
|
1246
|
-
inputs: [
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
inputs: [{ name: 'balance', internalType: 'uint256', type: 'uint256' }],
|
|
1252
|
-
name: 'CurrencyBalanceNot0',
|
|
1375
|
+
inputs: [
|
|
1376
|
+
{ name: 'inputAmount', internalType: 'uint256', type: 'uint256' },
|
|
1377
|
+
{ name: 'availableAmount', internalType: 'uint256', type: 'uint256' },
|
|
1378
|
+
],
|
|
1379
|
+
name: 'InsufficientInputCurrency',
|
|
1253
1380
|
},
|
|
1254
|
-
{ type: 'error', inputs: [], name: '
|
|
1255
|
-
{ type: 'error', inputs: [], name: 'FailedInnerCall' },
|
|
1256
|
-
{ type: 'error', inputs: [], name: 'HookNotImplemented' },
|
|
1257
|
-
{ type: 'error', inputs: [], name: 'InvalidSwapRouterCall' },
|
|
1381
|
+
{ type: 'error', inputs: [], name: 'InsufficientOutputAmount' },
|
|
1258
1382
|
{ type: 'error', inputs: [], name: 'NotFactory' },
|
|
1259
1383
|
{ type: 'error', inputs: [], name: 'OnlyPoolManager' },
|
|
1260
1384
|
{
|
|
@@ -1262,11 +1386,8 @@ export const buySupplyWithSwapRouterHookABI = [
|
|
|
1262
1386
|
inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
|
|
1263
1387
|
name: 'SafeERC20FailedOperation',
|
|
1264
1388
|
},
|
|
1265
|
-
{
|
|
1266
|
-
|
|
1267
|
-
inputs: [{ name: 'error', internalType: 'bytes', type: 'bytes' }],
|
|
1268
|
-
name: 'SwapReverted',
|
|
1269
|
-
},
|
|
1389
|
+
{ type: 'error', inputs: [], name: 'V3RouteCannotStartWithInputCurrency' },
|
|
1390
|
+
{ type: 'error', inputs: [], name: 'V3RouteDoesNotConnectToV4RouteStart' },
|
|
1270
1391
|
] as const
|
|
1271
1392
|
|
|
1272
1393
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
package/package.json
CHANGED
|
@@ -10,9 +10,7 @@ contract DeployHooks is CoinsDeployerBase {
|
|
|
10
10
|
|
|
11
11
|
vm.startBroadcast();
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// deployment.buySupplyWithSwapRouterHook = buySupplyWithSwapRouterHook;
|
|
13
|
+
deployment.buySupplyWithSwapRouterHook = address(deployBuySupplyWithV4SwapHook(deployment));
|
|
16
14
|
|
|
17
15
|
vm.stopBroadcast();
|
|
18
16
|
|
|
@@ -18,6 +18,7 @@ import {ProxyShim} from "../../test/utils/ProxyShim.sol";
|
|
|
18
18
|
import {CreatorCoin} from "../CreatorCoin.sol";
|
|
19
19
|
import {Create2} from "@openzeppelin/contracts/utils/Create2.sol";
|
|
20
20
|
import {HookUpgradeGate} from "../hooks/HookUpgradeGate.sol";
|
|
21
|
+
import {BuySupplyWithV4SwapHook} from "../hooks/deployment/BuySupplyWithV4SwapHook.sol";
|
|
21
22
|
|
|
22
23
|
contract CoinsDeployerBase is ProxyDeployerScript {
|
|
23
24
|
address internal constant PROTOCOL_REWARDS = 0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B;
|
|
@@ -123,14 +124,14 @@ contract CoinsDeployerBase is ProxyDeployerScript {
|
|
|
123
124
|
return new ZoraFactoryImpl({coinV4Impl_: coinV4Impl_, creatorCoinImpl_: creatorCoinImpl_, hook_: hook_, zoraHookRegistry_: zoraHookRegistry_});
|
|
124
125
|
}
|
|
125
126
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
function deployBuySupplyWithV4SwapHook(CoinsDeployment memory deployment) internal returns (BuySupplyWithV4SwapHook) {
|
|
128
|
+
return
|
|
129
|
+
new BuySupplyWithV4SwapHook({
|
|
130
|
+
_factory: IZoraFactory(deployment.zoraFactory),
|
|
131
|
+
_swapRouter: getUniswapSwapRouter(),
|
|
132
|
+
_poolManager: getUniswapV4PoolManager()
|
|
133
|
+
});
|
|
134
|
+
}
|
|
134
135
|
|
|
135
136
|
function deployUpgradeGate(CoinsDeployment memory deployment) internal returns (CoinsDeployment memory) {
|
|
136
137
|
deployment.hookUpgradeGate = address(new HookUpgradeGate(getProxyAdmin()));
|