@flaunch/sdk 0.8.1 → 0.8.2
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/README.md +36 -0
- package/dist/abi/TokenImporter.d.ts +288 -0
- package/dist/abi/TokenImporter.d.ts.map +1 -0
- package/dist/addresses/index.cjs +35 -6
- package/dist/addresses/index.cjs.map +1 -1
- package/dist/addresses/index.js +30 -7
- package/dist/addresses/index.js.map +1 -1
- package/dist/addresses.d.ts +8 -0
- package/dist/addresses.d.ts.map +1 -1
- package/dist/clients/FlaunchZapClient.d.ts +7 -2
- package/dist/clients/FlaunchZapClient.d.ts.map +1 -1
- package/dist/clients/TokenImporter.d.ts +41 -0
- package/dist/clients/TokenImporter.d.ts.map +1 -0
- package/dist/index.cjs.js +451 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +440 -24
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/sdk/FlaunchSDK.d.ts +27 -1
- package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +6 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./addresses";
|
|
|
4
4
|
export * from "./helpers";
|
|
5
5
|
export * from "./utils/univ4";
|
|
6
6
|
export * from "./utils/parseSwap";
|
|
7
|
+
export * from "./utils/universalRouter";
|
|
7
8
|
export * from "./types";
|
|
8
9
|
export type { BuySwapLog, SellSwapLog, BaseSwapLog, PoolCreatedLogs, PoolSwapLog, } from "./clients/FlaunchPositionManagerClient";
|
|
9
10
|
export { ReadFlaunchSDK, ReadWriteFlaunchSDK };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AAExB,YAAY,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,eAAe,EACf,WAAW,GACZ,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,UAAU;;;CAGtB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AAExB,YAAY,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,eAAe,EACf,WAAW,GACZ,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,UAAU;;;CAGtB,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -5317,10 +5317,35 @@ const FlaunchPositionManagerV1_1Address = {
|
|
|
5317
5317
|
[baseSepolia.id]: "0x24347e0dd16357059abfc1b321df354873552fdc",
|
|
5318
5318
|
};
|
|
5319
5319
|
const AnyPositionManagerAddress = {
|
|
5320
|
-
|
|
5321
|
-
[base.id]: zeroAddress,
|
|
5320
|
+
[base.id]: "0x8DC3b85e1dc1C846ebf3971179a751896842e5dC",
|
|
5322
5321
|
[baseSepolia.id]: "0xB4A535B9D35851972736495CC52FBfDaCF32e5dc",
|
|
5323
5322
|
};
|
|
5323
|
+
/** Verifiers */
|
|
5324
|
+
const TokenImporterAddress = {
|
|
5325
|
+
[base.id]: "0xb47af90ae61bc916ea4b4bacffae4570e7435842",
|
|
5326
|
+
[baseSepolia.id]: "0xb4955a396ef07c124a59164c30d63e96a103a98b",
|
|
5327
|
+
};
|
|
5328
|
+
const ClankerWorldVerifierAddress = {
|
|
5329
|
+
[base.id]: "0xf6ddfcb093be0cd0c015590cb6c5127d9ff2a20b",
|
|
5330
|
+
[baseSepolia.id]: "0x2874f9a30348acaaad55d74b0bec9c18f04b471a",
|
|
5331
|
+
};
|
|
5332
|
+
const DopplerVerifierAddress = {
|
|
5333
|
+
[base.id]: "0xedd66b080b8e9425c39d349a3fb69f480580f993",
|
|
5334
|
+
[baseSepolia.id]: "0x6428b5C4da36ecB070aBdcB5E1939244A3cC7fb5",
|
|
5335
|
+
};
|
|
5336
|
+
const VirtualsVerifierAddress = {
|
|
5337
|
+
[base.id]: "0x06a089fa231aca48d2aa77365123ad9aca43d3a4",
|
|
5338
|
+
[baseSepolia.id]: "0x6582d2bc6a7eba3b40bdf46b3868fc7ec2ff96ec",
|
|
5339
|
+
};
|
|
5340
|
+
const WhitelistVerifierAddress = {
|
|
5341
|
+
[base.id]: "0x7a04367563a65db574d6b7d084fdbcf4a570c5a6",
|
|
5342
|
+
[baseSepolia.id]: "0xfde5b79e3e2814edd5f91e8694ae400954d9cfaa",
|
|
5343
|
+
};
|
|
5344
|
+
const ZoraVerifierAddress = {
|
|
5345
|
+
[base.id]: "0x656047fd43d2c3a121f2ef859d7171d7dd59f8b9",
|
|
5346
|
+
[baseSepolia.id]: "0x05a5763e9199b88bb591c6b112d0424b2cd7a99e",
|
|
5347
|
+
};
|
|
5348
|
+
/** ======== */
|
|
5324
5349
|
const FeeEscrowAddress = {
|
|
5325
5350
|
[base.id]: "0x72e6f7948b1B1A343B477F39aAbd2E35E6D27dde",
|
|
5326
5351
|
[baseSepolia.id]: "0x73E27908b7d35A9251a54799A8ef4C17e4ED9FF9",
|
|
@@ -5356,8 +5381,7 @@ const FlaunchV1_1Address = {
|
|
|
5356
5381
|
[baseSepolia.id]: "0x96be8ff5e244294a34bfa507a39190dc7a839baa",
|
|
5357
5382
|
};
|
|
5358
5383
|
const AnyFlaunchAddress = {
|
|
5359
|
-
|
|
5360
|
-
[base.id]: zeroAddress,
|
|
5384
|
+
[base.id]: "0xc5B2E8F197407263F4B62a35C71bFc394ecF95D5",
|
|
5361
5385
|
[baseSepolia.id]: "0x67Ee6C83956a75f67bD3Fc8Ca4080D95a145c7C9",
|
|
5362
5386
|
};
|
|
5363
5387
|
const BidWallAddress = {
|
|
@@ -5370,8 +5394,7 @@ const BidWallV1_1Address = {
|
|
|
5370
5394
|
[baseSepolia.id]: "0x6f2fa01a05ff8b6efbfefd91a3b85aaf19265a00",
|
|
5371
5395
|
};
|
|
5372
5396
|
const AnyBidWallAddress = {
|
|
5373
|
-
|
|
5374
|
-
[base.id]: zeroAddress,
|
|
5397
|
+
[base.id]: "0x2154c604df568A5285284D1c4918DC98C39240df",
|
|
5375
5398
|
[baseSepolia.id]: "0xcfF222eA42E43F46A98755db237E4c9C2CA9B772",
|
|
5376
5399
|
};
|
|
5377
5400
|
const FastFlaunchZapAddress = {
|
|
@@ -12931,6 +12954,17 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
12931
12954
|
initialPriceParams,
|
|
12932
12955
|
slippagePercent: 5,
|
|
12933
12956
|
});
|
|
12957
|
+
const _treasuryManagerParams = params.treasuryManagerParams
|
|
12958
|
+
? {
|
|
12959
|
+
manager: params.treasuryManagerParams.manager ?? zeroAddress,
|
|
12960
|
+
initializeData: params.treasuryManagerParams.initializeData ?? "0x",
|
|
12961
|
+
depositData: params.treasuryManagerParams.depositData ?? "0x",
|
|
12962
|
+
}
|
|
12963
|
+
: {
|
|
12964
|
+
manager: zeroAddress,
|
|
12965
|
+
initializeData: "0x",
|
|
12966
|
+
depositData: "0x",
|
|
12967
|
+
};
|
|
12934
12968
|
return this.contract.write("flaunch", {
|
|
12935
12969
|
_flaunchParams: {
|
|
12936
12970
|
name: params.name,
|
|
@@ -12945,11 +12979,7 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
12945
12979
|
initialPriceParams,
|
|
12946
12980
|
feeCalculatorParams: "0x",
|
|
12947
12981
|
},
|
|
12948
|
-
_treasuryManagerParams
|
|
12949
|
-
manager: zeroAddress,
|
|
12950
|
-
initializeData: "0x",
|
|
12951
|
-
depositData: "0x",
|
|
12952
|
-
},
|
|
12982
|
+
_treasuryManagerParams,
|
|
12953
12983
|
_whitelistParams: {
|
|
12954
12984
|
merkleRoot: zeroHash,
|
|
12955
12985
|
merkleIPFSHash: "",
|
|
@@ -17107,6 +17137,382 @@ class ReadWriteAnyPositionManager extends ReadAnyPositionManager {
|
|
|
17107
17137
|
}
|
|
17108
17138
|
}
|
|
17109
17139
|
|
|
17140
|
+
const TokenImporterAbi = [
|
|
17141
|
+
{
|
|
17142
|
+
type: "constructor",
|
|
17143
|
+
inputs: [
|
|
17144
|
+
{
|
|
17145
|
+
name: "_anyPositionManager",
|
|
17146
|
+
type: "address",
|
|
17147
|
+
internalType: "address payable",
|
|
17148
|
+
},
|
|
17149
|
+
],
|
|
17150
|
+
stateMutability: "nonpayable",
|
|
17151
|
+
},
|
|
17152
|
+
{
|
|
17153
|
+
type: "function",
|
|
17154
|
+
name: "addVerifier",
|
|
17155
|
+
inputs: [{ name: "_verifier", type: "address", internalType: "address" }],
|
|
17156
|
+
outputs: [],
|
|
17157
|
+
stateMutability: "nonpayable",
|
|
17158
|
+
},
|
|
17159
|
+
{
|
|
17160
|
+
type: "function",
|
|
17161
|
+
name: "anyPositionManager",
|
|
17162
|
+
inputs: [],
|
|
17163
|
+
outputs: [
|
|
17164
|
+
{
|
|
17165
|
+
name: "",
|
|
17166
|
+
type: "address",
|
|
17167
|
+
internalType: "contract AnyPositionManager",
|
|
17168
|
+
},
|
|
17169
|
+
],
|
|
17170
|
+
stateMutability: "view",
|
|
17171
|
+
},
|
|
17172
|
+
{
|
|
17173
|
+
type: "function",
|
|
17174
|
+
name: "cancelOwnershipHandover",
|
|
17175
|
+
inputs: [],
|
|
17176
|
+
outputs: [],
|
|
17177
|
+
stateMutability: "payable",
|
|
17178
|
+
},
|
|
17179
|
+
{
|
|
17180
|
+
type: "function",
|
|
17181
|
+
name: "completeOwnershipHandover",
|
|
17182
|
+
inputs: [
|
|
17183
|
+
{ name: "pendingOwner", type: "address", internalType: "address" },
|
|
17184
|
+
],
|
|
17185
|
+
outputs: [],
|
|
17186
|
+
stateMutability: "payable",
|
|
17187
|
+
},
|
|
17188
|
+
{
|
|
17189
|
+
type: "function",
|
|
17190
|
+
name: "getAllVerifiers",
|
|
17191
|
+
inputs: [],
|
|
17192
|
+
outputs: [
|
|
17193
|
+
{
|
|
17194
|
+
name: "verifiers_",
|
|
17195
|
+
type: "address[]",
|
|
17196
|
+
internalType: "address[]",
|
|
17197
|
+
},
|
|
17198
|
+
],
|
|
17199
|
+
stateMutability: "view",
|
|
17200
|
+
},
|
|
17201
|
+
{
|
|
17202
|
+
type: "function",
|
|
17203
|
+
name: "initialize",
|
|
17204
|
+
inputs: [
|
|
17205
|
+
{ name: "_memecoin", type: "address", internalType: "address" },
|
|
17206
|
+
{
|
|
17207
|
+
name: "_creatorFeeAllocation",
|
|
17208
|
+
type: "uint24",
|
|
17209
|
+
internalType: "uint24",
|
|
17210
|
+
},
|
|
17211
|
+
{
|
|
17212
|
+
name: "_initialMarketCap",
|
|
17213
|
+
type: "uint256",
|
|
17214
|
+
internalType: "uint256",
|
|
17215
|
+
},
|
|
17216
|
+
{ name: "_verifier", type: "address", internalType: "address" },
|
|
17217
|
+
],
|
|
17218
|
+
outputs: [],
|
|
17219
|
+
stateMutability: "nonpayable",
|
|
17220
|
+
},
|
|
17221
|
+
{
|
|
17222
|
+
type: "function",
|
|
17223
|
+
name: "initialize",
|
|
17224
|
+
inputs: [
|
|
17225
|
+
{ name: "_memecoin", type: "address", internalType: "address" },
|
|
17226
|
+
{
|
|
17227
|
+
name: "_creatorFeeAllocation",
|
|
17228
|
+
type: "uint24",
|
|
17229
|
+
internalType: "uint24",
|
|
17230
|
+
},
|
|
17231
|
+
{
|
|
17232
|
+
name: "_initialMarketCap",
|
|
17233
|
+
type: "uint256",
|
|
17234
|
+
internalType: "uint256",
|
|
17235
|
+
},
|
|
17236
|
+
],
|
|
17237
|
+
outputs: [],
|
|
17238
|
+
stateMutability: "nonpayable",
|
|
17239
|
+
},
|
|
17240
|
+
{
|
|
17241
|
+
type: "function",
|
|
17242
|
+
name: "owner",
|
|
17243
|
+
inputs: [],
|
|
17244
|
+
outputs: [{ name: "result", type: "address", internalType: "address" }],
|
|
17245
|
+
stateMutability: "view",
|
|
17246
|
+
},
|
|
17247
|
+
{
|
|
17248
|
+
type: "function",
|
|
17249
|
+
name: "ownershipHandoverExpiresAt",
|
|
17250
|
+
inputs: [
|
|
17251
|
+
{ name: "pendingOwner", type: "address", internalType: "address" },
|
|
17252
|
+
],
|
|
17253
|
+
outputs: [{ name: "result", type: "uint256", internalType: "uint256" }],
|
|
17254
|
+
stateMutability: "view",
|
|
17255
|
+
},
|
|
17256
|
+
{
|
|
17257
|
+
type: "function",
|
|
17258
|
+
name: "removeVerifier",
|
|
17259
|
+
inputs: [{ name: "_verifier", type: "address", internalType: "address" }],
|
|
17260
|
+
outputs: [],
|
|
17261
|
+
stateMutability: "nonpayable",
|
|
17262
|
+
},
|
|
17263
|
+
{
|
|
17264
|
+
type: "function",
|
|
17265
|
+
name: "renounceOwnership",
|
|
17266
|
+
inputs: [],
|
|
17267
|
+
outputs: [],
|
|
17268
|
+
stateMutability: "payable",
|
|
17269
|
+
},
|
|
17270
|
+
{
|
|
17271
|
+
type: "function",
|
|
17272
|
+
name: "requestOwnershipHandover",
|
|
17273
|
+
inputs: [],
|
|
17274
|
+
outputs: [],
|
|
17275
|
+
stateMutability: "payable",
|
|
17276
|
+
},
|
|
17277
|
+
{
|
|
17278
|
+
type: "function",
|
|
17279
|
+
name: "setAnyPositionManager",
|
|
17280
|
+
inputs: [
|
|
17281
|
+
{
|
|
17282
|
+
name: "_anyPositionManager",
|
|
17283
|
+
type: "address",
|
|
17284
|
+
internalType: "address payable",
|
|
17285
|
+
},
|
|
17286
|
+
],
|
|
17287
|
+
outputs: [],
|
|
17288
|
+
stateMutability: "nonpayable",
|
|
17289
|
+
},
|
|
17290
|
+
{
|
|
17291
|
+
type: "function",
|
|
17292
|
+
name: "transferOwnership",
|
|
17293
|
+
inputs: [{ name: "newOwner", type: "address", internalType: "address" }],
|
|
17294
|
+
outputs: [],
|
|
17295
|
+
stateMutability: "payable",
|
|
17296
|
+
},
|
|
17297
|
+
{
|
|
17298
|
+
type: "function",
|
|
17299
|
+
name: "verifyMemecoin",
|
|
17300
|
+
inputs: [{ name: "_memecoin", type: "address", internalType: "address" }],
|
|
17301
|
+
outputs: [{ name: "verifier_", type: "address", internalType: "address" }],
|
|
17302
|
+
stateMutability: "view",
|
|
17303
|
+
},
|
|
17304
|
+
{
|
|
17305
|
+
type: "event",
|
|
17306
|
+
name: "AnyPositionManagerSet",
|
|
17307
|
+
inputs: [
|
|
17308
|
+
{
|
|
17309
|
+
name: "_anyPositionManager",
|
|
17310
|
+
type: "address",
|
|
17311
|
+
indexed: true,
|
|
17312
|
+
internalType: "address",
|
|
17313
|
+
},
|
|
17314
|
+
],
|
|
17315
|
+
anonymous: false,
|
|
17316
|
+
},
|
|
17317
|
+
{
|
|
17318
|
+
type: "event",
|
|
17319
|
+
name: "OwnershipHandoverCanceled",
|
|
17320
|
+
inputs: [
|
|
17321
|
+
{
|
|
17322
|
+
name: "pendingOwner",
|
|
17323
|
+
type: "address",
|
|
17324
|
+
indexed: true,
|
|
17325
|
+
internalType: "address",
|
|
17326
|
+
},
|
|
17327
|
+
],
|
|
17328
|
+
anonymous: false,
|
|
17329
|
+
},
|
|
17330
|
+
{
|
|
17331
|
+
type: "event",
|
|
17332
|
+
name: "OwnershipHandoverRequested",
|
|
17333
|
+
inputs: [
|
|
17334
|
+
{
|
|
17335
|
+
name: "pendingOwner",
|
|
17336
|
+
type: "address",
|
|
17337
|
+
indexed: true,
|
|
17338
|
+
internalType: "address",
|
|
17339
|
+
},
|
|
17340
|
+
],
|
|
17341
|
+
anonymous: false,
|
|
17342
|
+
},
|
|
17343
|
+
{
|
|
17344
|
+
type: "event",
|
|
17345
|
+
name: "OwnershipTransferred",
|
|
17346
|
+
inputs: [
|
|
17347
|
+
{
|
|
17348
|
+
name: "oldOwner",
|
|
17349
|
+
type: "address",
|
|
17350
|
+
indexed: true,
|
|
17351
|
+
internalType: "address",
|
|
17352
|
+
},
|
|
17353
|
+
{
|
|
17354
|
+
name: "newOwner",
|
|
17355
|
+
type: "address",
|
|
17356
|
+
indexed: true,
|
|
17357
|
+
internalType: "address",
|
|
17358
|
+
},
|
|
17359
|
+
],
|
|
17360
|
+
anonymous: false,
|
|
17361
|
+
},
|
|
17362
|
+
{
|
|
17363
|
+
type: "event",
|
|
17364
|
+
name: "TokenImported",
|
|
17365
|
+
inputs: [
|
|
17366
|
+
{
|
|
17367
|
+
name: "_memecoin",
|
|
17368
|
+
type: "address",
|
|
17369
|
+
indexed: true,
|
|
17370
|
+
internalType: "address",
|
|
17371
|
+
},
|
|
17372
|
+
{
|
|
17373
|
+
name: "_verifier",
|
|
17374
|
+
type: "address",
|
|
17375
|
+
indexed: true,
|
|
17376
|
+
internalType: "address",
|
|
17377
|
+
},
|
|
17378
|
+
],
|
|
17379
|
+
anonymous: false,
|
|
17380
|
+
},
|
|
17381
|
+
{
|
|
17382
|
+
type: "event",
|
|
17383
|
+
name: "VerifierAdded",
|
|
17384
|
+
inputs: [
|
|
17385
|
+
{
|
|
17386
|
+
name: "_verifier",
|
|
17387
|
+
type: "address",
|
|
17388
|
+
indexed: true,
|
|
17389
|
+
internalType: "address",
|
|
17390
|
+
},
|
|
17391
|
+
],
|
|
17392
|
+
anonymous: false,
|
|
17393
|
+
},
|
|
17394
|
+
{
|
|
17395
|
+
type: "event",
|
|
17396
|
+
name: "VerifierRemoved",
|
|
17397
|
+
inputs: [
|
|
17398
|
+
{
|
|
17399
|
+
name: "_verifier",
|
|
17400
|
+
type: "address",
|
|
17401
|
+
indexed: true,
|
|
17402
|
+
internalType: "address",
|
|
17403
|
+
},
|
|
17404
|
+
],
|
|
17405
|
+
anonymous: false,
|
|
17406
|
+
},
|
|
17407
|
+
{ type: "error", name: "AlreadyInitialized", inputs: [] },
|
|
17408
|
+
{ type: "error", name: "InvalidMemecoin", inputs: [] },
|
|
17409
|
+
{ type: "error", name: "NewOwnerIsZeroAddress", inputs: [] },
|
|
17410
|
+
{ type: "error", name: "NoHandoverRequest", inputs: [] },
|
|
17411
|
+
{ type: "error", name: "Unauthorized", inputs: [] },
|
|
17412
|
+
{ type: "error", name: "VerifierAlreadyAdded", inputs: [] },
|
|
17413
|
+
{ type: "error", name: "VerifierNotAdded", inputs: [] },
|
|
17414
|
+
{ type: "error", name: "ZeroAddress", inputs: [] },
|
|
17415
|
+
];
|
|
17416
|
+
|
|
17417
|
+
/**
|
|
17418
|
+
* Enumeration of Flaunch contract versions
|
|
17419
|
+
*/
|
|
17420
|
+
var FlaunchVersion;
|
|
17421
|
+
(function (FlaunchVersion) {
|
|
17422
|
+
FlaunchVersion["V1"] = "V1";
|
|
17423
|
+
FlaunchVersion["V1_1"] = "V1_1";
|
|
17424
|
+
FlaunchVersion["V1_1_1"] = "V1_1_1";
|
|
17425
|
+
FlaunchVersion["ANY"] = "ANY";
|
|
17426
|
+
})(FlaunchVersion || (FlaunchVersion = {}));
|
|
17427
|
+
/**
|
|
17428
|
+
* Enumeration of Verifiers for TokenImporter
|
|
17429
|
+
*/
|
|
17430
|
+
var Verifier;
|
|
17431
|
+
(function (Verifier) {
|
|
17432
|
+
Verifier["CLANKER"] = "clanker";
|
|
17433
|
+
Verifier["DOPPLER"] = "doppler";
|
|
17434
|
+
Verifier["VIRTUALS"] = "virtuals";
|
|
17435
|
+
Verifier["WHITELIST"] = "whitelist";
|
|
17436
|
+
Verifier["ZORA"] = "zora";
|
|
17437
|
+
})(Verifier || (Verifier = {}));
|
|
17438
|
+
|
|
17439
|
+
/**
|
|
17440
|
+
* Base client for interacting with the TokenImporter contract in read-only mode
|
|
17441
|
+
* Provides basic contract initialization
|
|
17442
|
+
*/
|
|
17443
|
+
class ReadTokenImporter {
|
|
17444
|
+
constructor(chainId, address, drift = createDrift$1()) {
|
|
17445
|
+
this.chainId = chainId;
|
|
17446
|
+
this.drift = drift;
|
|
17447
|
+
this.contract = drift.contract({
|
|
17448
|
+
abi: TokenImporterAbi,
|
|
17449
|
+
address,
|
|
17450
|
+
});
|
|
17451
|
+
}
|
|
17452
|
+
/**
|
|
17453
|
+
* Verifies if a memecoin is valid for importing
|
|
17454
|
+
* @param memecoin - The address of the memecoin to import
|
|
17455
|
+
* @returns Promise<{ isValid: boolean; verifier: Address }> - The result of the verification
|
|
17456
|
+
*/
|
|
17457
|
+
async verifyMemecoin(memecoin) {
|
|
17458
|
+
const verifier = await this.contract.read("verifyMemecoin", {
|
|
17459
|
+
_memecoin: memecoin,
|
|
17460
|
+
});
|
|
17461
|
+
return {
|
|
17462
|
+
isValid: verifier !== zeroAddress,
|
|
17463
|
+
verifier,
|
|
17464
|
+
};
|
|
17465
|
+
}
|
|
17466
|
+
/**
|
|
17467
|
+
* Returns the address of a verifier
|
|
17468
|
+
*/
|
|
17469
|
+
verifierAddress(verifier) {
|
|
17470
|
+
switch (verifier) {
|
|
17471
|
+
case Verifier.CLANKER:
|
|
17472
|
+
return ClankerWorldVerifierAddress[this.chainId];
|
|
17473
|
+
case Verifier.DOPPLER:
|
|
17474
|
+
return DopplerVerifierAddress[this.chainId];
|
|
17475
|
+
case Verifier.VIRTUALS:
|
|
17476
|
+
return VirtualsVerifierAddress[this.chainId];
|
|
17477
|
+
case Verifier.WHITELIST:
|
|
17478
|
+
return WhitelistVerifierAddress[this.chainId];
|
|
17479
|
+
case Verifier.ZORA:
|
|
17480
|
+
return ZoraVerifierAddress[this.chainId];
|
|
17481
|
+
default:
|
|
17482
|
+
throw new Error(`Unknown verifier: ${verifier}`);
|
|
17483
|
+
}
|
|
17484
|
+
}
|
|
17485
|
+
}
|
|
17486
|
+
/**
|
|
17487
|
+
* Extended client for interacting with the TokenImporter contract with write capabilities
|
|
17488
|
+
*/
|
|
17489
|
+
class ReadWriteTokenImporter extends ReadTokenImporter {
|
|
17490
|
+
constructor(chainId, address, drift = createDrift$1()) {
|
|
17491
|
+
super(chainId, address, drift);
|
|
17492
|
+
}
|
|
17493
|
+
initialize({ memecoin, creatorFeeAllocationPercent, initialMarketCapUSD, verifier, }) {
|
|
17494
|
+
const initialMCapInUSDCWei = parseUnits(initialMarketCapUSD.toString(), 6);
|
|
17495
|
+
const creatorFeeAllocationInBps = creatorFeeAllocationPercent * 100;
|
|
17496
|
+
// if the verifier is known then use that to save on gas
|
|
17497
|
+
if (verifier) {
|
|
17498
|
+
const verifierAddress = this.verifierAddress(verifier);
|
|
17499
|
+
return this.contract.write("initialize", {
|
|
17500
|
+
_memecoin: memecoin,
|
|
17501
|
+
_creatorFeeAllocation: creatorFeeAllocationInBps,
|
|
17502
|
+
_initialMarketCap: initialMCapInUSDCWei,
|
|
17503
|
+
_verifier: verifierAddress,
|
|
17504
|
+
});
|
|
17505
|
+
}
|
|
17506
|
+
else {
|
|
17507
|
+
return this.contract.write("initialize", {
|
|
17508
|
+
_memecoin: memecoin,
|
|
17509
|
+
_creatorFeeAllocation: creatorFeeAllocationInBps,
|
|
17510
|
+
_initialMarketCap: initialMCapInUSDCWei,
|
|
17511
|
+
});
|
|
17512
|
+
}
|
|
17513
|
+
}
|
|
17514
|
+
}
|
|
17515
|
+
|
|
17110
17516
|
const FeeEscrowAbi = [
|
|
17111
17517
|
{
|
|
17112
17518
|
inputs: [
|
|
@@ -21000,17 +21406,6 @@ class ReadWriteRevenueManager extends ReadRevenueManager {
|
|
|
21000
21406
|
}
|
|
21001
21407
|
}
|
|
21002
21408
|
|
|
21003
|
-
/**
|
|
21004
|
-
* Enumeration of Flaunch contract versions
|
|
21005
|
-
*/
|
|
21006
|
-
var FlaunchVersion;
|
|
21007
|
-
(function (FlaunchVersion) {
|
|
21008
|
-
FlaunchVersion["V1"] = "V1";
|
|
21009
|
-
FlaunchVersion["V1_1"] = "V1_1";
|
|
21010
|
-
FlaunchVersion["V1_1_1"] = "V1_1_1";
|
|
21011
|
-
FlaunchVersion["ANY"] = "ANY";
|
|
21012
|
-
})(FlaunchVersion || (FlaunchVersion = {}));
|
|
21013
|
-
|
|
21014
21409
|
// our min/max tick range that is valid for the tick spacing (60)
|
|
21015
21410
|
const TickFinder = {
|
|
21016
21411
|
MIN_TICK: -887220,
|
|
@@ -21182,6 +21577,7 @@ class ReadFlaunchSDK {
|
|
|
21182
21577
|
this.readPositionManager = new ReadFlaunchPositionManager(FlaunchPositionManagerAddress[this.chainId], drift);
|
|
21183
21578
|
this.readPositionManagerV1_1 = new ReadFlaunchPositionManagerV1_1(FlaunchPositionManagerV1_1Address[this.chainId], drift);
|
|
21184
21579
|
this.readAnyPositionManager = new ReadAnyPositionManager(AnyPositionManagerAddress[this.chainId], drift);
|
|
21580
|
+
this.readTokenImporter = new ReadTokenImporter(this.chainId, TokenImporterAddress[this.chainId], drift);
|
|
21185
21581
|
this.readFeeEscrow = new ReadFeeEscrow(FeeEscrowAddress[this.chainId], drift);
|
|
21186
21582
|
this.readReferralEscrow = new ReadReferralEscrow(ReferralEscrowAddress[this.chainId], drift);
|
|
21187
21583
|
this.readFlaunchZap = new ReadFlaunchZap(this.chainId, FlaunchZapAddress[this.chainId], drift);
|
|
@@ -21224,7 +21620,7 @@ class ReadFlaunchSDK {
|
|
|
21224
21620
|
}
|
|
21225
21621
|
throw new Error(`Unknown coin version for address: ${coinAddress}`);
|
|
21226
21622
|
}
|
|
21227
|
-
// TODO: update these get functions to support V1.1.1
|
|
21623
|
+
// TODO: update these get functions to support V1.1.1
|
|
21228
21624
|
/**
|
|
21229
21625
|
* Gets the position manager address for a given version
|
|
21230
21626
|
* @param version - The version to get the position manager address for
|
|
@@ -21919,6 +22315,14 @@ class ReadFlaunchSDK {
|
|
|
21919
22315
|
const positionManager = this.getPositionManager(params.version);
|
|
21920
22316
|
return positionManager.parseSwapTx(params.txHash, params.flETHIsCurrencyZero);
|
|
21921
22317
|
}
|
|
22318
|
+
/**
|
|
22319
|
+
* Verifies if a memecoin is valid for importing
|
|
22320
|
+
* @param memecoin - The address of the memecoin to import
|
|
22321
|
+
* @returns Promise<{ isValid: boolean; verifier: Address }> - The result of the verification
|
|
22322
|
+
*/
|
|
22323
|
+
tokenImporterVerifyMemecoin(memecoin) {
|
|
22324
|
+
return this.readTokenImporter.verifyMemecoin(memecoin);
|
|
22325
|
+
}
|
|
21922
22326
|
}
|
|
21923
22327
|
class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
|
|
21924
22328
|
constructor(chainId, drift = createDrift$1()) {
|
|
@@ -21926,6 +22330,7 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
|
|
|
21926
22330
|
this.readWritePositionManager = new ReadWriteFlaunchPositionManager(FlaunchPositionManagerAddress[this.chainId], drift);
|
|
21927
22331
|
this.readWritePositionManagerV1_1 = new ReadWriteFlaunchPositionManagerV1_1(FlaunchPositionManagerV1_1Address[this.chainId], drift);
|
|
21928
22332
|
this.readWriteAnyPositionManager = new ReadWriteAnyPositionManager(AnyPositionManagerAddress[this.chainId], drift);
|
|
22333
|
+
this.readWriteTokenImporter = new ReadWriteTokenImporter(this.chainId, TokenImporterAddress[this.chainId], drift);
|
|
21929
22334
|
this.readWriteFeeEscrow = new ReadWriteFeeEscrow(FeeEscrowAddress[this.chainId], drift);
|
|
21930
22335
|
this.readWriteReferralEscrow = new ReadWriteReferralEscrow(ReferralEscrowAddress[this.chainId], drift);
|
|
21931
22336
|
this.readWriteFlaunchZap = new ReadWriteFlaunchZap(this.chainId, FlaunchZapAddress[this.chainId], drift);
|
|
@@ -22216,6 +22621,17 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
|
|
|
22216
22621
|
const readWriteRevenueManager = new ReadWriteRevenueManager(params.revenueManagerAddress, this.drift);
|
|
22217
22622
|
return readWriteRevenueManager.creatorClaimForTokens(params.flaunchTokens);
|
|
22218
22623
|
}
|
|
22624
|
+
/**
|
|
22625
|
+
* Imports a memecoin into the TokenImporter
|
|
22626
|
+
* @param params.memecoin - The address of the memecoin to import
|
|
22627
|
+
* @param params.creatorFeeAllocationPercent - The creator fee allocation percentage
|
|
22628
|
+
* @param params.initialMarketCapUSD - The initial market cap in USD
|
|
22629
|
+
* @param params.verifier - Optional verifier to use for importing the memecoin
|
|
22630
|
+
* @returns Transaction response
|
|
22631
|
+
*/
|
|
22632
|
+
importMemecoin(params) {
|
|
22633
|
+
return this.readWriteTokenImporter.initialize(params);
|
|
22634
|
+
}
|
|
22219
22635
|
}
|
|
22220
22636
|
|
|
22221
22637
|
/**
|
|
@@ -22261,5 +22677,5 @@ const FlaunchSDK = {
|
|
|
22261
22677
|
ReadWriteFlaunchSDK,
|
|
22262
22678
|
};
|
|
22263
22679
|
|
|
22264
|
-
export { AddressFeeSplitManagerAddress, AnyBidWallAddress, AnyFlaunchAddress, AnyPositionManagerAbi, AnyPositionManagerAddress, BidWallAddress, BidWallV1_1Abi, BidWallV1_1Address, BidwallAbi, FLETHAddress, FLETHHooksAddress, FairLaunchAbi, FairLaunchAddress, FairLaunchV1_1Abi, FairLaunchV1_1Address, FastFlaunchZapAbi, FastFlaunchZapAddress, FeeEscrowAbi, FeeEscrowAddress, FlaunchAbi, FlaunchAddress, FlaunchPositionManagerAbi, FlaunchPositionManagerAddress, FlaunchPositionManagerV1_1Abi, FlaunchPositionManagerV1_1Address, FlaunchSDK, FlaunchV1_1Abi, FlaunchV1_1Address, FlaunchVersion, FlaunchZapAbi, FlaunchZapAddress, InitialPriceAbi, MemecoinAbi, MulticallAbi, Permit2Abi, Permit2Address, PoolManagerAbi, PoolManagerAddress, QuoterAbi, QuoterAddress, ReadFlaunchSDK, ReadWriteFlaunchSDK, ReferralEscrowAbi, ReferralEscrowAddress, RevenueManagerAbi, RevenueManagerAddress, StateViewAbi, StateViewAddress, TICK_SPACING, TickFinder, TreasuryManagerFactoryAbi, TreasuryManagerFactoryAddress, USDCETHPoolKeys, UniversalRouterAbi, UniversalRouterAddress, bytes32ToUint256, calculateUnderlyingTokenBalances, chainIdToChain, createDrift, createFlaunch, generateTokenUri, getPoolId, getSqrtPriceX96FromTick, getValidTick, orderPoolKey, parseSwapData, resolveIPFS, uint256ToBytes32, uploadFileToIPFS, uploadImageToIPFS, uploadJsonToIPFS };
|
|
22680
|
+
export { AddressFeeSplitManagerAddress, AnyBidWallAddress, AnyFlaunchAddress, AnyPositionManagerAbi, AnyPositionManagerAddress, BidWallAddress, BidWallV1_1Abi, BidWallV1_1Address, BidwallAbi, ClankerWorldVerifierAddress, DopplerVerifierAddress, FLETHAddress, FLETHHooksAddress, FairLaunchAbi, FairLaunchAddress, FairLaunchV1_1Abi, FairLaunchV1_1Address, FastFlaunchZapAbi, FastFlaunchZapAddress, FeeEscrowAbi, FeeEscrowAddress, FlaunchAbi, FlaunchAddress, FlaunchPositionManagerAbi, FlaunchPositionManagerAddress, FlaunchPositionManagerV1_1Abi, FlaunchPositionManagerV1_1Address, FlaunchSDK, FlaunchV1_1Abi, FlaunchV1_1Address, FlaunchVersion, FlaunchZapAbi, FlaunchZapAddress, InitialPriceAbi, MemecoinAbi, MulticallAbi, PERMIT_DETAILS, PERMIT_TYPES, Permit2Abi, Permit2Address, PoolManagerAbi, PoolManagerAddress, QuoterAbi, QuoterAddress, ReadFlaunchSDK, ReadWriteFlaunchSDK, ReferralEscrowAbi, ReferralEscrowAddress, RevenueManagerAbi, RevenueManagerAddress, StateViewAbi, StateViewAddress, TICK_SPACING, TickFinder, TokenImporterAddress, TreasuryManagerFactoryAbi, TreasuryManagerFactoryAddress, USDCETHPoolKeys, UniversalRouterAbi, UniversalRouterAddress, Verifier, VirtualsVerifierAddress, WhitelistVerifierAddress, ZoraVerifierAddress, bytes32ToUint256, calculateUnderlyingTokenBalances, chainIdToChain, createDrift, createFlaunch, ethToMemecoin, generateTokenUri, getAmountWithSlippage, getPermit2TypedData, getPoolId, getSqrtPriceX96FromTick, getValidTick, memecoinToEthWithPermit2, orderPoolKey, parseSwapData, resolveIPFS, uint256ToBytes32, uploadFileToIPFS, uploadImageToIPFS, uploadJsonToIPFS };
|
|
22265
22681
|
//# sourceMappingURL=index.esm.js.map
|