@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
package/dist/index.js
CHANGED
|
@@ -1,16 +1,82 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseError,
|
|
3
|
+
decodeAbiParameters,
|
|
3
4
|
encodeAbiParameters,
|
|
5
|
+
encodeFunctionData,
|
|
4
6
|
etherUnits,
|
|
5
7
|
getAbiItem,
|
|
6
8
|
keccak256,
|
|
7
9
|
toHex
|
|
8
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NPNNGXR4.js";
|
|
9
11
|
import {
|
|
10
12
|
__export
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PR4QN5HX.js";
|
|
12
14
|
|
|
13
15
|
// src/generated/wagmi.ts
|
|
16
|
+
var buySupplyWithSwapRouterHookABI = [
|
|
17
|
+
{
|
|
18
|
+
type: "constructor",
|
|
19
|
+
inputs: [
|
|
20
|
+
{
|
|
21
|
+
name: "_factory",
|
|
22
|
+
internalType: "contract IZoraFactory",
|
|
23
|
+
type: "address"
|
|
24
|
+
},
|
|
25
|
+
{ name: "_swapRouter", internalType: "address", type: "address" }
|
|
26
|
+
],
|
|
27
|
+
stateMutability: "nonpayable"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: "function",
|
|
31
|
+
inputs: [
|
|
32
|
+
{ name: "sender", internalType: "address", type: "address" },
|
|
33
|
+
{ name: "coin", internalType: "contract ICoin", type: "address" },
|
|
34
|
+
{ name: "hookData", internalType: "bytes", type: "bytes" }
|
|
35
|
+
],
|
|
36
|
+
name: "afterCoinDeploy",
|
|
37
|
+
outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
|
|
38
|
+
stateMutability: "payable"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: "function",
|
|
42
|
+
inputs: [],
|
|
43
|
+
name: "factory",
|
|
44
|
+
outputs: [
|
|
45
|
+
{ name: "", internalType: "contract IZoraFactory", type: "address" }
|
|
46
|
+
],
|
|
47
|
+
stateMutability: "view"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "function",
|
|
51
|
+
inputs: [{ name: "interfaceId", internalType: "bytes4", type: "bytes4" }],
|
|
52
|
+
name: "supportsInterface",
|
|
53
|
+
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
54
|
+
stateMutability: "pure"
|
|
55
|
+
},
|
|
56
|
+
{ type: "error", inputs: [], name: "AddressZero" },
|
|
57
|
+
{
|
|
58
|
+
type: "error",
|
|
59
|
+
inputs: [{ name: "balance", internalType: "uint256", type: "uint256" }],
|
|
60
|
+
name: "CoinBalanceNot0"
|
|
61
|
+
},
|
|
62
|
+
{ type: "error", inputs: [], name: "Erc20NotReceived" },
|
|
63
|
+
{ type: "error", inputs: [], name: "HookNotImplemented" },
|
|
64
|
+
{ type: "error", inputs: [], name: "InvalidSwapRouterCall" },
|
|
65
|
+
{ type: "error", inputs: [], name: "NotFactory" },
|
|
66
|
+
{
|
|
67
|
+
type: "error",
|
|
68
|
+
inputs: [{ name: "error", internalType: "bytes", type: "bytes" }],
|
|
69
|
+
name: "SwapReverted"
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
var buySupplyWithSwapRouterHookAddress = {
|
|
73
|
+
8453: "0x264b731e40691Da5B40aA63AC5c3B7F7DAafA721",
|
|
74
|
+
84532: "0x6B78be0808262b1d5E9B1eeDfE448aDCE2C637a8"
|
|
75
|
+
};
|
|
76
|
+
var buySupplyWithSwapRouterHookConfig = {
|
|
77
|
+
address: buySupplyWithSwapRouterHookAddress,
|
|
78
|
+
abi: buySupplyWithSwapRouterHookABI
|
|
79
|
+
};
|
|
14
80
|
var callerAndCommenterABI = [
|
|
15
81
|
{
|
|
16
82
|
type: "constructor",
|
|
@@ -1066,55 +1132,6 @@ var coinABI = [
|
|
|
1066
1132
|
outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
1067
1133
|
stateMutability: "view"
|
|
1068
1134
|
},
|
|
1069
|
-
{
|
|
1070
|
-
type: "function",
|
|
1071
|
-
inputs: [],
|
|
1072
|
-
name: "MAX_TOTAL_SUPPLY",
|
|
1073
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
1074
|
-
stateMutability: "view"
|
|
1075
|
-
},
|
|
1076
|
-
{
|
|
1077
|
-
type: "function",
|
|
1078
|
-
inputs: [],
|
|
1079
|
-
name: "MIN_ORDER_SIZE",
|
|
1080
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
1081
|
-
stateMutability: "view"
|
|
1082
|
-
},
|
|
1083
|
-
{
|
|
1084
|
-
type: "function",
|
|
1085
|
-
inputs: [],
|
|
1086
|
-
name: "PLATFORM_REFERRER_FEE_BPS",
|
|
1087
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
1088
|
-
stateMutability: "view"
|
|
1089
|
-
},
|
|
1090
|
-
{
|
|
1091
|
-
type: "function",
|
|
1092
|
-
inputs: [],
|
|
1093
|
-
name: "PROTOCOL_FEE_BPS",
|
|
1094
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
1095
|
-
stateMutability: "view"
|
|
1096
|
-
},
|
|
1097
|
-
{
|
|
1098
|
-
type: "function",
|
|
1099
|
-
inputs: [],
|
|
1100
|
-
name: "TOKEN_CREATOR_FEE_BPS",
|
|
1101
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
1102
|
-
stateMutability: "view"
|
|
1103
|
-
},
|
|
1104
|
-
{
|
|
1105
|
-
type: "function",
|
|
1106
|
-
inputs: [],
|
|
1107
|
-
name: "TOTAL_FEE_BPS",
|
|
1108
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
1109
|
-
stateMutability: "view"
|
|
1110
|
-
},
|
|
1111
|
-
{
|
|
1112
|
-
type: "function",
|
|
1113
|
-
inputs: [],
|
|
1114
|
-
name: "TRADE_REFERRER_FEE_BPS",
|
|
1115
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
1116
|
-
stateMutability: "view"
|
|
1117
|
-
},
|
|
1118
1135
|
{
|
|
1119
1136
|
type: "function",
|
|
1120
1137
|
inputs: [],
|
|
@@ -1267,6 +1284,20 @@ var coinABI = [
|
|
|
1267
1284
|
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
1268
1285
|
stateMutability: "view"
|
|
1269
1286
|
},
|
|
1287
|
+
{
|
|
1288
|
+
type: "function",
|
|
1289
|
+
inputs: [],
|
|
1290
|
+
name: "market",
|
|
1291
|
+
outputs: [{ name: "", internalType: "bytes", type: "bytes" }],
|
|
1292
|
+
stateMutability: "view"
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
type: "function",
|
|
1296
|
+
inputs: [],
|
|
1297
|
+
name: "marketVersion",
|
|
1298
|
+
outputs: [{ name: "", internalType: "uint8", type: "uint8" }],
|
|
1299
|
+
stateMutability: "view"
|
|
1300
|
+
},
|
|
1270
1301
|
{
|
|
1271
1302
|
type: "function",
|
|
1272
1303
|
inputs: [],
|
|
@@ -1912,6 +1943,7 @@ var coinABI = [
|
|
|
1912
1943
|
name: "AddressInsufficientBalance"
|
|
1913
1944
|
},
|
|
1914
1945
|
{ type: "error", inputs: [], name: "AddressZero" },
|
|
1946
|
+
{ type: "error", inputs: [], name: "AddressZero" },
|
|
1915
1947
|
{ type: "error", inputs: [], name: "AlreadyOwner" },
|
|
1916
1948
|
{ type: "error", inputs: [], name: "CannotMintZeroLiquidity" },
|
|
1917
1949
|
{
|
|
@@ -2002,6 +2034,7 @@ var coinABI = [
|
|
|
2002
2034
|
{ type: "error", inputs: [], name: "InvalidInitialization" },
|
|
2003
2035
|
{ type: "error", inputs: [], name: "InvalidMarketType" },
|
|
2004
2036
|
{ type: "error", inputs: [], name: "InvalidPoolVersion" },
|
|
2037
|
+
{ type: "error", inputs: [], name: "InvalidPoolVersion" },
|
|
2005
2038
|
{
|
|
2006
2039
|
type: "error",
|
|
2007
2040
|
inputs: [
|
|
@@ -2027,7 +2060,14 @@ var coinABI = [
|
|
|
2027
2060
|
{ type: "error", inputs: [], name: "NumDiscoveryPositionsOutOfRange" },
|
|
2028
2061
|
{ type: "error", inputs: [], name: "OneOwnerRequired" },
|
|
2029
2062
|
{ type: "error", inputs: [], name: "OnlyOwner" },
|
|
2030
|
-
{
|
|
2063
|
+
{
|
|
2064
|
+
type: "error",
|
|
2065
|
+
inputs: [
|
|
2066
|
+
{ name: "sender", internalType: "address", type: "address" },
|
|
2067
|
+
{ name: "pool", internalType: "address", type: "address" }
|
|
2068
|
+
],
|
|
2069
|
+
name: "OnlyPool"
|
|
2070
|
+
},
|
|
2031
2071
|
{ type: "error", inputs: [], name: "OnlyWeth" },
|
|
2032
2072
|
{ type: "error", inputs: [], name: "OwnerCannotBeAddressZero" },
|
|
2033
2073
|
{ type: "error", inputs: [], name: "ReentrancyGuardReentrantCall" },
|
|
@@ -2059,6 +2099,20 @@ var coinFactoryABI = [
|
|
|
2059
2099
|
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
2060
2100
|
stateMutability: "view"
|
|
2061
2101
|
},
|
|
2102
|
+
{
|
|
2103
|
+
type: "function",
|
|
2104
|
+
inputs: [],
|
|
2105
|
+
name: "contractName",
|
|
2106
|
+
outputs: [{ name: "", internalType: "string", type: "string" }],
|
|
2107
|
+
stateMutability: "pure"
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
type: "function",
|
|
2111
|
+
inputs: [],
|
|
2112
|
+
name: "contractVersion",
|
|
2113
|
+
outputs: [{ name: "", internalType: "string", type: "string" }],
|
|
2114
|
+
stateMutability: "pure"
|
|
2115
|
+
},
|
|
2062
2116
|
{
|
|
2063
2117
|
type: "function",
|
|
2064
2118
|
inputs: [
|
|
@@ -2098,6 +2152,26 @@ var coinFactoryABI = [
|
|
|
2098
2152
|
],
|
|
2099
2153
|
stateMutability: "payable"
|
|
2100
2154
|
},
|
|
2155
|
+
{
|
|
2156
|
+
type: "function",
|
|
2157
|
+
inputs: [
|
|
2158
|
+
{ name: "payoutRecipient", internalType: "address", type: "address" },
|
|
2159
|
+
{ name: "owners", internalType: "address[]", type: "address[]" },
|
|
2160
|
+
{ name: "uri", internalType: "string", type: "string" },
|
|
2161
|
+
{ name: "name", internalType: "string", type: "string" },
|
|
2162
|
+
{ name: "symbol", internalType: "string", type: "string" },
|
|
2163
|
+
{ name: "poolConfig", internalType: "bytes", type: "bytes" },
|
|
2164
|
+
{ name: "platformReferrer", internalType: "address", type: "address" },
|
|
2165
|
+
{ name: "hook", internalType: "address", type: "address" },
|
|
2166
|
+
{ name: "hookData", internalType: "bytes", type: "bytes" }
|
|
2167
|
+
],
|
|
2168
|
+
name: "deployWithHook",
|
|
2169
|
+
outputs: [
|
|
2170
|
+
{ name: "coin", internalType: "address", type: "address" },
|
|
2171
|
+
{ name: "hookDataOut", internalType: "bytes", type: "bytes" }
|
|
2172
|
+
],
|
|
2173
|
+
stateMutability: "payable"
|
|
2174
|
+
},
|
|
2101
2175
|
{
|
|
2102
2176
|
type: "function",
|
|
2103
2177
|
inputs: [],
|
|
@@ -2276,6 +2350,7 @@ var coinFactoryABI = [
|
|
|
2276
2350
|
{ type: "error", inputs: [], name: "ERC20TransferAmountMismatch" },
|
|
2277
2351
|
{ type: "error", inputs: [], name: "EthTransferInvalid" },
|
|
2278
2352
|
{ type: "error", inputs: [], name: "FailedInnerCall" },
|
|
2353
|
+
{ type: "error", inputs: [], name: "InvalidHook" },
|
|
2279
2354
|
{ type: "error", inputs: [], name: "InvalidInitialization" },
|
|
2280
2355
|
{ type: "error", inputs: [], name: "NotInitializing" },
|
|
2281
2356
|
{
|
|
@@ -2299,6 +2374,14 @@ var coinFactoryABI = [
|
|
|
2299
2374
|
type: "error",
|
|
2300
2375
|
inputs: [{ name: "slot", internalType: "bytes32", type: "bytes32" }],
|
|
2301
2376
|
name: "UUPSUnsupportedProxiableUUID"
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
type: "error",
|
|
2380
|
+
inputs: [
|
|
2381
|
+
{ name: "currentName", internalType: "string", type: "string" },
|
|
2382
|
+
{ name: "newName", internalType: "string", type: "string" }
|
|
2383
|
+
],
|
|
2384
|
+
name: "UpgradeToMismatchedContractName"
|
|
2302
2385
|
}
|
|
2303
2386
|
];
|
|
2304
2387
|
var coinFactoryAddress = {
|
|
@@ -6975,6 +7058,29 @@ var sponsoredSparksSpenderConfig = {
|
|
|
6975
7058
|
abi: sponsoredSparksSpenderABI
|
|
6976
7059
|
};
|
|
6977
7060
|
var uniswapV3SwapRouterABI = [
|
|
7061
|
+
{
|
|
7062
|
+
type: "function",
|
|
7063
|
+
inputs: [
|
|
7064
|
+
{
|
|
7065
|
+
name: "params",
|
|
7066
|
+
internalType: "struct ISwapRouter.ExactInputParams",
|
|
7067
|
+
type: "tuple",
|
|
7068
|
+
components: [
|
|
7069
|
+
{ name: "path", internalType: "bytes", type: "bytes" },
|
|
7070
|
+
{ name: "recipient", internalType: "address", type: "address" },
|
|
7071
|
+
{ name: "amountIn", internalType: "uint256", type: "uint256" },
|
|
7072
|
+
{
|
|
7073
|
+
name: "amountOutMinimum",
|
|
7074
|
+
internalType: "uint256",
|
|
7075
|
+
type: "uint256"
|
|
7076
|
+
}
|
|
7077
|
+
]
|
|
7078
|
+
}
|
|
7079
|
+
],
|
|
7080
|
+
name: "exactInput",
|
|
7081
|
+
outputs: [{ name: "amountOut", internalType: "uint256", type: "uint256" }],
|
|
7082
|
+
stateMutability: "payable"
|
|
7083
|
+
},
|
|
6978
7084
|
{
|
|
6979
7085
|
type: "function",
|
|
6980
7086
|
inputs: [
|
|
@@ -7005,6 +7111,25 @@ var uniswapV3SwapRouterABI = [
|
|
|
7005
7111
|
outputs: [{ name: "amountOut", internalType: "uint256", type: "uint256" }],
|
|
7006
7112
|
stateMutability: "payable"
|
|
7007
7113
|
},
|
|
7114
|
+
{
|
|
7115
|
+
type: "function",
|
|
7116
|
+
inputs: [
|
|
7117
|
+
{
|
|
7118
|
+
name: "params",
|
|
7119
|
+
internalType: "struct ISwapRouter.ExactOutputParams",
|
|
7120
|
+
type: "tuple",
|
|
7121
|
+
components: [
|
|
7122
|
+
{ name: "path", internalType: "bytes", type: "bytes" },
|
|
7123
|
+
{ name: "recipient", internalType: "address", type: "address" },
|
|
7124
|
+
{ name: "amountOut", internalType: "uint256", type: "uint256" },
|
|
7125
|
+
{ name: "amountInMaximum", internalType: "uint256", type: "uint256" }
|
|
7126
|
+
]
|
|
7127
|
+
}
|
|
7128
|
+
],
|
|
7129
|
+
name: "exactOutput",
|
|
7130
|
+
outputs: [{ name: "amountIn", internalType: "uint256", type: "uint256" }],
|
|
7131
|
+
stateMutability: "payable"
|
|
7132
|
+
},
|
|
7008
7133
|
{
|
|
7009
7134
|
type: "function",
|
|
7010
7135
|
inputs: [
|
|
@@ -15207,7 +15332,7 @@ var zoraTimedSaleStrategyConfig = {
|
|
|
15207
15332
|
abi: zoraTimedSaleStrategyABI
|
|
15208
15333
|
};
|
|
15209
15334
|
|
|
15210
|
-
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.
|
|
15335
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/errors/unit.js
|
|
15211
15336
|
var InvalidDecimalNumberError = class extends BaseError {
|
|
15212
15337
|
constructor({ value }) {
|
|
15213
15338
|
super(`Number \`${value}\` is not a valid decimal number.`, {
|
|
@@ -15216,7 +15341,7 @@ var InvalidDecimalNumberError = class extends BaseError {
|
|
|
15216
15341
|
}
|
|
15217
15342
|
};
|
|
15218
15343
|
|
|
15219
|
-
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.
|
|
15344
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/parseUnits.js
|
|
15220
15345
|
function parseUnits(value, decimals) {
|
|
15221
15346
|
if (!/^(-?)([0-9]*)\.?([0-9]*)$/.test(value))
|
|
15222
15347
|
throw new InvalidDecimalNumberError({ value });
|
|
@@ -15251,7 +15376,7 @@ function parseUnits(value, decimals) {
|
|
|
15251
15376
|
return BigInt(`${negative ? "-" : ""}${integer}${fraction}`);
|
|
15252
15377
|
}
|
|
15253
15378
|
|
|
15254
|
-
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.
|
|
15379
|
+
// ../../node_modules/.pnpm/viem@2.22.12_bufferutil@4.0.9_typescript@5.8.3_utf-8-validate@5.0.10_zod@3.24.1/node_modules/viem/_esm/utils/unit/parseEther.js
|
|
15255
15380
|
function parseEther(ether, unit = "wei") {
|
|
15256
15381
|
return parseUnits(ether, etherUnits[unit]);
|
|
15257
15382
|
}
|
|
@@ -15710,6 +15835,82 @@ var safeTransferSwapAbiParameters = [
|
|
|
15710
15835
|
{ name: "minEthToAcquire", internalType: "uint256", type: "uint256" },
|
|
15711
15836
|
{ name: "sqrtPriceLimitX96", internalType: "uint160", type: "uint160" }
|
|
15712
15837
|
];
|
|
15838
|
+
var buySupplyWithSwapRouterHookAbiParameters = [
|
|
15839
|
+
{ name: "buyRecipient", internalType: "address", type: "address" },
|
|
15840
|
+
{ name: "swapRouterCall", internalType: "bytes", type: "bytes" }
|
|
15841
|
+
];
|
|
15842
|
+
var buySupplyWithSwapRouterHookReturnParameters = [
|
|
15843
|
+
{ name: "amountCurrency", internalType: "uint256", type: "uint256" },
|
|
15844
|
+
{ name: "coinsPurchased", internalType: "uint256", type: "uint256" }
|
|
15845
|
+
];
|
|
15846
|
+
var encodeBuySupplyWithSwapRouterHookCalldata = (buyRecipient, swapRouterCall) => {
|
|
15847
|
+
return encodeAbiParameters(buySupplyWithSwapRouterHookAbiParameters, [
|
|
15848
|
+
buyRecipient,
|
|
15849
|
+
swapRouterCall
|
|
15850
|
+
]);
|
|
15851
|
+
};
|
|
15852
|
+
var encodeBuySupplyWithSingleHopSwapRouterHookCall = ({
|
|
15853
|
+
buyRecipient,
|
|
15854
|
+
exactInputSingleParams,
|
|
15855
|
+
chainId,
|
|
15856
|
+
ethValue
|
|
15857
|
+
}) => {
|
|
15858
|
+
const hook = buySupplyWithSwapRouterHookAddress[chainId];
|
|
15859
|
+
const callToSwapRouter = encodeFunctionData({
|
|
15860
|
+
abi: uniswapV3SwapRouterABI,
|
|
15861
|
+
functionName: "exactInputSingle",
|
|
15862
|
+
args: [
|
|
15863
|
+
{
|
|
15864
|
+
recipient: hook,
|
|
15865
|
+
...exactInputSingleParams
|
|
15866
|
+
}
|
|
15867
|
+
]
|
|
15868
|
+
});
|
|
15869
|
+
return {
|
|
15870
|
+
hook,
|
|
15871
|
+
hookData: encodeBuySupplyWithSwapRouterHookCalldata(
|
|
15872
|
+
buyRecipient,
|
|
15873
|
+
callToSwapRouter
|
|
15874
|
+
),
|
|
15875
|
+
value: ethValue
|
|
15876
|
+
};
|
|
15877
|
+
};
|
|
15878
|
+
var encodeBuySupplyWithMultiHopSwapRouterHookCall = ({
|
|
15879
|
+
buyRecipient,
|
|
15880
|
+
exactInputParams,
|
|
15881
|
+
chainId,
|
|
15882
|
+
ethValue
|
|
15883
|
+
}) => {
|
|
15884
|
+
const hook = buySupplyWithSwapRouterHookAddress[chainId];
|
|
15885
|
+
const callToSwapRouter = encodeFunctionData({
|
|
15886
|
+
abi: uniswapV3SwapRouterABI,
|
|
15887
|
+
functionName: "exactInput",
|
|
15888
|
+
args: [
|
|
15889
|
+
{
|
|
15890
|
+
recipient: hook,
|
|
15891
|
+
...exactInputParams
|
|
15892
|
+
}
|
|
15893
|
+
]
|
|
15894
|
+
});
|
|
15895
|
+
return {
|
|
15896
|
+
hook,
|
|
15897
|
+
hookData: encodeBuySupplyWithSwapRouterHookCalldata(
|
|
15898
|
+
buyRecipient,
|
|
15899
|
+
callToSwapRouter
|
|
15900
|
+
),
|
|
15901
|
+
value: ethValue
|
|
15902
|
+
};
|
|
15903
|
+
};
|
|
15904
|
+
var decodeBuySupplyWithSwapRouterHookReturn = (returnData) => {
|
|
15905
|
+
const result = decodeAbiParameters(
|
|
15906
|
+
buySupplyWithSwapRouterHookReturnParameters,
|
|
15907
|
+
returnData
|
|
15908
|
+
);
|
|
15909
|
+
return {
|
|
15910
|
+
amountCurrency: result[0],
|
|
15911
|
+
coinsPurchased: result[1]
|
|
15912
|
+
};
|
|
15913
|
+
};
|
|
15713
15914
|
|
|
15714
15915
|
// src/generated/1155.ts
|
|
15715
15916
|
var __exports = {};
|
|
@@ -16107,6 +16308,11 @@ var addresses2 = {
|
|
|
16107
16308
|
};
|
|
16108
16309
|
export {
|
|
16109
16310
|
PremintConfigVersion,
|
|
16311
|
+
buySupplyWithSwapRouterHookABI,
|
|
16312
|
+
buySupplyWithSwapRouterHookAbiParameters,
|
|
16313
|
+
buySupplyWithSwapRouterHookAddress,
|
|
16314
|
+
buySupplyWithSwapRouterHookConfig,
|
|
16315
|
+
buySupplyWithSwapRouterHookReturnParameters,
|
|
16110
16316
|
callerAndCommenterABI,
|
|
16111
16317
|
callerAndCommenterAddress,
|
|
16112
16318
|
callerAndCommenterConfig,
|
|
@@ -16122,7 +16328,11 @@ export {
|
|
|
16122
16328
|
commentsAddress,
|
|
16123
16329
|
commentsConfig,
|
|
16124
16330
|
__exports as contracts1155,
|
|
16331
|
+
decodeBuySupplyWithSwapRouterHookReturn,
|
|
16125
16332
|
emptyCommentIdentifier,
|
|
16333
|
+
encodeBuySupplyWithMultiHopSwapRouterHookCall,
|
|
16334
|
+
encodeBuySupplyWithSingleHopSwapRouterHookCall,
|
|
16335
|
+
encodeBuySupplyWithSwapRouterHookCalldata,
|
|
16126
16336
|
encodePremintConfig,
|
|
16127
16337
|
erc20MinterABI,
|
|
16128
16338
|
erc20MinterAddress,
|