@zoralabs/protocol-deployments 0.5.4 → 0.5.5
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 +47 -46
- package/CHANGELOG.md +13 -0
- package/dist/{_esm-RA774I7E.js → _esm-AN6HMJZC.js} +119 -234
- package/dist/_esm-AN6HMJZC.js.map +1 -0
- package/dist/{ccip-OTD7W43P.js → ccip-C5WONSSK.js} +3 -3
- package/dist/{chunk-ETO2D44V.js → chunk-NPNNGXR4.js} +89 -87
- package/dist/{chunk-ETO2D44V.js.map → chunk-NPNNGXR4.js.map} +1 -1
- package/dist/{chunk-3EJPJMEH.js → chunk-PR4QN5HX.js} +2 -3
- package/dist/encoding.d.ts +85 -0
- package/dist/encoding.d.ts.map +1 -1
- package/dist/generated/wagmi.d.ts +546 -72
- package/dist/generated/wagmi.d.ts.map +1 -1
- package/dist/index.cjs +958 -133
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +265 -55
- package/dist/index.js.map +1 -1
- package/dist/{secp256k1-DTX2GS77.js → secp256k1-QZA5SALG.js} +3 -3
- package/dist/typedData.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/encoding.ts +157 -0
- package/src/generated/wagmi.ts +192 -50
- package/dist/_esm-RA774I7E.js.map +0 -1
- /package/dist/{ccip-OTD7W43P.js.map → ccip-C5WONSSK.js.map} +0 -0
- /package/dist/{chunk-3EJPJMEH.js.map → chunk-PR4QN5HX.js.map} +0 -0
- /package/dist/{secp256k1-DTX2GS77.js.map → secp256k1-QZA5SALG.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__export
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PR4QN5HX.js";
|
|
4
4
|
|
|
5
5
|
// ../../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/_assert.js
|
|
6
6
|
function anumber(n) {
|
|
@@ -37,7 +37,7 @@ function aoutput(out, instance) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
// ../../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/cryptoNode.js
|
|
40
|
-
import * as nc from "crypto";
|
|
40
|
+
import * as nc from "node:crypto";
|
|
41
41
|
var crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && "randomBytes" in nc ? nc : void 0;
|
|
42
42
|
|
|
43
43
|
// ../../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/utils.js
|
|
@@ -2552,4 +2552,4 @@ export {
|
|
|
2552
2552
|
@noble/curves/esm/secp256k1.js:
|
|
2553
2553
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
2554
2554
|
*/
|
|
2555
|
-
//# sourceMappingURL=secp256k1-
|
|
2555
|
+
//# sourceMappingURL=secp256k1-QZA5SALG.js.map
|
package/dist/typedData.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedData.d.ts","sourceRoot":"","sources":["../src/typedData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAGP,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,mBAAmB,EAMpB,MAAM,MAAM,CAAC;AACd,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAG9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EAKxB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,8BAA8B,EAC/B,MAAM,SAAS,CAAC;AAiBjB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBE,CAAC;AA8C/B,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,oBAAoB,
|
|
1
|
+
{"version":3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AAa,EACtB,iBAAiB,OAAO,KACvB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAoC,eAAe,CAAC,GAAG;IAC3E,OAAO,EAAE,OAAO,CAAC;CA6BlB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,qCAAqC,GAChD,SAAS,kBAAkB,EAC3B,iBAAiB,OAAO,KACvB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEpB,oBAAoB,CACrB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CA0BrB,CAAC;AAGF,eAAO,MAAM,UAAU,cAA+B,CAAC;AAEvD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uCAAuC,GAClD,SAAS,oBAAoB,EAC7B,iBAAiB,OAAO,KACvB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEpB,+BAA+B,CAChC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAwCrB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iDAAiD,GAC5D,SAAS,8BAA8B,EACvC,iBAAiB,OAAO,KACvB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEpB,gCAAgC,CACjC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAyCrB,CAAC"}
|
package/package.json
CHANGED
package/src/encoding.ts
CHANGED
|
@@ -1,6 +1,163 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Address,
|
|
3
|
+
decodeAbiParameters,
|
|
4
|
+
encodeAbiParameters,
|
|
5
|
+
encodeFunctionData,
|
|
6
|
+
} from "viem";
|
|
7
|
+
import { uniswapV3SwapRouterABI } from "./generated/wagmi";
|
|
8
|
+
import { buySupplyWithSwapRouterHookAddress } from "./generated/wagmi";
|
|
9
|
+
|
|
10
|
+
import { Hex } from "viem";
|
|
11
|
+
import { AbiParametersToPrimitiveTypes, ExtractAbiFunction } from "abitype";
|
|
12
|
+
|
|
1
13
|
/** ABI parameters for performing a SafeTransferFrom based swap when selling on secondary. */
|
|
2
14
|
export const safeTransferSwapAbiParameters = [
|
|
3
15
|
{ name: "recipient", internalType: "address payable", type: "address" },
|
|
4
16
|
{ name: "minEthToAcquire", internalType: "uint256", type: "uint256" },
|
|
5
17
|
{ name: "sqrtPriceLimitX96", internalType: "uint160", type: "uint160" },
|
|
6
18
|
] as const;
|
|
19
|
+
|
|
20
|
+
export const buySupplyWithSwapRouterHookAbiParameters = [
|
|
21
|
+
{ name: "buyRecipient", internalType: "address", type: "address" },
|
|
22
|
+
{ name: "swapRouterCall", internalType: "bytes", type: "bytes" },
|
|
23
|
+
] as const;
|
|
24
|
+
|
|
25
|
+
export const buySupplyWithSwapRouterHookReturnParameters = [
|
|
26
|
+
{ name: "amountCurrency", internalType: "uint256", type: "uint256" },
|
|
27
|
+
{ name: "coinsPurchased", internalType: "uint256", type: "uint256" },
|
|
28
|
+
] as const;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Encodes the calldata for the BuySupplyWithSwapRouterHook.
|
|
32
|
+
*
|
|
33
|
+
* @param buyRecipient - The address of the recipient of the coins that are purchased.
|
|
34
|
+
* @param swapRouterCall - The calldata to send for swapping on the swap router. For the call, the recipient of the swap
|
|
35
|
+
* must be the hook contract.
|
|
36
|
+
* @returns The encoded calldata.
|
|
37
|
+
*/
|
|
38
|
+
export const encodeBuySupplyWithSwapRouterHookCalldata = (
|
|
39
|
+
buyRecipient: Address,
|
|
40
|
+
swapRouterCall: Hex,
|
|
41
|
+
) => {
|
|
42
|
+
return encodeAbiParameters(buySupplyWithSwapRouterHookAbiParameters, [
|
|
43
|
+
buyRecipient,
|
|
44
|
+
swapRouterCall,
|
|
45
|
+
]);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
type ExactInputSingleParams = AbiParametersToPrimitiveTypes<
|
|
49
|
+
ExtractAbiFunction<
|
|
50
|
+
typeof uniswapV3SwapRouterABI,
|
|
51
|
+
"exactInputSingle"
|
|
52
|
+
>["inputs"]
|
|
53
|
+
>[0];
|
|
54
|
+
|
|
55
|
+
type ExactInputParams = AbiParametersToPrimitiveTypes<
|
|
56
|
+
ExtractAbiFunction<typeof uniswapV3SwapRouterABI, "exactInput">["inputs"]
|
|
57
|
+
>[0];
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Encodes the call data for buying supply with a single-hop swap router hook.
|
|
61
|
+
* This function creates the hook call and hook data needed to buy Coin supply using ETH through a Uniswap V3 single-hop swap.
|
|
62
|
+
*
|
|
63
|
+
* @param buyRecipient - The address that will receive the coins purchased
|
|
64
|
+
* @param exactInputSingleParams - The parameters for the exactInputSingle function on the swap router (recipient is omitted as it will be set to the hook address)
|
|
65
|
+
* @param chainId - The chain ID to use for getting the hook address
|
|
66
|
+
* @param ethValue - Optional amount of ETH to send with the call to the swap router
|
|
67
|
+
* @returns Object containing the encoded hook call, hook data, and ETH value
|
|
68
|
+
*/
|
|
69
|
+
export const encodeBuySupplyWithSingleHopSwapRouterHookCall = ({
|
|
70
|
+
buyRecipient,
|
|
71
|
+
exactInputSingleParams,
|
|
72
|
+
chainId,
|
|
73
|
+
ethValue,
|
|
74
|
+
}: {
|
|
75
|
+
buyRecipient: Address;
|
|
76
|
+
exactInputSingleParams: Omit<ExactInputSingleParams, "recipient">;
|
|
77
|
+
chainId: keyof typeof buySupplyWithSwapRouterHookAddress;
|
|
78
|
+
// optional amount of ETH to send with the call to the swap router
|
|
79
|
+
ethValue?: bigint;
|
|
80
|
+
}) => {
|
|
81
|
+
const hook = buySupplyWithSwapRouterHookAddress[chainId];
|
|
82
|
+
const callToSwapRouter = encodeFunctionData({
|
|
83
|
+
abi: uniswapV3SwapRouterABI,
|
|
84
|
+
functionName: "exactInputSingle",
|
|
85
|
+
args: [
|
|
86
|
+
{
|
|
87
|
+
recipient: hook,
|
|
88
|
+
...exactInputSingleParams,
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
hook,
|
|
95
|
+
hookData: encodeBuySupplyWithSwapRouterHookCalldata(
|
|
96
|
+
buyRecipient,
|
|
97
|
+
callToSwapRouter,
|
|
98
|
+
),
|
|
99
|
+
value: ethValue,
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Encodes the call data for buying supply with a multi-hop swap router hook.
|
|
105
|
+
* This function creates the hook call and hook data needed to buy Coin supply using ETH through a Uniswap V3 multi-hop swap.
|
|
106
|
+
*
|
|
107
|
+
* @param buyRecipient - The address that will receive the coins purchased
|
|
108
|
+
* @param exactInputParams - The parameters for the exactInput function on the swap router (recipient is omitted as it will be set to the hook address)
|
|
109
|
+
* @param chainId - The chain ID to use for getting the hook address
|
|
110
|
+
* @param ethValue - Optional amount of ETH to send with the call to the swap router
|
|
111
|
+
* @returns Object containing the encoded hook call, hook data, and ETH value
|
|
112
|
+
*/
|
|
113
|
+
export const encodeBuySupplyWithMultiHopSwapRouterHookCall = ({
|
|
114
|
+
buyRecipient,
|
|
115
|
+
exactInputParams,
|
|
116
|
+
chainId,
|
|
117
|
+
ethValue,
|
|
118
|
+
}: {
|
|
119
|
+
buyRecipient: Address;
|
|
120
|
+
exactInputParams: Omit<ExactInputParams, "recipient">;
|
|
121
|
+
chainId: keyof typeof buySupplyWithSwapRouterHookAddress;
|
|
122
|
+
// optional amount of ETH to send with the call to the swap router
|
|
123
|
+
ethValue?: bigint;
|
|
124
|
+
}) => {
|
|
125
|
+
const hook = buySupplyWithSwapRouterHookAddress[chainId];
|
|
126
|
+
const callToSwapRouter = encodeFunctionData({
|
|
127
|
+
abi: uniswapV3SwapRouterABI,
|
|
128
|
+
functionName: "exactInput",
|
|
129
|
+
args: [
|
|
130
|
+
{
|
|
131
|
+
recipient: hook,
|
|
132
|
+
...exactInputParams,
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
hook,
|
|
139
|
+
hookData: encodeBuySupplyWithSwapRouterHookCalldata(
|
|
140
|
+
buyRecipient,
|
|
141
|
+
callToSwapRouter,
|
|
142
|
+
),
|
|
143
|
+
value: ethValue,
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Decodes the return data from the BuySupplyWithSwapRouterHook.
|
|
149
|
+
*
|
|
150
|
+
* @param returnData - The return data from the BuySupplyWithSwapRouterHook.
|
|
151
|
+
* @returns The decoded return data.
|
|
152
|
+
*/
|
|
153
|
+
export const decodeBuySupplyWithSwapRouterHookReturn = (returnData: Hex) => {
|
|
154
|
+
const result = decodeAbiParameters(
|
|
155
|
+
buySupplyWithSwapRouterHookReturnParameters,
|
|
156
|
+
returnData,
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
amountCurrency: result[0],
|
|
161
|
+
coinsPurchased: result[1],
|
|
162
|
+
};
|
|
163
|
+
};
|
package/src/generated/wagmi.ts
CHANGED
|
@@ -1,3 +1,86 @@
|
|
|
1
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
// BuySupplyWithSwapRouterHook
|
|
3
|
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* - [__View Contract on Base Basescan__](https://basescan.org/address/0x264b731e40691Da5B40aA63AC5c3B7F7DAafA721)
|
|
7
|
+
* - [__View Contract on Base Sepolia Basescan__](https://sepolia.basescan.org/address/0x6B78be0808262b1d5E9B1eeDfE448aDCE2C637a8)
|
|
8
|
+
*/
|
|
9
|
+
export const buySupplyWithSwapRouterHookABI = [
|
|
10
|
+
{
|
|
11
|
+
type: 'constructor',
|
|
12
|
+
inputs: [
|
|
13
|
+
{
|
|
14
|
+
name: '_factory',
|
|
15
|
+
internalType: 'contract IZoraFactory',
|
|
16
|
+
type: 'address',
|
|
17
|
+
},
|
|
18
|
+
{ name: '_swapRouter', internalType: 'address', type: 'address' },
|
|
19
|
+
],
|
|
20
|
+
stateMutability: 'nonpayable',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: 'function',
|
|
24
|
+
inputs: [
|
|
25
|
+
{ name: 'sender', internalType: 'address', type: 'address' },
|
|
26
|
+
{ name: 'coin', internalType: 'contract ICoin', type: 'address' },
|
|
27
|
+
{ name: 'hookData', internalType: 'bytes', type: 'bytes' },
|
|
28
|
+
],
|
|
29
|
+
name: 'afterCoinDeploy',
|
|
30
|
+
outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
|
|
31
|
+
stateMutability: 'payable',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'function',
|
|
35
|
+
inputs: [],
|
|
36
|
+
name: 'factory',
|
|
37
|
+
outputs: [
|
|
38
|
+
{ name: '', internalType: 'contract IZoraFactory', type: 'address' },
|
|
39
|
+
],
|
|
40
|
+
stateMutability: 'view',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'function',
|
|
44
|
+
inputs: [{ name: 'interfaceId', internalType: 'bytes4', type: 'bytes4' }],
|
|
45
|
+
name: 'supportsInterface',
|
|
46
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
47
|
+
stateMutability: 'pure',
|
|
48
|
+
},
|
|
49
|
+
{ type: 'error', inputs: [], name: 'AddressZero' },
|
|
50
|
+
{
|
|
51
|
+
type: 'error',
|
|
52
|
+
inputs: [{ name: 'balance', internalType: 'uint256', type: 'uint256' }],
|
|
53
|
+
name: 'CoinBalanceNot0',
|
|
54
|
+
},
|
|
55
|
+
{ type: 'error', inputs: [], name: 'Erc20NotReceived' },
|
|
56
|
+
{ type: 'error', inputs: [], name: 'HookNotImplemented' },
|
|
57
|
+
{ type: 'error', inputs: [], name: 'InvalidSwapRouterCall' },
|
|
58
|
+
{ type: 'error', inputs: [], name: 'NotFactory' },
|
|
59
|
+
{
|
|
60
|
+
type: 'error',
|
|
61
|
+
inputs: [{ name: 'error', internalType: 'bytes', type: 'bytes' }],
|
|
62
|
+
name: 'SwapReverted',
|
|
63
|
+
},
|
|
64
|
+
] as const
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* - [__View Contract on Base Basescan__](https://basescan.org/address/0x264b731e40691Da5B40aA63AC5c3B7F7DAafA721)
|
|
68
|
+
* - [__View Contract on Base Sepolia Basescan__](https://sepolia.basescan.org/address/0x6B78be0808262b1d5E9B1eeDfE448aDCE2C637a8)
|
|
69
|
+
*/
|
|
70
|
+
export const buySupplyWithSwapRouterHookAddress = {
|
|
71
|
+
8453: '0x264b731e40691Da5B40aA63AC5c3B7F7DAafA721',
|
|
72
|
+
84532: '0x6B78be0808262b1d5E9B1eeDfE448aDCE2C637a8',
|
|
73
|
+
} as const
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* - [__View Contract on Base Basescan__](https://basescan.org/address/0x264b731e40691Da5B40aA63AC5c3B7F7DAafA721)
|
|
77
|
+
* - [__View Contract on Base Sepolia Basescan__](https://sepolia.basescan.org/address/0x6B78be0808262b1d5E9B1eeDfE448aDCE2C637a8)
|
|
78
|
+
*/
|
|
79
|
+
export const buySupplyWithSwapRouterHookConfig = {
|
|
80
|
+
address: buySupplyWithSwapRouterHookAddress,
|
|
81
|
+
abi: buySupplyWithSwapRouterHookABI,
|
|
82
|
+
} as const
|
|
83
|
+
|
|
1
84
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
85
|
// CallerAndCommenter
|
|
3
86
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
@@ -1104,55 +1187,6 @@ export const coinABI = [
|
|
|
1104
1187
|
outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
|
|
1105
1188
|
stateMutability: 'view',
|
|
1106
1189
|
},
|
|
1107
|
-
{
|
|
1108
|
-
type: 'function',
|
|
1109
|
-
inputs: [],
|
|
1110
|
-
name: 'MAX_TOTAL_SUPPLY',
|
|
1111
|
-
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
|
|
1112
|
-
stateMutability: 'view',
|
|
1113
|
-
},
|
|
1114
|
-
{
|
|
1115
|
-
type: 'function',
|
|
1116
|
-
inputs: [],
|
|
1117
|
-
name: 'MIN_ORDER_SIZE',
|
|
1118
|
-
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
|
|
1119
|
-
stateMutability: 'view',
|
|
1120
|
-
},
|
|
1121
|
-
{
|
|
1122
|
-
type: 'function',
|
|
1123
|
-
inputs: [],
|
|
1124
|
-
name: 'PLATFORM_REFERRER_FEE_BPS',
|
|
1125
|
-
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
|
|
1126
|
-
stateMutability: 'view',
|
|
1127
|
-
},
|
|
1128
|
-
{
|
|
1129
|
-
type: 'function',
|
|
1130
|
-
inputs: [],
|
|
1131
|
-
name: 'PROTOCOL_FEE_BPS',
|
|
1132
|
-
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
|
|
1133
|
-
stateMutability: 'view',
|
|
1134
|
-
},
|
|
1135
|
-
{
|
|
1136
|
-
type: 'function',
|
|
1137
|
-
inputs: [],
|
|
1138
|
-
name: 'TOKEN_CREATOR_FEE_BPS',
|
|
1139
|
-
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
|
|
1140
|
-
stateMutability: 'view',
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
type: 'function',
|
|
1144
|
-
inputs: [],
|
|
1145
|
-
name: 'TOTAL_FEE_BPS',
|
|
1146
|
-
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
|
|
1147
|
-
stateMutability: 'view',
|
|
1148
|
-
},
|
|
1149
|
-
{
|
|
1150
|
-
type: 'function',
|
|
1151
|
-
inputs: [],
|
|
1152
|
-
name: 'TRADE_REFERRER_FEE_BPS',
|
|
1153
|
-
outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
|
|
1154
|
-
stateMutability: 'view',
|
|
1155
|
-
},
|
|
1156
1190
|
{
|
|
1157
1191
|
type: 'function',
|
|
1158
1192
|
inputs: [],
|
|
@@ -1305,6 +1339,20 @@ export const coinABI = [
|
|
|
1305
1339
|
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
1306
1340
|
stateMutability: 'view',
|
|
1307
1341
|
},
|
|
1342
|
+
{
|
|
1343
|
+
type: 'function',
|
|
1344
|
+
inputs: [],
|
|
1345
|
+
name: 'market',
|
|
1346
|
+
outputs: [{ name: '', internalType: 'bytes', type: 'bytes' }],
|
|
1347
|
+
stateMutability: 'view',
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
type: 'function',
|
|
1351
|
+
inputs: [],
|
|
1352
|
+
name: 'marketVersion',
|
|
1353
|
+
outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
|
|
1354
|
+
stateMutability: 'view',
|
|
1355
|
+
},
|
|
1308
1356
|
{
|
|
1309
1357
|
type: 'function',
|
|
1310
1358
|
inputs: [],
|
|
@@ -1950,6 +1998,7 @@ export const coinABI = [
|
|
|
1950
1998
|
name: 'AddressInsufficientBalance',
|
|
1951
1999
|
},
|
|
1952
2000
|
{ type: 'error', inputs: [], name: 'AddressZero' },
|
|
2001
|
+
{ type: 'error', inputs: [], name: 'AddressZero' },
|
|
1953
2002
|
{ type: 'error', inputs: [], name: 'AlreadyOwner' },
|
|
1954
2003
|
{ type: 'error', inputs: [], name: 'CannotMintZeroLiquidity' },
|
|
1955
2004
|
{
|
|
@@ -2040,6 +2089,7 @@ export const coinABI = [
|
|
|
2040
2089
|
{ type: 'error', inputs: [], name: 'InvalidInitialization' },
|
|
2041
2090
|
{ type: 'error', inputs: [], name: 'InvalidMarketType' },
|
|
2042
2091
|
{ type: 'error', inputs: [], name: 'InvalidPoolVersion' },
|
|
2092
|
+
{ type: 'error', inputs: [], name: 'InvalidPoolVersion' },
|
|
2043
2093
|
{
|
|
2044
2094
|
type: 'error',
|
|
2045
2095
|
inputs: [
|
|
@@ -2065,7 +2115,14 @@ export const coinABI = [
|
|
|
2065
2115
|
{ type: 'error', inputs: [], name: 'NumDiscoveryPositionsOutOfRange' },
|
|
2066
2116
|
{ type: 'error', inputs: [], name: 'OneOwnerRequired' },
|
|
2067
2117
|
{ type: 'error', inputs: [], name: 'OnlyOwner' },
|
|
2068
|
-
{
|
|
2118
|
+
{
|
|
2119
|
+
type: 'error',
|
|
2120
|
+
inputs: [
|
|
2121
|
+
{ name: 'sender', internalType: 'address', type: 'address' },
|
|
2122
|
+
{ name: 'pool', internalType: 'address', type: 'address' },
|
|
2123
|
+
],
|
|
2124
|
+
name: 'OnlyPool',
|
|
2125
|
+
},
|
|
2069
2126
|
{ type: 'error', inputs: [], name: 'OnlyWeth' },
|
|
2070
2127
|
{ type: 'error', inputs: [], name: 'OwnerCannotBeAddressZero' },
|
|
2071
2128
|
{ type: 'error', inputs: [], name: 'ReentrancyGuardReentrantCall' },
|
|
@@ -2106,6 +2163,20 @@ export const coinFactoryABI = [
|
|
|
2106
2163
|
outputs: [{ name: '', internalType: 'address', type: 'address' }],
|
|
2107
2164
|
stateMutability: 'view',
|
|
2108
2165
|
},
|
|
2166
|
+
{
|
|
2167
|
+
type: 'function',
|
|
2168
|
+
inputs: [],
|
|
2169
|
+
name: 'contractName',
|
|
2170
|
+
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
2171
|
+
stateMutability: 'pure',
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
type: 'function',
|
|
2175
|
+
inputs: [],
|
|
2176
|
+
name: 'contractVersion',
|
|
2177
|
+
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
2178
|
+
stateMutability: 'pure',
|
|
2179
|
+
},
|
|
2109
2180
|
{
|
|
2110
2181
|
type: 'function',
|
|
2111
2182
|
inputs: [
|
|
@@ -2145,6 +2216,26 @@ export const coinFactoryABI = [
|
|
|
2145
2216
|
],
|
|
2146
2217
|
stateMutability: 'payable',
|
|
2147
2218
|
},
|
|
2219
|
+
{
|
|
2220
|
+
type: 'function',
|
|
2221
|
+
inputs: [
|
|
2222
|
+
{ name: 'payoutRecipient', internalType: 'address', type: 'address' },
|
|
2223
|
+
{ name: 'owners', internalType: 'address[]', type: 'address[]' },
|
|
2224
|
+
{ name: 'uri', internalType: 'string', type: 'string' },
|
|
2225
|
+
{ name: 'name', internalType: 'string', type: 'string' },
|
|
2226
|
+
{ name: 'symbol', internalType: 'string', type: 'string' },
|
|
2227
|
+
{ name: 'poolConfig', internalType: 'bytes', type: 'bytes' },
|
|
2228
|
+
{ name: 'platformReferrer', internalType: 'address', type: 'address' },
|
|
2229
|
+
{ name: 'hook', internalType: 'address', type: 'address' },
|
|
2230
|
+
{ name: 'hookData', internalType: 'bytes', type: 'bytes' },
|
|
2231
|
+
],
|
|
2232
|
+
name: 'deployWithHook',
|
|
2233
|
+
outputs: [
|
|
2234
|
+
{ name: 'coin', internalType: 'address', type: 'address' },
|
|
2235
|
+
{ name: 'hookDataOut', internalType: 'bytes', type: 'bytes' },
|
|
2236
|
+
],
|
|
2237
|
+
stateMutability: 'payable',
|
|
2238
|
+
},
|
|
2148
2239
|
{
|
|
2149
2240
|
type: 'function',
|
|
2150
2241
|
inputs: [],
|
|
@@ -2323,6 +2414,7 @@ export const coinFactoryABI = [
|
|
|
2323
2414
|
{ type: 'error', inputs: [], name: 'ERC20TransferAmountMismatch' },
|
|
2324
2415
|
{ type: 'error', inputs: [], name: 'EthTransferInvalid' },
|
|
2325
2416
|
{ type: 'error', inputs: [], name: 'FailedInnerCall' },
|
|
2417
|
+
{ type: 'error', inputs: [], name: 'InvalidHook' },
|
|
2326
2418
|
{ type: 'error', inputs: [], name: 'InvalidInitialization' },
|
|
2327
2419
|
{ type: 'error', inputs: [], name: 'NotInitializing' },
|
|
2328
2420
|
{
|
|
@@ -2347,6 +2439,14 @@ export const coinFactoryABI = [
|
|
|
2347
2439
|
inputs: [{ name: 'slot', internalType: 'bytes32', type: 'bytes32' }],
|
|
2348
2440
|
name: 'UUPSUnsupportedProxiableUUID',
|
|
2349
2441
|
},
|
|
2442
|
+
{
|
|
2443
|
+
type: 'error',
|
|
2444
|
+
inputs: [
|
|
2445
|
+
{ name: 'currentName', internalType: 'string', type: 'string' },
|
|
2446
|
+
{ name: 'newName', internalType: 'string', type: 'string' },
|
|
2447
|
+
],
|
|
2448
|
+
name: 'UpgradeToMismatchedContractName',
|
|
2449
|
+
},
|
|
2350
2450
|
] as const
|
|
2351
2451
|
|
|
2352
2452
|
/**
|
|
@@ -7379,6 +7479,29 @@ export const sponsoredSparksSpenderConfig = {
|
|
|
7379
7479
|
* - [__View Contract on Zora Sepolia Zora Sepolia Explorer__](https://sepolia.explorer.zora.energy//address/0x6B36d761981d82B1e07cF3c4daF4cB4615c4850a)
|
|
7380
7480
|
*/
|
|
7381
7481
|
export const uniswapV3SwapRouterABI = [
|
|
7482
|
+
{
|
|
7483
|
+
type: 'function',
|
|
7484
|
+
inputs: [
|
|
7485
|
+
{
|
|
7486
|
+
name: 'params',
|
|
7487
|
+
internalType: 'struct ISwapRouter.ExactInputParams',
|
|
7488
|
+
type: 'tuple',
|
|
7489
|
+
components: [
|
|
7490
|
+
{ name: 'path', internalType: 'bytes', type: 'bytes' },
|
|
7491
|
+
{ name: 'recipient', internalType: 'address', type: 'address' },
|
|
7492
|
+
{ name: 'amountIn', internalType: 'uint256', type: 'uint256' },
|
|
7493
|
+
{
|
|
7494
|
+
name: 'amountOutMinimum',
|
|
7495
|
+
internalType: 'uint256',
|
|
7496
|
+
type: 'uint256',
|
|
7497
|
+
},
|
|
7498
|
+
],
|
|
7499
|
+
},
|
|
7500
|
+
],
|
|
7501
|
+
name: 'exactInput',
|
|
7502
|
+
outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
|
|
7503
|
+
stateMutability: 'payable',
|
|
7504
|
+
},
|
|
7382
7505
|
{
|
|
7383
7506
|
type: 'function',
|
|
7384
7507
|
inputs: [
|
|
@@ -7409,6 +7532,25 @@ export const uniswapV3SwapRouterABI = [
|
|
|
7409
7532
|
outputs: [{ name: 'amountOut', internalType: 'uint256', type: 'uint256' }],
|
|
7410
7533
|
stateMutability: 'payable',
|
|
7411
7534
|
},
|
|
7535
|
+
{
|
|
7536
|
+
type: 'function',
|
|
7537
|
+
inputs: [
|
|
7538
|
+
{
|
|
7539
|
+
name: 'params',
|
|
7540
|
+
internalType: 'struct ISwapRouter.ExactOutputParams',
|
|
7541
|
+
type: 'tuple',
|
|
7542
|
+
components: [
|
|
7543
|
+
{ name: 'path', internalType: 'bytes', type: 'bytes' },
|
|
7544
|
+
{ name: 'recipient', internalType: 'address', type: 'address' },
|
|
7545
|
+
{ name: 'amountOut', internalType: 'uint256', type: 'uint256' },
|
|
7546
|
+
{ name: 'amountInMaximum', internalType: 'uint256', type: 'uint256' },
|
|
7547
|
+
],
|
|
7548
|
+
},
|
|
7549
|
+
],
|
|
7550
|
+
name: 'exactOutput',
|
|
7551
|
+
outputs: [{ name: 'amountIn', internalType: 'uint256', type: 'uint256' }],
|
|
7552
|
+
stateMutability: 'payable',
|
|
7553
|
+
},
|
|
7412
7554
|
{
|
|
7413
7555
|
type: 'function',
|
|
7414
7556
|
inputs: [
|