@flaunch/sdk 0.8.2 → 0.8.3-beta.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/dist/abi/FlaunchZap.d.ts +131 -101
- package/dist/abi/FlaunchZap.d.ts.map +1 -1
- package/dist/abi/TreasuryManager.d.ts +106 -0
- package/dist/abi/TreasuryManager.d.ts.map +1 -0
- package/dist/abi/TreasuryManagerFactory.d.ts +243 -243
- package/dist/abi/TreasuryManagerFactory.d.ts.map +1 -1
- package/dist/abi/index.cjs +483 -329
- package/dist/abi/index.cjs.map +1 -1
- package/dist/abi/index.js +483 -329
- package/dist/abi/index.js.map +1 -1
- package/dist/addresses/index.cjs +23 -6
- package/dist/addresses/index.cjs.map +1 -1
- package/dist/addresses/index.js +21 -7
- package/dist/addresses/index.js.map +1 -1
- package/dist/addresses.d.ts +6 -1
- package/dist/addresses.d.ts.map +1 -1
- package/dist/clients/FlaunchZapClient.d.ts +44 -1
- package/dist/clients/FlaunchZapClient.d.ts.map +1 -1
- package/dist/clients/TreasuryManagerClient.d.ts +60 -0
- package/dist/clients/TreasuryManagerClient.d.ts.map +1 -0
- package/dist/clients/TreasuryManagerFactoryClient.d.ts +4 -14
- package/dist/clients/TreasuryManagerFactoryClient.d.ts.map +1 -1
- package/dist/helpers/index.cjs +61 -0
- package/dist/helpers/index.cjs.map +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js +62 -2
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/permissions.d.ts +10 -0
- package/dist/helpers/permissions.d.ts.map +1 -0
- package/dist/index.cjs.js +985 -431
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +983 -433
- 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 +71 -6
- package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createDrift as createDrift$1 } from '@delvtech/drift';
|
|
2
|
-
import { zeroAddress, parseEther, encodeAbiParameters, maxUint256 as maxUint256$1, encodeFunctionData, maxUint160, maxUint48, parseUnits, hexToBigInt as hexToBigInt$1, pad as pad$1, keccak256 as keccak256$1, encodePacked, stringToHex as stringToHex$1, zeroHash, formatUnits as formatUnits$1, concat, toHex as toHex$1,
|
|
2
|
+
import { zeroAddress, parseEther, encodeAbiParameters, maxUint256 as maxUint256$1, encodeFunctionData, maxUint160, maxUint48, parseUnits, hexToBigInt as hexToBigInt$1, pad as pad$1, keccak256 as keccak256$1, encodePacked, stringToHex as stringToHex$1, zeroHash, formatUnits as formatUnits$1, createPublicClient, http, concat, toHex as toHex$1, erc721Abi } from 'viem';
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import { TickMath } from '@uniswap/v3-sdk';
|
|
5
5
|
import { viemAdapter } from '@delvtech/drift-viem';
|
|
@@ -5307,7 +5307,7 @@ const sourceId = 5; // goerli
|
|
|
5307
5307
|
testnet: true,
|
|
5308
5308
|
});
|
|
5309
5309
|
|
|
5310
|
-
// doesn't use FeeEscrow
|
|
5310
|
+
// only old V1.0: doesn't use FeeEscrow
|
|
5311
5311
|
const FlaunchPositionManagerAddress = {
|
|
5312
5312
|
[base.id]: "0x51Bba15255406Cfe7099a42183302640ba7dAFDC",
|
|
5313
5313
|
[baseSepolia.id]: "0x9A7059cA00dA92843906Cb4bCa1D005cE848AFdC",
|
|
@@ -5346,6 +5346,16 @@ const ZoraVerifierAddress = {
|
|
|
5346
5346
|
[baseSepolia.id]: "0x05a5763e9199b88bb591c6b112d0424b2cd7a99e",
|
|
5347
5347
|
};
|
|
5348
5348
|
/** ======== */
|
|
5349
|
+
/** Permissions */
|
|
5350
|
+
const ClosedPermissionsAddress = {
|
|
5351
|
+
[base.id]: "0x0000000000000000000000000000000000000000", // TODO: add mainnet address
|
|
5352
|
+
[baseSepolia.id]: "0x551aeD820CAfaca2f9cD1C637AAc076D05a03AC2",
|
|
5353
|
+
};
|
|
5354
|
+
const WhitelistedPermissionsAddress = {
|
|
5355
|
+
[base.id]: "0x0000000000000000000000000000000000000000", // TODO: add mainnet address
|
|
5356
|
+
[baseSepolia.id]: "0xe8691E8f576A98c41EBB5E984207d4F51386621f",
|
|
5357
|
+
};
|
|
5358
|
+
/** =========== */
|
|
5349
5359
|
const FeeEscrowAddress = {
|
|
5350
5360
|
[base.id]: "0x72e6f7948b1B1A343B477F39aAbd2E35E6D27dde",
|
|
5351
5361
|
[baseSepolia.id]: "0x73E27908b7d35A9251a54799A8ef4C17e4ED9FF9",
|
|
@@ -5402,8 +5412,12 @@ const FastFlaunchZapAddress = {
|
|
|
5402
5412
|
[baseSepolia.id]: "0x821d9f6075e7971cc71c379081de9d532f5f9957",
|
|
5403
5413
|
};
|
|
5404
5414
|
const FlaunchZapAddress = {
|
|
5405
|
-
[base.id]: "0xfa9e8528ee95eb109bffd1a2d59cb95b300a672a",
|
|
5406
|
-
[baseSepolia.id]: "
|
|
5415
|
+
[base.id]: "0xfa9e8528ee95eb109bffd1a2d59cb95b300a672a", // TODO: update mainnet address with permissions param
|
|
5416
|
+
[baseSepolia.id]: "0x2871a184410F03F4e2C7C5257d839FB34169496A",
|
|
5417
|
+
};
|
|
5418
|
+
const TreasuryManagerFactoryAddress = {
|
|
5419
|
+
[base.id]: "0x48af8b28DDC5e5A86c4906212fc35Fa808CA8763",
|
|
5420
|
+
[baseSepolia.id]: "0xD2F3C6185e06925dCBE794C6574315b2202E9CcD",
|
|
5407
5421
|
};
|
|
5408
5422
|
const RevenueManagerAddress = {
|
|
5409
5423
|
[base.id]: "0x712fa8ddc7347b4b6b029aa21710f365cd02d898",
|
|
@@ -5413,9 +5427,9 @@ const AddressFeeSplitManagerAddress = {
|
|
|
5413
5427
|
[base.id]: "0x6baa4ec493a9698dc7388c0f290e29ea3d149f99",
|
|
5414
5428
|
[baseSepolia.id]: "0xf72dcdee692c188de6b14c6213e849982e04069b",
|
|
5415
5429
|
};
|
|
5416
|
-
const
|
|
5417
|
-
[base.id]: "
|
|
5418
|
-
[baseSepolia.id]: "
|
|
5430
|
+
const StakingManagerAddress = {
|
|
5431
|
+
[base.id]: "0x0000000000000000000000000000000000000000", // TODO: update mainnet address
|
|
5432
|
+
[baseSepolia.id]: "0x4a59dBAd29981A39BE597081f7f5071843552158",
|
|
5419
5433
|
};
|
|
5420
5434
|
const PoolManagerAddress = {
|
|
5421
5435
|
[base.id]: "0x498581fF718922c3f8e6A244956aF099B2652b2b",
|
|
@@ -10803,253 +10817,425 @@ class AnyBidWall {
|
|
|
10803
10817
|
|
|
10804
10818
|
const FlaunchZapAbi = [
|
|
10805
10819
|
{
|
|
10820
|
+
type: "constructor",
|
|
10806
10821
|
inputs: [
|
|
10807
10822
|
{
|
|
10808
|
-
internalType: "contract PositionManager",
|
|
10809
10823
|
name: "_positionManager",
|
|
10810
10824
|
type: "address",
|
|
10825
|
+
internalType: "contract PositionManager",
|
|
10811
10826
|
},
|
|
10812
10827
|
{
|
|
10813
|
-
internalType: "contract Flaunch",
|
|
10814
10828
|
name: "_flaunchContract",
|
|
10815
10829
|
type: "address",
|
|
10830
|
+
internalType: "contract Flaunch",
|
|
10831
|
+
},
|
|
10832
|
+
{
|
|
10833
|
+
name: "_flETH",
|
|
10834
|
+
type: "address",
|
|
10835
|
+
internalType: "contract IFLETH",
|
|
10836
|
+
},
|
|
10837
|
+
{
|
|
10838
|
+
name: "_poolSwap",
|
|
10839
|
+
type: "address",
|
|
10840
|
+
internalType: "contract PoolSwap",
|
|
10816
10841
|
},
|
|
10817
|
-
{ internalType: "contract IFLETH", name: "_flETH", type: "address" },
|
|
10818
|
-
{ internalType: "contract PoolSwap", name: "_poolSwap", type: "address" },
|
|
10819
10842
|
{
|
|
10820
|
-
internalType: "contract ITreasuryManagerFactory",
|
|
10821
10843
|
name: "_treasuryManagerFactory",
|
|
10822
10844
|
type: "address",
|
|
10845
|
+
internalType: "contract ITreasuryManagerFactory",
|
|
10823
10846
|
},
|
|
10824
10847
|
{
|
|
10825
|
-
internalType: "contract IMerkleAirdrop",
|
|
10826
10848
|
name: "_merkleAirdrop",
|
|
10827
10849
|
type: "address",
|
|
10850
|
+
internalType: "contract IMerkleAirdrop",
|
|
10828
10851
|
},
|
|
10829
10852
|
{
|
|
10830
|
-
internalType: "contract WhitelistFairLaunch",
|
|
10831
10853
|
name: "_whitelistFairLaunch",
|
|
10832
10854
|
type: "address",
|
|
10855
|
+
internalType: "contract WhitelistFairLaunch",
|
|
10833
10856
|
},
|
|
10834
10857
|
],
|
|
10835
10858
|
stateMutability: "nonpayable",
|
|
10836
|
-
type: "constructor",
|
|
10837
10859
|
},
|
|
10838
|
-
{
|
|
10839
|
-
{ inputs: [], name: "InsufficientMemecoinsForAirdrop", type: "error" },
|
|
10860
|
+
{ type: "receive", stateMutability: "payable" },
|
|
10840
10861
|
{
|
|
10862
|
+
type: "function",
|
|
10863
|
+
name: "calculateFee",
|
|
10841
10864
|
inputs: [
|
|
10842
|
-
{
|
|
10843
|
-
|
|
10844
|
-
|
|
10865
|
+
{
|
|
10866
|
+
name: "_premineAmount",
|
|
10867
|
+
type: "uint256",
|
|
10868
|
+
internalType: "uint256",
|
|
10869
|
+
},
|
|
10870
|
+
{ name: "_slippage", type: "uint256", internalType: "uint256" },
|
|
10871
|
+
{
|
|
10872
|
+
name: "_initialPriceParams",
|
|
10873
|
+
type: "bytes",
|
|
10874
|
+
internalType: "bytes",
|
|
10875
|
+
},
|
|
10845
10876
|
],
|
|
10846
|
-
name: "calculateFee",
|
|
10847
10877
|
outputs: [
|
|
10848
|
-
{
|
|
10878
|
+
{ name: "ethRequired_", type: "uint256", internalType: "uint256" },
|
|
10849
10879
|
],
|
|
10850
10880
|
stateMutability: "view",
|
|
10881
|
+
},
|
|
10882
|
+
{
|
|
10851
10883
|
type: "function",
|
|
10884
|
+
name: "deployAndInitializeManager",
|
|
10885
|
+
inputs: [
|
|
10886
|
+
{
|
|
10887
|
+
name: "_managerImplementation",
|
|
10888
|
+
type: "address",
|
|
10889
|
+
internalType: "address",
|
|
10890
|
+
},
|
|
10891
|
+
{ name: "_owner", type: "address", internalType: "address" },
|
|
10892
|
+
{ name: "_data", type: "bytes", internalType: "bytes" },
|
|
10893
|
+
{ name: "_permissions", type: "address", internalType: "address" },
|
|
10894
|
+
],
|
|
10895
|
+
outputs: [
|
|
10896
|
+
{
|
|
10897
|
+
name: "manager_",
|
|
10898
|
+
type: "address",
|
|
10899
|
+
internalType: "address payable",
|
|
10900
|
+
},
|
|
10901
|
+
],
|
|
10902
|
+
stateMutability: "nonpayable",
|
|
10852
10903
|
},
|
|
10853
10904
|
{
|
|
10854
|
-
|
|
10905
|
+
type: "function",
|
|
10855
10906
|
name: "flETH",
|
|
10856
|
-
|
|
10907
|
+
inputs: [],
|
|
10908
|
+
outputs: [{ name: "", type: "address", internalType: "contract IFLETH" }],
|
|
10857
10909
|
stateMutability: "view",
|
|
10858
|
-
type: "function",
|
|
10859
10910
|
},
|
|
10860
10911
|
{
|
|
10912
|
+
type: "function",
|
|
10913
|
+
name: "flaunch",
|
|
10861
10914
|
inputs: [
|
|
10862
10915
|
{
|
|
10916
|
+
name: "_flaunchParams",
|
|
10917
|
+
type: "tuple",
|
|
10918
|
+
internalType: "struct PositionManager.FlaunchParams",
|
|
10863
10919
|
components: [
|
|
10864
|
-
{
|
|
10865
|
-
{
|
|
10866
|
-
{
|
|
10920
|
+
{ name: "name", type: "string", internalType: "string" },
|
|
10921
|
+
{ name: "symbol", type: "string", internalType: "string" },
|
|
10922
|
+
{ name: "tokenUri", type: "string", internalType: "string" },
|
|
10867
10923
|
{
|
|
10868
|
-
internalType: "uint256",
|
|
10869
10924
|
name: "initialTokenFairLaunch",
|
|
10870
10925
|
type: "uint256",
|
|
10926
|
+
internalType: "uint256",
|
|
10871
10927
|
},
|
|
10872
10928
|
{
|
|
10873
|
-
internalType: "uint256",
|
|
10874
10929
|
name: "fairLaunchDuration",
|
|
10875
10930
|
type: "uint256",
|
|
10931
|
+
internalType: "uint256",
|
|
10876
10932
|
},
|
|
10877
|
-
{ internalType: "uint256", name: "premineAmount", type: "uint256" },
|
|
10878
|
-
{ internalType: "address", name: "creator", type: "address" },
|
|
10879
10933
|
{
|
|
10880
|
-
|
|
10934
|
+
name: "premineAmount",
|
|
10935
|
+
type: "uint256",
|
|
10936
|
+
internalType: "uint256",
|
|
10937
|
+
},
|
|
10938
|
+
{ name: "creator", type: "address", internalType: "address" },
|
|
10939
|
+
{
|
|
10881
10940
|
name: "creatorFeeAllocation",
|
|
10882
10941
|
type: "uint24",
|
|
10942
|
+
internalType: "uint24",
|
|
10943
|
+
},
|
|
10944
|
+
{
|
|
10945
|
+
name: "flaunchAt",
|
|
10946
|
+
type: "uint256",
|
|
10947
|
+
internalType: "uint256",
|
|
10948
|
+
},
|
|
10949
|
+
{
|
|
10950
|
+
name: "initialPriceParams",
|
|
10951
|
+
type: "bytes",
|
|
10952
|
+
internalType: "bytes",
|
|
10953
|
+
},
|
|
10954
|
+
{
|
|
10955
|
+
name: "feeCalculatorParams",
|
|
10956
|
+
type: "bytes",
|
|
10957
|
+
internalType: "bytes",
|
|
10883
10958
|
},
|
|
10884
|
-
{ internalType: "uint256", name: "flaunchAt", type: "uint256" },
|
|
10885
|
-
{ internalType: "bytes", name: "initialPriceParams", type: "bytes" },
|
|
10886
|
-
{ internalType: "bytes", name: "feeCalculatorParams", type: "bytes" },
|
|
10887
10959
|
],
|
|
10888
|
-
internalType: "struct PositionManager.FlaunchParams",
|
|
10889
|
-
name: "_flaunchParams",
|
|
10890
|
-
type: "tuple",
|
|
10891
10960
|
},
|
|
10892
10961
|
],
|
|
10893
|
-
name: "flaunch",
|
|
10894
10962
|
outputs: [
|
|
10895
|
-
{
|
|
10896
|
-
{
|
|
10897
|
-
{
|
|
10963
|
+
{ name: "memecoin_", type: "address", internalType: "address" },
|
|
10964
|
+
{ name: "ethSpent_", type: "uint256", internalType: "uint256" },
|
|
10965
|
+
{ name: "", type: "address", internalType: "address" },
|
|
10898
10966
|
],
|
|
10899
10967
|
stateMutability: "payable",
|
|
10900
|
-
type: "function",
|
|
10901
10968
|
},
|
|
10902
10969
|
{
|
|
10970
|
+
type: "function",
|
|
10971
|
+
name: "flaunch",
|
|
10903
10972
|
inputs: [
|
|
10904
10973
|
{
|
|
10974
|
+
name: "_flaunchParams",
|
|
10975
|
+
type: "tuple",
|
|
10976
|
+
internalType: "struct PositionManager.FlaunchParams",
|
|
10905
10977
|
components: [
|
|
10906
|
-
{
|
|
10907
|
-
{
|
|
10908
|
-
{
|
|
10978
|
+
{ name: "name", type: "string", internalType: "string" },
|
|
10979
|
+
{ name: "symbol", type: "string", internalType: "string" },
|
|
10980
|
+
{ name: "tokenUri", type: "string", internalType: "string" },
|
|
10909
10981
|
{
|
|
10910
|
-
internalType: "uint256",
|
|
10911
10982
|
name: "initialTokenFairLaunch",
|
|
10912
10983
|
type: "uint256",
|
|
10984
|
+
internalType: "uint256",
|
|
10913
10985
|
},
|
|
10914
10986
|
{
|
|
10915
|
-
internalType: "uint256",
|
|
10916
10987
|
name: "fairLaunchDuration",
|
|
10917
10988
|
type: "uint256",
|
|
10989
|
+
internalType: "uint256",
|
|
10918
10990
|
},
|
|
10919
|
-
{ internalType: "uint256", name: "premineAmount", type: "uint256" },
|
|
10920
|
-
{ internalType: "address", name: "creator", type: "address" },
|
|
10921
10991
|
{
|
|
10922
|
-
|
|
10992
|
+
name: "premineAmount",
|
|
10993
|
+
type: "uint256",
|
|
10994
|
+
internalType: "uint256",
|
|
10995
|
+
},
|
|
10996
|
+
{ name: "creator", type: "address", internalType: "address" },
|
|
10997
|
+
{
|
|
10923
10998
|
name: "creatorFeeAllocation",
|
|
10924
10999
|
type: "uint24",
|
|
11000
|
+
internalType: "uint24",
|
|
11001
|
+
},
|
|
11002
|
+
{
|
|
11003
|
+
name: "flaunchAt",
|
|
11004
|
+
type: "uint256",
|
|
11005
|
+
internalType: "uint256",
|
|
11006
|
+
},
|
|
11007
|
+
{
|
|
11008
|
+
name: "initialPriceParams",
|
|
11009
|
+
type: "bytes",
|
|
11010
|
+
internalType: "bytes",
|
|
11011
|
+
},
|
|
11012
|
+
{
|
|
11013
|
+
name: "feeCalculatorParams",
|
|
11014
|
+
type: "bytes",
|
|
11015
|
+
internalType: "bytes",
|
|
10925
11016
|
},
|
|
10926
|
-
{ internalType: "uint256", name: "flaunchAt", type: "uint256" },
|
|
10927
|
-
{ internalType: "bytes", name: "initialPriceParams", type: "bytes" },
|
|
10928
|
-
{ internalType: "bytes", name: "feeCalculatorParams", type: "bytes" },
|
|
10929
11017
|
],
|
|
10930
|
-
internalType: "struct PositionManager.FlaunchParams",
|
|
10931
|
-
name: "_flaunchParams",
|
|
10932
|
-
type: "tuple",
|
|
10933
11018
|
},
|
|
10934
11019
|
{
|
|
10935
|
-
components: [
|
|
10936
|
-
{ internalType: "bytes32", name: "merkleRoot", type: "bytes32" },
|
|
10937
|
-
{ internalType: "string", name: "merkleIPFSHash", type: "string" },
|
|
10938
|
-
{ internalType: "uint256", name: "maxTokens", type: "uint256" },
|
|
10939
|
-
],
|
|
10940
|
-
internalType: "struct FlaunchZap.WhitelistParams",
|
|
10941
11020
|
name: "_whitelistParams",
|
|
10942
11021
|
type: "tuple",
|
|
10943
|
-
|
|
10944
|
-
{
|
|
11022
|
+
internalType: "struct FlaunchZap.WhitelistParams",
|
|
10945
11023
|
components: [
|
|
10946
|
-
{
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
11024
|
+
{
|
|
11025
|
+
name: "merkleRoot",
|
|
11026
|
+
type: "bytes32",
|
|
11027
|
+
internalType: "bytes32",
|
|
11028
|
+
},
|
|
11029
|
+
{
|
|
11030
|
+
name: "merkleIPFSHash",
|
|
11031
|
+
type: "string",
|
|
11032
|
+
internalType: "string",
|
|
11033
|
+
},
|
|
11034
|
+
{
|
|
11035
|
+
name: "maxTokens",
|
|
11036
|
+
type: "uint256",
|
|
11037
|
+
internalType: "uint256",
|
|
11038
|
+
},
|
|
10951
11039
|
],
|
|
10952
|
-
internalType: "struct FlaunchZap.AirdropParams",
|
|
10953
|
-
name: "_airdropParams",
|
|
10954
|
-
type: "tuple",
|
|
10955
11040
|
},
|
|
10956
11041
|
{
|
|
11042
|
+
name: "_airdropParams",
|
|
11043
|
+
type: "tuple",
|
|
11044
|
+
internalType: "struct FlaunchZap.AirdropParams",
|
|
10957
11045
|
components: [
|
|
10958
|
-
{
|
|
10959
|
-
|
|
10960
|
-
|
|
11046
|
+
{
|
|
11047
|
+
name: "airdropIndex",
|
|
11048
|
+
type: "uint256",
|
|
11049
|
+
internalType: "uint256",
|
|
11050
|
+
},
|
|
11051
|
+
{
|
|
11052
|
+
name: "airdropAmount",
|
|
11053
|
+
type: "uint256",
|
|
11054
|
+
internalType: "uint256",
|
|
11055
|
+
},
|
|
11056
|
+
{
|
|
11057
|
+
name: "airdropEndTime",
|
|
11058
|
+
type: "uint256",
|
|
11059
|
+
internalType: "uint256",
|
|
11060
|
+
},
|
|
11061
|
+
{
|
|
11062
|
+
name: "merkleRoot",
|
|
11063
|
+
type: "bytes32",
|
|
11064
|
+
internalType: "bytes32",
|
|
11065
|
+
},
|
|
11066
|
+
{
|
|
11067
|
+
name: "merkleIPFSHash",
|
|
11068
|
+
type: "string",
|
|
11069
|
+
internalType: "string",
|
|
11070
|
+
},
|
|
10961
11071
|
],
|
|
10962
|
-
|
|
11072
|
+
},
|
|
11073
|
+
{
|
|
10963
11074
|
name: "_treasuryManagerParams",
|
|
10964
11075
|
type: "tuple",
|
|
11076
|
+
internalType: "struct FlaunchZap.TreasuryManagerParams",
|
|
11077
|
+
components: [
|
|
11078
|
+
{ name: "manager", type: "address", internalType: "address" },
|
|
11079
|
+
{
|
|
11080
|
+
name: "permissions",
|
|
11081
|
+
type: "address",
|
|
11082
|
+
internalType: "address",
|
|
11083
|
+
},
|
|
11084
|
+
{
|
|
11085
|
+
name: "initializeData",
|
|
11086
|
+
type: "bytes",
|
|
11087
|
+
internalType: "bytes",
|
|
11088
|
+
},
|
|
11089
|
+
{ name: "depositData", type: "bytes", internalType: "bytes" },
|
|
11090
|
+
],
|
|
10965
11091
|
},
|
|
10966
11092
|
],
|
|
10967
|
-
name: "flaunch",
|
|
10968
11093
|
outputs: [
|
|
10969
|
-
{
|
|
10970
|
-
{
|
|
10971
|
-
{
|
|
11094
|
+
{ name: "memecoin_", type: "address", internalType: "address" },
|
|
11095
|
+
{ name: "ethSpent_", type: "uint256", internalType: "uint256" },
|
|
11096
|
+
{
|
|
11097
|
+
name: "deployedManager_",
|
|
11098
|
+
type: "address",
|
|
11099
|
+
internalType: "address",
|
|
11100
|
+
},
|
|
10972
11101
|
],
|
|
10973
11102
|
stateMutability: "payable",
|
|
10974
|
-
type: "function",
|
|
10975
11103
|
},
|
|
10976
11104
|
{
|
|
10977
|
-
|
|
11105
|
+
type: "function",
|
|
10978
11106
|
name: "flaunchContract",
|
|
10979
|
-
|
|
11107
|
+
inputs: [],
|
|
11108
|
+
outputs: [{ name: "", type: "address", internalType: "contract Flaunch" }],
|
|
10980
11109
|
stateMutability: "view",
|
|
10981
|
-
type: "function",
|
|
10982
11110
|
},
|
|
10983
11111
|
{
|
|
10984
|
-
|
|
11112
|
+
type: "function",
|
|
10985
11113
|
name: "merkleAirdrop",
|
|
11114
|
+
inputs: [],
|
|
10986
11115
|
outputs: [
|
|
10987
|
-
{
|
|
11116
|
+
{
|
|
11117
|
+
name: "",
|
|
11118
|
+
type: "address",
|
|
11119
|
+
internalType: "contract IMerkleAirdrop",
|
|
11120
|
+
},
|
|
10988
11121
|
],
|
|
10989
11122
|
stateMutability: "view",
|
|
10990
|
-
type: "function",
|
|
10991
11123
|
},
|
|
10992
11124
|
{
|
|
10993
|
-
|
|
11125
|
+
type: "function",
|
|
10994
11126
|
name: "poolSwap",
|
|
10995
|
-
|
|
11127
|
+
inputs: [],
|
|
11128
|
+
outputs: [{ name: "", type: "address", internalType: "contract PoolSwap" }],
|
|
10996
11129
|
stateMutability: "view",
|
|
10997
|
-
type: "function",
|
|
10998
11130
|
},
|
|
10999
11131
|
{
|
|
11000
|
-
|
|
11132
|
+
type: "function",
|
|
11001
11133
|
name: "positionManager",
|
|
11134
|
+
inputs: [],
|
|
11002
11135
|
outputs: [
|
|
11003
|
-
{
|
|
11136
|
+
{
|
|
11137
|
+
name: "",
|
|
11138
|
+
type: "address",
|
|
11139
|
+
internalType: "contract PositionManager",
|
|
11140
|
+
},
|
|
11004
11141
|
],
|
|
11005
11142
|
stateMutability: "view",
|
|
11006
|
-
type: "function",
|
|
11007
11143
|
},
|
|
11008
11144
|
{
|
|
11009
|
-
|
|
11145
|
+
type: "function",
|
|
11010
11146
|
name: "treasuryManagerFactory",
|
|
11147
|
+
inputs: [],
|
|
11011
11148
|
outputs: [
|
|
11012
11149
|
{
|
|
11013
|
-
internalType: "contract ITreasuryManagerFactory",
|
|
11014
11150
|
name: "",
|
|
11015
11151
|
type: "address",
|
|
11152
|
+
internalType: "contract ITreasuryManagerFactory",
|
|
11016
11153
|
},
|
|
11017
11154
|
],
|
|
11018
11155
|
stateMutability: "view",
|
|
11019
|
-
type: "function",
|
|
11020
11156
|
},
|
|
11021
11157
|
{
|
|
11022
|
-
|
|
11158
|
+
type: "function",
|
|
11023
11159
|
name: "whitelistFairLaunch",
|
|
11160
|
+
inputs: [],
|
|
11024
11161
|
outputs: [
|
|
11025
11162
|
{
|
|
11026
|
-
internalType: "contract WhitelistFairLaunch",
|
|
11027
11163
|
name: "",
|
|
11028
11164
|
type: "address",
|
|
11165
|
+
internalType: "contract WhitelistFairLaunch",
|
|
11029
11166
|
},
|
|
11030
11167
|
],
|
|
11031
11168
|
stateMutability: "view",
|
|
11032
|
-
type: "function",
|
|
11033
11169
|
},
|
|
11034
|
-
{
|
|
11170
|
+
{ type: "error", name: "CreatorCannotBeZero", inputs: [] },
|
|
11171
|
+
{ type: "error", name: "InsufficientMemecoinsForAirdrop", inputs: [] },
|
|
11035
11172
|
];
|
|
11036
11173
|
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11174
|
+
/**
|
|
11175
|
+
* Enumeration of Flaunch contract versions
|
|
11176
|
+
*/
|
|
11177
|
+
var FlaunchVersion;
|
|
11178
|
+
(function (FlaunchVersion) {
|
|
11179
|
+
FlaunchVersion["V1"] = "V1";
|
|
11180
|
+
FlaunchVersion["V1_1"] = "V1_1";
|
|
11181
|
+
FlaunchVersion["V1_1_1"] = "V1_1_1";
|
|
11182
|
+
FlaunchVersion["ANY"] = "ANY";
|
|
11183
|
+
})(FlaunchVersion || (FlaunchVersion = {}));
|
|
11184
|
+
/**
|
|
11185
|
+
* Enumeration of Verifiers for TokenImporter
|
|
11186
|
+
*/
|
|
11187
|
+
var Verifier;
|
|
11188
|
+
(function (Verifier) {
|
|
11189
|
+
Verifier["CLANKER"] = "clanker";
|
|
11190
|
+
Verifier["DOPPLER"] = "doppler";
|
|
11191
|
+
Verifier["VIRTUALS"] = "virtuals";
|
|
11192
|
+
Verifier["WHITELIST"] = "whitelist";
|
|
11193
|
+
Verifier["ZORA"] = "zora";
|
|
11194
|
+
})(Verifier || (Verifier = {}));
|
|
11195
|
+
/**
|
|
11196
|
+
* Enumeration of Permissions for TreasuryManagers. Defaults to OPEN.
|
|
11197
|
+
*/
|
|
11198
|
+
var Permissions;
|
|
11199
|
+
(function (Permissions) {
|
|
11200
|
+
Permissions["OPEN"] = "open";
|
|
11201
|
+
Permissions["CLOSED"] = "closed";
|
|
11202
|
+
Permissions["WHITELISTED"] = "whitelisted";
|
|
11203
|
+
})(Permissions || (Permissions = {}));
|
|
11204
|
+
|
|
11205
|
+
/**
|
|
11206
|
+
* Maps a Permissions enum value to its corresponding contract address
|
|
11207
|
+
* @param permissions - The permissions enum value
|
|
11208
|
+
* @param chainId - The chain ID to get the address for
|
|
11209
|
+
* @returns The corresponding permissions contract address
|
|
11210
|
+
*/
|
|
11211
|
+
function getPermissionsAddress(permissions, chainId) {
|
|
11212
|
+
switch (permissions) {
|
|
11213
|
+
case Permissions.CLOSED:
|
|
11214
|
+
return ClosedPermissionsAddress[chainId];
|
|
11215
|
+
case Permissions.WHITELISTED:
|
|
11216
|
+
return WhitelistedPermissionsAddress[chainId];
|
|
11217
|
+
case Permissions.OPEN:
|
|
11218
|
+
default:
|
|
11219
|
+
return zeroAddress;
|
|
11220
|
+
}
|
|
11221
|
+
}
|
|
11222
|
+
|
|
11223
|
+
const FlaunchPositionManagerV1_1Abi = [
|
|
11224
|
+
{
|
|
11225
|
+
inputs: [
|
|
11226
|
+
{
|
|
11227
|
+
components: [
|
|
11228
|
+
{ internalType: "address", name: "nativeToken", type: "address" },
|
|
11229
|
+
{
|
|
11230
|
+
internalType: "contract IPoolManager",
|
|
11231
|
+
name: "poolManager",
|
|
11232
|
+
type: "address",
|
|
11233
|
+
},
|
|
11234
|
+
{
|
|
11235
|
+
components: [
|
|
11236
|
+
{ internalType: "uint24", name: "swapFee", type: "uint24" },
|
|
11237
|
+
{ internalType: "uint24", name: "referrer", type: "uint24" },
|
|
11238
|
+
{ internalType: "uint24", name: "protocol", type: "uint24" },
|
|
11053
11239
|
{ internalType: "bool", name: "active", type: "bool" },
|
|
11054
11240
|
],
|
|
11055
11241
|
internalType: "struct FeeDistributor.FeeDistribution",
|
|
@@ -12957,11 +13143,13 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
12957
13143
|
const _treasuryManagerParams = params.treasuryManagerParams
|
|
12958
13144
|
? {
|
|
12959
13145
|
manager: params.treasuryManagerParams.manager ?? zeroAddress,
|
|
13146
|
+
permissions: params.treasuryManagerParams.permissions ?? Permissions.OPEN,
|
|
12960
13147
|
initializeData: params.treasuryManagerParams.initializeData ?? "0x",
|
|
12961
13148
|
depositData: params.treasuryManagerParams.depositData ?? "0x",
|
|
12962
13149
|
}
|
|
12963
13150
|
: {
|
|
12964
13151
|
manager: zeroAddress,
|
|
13152
|
+
permissions: Permissions.OPEN,
|
|
12965
13153
|
initializeData: "0x",
|
|
12966
13154
|
depositData: "0x",
|
|
12967
13155
|
};
|
|
@@ -12979,7 +13167,10 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
12979
13167
|
initialPriceParams,
|
|
12980
13168
|
feeCalculatorParams: "0x",
|
|
12981
13169
|
},
|
|
12982
|
-
_treasuryManagerParams
|
|
13170
|
+
_treasuryManagerParams: {
|
|
13171
|
+
..._treasuryManagerParams,
|
|
13172
|
+
permissions: getPermissionsAddress(_treasuryManagerParams.permissions, this.chainId),
|
|
13173
|
+
},
|
|
12983
13174
|
_whitelistParams: {
|
|
12984
13175
|
merkleRoot: zeroHash,
|
|
12985
13176
|
merkleIPFSHash: "",
|
|
@@ -13053,6 +13244,7 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
13053
13244
|
},
|
|
13054
13245
|
_treasuryManagerParams: {
|
|
13055
13246
|
manager: params.revenueManagerInstanceAddress,
|
|
13247
|
+
permissions: getPermissionsAddress(params.treasuryManagerParams?.permissions ?? Permissions.OPEN, this.chainId),
|
|
13056
13248
|
initializeData: "0x",
|
|
13057
13249
|
depositData: "0x",
|
|
13058
13250
|
},
|
|
@@ -13170,6 +13362,7 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
13170
13362
|
},
|
|
13171
13363
|
_treasuryManagerParams: {
|
|
13172
13364
|
manager: AddressFeeSplitManagerAddress[this.chainId],
|
|
13365
|
+
permissions: getPermissionsAddress(params.treasuryManagerParams?.permissions ?? Permissions.OPEN, this.chainId),
|
|
13173
13366
|
initializeData,
|
|
13174
13367
|
depositData: "0x",
|
|
13175
13368
|
},
|
|
@@ -13204,6 +13397,77 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
13204
13397
|
tokenUri,
|
|
13205
13398
|
});
|
|
13206
13399
|
}
|
|
13400
|
+
/**
|
|
13401
|
+
* Deploys a new revenue manager
|
|
13402
|
+
* @param params - Parameters for deploying the revenue manager
|
|
13403
|
+
* @param params.protocolRecipient - The address of the protocol recipient
|
|
13404
|
+
* @param params.protocolFeePercent - The percentage of the protocol fee
|
|
13405
|
+
* @param params.permissions - The permissions for the revenue manager
|
|
13406
|
+
* @returns Transaction response
|
|
13407
|
+
*/
|
|
13408
|
+
deployRevenueManager(params) {
|
|
13409
|
+
const permissionsAddress = getPermissionsAddress(params.permissions ?? Permissions.OPEN, this.chainId);
|
|
13410
|
+
return this.contract.write("deployAndInitializeManager", {
|
|
13411
|
+
_managerImplementation: RevenueManagerAddress[this.chainId],
|
|
13412
|
+
_owner: params.protocolRecipient,
|
|
13413
|
+
_data: encodeAbiParameters([
|
|
13414
|
+
{
|
|
13415
|
+
type: "tuple",
|
|
13416
|
+
components: [
|
|
13417
|
+
{ type: "address", name: "protocolRecipient" },
|
|
13418
|
+
{ type: "uint256", name: "protocolFee" },
|
|
13419
|
+
],
|
|
13420
|
+
},
|
|
13421
|
+
], [
|
|
13422
|
+
{
|
|
13423
|
+
protocolRecipient: params.protocolRecipient,
|
|
13424
|
+
protocolFee: BigInt(params.protocolFeePercent * 100), // Convert percentage to basis points
|
|
13425
|
+
},
|
|
13426
|
+
]),
|
|
13427
|
+
_permissions: permissionsAddress,
|
|
13428
|
+
});
|
|
13429
|
+
}
|
|
13430
|
+
/**
|
|
13431
|
+
* Deploys a new staking manager
|
|
13432
|
+
* @param params - Parameters for deploying the staking manager
|
|
13433
|
+
* @param params.managerOwner - The address of the manager owner
|
|
13434
|
+
* @param params.stakingToken - The address of the token to be staked
|
|
13435
|
+
* @param params.minEscrowDuration - The minimum duration (in seconds) that the creator's NFT is locked for
|
|
13436
|
+
* @param params.minStakeDuration - The minimum duration (in seconds) that the user's tokens are locked for
|
|
13437
|
+
* @param params.creatorSharePercent - The % share that a creator will earn from their token
|
|
13438
|
+
* @param params.ownerSharePercent - The % share that the manager owner will earn from their token
|
|
13439
|
+
* @param params.permissions - The permissions for the staking manager
|
|
13440
|
+
* @returns Transaction response
|
|
13441
|
+
*/
|
|
13442
|
+
deployStakingManager(params) {
|
|
13443
|
+
const permissionsAddress = getPermissionsAddress(params.permissions ?? Permissions.OPEN, this.chainId);
|
|
13444
|
+
const VALID_SHARE_TOTAL = 10000000n; // 5 decimals as BigInt
|
|
13445
|
+
return this.contract.write("deployAndInitializeManager", {
|
|
13446
|
+
_managerImplementation: StakingManagerAddress[this.chainId],
|
|
13447
|
+
_owner: params.managerOwner,
|
|
13448
|
+
_data: encodeAbiParameters([
|
|
13449
|
+
{
|
|
13450
|
+
type: "tuple",
|
|
13451
|
+
components: [
|
|
13452
|
+
{ type: "address", name: "stakingToken" },
|
|
13453
|
+
{ type: "uint256", name: "minEscrowDuration" },
|
|
13454
|
+
{ type: "uint256", name: "minStakeDuration" },
|
|
13455
|
+
{ type: "uint256", name: "creatorShare" },
|
|
13456
|
+
{ type: "uint256", name: "ownerShare" },
|
|
13457
|
+
],
|
|
13458
|
+
},
|
|
13459
|
+
], [
|
|
13460
|
+
{
|
|
13461
|
+
stakingToken: params.stakingToken,
|
|
13462
|
+
minEscrowDuration: params.minEscrowDuration,
|
|
13463
|
+
minStakeDuration: params.minStakeDuration,
|
|
13464
|
+
creatorShare: (BigInt(params.creatorSharePercent) * VALID_SHARE_TOTAL) / 100n,
|
|
13465
|
+
ownerShare: (BigInt(params.ownerSharePercent) * VALID_SHARE_TOTAL) / 100n,
|
|
13466
|
+
},
|
|
13467
|
+
]),
|
|
13468
|
+
_permissions: permissionsAddress,
|
|
13469
|
+
});
|
|
13470
|
+
}
|
|
13207
13471
|
}
|
|
13208
13472
|
|
|
13209
13473
|
const FlaunchAbi = [
|
|
@@ -17414,28 +17678,6 @@ const TokenImporterAbi = [
|
|
|
17414
17678
|
{ type: "error", name: "ZeroAddress", inputs: [] },
|
|
17415
17679
|
];
|
|
17416
17680
|
|
|
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
17681
|
/**
|
|
17440
17682
|
* Base client for interacting with the TokenImporter contract in read-only mode
|
|
17441
17683
|
* Provides basic contract initialization
|
|
@@ -19848,388 +20090,424 @@ class ReadFlaunchV1_1 {
|
|
|
19848
20090
|
|
|
19849
20091
|
const TreasuryManagerFactoryAbi = [
|
|
19850
20092
|
{
|
|
20093
|
+
type: "constructor",
|
|
19851
20094
|
inputs: [
|
|
19852
|
-
{
|
|
19853
|
-
|
|
20095
|
+
{
|
|
20096
|
+
name: "_protocolOwner",
|
|
20097
|
+
type: "address",
|
|
20098
|
+
internalType: "address",
|
|
20099
|
+
},
|
|
20100
|
+
{ name: "_feeEscrow", type: "address", internalType: "address" },
|
|
19854
20101
|
],
|
|
19855
20102
|
stateMutability: "nonpayable",
|
|
19856
|
-
type: "constructor",
|
|
19857
20103
|
},
|
|
19858
|
-
{ inputs: [], name: "AccessControlBadConfirmation", type: "error" },
|
|
19859
20104
|
{
|
|
19860
|
-
|
|
19861
|
-
|
|
19862
|
-
|
|
19863
|
-
],
|
|
19864
|
-
|
|
19865
|
-
type: "error",
|
|
20105
|
+
type: "function",
|
|
20106
|
+
name: "DEFAULT_ADMIN_ROLE",
|
|
20107
|
+
inputs: [],
|
|
20108
|
+
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
|
|
20109
|
+
stateMutability: "view",
|
|
19866
20110
|
},
|
|
19867
|
-
{ inputs: [], name: "AlreadyInitialized", type: "error" },
|
|
19868
|
-
{ inputs: [], name: "NewOwnerIsZeroAddress", type: "error" },
|
|
19869
|
-
{ inputs: [], name: "NoHandoverRequest", type: "error" },
|
|
19870
|
-
{ inputs: [], name: "Unauthorized", type: "error" },
|
|
19871
|
-
{ inputs: [], name: "UnknownManagerImplemention", type: "error" },
|
|
19872
20111
|
{
|
|
19873
|
-
|
|
20112
|
+
type: "function",
|
|
20113
|
+
name: "approveManager",
|
|
19874
20114
|
inputs: [
|
|
19875
20115
|
{
|
|
19876
|
-
indexed: true,
|
|
19877
|
-
internalType: "address",
|
|
19878
|
-
name: "_manager",
|
|
19879
|
-
type: "address",
|
|
19880
|
-
},
|
|
19881
|
-
{
|
|
19882
|
-
indexed: true,
|
|
19883
|
-
internalType: "address",
|
|
19884
20116
|
name: "_managerImplementation",
|
|
19885
20117
|
type: "address",
|
|
20118
|
+
internalType: "address",
|
|
19886
20119
|
},
|
|
19887
20120
|
],
|
|
19888
|
-
|
|
19889
|
-
|
|
20121
|
+
outputs: [],
|
|
20122
|
+
stateMutability: "nonpayable",
|
|
19890
20123
|
},
|
|
19891
20124
|
{
|
|
19892
|
-
|
|
20125
|
+
type: "function",
|
|
20126
|
+
name: "approvedManagerImplementation",
|
|
19893
20127
|
inputs: [
|
|
19894
20128
|
{
|
|
19895
|
-
indexed: true,
|
|
19896
|
-
internalType: "address",
|
|
19897
20129
|
name: "_managerImplementation",
|
|
19898
20130
|
type: "address",
|
|
20131
|
+
internalType: "address",
|
|
19899
20132
|
},
|
|
19900
20133
|
],
|
|
19901
|
-
name: "
|
|
19902
|
-
|
|
20134
|
+
outputs: [{ name: "_approved", type: "bool", internalType: "bool" }],
|
|
20135
|
+
stateMutability: "view",
|
|
19903
20136
|
},
|
|
19904
20137
|
{
|
|
19905
|
-
|
|
20138
|
+
type: "function",
|
|
20139
|
+
name: "cancelOwnershipHandover",
|
|
20140
|
+
inputs: [],
|
|
20141
|
+
outputs: [],
|
|
20142
|
+
stateMutability: "payable",
|
|
20143
|
+
},
|
|
20144
|
+
{
|
|
20145
|
+
type: "function",
|
|
20146
|
+
name: "completeOwnershipHandover",
|
|
19906
20147
|
inputs: [
|
|
19907
|
-
{
|
|
19908
|
-
indexed: true,
|
|
19909
|
-
internalType: "address",
|
|
19910
|
-
name: "_managerImplementation",
|
|
19911
|
-
type: "address",
|
|
19912
|
-
},
|
|
20148
|
+
{ name: "pendingOwner", type: "address", internalType: "address" },
|
|
19913
20149
|
],
|
|
19914
|
-
|
|
19915
|
-
|
|
20150
|
+
outputs: [],
|
|
20151
|
+
stateMutability: "payable",
|
|
19916
20152
|
},
|
|
19917
20153
|
{
|
|
19918
|
-
|
|
20154
|
+
type: "function",
|
|
20155
|
+
name: "deployAndInitializeManager",
|
|
19919
20156
|
inputs: [
|
|
19920
20157
|
{
|
|
19921
|
-
|
|
19922
|
-
internalType: "address",
|
|
19923
|
-
name: "pendingOwner",
|
|
20158
|
+
name: "_managerImplementation",
|
|
19924
20159
|
type: "address",
|
|
20160
|
+
internalType: "address",
|
|
19925
20161
|
},
|
|
20162
|
+
{ name: "_owner", type: "address", internalType: "address" },
|
|
20163
|
+
{ name: "_data", type: "bytes", internalType: "bytes" },
|
|
19926
20164
|
],
|
|
19927
|
-
|
|
19928
|
-
type: "event",
|
|
19929
|
-
},
|
|
19930
|
-
{
|
|
19931
|
-
anonymous: false,
|
|
19932
|
-
inputs: [
|
|
20165
|
+
outputs: [
|
|
19933
20166
|
{
|
|
19934
|
-
|
|
19935
|
-
internalType: "address",
|
|
19936
|
-
name: "pendingOwner",
|
|
20167
|
+
name: "manager_",
|
|
19937
20168
|
type: "address",
|
|
20169
|
+
internalType: "address payable",
|
|
19938
20170
|
},
|
|
19939
20171
|
],
|
|
19940
|
-
|
|
19941
|
-
type: "event",
|
|
20172
|
+
stateMutability: "nonpayable",
|
|
19942
20173
|
},
|
|
19943
20174
|
{
|
|
19944
|
-
|
|
20175
|
+
type: "function",
|
|
20176
|
+
name: "deployManager",
|
|
19945
20177
|
inputs: [
|
|
19946
20178
|
{
|
|
19947
|
-
|
|
19948
|
-
internalType: "address",
|
|
19949
|
-
name: "oldOwner",
|
|
20179
|
+
name: "_managerImplementation",
|
|
19950
20180
|
type: "address",
|
|
20181
|
+
internalType: "address",
|
|
19951
20182
|
},
|
|
20183
|
+
],
|
|
20184
|
+
outputs: [
|
|
19952
20185
|
{
|
|
19953
|
-
|
|
19954
|
-
internalType: "address",
|
|
19955
|
-
name: "newOwner",
|
|
20186
|
+
name: "manager_",
|
|
19956
20187
|
type: "address",
|
|
20188
|
+
internalType: "address payable",
|
|
19957
20189
|
},
|
|
19958
20190
|
],
|
|
19959
|
-
|
|
19960
|
-
type: "event",
|
|
20191
|
+
stateMutability: "nonpayable",
|
|
19961
20192
|
},
|
|
19962
20193
|
{
|
|
19963
|
-
|
|
20194
|
+
type: "function",
|
|
20195
|
+
name: "feeEscrow",
|
|
20196
|
+
inputs: [],
|
|
20197
|
+
outputs: [
|
|
20198
|
+
{ name: "", type: "address", internalType: "contract IFeeEscrow" },
|
|
20199
|
+
],
|
|
20200
|
+
stateMutability: "view",
|
|
20201
|
+
},
|
|
20202
|
+
{
|
|
20203
|
+
type: "function",
|
|
20204
|
+
name: "getRoleAdmin",
|
|
20205
|
+
inputs: [{ name: "role", type: "bytes32", internalType: "bytes32" }],
|
|
20206
|
+
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
|
|
20207
|
+
stateMutability: "view",
|
|
20208
|
+
},
|
|
20209
|
+
{
|
|
20210
|
+
type: "function",
|
|
20211
|
+
name: "grantRole",
|
|
19964
20212
|
inputs: [
|
|
19965
|
-
{
|
|
19966
|
-
{
|
|
19967
|
-
indexed: true,
|
|
19968
|
-
internalType: "bytes32",
|
|
19969
|
-
name: "previousAdminRole",
|
|
19970
|
-
type: "bytes32",
|
|
19971
|
-
},
|
|
19972
|
-
{
|
|
19973
|
-
indexed: true,
|
|
19974
|
-
internalType: "bytes32",
|
|
19975
|
-
name: "newAdminRole",
|
|
19976
|
-
type: "bytes32",
|
|
19977
|
-
},
|
|
20213
|
+
{ name: "role", type: "bytes32", internalType: "bytes32" },
|
|
20214
|
+
{ name: "account", type: "address", internalType: "address" },
|
|
19978
20215
|
],
|
|
19979
|
-
|
|
19980
|
-
|
|
20216
|
+
outputs: [],
|
|
20217
|
+
stateMutability: "nonpayable",
|
|
19981
20218
|
},
|
|
19982
20219
|
{
|
|
19983
|
-
|
|
20220
|
+
type: "function",
|
|
20221
|
+
name: "hasRole",
|
|
19984
20222
|
inputs: [
|
|
19985
|
-
{
|
|
19986
|
-
{
|
|
19987
|
-
indexed: true,
|
|
19988
|
-
internalType: "address",
|
|
19989
|
-
name: "account",
|
|
19990
|
-
type: "address",
|
|
19991
|
-
},
|
|
19992
|
-
{
|
|
19993
|
-
indexed: true,
|
|
19994
|
-
internalType: "address",
|
|
19995
|
-
name: "sender",
|
|
19996
|
-
type: "address",
|
|
19997
|
-
},
|
|
20223
|
+
{ name: "role", type: "bytes32", internalType: "bytes32" },
|
|
20224
|
+
{ name: "account", type: "address", internalType: "address" },
|
|
19998
20225
|
],
|
|
19999
|
-
name: "
|
|
20000
|
-
|
|
20226
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
20227
|
+
stateMutability: "view",
|
|
20001
20228
|
},
|
|
20002
20229
|
{
|
|
20003
|
-
|
|
20004
|
-
|
|
20005
|
-
|
|
20230
|
+
type: "function",
|
|
20231
|
+
name: "managerImplementation",
|
|
20232
|
+
inputs: [{ name: "_manager", type: "address", internalType: "address" }],
|
|
20233
|
+
outputs: [
|
|
20006
20234
|
{
|
|
20007
|
-
|
|
20008
|
-
internalType: "address",
|
|
20009
|
-
name: "account",
|
|
20235
|
+
name: "_managerImplementation",
|
|
20010
20236
|
type: "address",
|
|
20011
|
-
},
|
|
20012
|
-
{
|
|
20013
|
-
indexed: true,
|
|
20014
20237
|
internalType: "address",
|
|
20015
|
-
name: "sender",
|
|
20016
|
-
type: "address",
|
|
20017
20238
|
},
|
|
20018
20239
|
],
|
|
20019
|
-
|
|
20020
|
-
type: "event",
|
|
20240
|
+
stateMutability: "view",
|
|
20021
20241
|
},
|
|
20022
20242
|
{
|
|
20243
|
+
type: "function",
|
|
20244
|
+
name: "owner",
|
|
20023
20245
|
inputs: [],
|
|
20024
|
-
name: "
|
|
20025
|
-
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
|
20246
|
+
outputs: [{ name: "result", type: "address", internalType: "address" }],
|
|
20026
20247
|
stateMutability: "view",
|
|
20027
|
-
type: "function",
|
|
20028
20248
|
},
|
|
20029
20249
|
{
|
|
20250
|
+
type: "function",
|
|
20251
|
+
name: "ownershipHandoverExpiresAt",
|
|
20030
20252
|
inputs: [
|
|
20031
|
-
{
|
|
20032
|
-
internalType: "address",
|
|
20033
|
-
name: "_managerImplementation",
|
|
20034
|
-
type: "address",
|
|
20035
|
-
},
|
|
20253
|
+
{ name: "pendingOwner", type: "address", internalType: "address" },
|
|
20036
20254
|
],
|
|
20037
|
-
name: "
|
|
20038
|
-
|
|
20039
|
-
|
|
20255
|
+
outputs: [{ name: "result", type: "uint256", internalType: "uint256" }],
|
|
20256
|
+
stateMutability: "view",
|
|
20257
|
+
},
|
|
20258
|
+
{
|
|
20040
20259
|
type: "function",
|
|
20260
|
+
name: "renounceOwnership",
|
|
20261
|
+
inputs: [],
|
|
20262
|
+
outputs: [],
|
|
20263
|
+
stateMutability: "payable",
|
|
20041
20264
|
},
|
|
20042
20265
|
{
|
|
20266
|
+
type: "function",
|
|
20267
|
+
name: "renounceRole",
|
|
20043
20268
|
inputs: [
|
|
20269
|
+
{ name: "role", type: "bytes32", internalType: "bytes32" },
|
|
20044
20270
|
{
|
|
20045
|
-
|
|
20046
|
-
name: "_managerImplementation",
|
|
20271
|
+
name: "callerConfirmation",
|
|
20047
20272
|
type: "address",
|
|
20273
|
+
internalType: "address",
|
|
20048
20274
|
},
|
|
20049
20275
|
],
|
|
20050
|
-
|
|
20051
|
-
|
|
20052
|
-
stateMutability: "view",
|
|
20053
|
-
type: "function",
|
|
20276
|
+
outputs: [],
|
|
20277
|
+
stateMutability: "nonpayable",
|
|
20054
20278
|
},
|
|
20055
20279
|
{
|
|
20280
|
+
type: "function",
|
|
20281
|
+
name: "requestOwnershipHandover",
|
|
20056
20282
|
inputs: [],
|
|
20057
|
-
name: "cancelOwnershipHandover",
|
|
20058
20283
|
outputs: [],
|
|
20059
20284
|
stateMutability: "payable",
|
|
20060
|
-
type: "function",
|
|
20061
20285
|
},
|
|
20062
20286
|
{
|
|
20287
|
+
type: "function",
|
|
20288
|
+
name: "revokeRole",
|
|
20063
20289
|
inputs: [
|
|
20064
|
-
{
|
|
20290
|
+
{ name: "role", type: "bytes32", internalType: "bytes32" },
|
|
20291
|
+
{ name: "account", type: "address", internalType: "address" },
|
|
20065
20292
|
],
|
|
20066
|
-
name: "completeOwnershipHandover",
|
|
20067
20293
|
outputs: [],
|
|
20068
|
-
stateMutability: "
|
|
20294
|
+
stateMutability: "nonpayable",
|
|
20295
|
+
},
|
|
20296
|
+
{
|
|
20297
|
+
type: "function",
|
|
20298
|
+
name: "supportsInterface",
|
|
20299
|
+
inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }],
|
|
20300
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
20301
|
+
stateMutability: "view",
|
|
20302
|
+
},
|
|
20303
|
+
{
|
|
20069
20304
|
type: "function",
|
|
20305
|
+
name: "transferOwnership",
|
|
20306
|
+
inputs: [{ name: "newOwner", type: "address", internalType: "address" }],
|
|
20307
|
+
outputs: [],
|
|
20308
|
+
stateMutability: "payable",
|
|
20070
20309
|
},
|
|
20071
20310
|
{
|
|
20311
|
+
type: "function",
|
|
20312
|
+
name: "unapproveManager",
|
|
20072
20313
|
inputs: [
|
|
20073
20314
|
{
|
|
20074
|
-
internalType: "address",
|
|
20075
20315
|
name: "_managerImplementation",
|
|
20076
20316
|
type: "address",
|
|
20317
|
+
internalType: "address",
|
|
20077
20318
|
},
|
|
20078
|
-
{ internalType: "address", name: "_owner", type: "address" },
|
|
20079
|
-
{ internalType: "bytes", name: "_data", type: "bytes" },
|
|
20080
|
-
],
|
|
20081
|
-
name: "deployAndInitializeManager",
|
|
20082
|
-
outputs: [
|
|
20083
|
-
{ internalType: "address payable", name: "manager_", type: "address" },
|
|
20084
20319
|
],
|
|
20320
|
+
outputs: [],
|
|
20085
20321
|
stateMutability: "nonpayable",
|
|
20086
|
-
type: "function",
|
|
20087
20322
|
},
|
|
20088
20323
|
{
|
|
20324
|
+
type: "event",
|
|
20325
|
+
name: "ManagerDeployed",
|
|
20089
20326
|
inputs: [
|
|
20090
20327
|
{
|
|
20328
|
+
name: "_manager",
|
|
20329
|
+
type: "address",
|
|
20330
|
+
indexed: true,
|
|
20091
20331
|
internalType: "address",
|
|
20332
|
+
},
|
|
20333
|
+
{
|
|
20092
20334
|
name: "_managerImplementation",
|
|
20093
20335
|
type: "address",
|
|
20336
|
+
indexed: true,
|
|
20337
|
+
internalType: "address",
|
|
20094
20338
|
},
|
|
20095
20339
|
],
|
|
20096
|
-
|
|
20097
|
-
outputs: [
|
|
20098
|
-
{ internalType: "address payable", name: "manager_", type: "address" },
|
|
20099
|
-
],
|
|
20100
|
-
stateMutability: "nonpayable",
|
|
20101
|
-
type: "function",
|
|
20340
|
+
anonymous: false,
|
|
20102
20341
|
},
|
|
20103
20342
|
{
|
|
20104
|
-
|
|
20105
|
-
name: "
|
|
20106
|
-
|
|
20107
|
-
{
|
|
20343
|
+
type: "event",
|
|
20344
|
+
name: "ManagerImplementationApproved",
|
|
20345
|
+
inputs: [
|
|
20346
|
+
{
|
|
20347
|
+
name: "_managerImplementation",
|
|
20348
|
+
type: "address",
|
|
20349
|
+
indexed: true,
|
|
20350
|
+
internalType: "address",
|
|
20351
|
+
},
|
|
20108
20352
|
],
|
|
20109
|
-
|
|
20110
|
-
type: "function",
|
|
20111
|
-
},
|
|
20112
|
-
{
|
|
20113
|
-
inputs: [{ internalType: "bytes32", name: "role", type: "bytes32" }],
|
|
20114
|
-
name: "getRoleAdmin",
|
|
20115
|
-
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
|
20116
|
-
stateMutability: "view",
|
|
20117
|
-
type: "function",
|
|
20353
|
+
anonymous: false,
|
|
20118
20354
|
},
|
|
20119
20355
|
{
|
|
20356
|
+
type: "event",
|
|
20357
|
+
name: "ManagerImplementationUnapproved",
|
|
20120
20358
|
inputs: [
|
|
20121
|
-
{
|
|
20122
|
-
|
|
20359
|
+
{
|
|
20360
|
+
name: "_managerImplementation",
|
|
20361
|
+
type: "address",
|
|
20362
|
+
indexed: true,
|
|
20363
|
+
internalType: "address",
|
|
20364
|
+
},
|
|
20123
20365
|
],
|
|
20124
|
-
|
|
20125
|
-
outputs: [],
|
|
20126
|
-
stateMutability: "nonpayable",
|
|
20127
|
-
type: "function",
|
|
20366
|
+
anonymous: false,
|
|
20128
20367
|
},
|
|
20129
20368
|
{
|
|
20369
|
+
type: "event",
|
|
20370
|
+
name: "OwnershipHandoverCanceled",
|
|
20130
20371
|
inputs: [
|
|
20131
|
-
{
|
|
20132
|
-
|
|
20372
|
+
{
|
|
20373
|
+
name: "pendingOwner",
|
|
20374
|
+
type: "address",
|
|
20375
|
+
indexed: true,
|
|
20376
|
+
internalType: "address",
|
|
20377
|
+
},
|
|
20133
20378
|
],
|
|
20134
|
-
|
|
20135
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
20136
|
-
stateMutability: "view",
|
|
20137
|
-
type: "function",
|
|
20379
|
+
anonymous: false,
|
|
20138
20380
|
},
|
|
20139
20381
|
{
|
|
20140
|
-
|
|
20141
|
-
name: "
|
|
20142
|
-
|
|
20382
|
+
type: "event",
|
|
20383
|
+
name: "OwnershipHandoverRequested",
|
|
20384
|
+
inputs: [
|
|
20143
20385
|
{
|
|
20144
|
-
|
|
20145
|
-
name: "_managerImplementation",
|
|
20386
|
+
name: "pendingOwner",
|
|
20146
20387
|
type: "address",
|
|
20388
|
+
indexed: true,
|
|
20389
|
+
internalType: "address",
|
|
20147
20390
|
},
|
|
20148
20391
|
],
|
|
20149
|
-
|
|
20150
|
-
type: "function",
|
|
20151
|
-
},
|
|
20152
|
-
{
|
|
20153
|
-
inputs: [],
|
|
20154
|
-
name: "owner",
|
|
20155
|
-
outputs: [{ internalType: "address", name: "result", type: "address" }],
|
|
20156
|
-
stateMutability: "view",
|
|
20157
|
-
type: "function",
|
|
20392
|
+
anonymous: false,
|
|
20158
20393
|
},
|
|
20159
20394
|
{
|
|
20395
|
+
type: "event",
|
|
20396
|
+
name: "OwnershipTransferred",
|
|
20160
20397
|
inputs: [
|
|
20161
|
-
{
|
|
20398
|
+
{
|
|
20399
|
+
name: "oldOwner",
|
|
20400
|
+
type: "address",
|
|
20401
|
+
indexed: true,
|
|
20402
|
+
internalType: "address",
|
|
20403
|
+
},
|
|
20404
|
+
{
|
|
20405
|
+
name: "newOwner",
|
|
20406
|
+
type: "address",
|
|
20407
|
+
indexed: true,
|
|
20408
|
+
internalType: "address",
|
|
20409
|
+
},
|
|
20162
20410
|
],
|
|
20163
|
-
|
|
20164
|
-
outputs: [{ internalType: "uint256", name: "result", type: "uint256" }],
|
|
20165
|
-
stateMutability: "view",
|
|
20166
|
-
type: "function",
|
|
20167
|
-
},
|
|
20168
|
-
{
|
|
20169
|
-
inputs: [],
|
|
20170
|
-
name: "renounceOwnership",
|
|
20171
|
-
outputs: [],
|
|
20172
|
-
stateMutability: "payable",
|
|
20173
|
-
type: "function",
|
|
20411
|
+
anonymous: false,
|
|
20174
20412
|
},
|
|
20175
20413
|
{
|
|
20414
|
+
type: "event",
|
|
20415
|
+
name: "RoleAdminChanged",
|
|
20176
20416
|
inputs: [
|
|
20177
|
-
{
|
|
20178
|
-
|
|
20417
|
+
{
|
|
20418
|
+
name: "role",
|
|
20419
|
+
type: "bytes32",
|
|
20420
|
+
indexed: true,
|
|
20421
|
+
internalType: "bytes32",
|
|
20422
|
+
},
|
|
20423
|
+
{
|
|
20424
|
+
name: "previousAdminRole",
|
|
20425
|
+
type: "bytes32",
|
|
20426
|
+
indexed: true,
|
|
20427
|
+
internalType: "bytes32",
|
|
20428
|
+
},
|
|
20429
|
+
{
|
|
20430
|
+
name: "newAdminRole",
|
|
20431
|
+
type: "bytes32",
|
|
20432
|
+
indexed: true,
|
|
20433
|
+
internalType: "bytes32",
|
|
20434
|
+
},
|
|
20179
20435
|
],
|
|
20180
|
-
|
|
20181
|
-
outputs: [],
|
|
20182
|
-
stateMutability: "nonpayable",
|
|
20183
|
-
type: "function",
|
|
20184
|
-
},
|
|
20185
|
-
{
|
|
20186
|
-
inputs: [],
|
|
20187
|
-
name: "requestOwnershipHandover",
|
|
20188
|
-
outputs: [],
|
|
20189
|
-
stateMutability: "payable",
|
|
20190
|
-
type: "function",
|
|
20436
|
+
anonymous: false,
|
|
20191
20437
|
},
|
|
20192
20438
|
{
|
|
20439
|
+
type: "event",
|
|
20440
|
+
name: "RoleGranted",
|
|
20193
20441
|
inputs: [
|
|
20194
|
-
{
|
|
20195
|
-
|
|
20442
|
+
{
|
|
20443
|
+
name: "role",
|
|
20444
|
+
type: "bytes32",
|
|
20445
|
+
indexed: true,
|
|
20446
|
+
internalType: "bytes32",
|
|
20447
|
+
},
|
|
20448
|
+
{
|
|
20449
|
+
name: "account",
|
|
20450
|
+
type: "address",
|
|
20451
|
+
indexed: true,
|
|
20452
|
+
internalType: "address",
|
|
20453
|
+
},
|
|
20454
|
+
{
|
|
20455
|
+
name: "sender",
|
|
20456
|
+
type: "address",
|
|
20457
|
+
indexed: true,
|
|
20458
|
+
internalType: "address",
|
|
20459
|
+
},
|
|
20196
20460
|
],
|
|
20197
|
-
|
|
20198
|
-
outputs: [],
|
|
20199
|
-
stateMutability: "nonpayable",
|
|
20200
|
-
type: "function",
|
|
20201
|
-
},
|
|
20202
|
-
{
|
|
20203
|
-
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
|
|
20204
|
-
name: "supportsInterface",
|
|
20205
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
20206
|
-
stateMutability: "view",
|
|
20207
|
-
type: "function",
|
|
20208
|
-
},
|
|
20209
|
-
{
|
|
20210
|
-
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
|
|
20211
|
-
name: "transferOwnership",
|
|
20212
|
-
outputs: [],
|
|
20213
|
-
stateMutability: "payable",
|
|
20214
|
-
type: "function",
|
|
20461
|
+
anonymous: false,
|
|
20215
20462
|
},
|
|
20216
20463
|
{
|
|
20464
|
+
type: "event",
|
|
20465
|
+
name: "RoleRevoked",
|
|
20217
20466
|
inputs: [
|
|
20218
20467
|
{
|
|
20468
|
+
name: "role",
|
|
20469
|
+
type: "bytes32",
|
|
20470
|
+
indexed: true,
|
|
20471
|
+
internalType: "bytes32",
|
|
20472
|
+
},
|
|
20473
|
+
{
|
|
20474
|
+
name: "account",
|
|
20475
|
+
type: "address",
|
|
20476
|
+
indexed: true,
|
|
20219
20477
|
internalType: "address",
|
|
20220
|
-
|
|
20478
|
+
},
|
|
20479
|
+
{
|
|
20480
|
+
name: "sender",
|
|
20221
20481
|
type: "address",
|
|
20482
|
+
indexed: true,
|
|
20483
|
+
internalType: "address",
|
|
20222
20484
|
},
|
|
20223
20485
|
],
|
|
20224
|
-
|
|
20225
|
-
outputs: [],
|
|
20226
|
-
stateMutability: "nonpayable",
|
|
20227
|
-
type: "function",
|
|
20486
|
+
anonymous: false,
|
|
20228
20487
|
},
|
|
20488
|
+
{ type: "error", name: "AccessControlBadConfirmation", inputs: [] },
|
|
20489
|
+
{
|
|
20490
|
+
type: "error",
|
|
20491
|
+
name: "AccessControlUnauthorizedAccount",
|
|
20492
|
+
inputs: [
|
|
20493
|
+
{ name: "account", type: "address", internalType: "address" },
|
|
20494
|
+
{ name: "neededRole", type: "bytes32", internalType: "bytes32" },
|
|
20495
|
+
],
|
|
20496
|
+
},
|
|
20497
|
+
{ type: "error", name: "AlreadyInitialized", inputs: [] },
|
|
20498
|
+
{ type: "error", name: "NewOwnerIsZeroAddress", inputs: [] },
|
|
20499
|
+
{ type: "error", name: "NoHandoverRequest", inputs: [] },
|
|
20500
|
+
{ type: "error", name: "Unauthorized", inputs: [] },
|
|
20501
|
+
{ type: "error", name: "UnknownManagerImplemention", inputs: [] },
|
|
20229
20502
|
];
|
|
20230
20503
|
|
|
20504
|
+
const chainIdToChain = {
|
|
20505
|
+
[base.id]: base,
|
|
20506
|
+
[baseSepolia.id]: baseSepolia,
|
|
20507
|
+
};
|
|
20508
|
+
|
|
20231
20509
|
class ReadTreasuryManagerFactory {
|
|
20232
|
-
constructor(address, drift = createDrift$1()) {
|
|
20510
|
+
constructor(chainId, address, drift = createDrift$1()) {
|
|
20233
20511
|
if (!address) {
|
|
20234
20512
|
throw new Error("Address is required");
|
|
20235
20513
|
}
|
|
@@ -20237,39 +20515,35 @@ class ReadTreasuryManagerFactory {
|
|
|
20237
20515
|
abi: TreasuryManagerFactoryAbi,
|
|
20238
20516
|
address,
|
|
20239
20517
|
});
|
|
20518
|
+
this.chainId = chainId;
|
|
20519
|
+
}
|
|
20520
|
+
async getManagerDeployedAddressFromTx(hash) {
|
|
20521
|
+
// Create a public client to get the transaction receipt with logs
|
|
20522
|
+
const publicClient = createPublicClient({
|
|
20523
|
+
chain: chainIdToChain[this.chainId],
|
|
20524
|
+
transport: http(),
|
|
20525
|
+
});
|
|
20526
|
+
// Wait for transaction receipt
|
|
20527
|
+
const receipt = await publicClient.waitForTransactionReceipt({ hash });
|
|
20528
|
+
// Get the logs from the receipt and find the ManagerDeployed event
|
|
20529
|
+
const events = await publicClient.getContractEvents({
|
|
20530
|
+
address: this.contract.address,
|
|
20531
|
+
abi: TreasuryManagerFactoryAbi,
|
|
20532
|
+
eventName: "ManagerDeployed",
|
|
20533
|
+
fromBlock: receipt.blockNumber,
|
|
20534
|
+
toBlock: receipt.blockNumber,
|
|
20535
|
+
});
|
|
20536
|
+
// Find the event from our transaction
|
|
20537
|
+
const event = events.find((e) => e.transactionHash === hash);
|
|
20538
|
+
if (!event) {
|
|
20539
|
+
throw new Error("ManagerDeployed event not found in transaction logs");
|
|
20540
|
+
}
|
|
20541
|
+
return event.args._manager;
|
|
20240
20542
|
}
|
|
20241
20543
|
}
|
|
20242
20544
|
class ReadWriteTreasuryManagerFactory extends ReadTreasuryManagerFactory {
|
|
20243
20545
|
constructor(chainId, address, drift = createDrift$1()) {
|
|
20244
|
-
super(address, drift);
|
|
20245
|
-
this.chainId = chainId;
|
|
20246
|
-
}
|
|
20247
|
-
/**
|
|
20248
|
-
* Deploys a new revenue manager
|
|
20249
|
-
* @param params - Parameters for deploying the revenue manager
|
|
20250
|
-
* @param params.protocolRecipient - The address of the protocol recipient
|
|
20251
|
-
* @param params.protocolFeePercent - The percentage of the protocol fee
|
|
20252
|
-
* @returns Transaction response
|
|
20253
|
-
*/
|
|
20254
|
-
deployRevenueManager(params) {
|
|
20255
|
-
return this.contract.write("deployAndInitializeManager", {
|
|
20256
|
-
_managerImplementation: RevenueManagerAddress[this.chainId],
|
|
20257
|
-
_owner: params.protocolRecipient,
|
|
20258
|
-
_data: encodeAbiParameters([
|
|
20259
|
-
{
|
|
20260
|
-
type: "tuple",
|
|
20261
|
-
components: [
|
|
20262
|
-
{ type: "address", name: "protocolRecipient" },
|
|
20263
|
-
{ type: "uint256", name: "protocolFee" },
|
|
20264
|
-
],
|
|
20265
|
-
},
|
|
20266
|
-
], [
|
|
20267
|
-
{
|
|
20268
|
-
protocolRecipient: params.protocolRecipient,
|
|
20269
|
-
protocolFee: BigInt(params.protocolFeePercent * 100), // Convert percentage to basis points
|
|
20270
|
-
},
|
|
20271
|
-
]),
|
|
20272
|
-
});
|
|
20546
|
+
super(chainId, address, drift);
|
|
20273
20547
|
}
|
|
20274
20548
|
}
|
|
20275
20549
|
|
|
@@ -21406,6 +21680,185 @@ class ReadWriteRevenueManager extends ReadRevenueManager {
|
|
|
21406
21680
|
}
|
|
21407
21681
|
}
|
|
21408
21682
|
|
|
21683
|
+
const TreasuryManagerAbi = [
|
|
21684
|
+
{
|
|
21685
|
+
type: "function",
|
|
21686
|
+
name: "deposit",
|
|
21687
|
+
inputs: [
|
|
21688
|
+
{
|
|
21689
|
+
name: "_flaunchToken",
|
|
21690
|
+
type: "tuple",
|
|
21691
|
+
internalType: "struct ITreasuryManager.FlaunchToken",
|
|
21692
|
+
components: [
|
|
21693
|
+
{
|
|
21694
|
+
name: "flaunch",
|
|
21695
|
+
type: "address",
|
|
21696
|
+
internalType: "contract Flaunch",
|
|
21697
|
+
},
|
|
21698
|
+
{ name: "tokenId", type: "uint256", internalType: "uint256" },
|
|
21699
|
+
],
|
|
21700
|
+
},
|
|
21701
|
+
{ name: "_creator", type: "address", internalType: "address" },
|
|
21702
|
+
{ name: "_data", type: "bytes", internalType: "bytes" },
|
|
21703
|
+
],
|
|
21704
|
+
outputs: [],
|
|
21705
|
+
stateMutability: "nonpayable",
|
|
21706
|
+
},
|
|
21707
|
+
{
|
|
21708
|
+
type: "function",
|
|
21709
|
+
name: "initialize",
|
|
21710
|
+
inputs: [
|
|
21711
|
+
{ name: "_owner", type: "address", internalType: "address" },
|
|
21712
|
+
{ name: "_data", type: "bytes", internalType: "bytes" },
|
|
21713
|
+
],
|
|
21714
|
+
outputs: [],
|
|
21715
|
+
stateMutability: "nonpayable",
|
|
21716
|
+
},
|
|
21717
|
+
{
|
|
21718
|
+
type: "function",
|
|
21719
|
+
name: "managerOwner",
|
|
21720
|
+
inputs: [],
|
|
21721
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
21722
|
+
stateMutability: "view",
|
|
21723
|
+
},
|
|
21724
|
+
{
|
|
21725
|
+
type: "function",
|
|
21726
|
+
name: "permissions",
|
|
21727
|
+
inputs: [],
|
|
21728
|
+
outputs: [
|
|
21729
|
+
{
|
|
21730
|
+
name: "",
|
|
21731
|
+
type: "address",
|
|
21732
|
+
internalType: "contract IManagerPermissions",
|
|
21733
|
+
},
|
|
21734
|
+
],
|
|
21735
|
+
stateMutability: "view",
|
|
21736
|
+
},
|
|
21737
|
+
{
|
|
21738
|
+
type: "function",
|
|
21739
|
+
name: "rescue",
|
|
21740
|
+
inputs: [
|
|
21741
|
+
{
|
|
21742
|
+
name: "_flaunchToken",
|
|
21743
|
+
type: "tuple",
|
|
21744
|
+
internalType: "struct ITreasuryManager.FlaunchToken",
|
|
21745
|
+
components: [
|
|
21746
|
+
{
|
|
21747
|
+
name: "flaunch",
|
|
21748
|
+
type: "address",
|
|
21749
|
+
internalType: "contract Flaunch",
|
|
21750
|
+
},
|
|
21751
|
+
{ name: "tokenId", type: "uint256", internalType: "uint256" },
|
|
21752
|
+
],
|
|
21753
|
+
},
|
|
21754
|
+
{ name: "_recipient", type: "address", internalType: "address" },
|
|
21755
|
+
],
|
|
21756
|
+
outputs: [],
|
|
21757
|
+
stateMutability: "nonpayable",
|
|
21758
|
+
},
|
|
21759
|
+
{
|
|
21760
|
+
type: "function",
|
|
21761
|
+
name: "setPermissions",
|
|
21762
|
+
inputs: [
|
|
21763
|
+
{ name: "_permissions", type: "address", internalType: "address" },
|
|
21764
|
+
],
|
|
21765
|
+
outputs: [],
|
|
21766
|
+
stateMutability: "nonpayable",
|
|
21767
|
+
},
|
|
21768
|
+
{
|
|
21769
|
+
type: "function",
|
|
21770
|
+
name: "transferManagerOwnership",
|
|
21771
|
+
inputs: [
|
|
21772
|
+
{
|
|
21773
|
+
name: "_newManagerOwner",
|
|
21774
|
+
type: "address",
|
|
21775
|
+
internalType: "address",
|
|
21776
|
+
},
|
|
21777
|
+
],
|
|
21778
|
+
outputs: [],
|
|
21779
|
+
stateMutability: "nonpayable",
|
|
21780
|
+
},
|
|
21781
|
+
];
|
|
21782
|
+
|
|
21783
|
+
/**
|
|
21784
|
+
* Client for interacting with the TreasuryManager contract in read-only mode
|
|
21785
|
+
* Provides methods to query permissions and manager owner
|
|
21786
|
+
*/
|
|
21787
|
+
class ReadTreasuryManager {
|
|
21788
|
+
/**
|
|
21789
|
+
* Creates a new ReadTreasuryManager instance
|
|
21790
|
+
* @param address - The address of the TreasuryManager contract
|
|
21791
|
+
* @param drift - Optional drift instance for contract interactions (creates new instance if not provided)
|
|
21792
|
+
* @throws Error if address is not provided
|
|
21793
|
+
*/
|
|
21794
|
+
constructor(address, drift = createDrift$1()) {
|
|
21795
|
+
if (!address) {
|
|
21796
|
+
throw new Error("Address is required");
|
|
21797
|
+
}
|
|
21798
|
+
this.contract = drift.contract({
|
|
21799
|
+
abi: TreasuryManagerAbi,
|
|
21800
|
+
address,
|
|
21801
|
+
});
|
|
21802
|
+
}
|
|
21803
|
+
/**
|
|
21804
|
+
* Gets the permissions contract address
|
|
21805
|
+
* @returns Promise<Address> - The address of the permissions contract
|
|
21806
|
+
*/
|
|
21807
|
+
permissions() {
|
|
21808
|
+
return this.contract.read("permissions");
|
|
21809
|
+
}
|
|
21810
|
+
/**
|
|
21811
|
+
* Gets the manager owner address
|
|
21812
|
+
* @returns Promise<Address> - The address of the manager owner
|
|
21813
|
+
*/
|
|
21814
|
+
managerOwner() {
|
|
21815
|
+
return this.contract.read("managerOwner");
|
|
21816
|
+
}
|
|
21817
|
+
}
|
|
21818
|
+
/**
|
|
21819
|
+
* Extended client for interacting with the TreasuryManager contract with write capabilities
|
|
21820
|
+
* Provides methods to deposit tokens, set permissions, and transfer ownership
|
|
21821
|
+
*/
|
|
21822
|
+
class ReadWriteTreasuryManager extends ReadTreasuryManager {
|
|
21823
|
+
constructor(address, drift = createDrift$1()) {
|
|
21824
|
+
super(address, drift);
|
|
21825
|
+
}
|
|
21826
|
+
/**
|
|
21827
|
+
* Deposits a flaunch token to the treasury
|
|
21828
|
+
* @param flaunchToken - The flaunch token to deposit
|
|
21829
|
+
* @param creator - The address of the creator
|
|
21830
|
+
* @param data - Additional data for the deposit
|
|
21831
|
+
* @returns Promise<void>
|
|
21832
|
+
*/
|
|
21833
|
+
deposit(flaunchToken, creator, data) {
|
|
21834
|
+
return this.contract.write("deposit", {
|
|
21835
|
+
_flaunchToken: flaunchToken,
|
|
21836
|
+
_creator: creator,
|
|
21837
|
+
_data: data,
|
|
21838
|
+
});
|
|
21839
|
+
}
|
|
21840
|
+
/**
|
|
21841
|
+
* Sets the permissions contract address
|
|
21842
|
+
* @param permissions - The address of the new permissions contract
|
|
21843
|
+
* @returns Promise<void>
|
|
21844
|
+
*/
|
|
21845
|
+
setPermissions(permissions) {
|
|
21846
|
+
return this.contract.write("setPermissions", {
|
|
21847
|
+
_permissions: permissions,
|
|
21848
|
+
});
|
|
21849
|
+
}
|
|
21850
|
+
/**
|
|
21851
|
+
* Transfers the manager ownership to a new address
|
|
21852
|
+
* @param newManagerOwner - The address of the new manager owner
|
|
21853
|
+
* @returns Promise<void>
|
|
21854
|
+
*/
|
|
21855
|
+
transferManagerOwnership(newManagerOwner) {
|
|
21856
|
+
return this.contract.write("transferManagerOwnership", {
|
|
21857
|
+
_newManagerOwner: newManagerOwner,
|
|
21858
|
+
});
|
|
21859
|
+
}
|
|
21860
|
+
}
|
|
21861
|
+
|
|
21409
21862
|
// our min/max tick range that is valid for the tick spacing (60)
|
|
21410
21863
|
const TickFinder = {
|
|
21411
21864
|
MIN_TICK: -887220,
|
|
@@ -21497,11 +21950,6 @@ const calculateUnderlyingTokenBalances = (liquidity, tickLower, tickUpper, tickC
|
|
|
21497
21950
|
return { amount0, amount1 };
|
|
21498
21951
|
};
|
|
21499
21952
|
|
|
21500
|
-
const chainIdToChain = {
|
|
21501
|
-
[base.id]: base,
|
|
21502
|
-
[baseSepolia.id]: baseSepolia,
|
|
21503
|
-
};
|
|
21504
|
-
|
|
21505
21953
|
const FastFlaunchZapAbi = [
|
|
21506
21954
|
{
|
|
21507
21955
|
inputs: [
|
|
@@ -21669,6 +22117,22 @@ class ReadFlaunchSDK {
|
|
|
21669
22117
|
return this.readBidWallV1_1;
|
|
21670
22118
|
}
|
|
21671
22119
|
}
|
|
22120
|
+
/**
|
|
22121
|
+
* Gets the flaunch contract address for a given version
|
|
22122
|
+
* @param version - The version to get the flaunch contract address for
|
|
22123
|
+
*/
|
|
22124
|
+
getFlaunchAddress(version) {
|
|
22125
|
+
switch (version) {
|
|
22126
|
+
case FlaunchVersion.V1:
|
|
22127
|
+
return this.readFlaunch.contract.address;
|
|
22128
|
+
case FlaunchVersion.V1_1:
|
|
22129
|
+
return this.readFlaunchV1_1.contract.address;
|
|
22130
|
+
case FlaunchVersion.ANY:
|
|
22131
|
+
return this.readFlaunchV1_1.contract.address;
|
|
22132
|
+
default:
|
|
22133
|
+
return this.readFlaunchV1_1.contract.address;
|
|
22134
|
+
}
|
|
22135
|
+
}
|
|
21672
22136
|
getPositionManagerAddress(version) {
|
|
21673
22137
|
return this.getPositionManager(version).contract.address;
|
|
21674
22138
|
}
|
|
@@ -22188,6 +22652,22 @@ class ReadFlaunchSDK {
|
|
|
22188
22652
|
const readRevenueManager = new ReadRevenueManager(params.revenueManagerAddress, this.drift);
|
|
22189
22653
|
return readRevenueManager.allTokensInManager(params.sortByDesc);
|
|
22190
22654
|
}
|
|
22655
|
+
/**
|
|
22656
|
+
* Gets treasury manager information including owner and permissions
|
|
22657
|
+
* @param treasuryManagerAddress - The address of the treasury manager
|
|
22658
|
+
* @returns Promise<{managerOwner: Address, permissions: Address}> - Treasury manager owner and permissions contract addresses
|
|
22659
|
+
*/
|
|
22660
|
+
async treasuryManagerInfo(treasuryManagerAddress) {
|
|
22661
|
+
const readTreasuryManager = new ReadTreasuryManager(treasuryManagerAddress, this.drift);
|
|
22662
|
+
const [managerOwner, permissions] = await Promise.all([
|
|
22663
|
+
readTreasuryManager.managerOwner(),
|
|
22664
|
+
readTreasuryManager.permissions(),
|
|
22665
|
+
]);
|
|
22666
|
+
return {
|
|
22667
|
+
managerOwner,
|
|
22668
|
+
permissions,
|
|
22669
|
+
};
|
|
22670
|
+
}
|
|
22191
22671
|
/**
|
|
22192
22672
|
* Gets the pool ID for a given coin
|
|
22193
22673
|
* @param coinAddress - The address of the coin
|
|
@@ -22323,6 +22803,22 @@ class ReadFlaunchSDK {
|
|
|
22323
22803
|
tokenImporterVerifyMemecoin(memecoin) {
|
|
22324
22804
|
return this.readTokenImporter.verifyMemecoin(memecoin);
|
|
22325
22805
|
}
|
|
22806
|
+
/**
|
|
22807
|
+
* Checks if an operator is approved for all flaunch tokens of an owner
|
|
22808
|
+
* @param version - The flaunch version to determine the correct contract address
|
|
22809
|
+
* @param owner - The owner address to check
|
|
22810
|
+
* @param operator - The operator address to check
|
|
22811
|
+
* @returns Promise<boolean> - True if operator is approved for all tokens
|
|
22812
|
+
*/
|
|
22813
|
+
async isFlaunchTokenApprovedForAll(version, owner, operator) {
|
|
22814
|
+
const flaunchAddress = this.getFlaunchAddress(version);
|
|
22815
|
+
return this.drift.read({
|
|
22816
|
+
abi: erc721Abi,
|
|
22817
|
+
address: flaunchAddress,
|
|
22818
|
+
fn: "isApprovedForAll",
|
|
22819
|
+
args: { owner, operator },
|
|
22820
|
+
});
|
|
22821
|
+
}
|
|
22326
22822
|
}
|
|
22327
22823
|
class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
|
|
22328
22824
|
constructor(chainId, drift = createDrift$1()) {
|
|
@@ -22342,31 +22838,28 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
|
|
|
22342
22838
|
* @param params - Parameters for deploying the revenue manager
|
|
22343
22839
|
* @param params.protocolRecipient - The address of the protocol recipient
|
|
22344
22840
|
* @param params.protocolFeePercent - The percentage of the protocol fee
|
|
22841
|
+
* @param params.permissions - The permissions for the revenue manager
|
|
22345
22842
|
* @returns Address of the deployed revenue manager
|
|
22346
22843
|
*/
|
|
22347
22844
|
async deployRevenueManager(params) {
|
|
22348
|
-
const hash = await this.
|
|
22349
|
-
|
|
22350
|
-
|
|
22351
|
-
|
|
22352
|
-
|
|
22353
|
-
|
|
22354
|
-
|
|
22355
|
-
|
|
22356
|
-
|
|
22357
|
-
|
|
22358
|
-
|
|
22359
|
-
|
|
22360
|
-
|
|
22361
|
-
|
|
22362
|
-
|
|
22363
|
-
|
|
22364
|
-
|
|
22365
|
-
|
|
22366
|
-
if (!event) {
|
|
22367
|
-
throw new Error("ManagerDeployed event not found in transaction logs");
|
|
22368
|
-
}
|
|
22369
|
-
return event.args._manager;
|
|
22845
|
+
const hash = await this.readWriteFlaunchZap.deployRevenueManager(params);
|
|
22846
|
+
return await this.readWriteTreasuryManagerFactory.getManagerDeployedAddressFromTx(hash);
|
|
22847
|
+
}
|
|
22848
|
+
/**
|
|
22849
|
+
* Deploys a new staking manager
|
|
22850
|
+
* @param params - Parameters for deploying the staking manager
|
|
22851
|
+
* @param params.managerOwner - The address of the manager owner
|
|
22852
|
+
* @param params.stakingToken - The address of the token to be staked
|
|
22853
|
+
* @param params.minEscrowDuration - The minimum duration (in seconds) that the creator's NFT is locked for
|
|
22854
|
+
* @param params.minStakeDuration - The minimum duration (in seconds) that the user's tokens are locked for
|
|
22855
|
+
* @param params.creatorSharePercent - The % share that a creator will earn from their token
|
|
22856
|
+
* @param params.ownerSharePercent - The % share that the manager owner will earn from their token
|
|
22857
|
+
* @param params.permissions - The permissions for the staking manager
|
|
22858
|
+
* @returns Address of the deployed staking manager
|
|
22859
|
+
*/
|
|
22860
|
+
async deployStakingManager(params) {
|
|
22861
|
+
const hash = await this.readWriteFlaunchZap.deployStakingManager(params);
|
|
22862
|
+
return await this.readWriteTreasuryManagerFactory.getManagerDeployedAddressFromTx(hash);
|
|
22370
22863
|
}
|
|
22371
22864
|
/**
|
|
22372
22865
|
* Creates a new Flaunch on the specified version
|
|
@@ -22621,6 +23114,63 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
|
|
|
22621
23114
|
const readWriteRevenueManager = new ReadWriteRevenueManager(params.revenueManagerAddress, this.drift);
|
|
22622
23115
|
return readWriteRevenueManager.creatorClaimForTokens(params.flaunchTokens);
|
|
22623
23116
|
}
|
|
23117
|
+
/**
|
|
23118
|
+
* Sets the permissions contract address for a treasury manager
|
|
23119
|
+
* @param treasuryManagerAddress - The address of the treasury manager
|
|
23120
|
+
* @param permissions - The permissions enum value to set
|
|
23121
|
+
* @returns Transaction response
|
|
23122
|
+
*/
|
|
23123
|
+
treasuryManagerSetPermissions(treasuryManagerAddress, permissions) {
|
|
23124
|
+
const readWriteTreasuryManager = new ReadWriteTreasuryManager(treasuryManagerAddress, this.drift);
|
|
23125
|
+
const permissionsAddress = getPermissionsAddress(permissions, this.chainId);
|
|
23126
|
+
return readWriteTreasuryManager.setPermissions(permissionsAddress);
|
|
23127
|
+
}
|
|
23128
|
+
/**
|
|
23129
|
+
* Transfers the ownership of a treasury manager to a new address
|
|
23130
|
+
* @param treasuryManagerAddress - The address of the treasury manager
|
|
23131
|
+
* @param newManagerOwner - The address of the new manager owner
|
|
23132
|
+
* @returns Transaction response
|
|
23133
|
+
*/
|
|
23134
|
+
treasuryManagerTransferOwnership(treasuryManagerAddress, newManagerOwner) {
|
|
23135
|
+
const readWriteTreasuryManager = new ReadWriteTreasuryManager(treasuryManagerAddress, this.drift);
|
|
23136
|
+
return readWriteTreasuryManager.transferManagerOwnership(newManagerOwner);
|
|
23137
|
+
}
|
|
23138
|
+
/**
|
|
23139
|
+
* Sets approval for all flaunch tokens to an operator
|
|
23140
|
+
* @param version - The flaunch version to determine the correct contract address
|
|
23141
|
+
* @param operator - The operator address to approve/revoke
|
|
23142
|
+
* @param approved - Whether to approve or revoke approval
|
|
23143
|
+
* @returns Transaction response
|
|
23144
|
+
*/
|
|
23145
|
+
async setFlaunchTokenApprovalForAll(version, operator, approved) {
|
|
23146
|
+
const flaunchAddress = this.getFlaunchAddress(version);
|
|
23147
|
+
return this.drift.write({
|
|
23148
|
+
abi: erc721Abi,
|
|
23149
|
+
address: flaunchAddress,
|
|
23150
|
+
fn: "setApprovalForAll",
|
|
23151
|
+
args: { operator, approved },
|
|
23152
|
+
});
|
|
23153
|
+
}
|
|
23154
|
+
/**
|
|
23155
|
+
* Adds an existing flaunch token to a treasury manager. NFT approval must be given prior to calling this function.
|
|
23156
|
+
* @param treasuryManagerAddress - The address of the treasury manager
|
|
23157
|
+
* @param version - The flaunch version to determine the correct contract address
|
|
23158
|
+
* @param tokenId - The token ID to deposit
|
|
23159
|
+
* @param creator - Optional creator address. If not provided, uses the connected wallet address
|
|
23160
|
+
* @param data - Optional additional data for the deposit (defaults to empty bytes)
|
|
23161
|
+
* @returns Transaction response
|
|
23162
|
+
*/
|
|
23163
|
+
async addToTreasuryManager(treasuryManagerAddress, version, tokenId, creator, data = "0x") {
|
|
23164
|
+
const readWriteTreasuryManager = new ReadWriteTreasuryManager(treasuryManagerAddress, this.drift);
|
|
23165
|
+
// Get the flaunch contract address based on version
|
|
23166
|
+
const flaunchAddress = this.getFlaunchAddress(version);
|
|
23167
|
+
const flaunchToken = {
|
|
23168
|
+
flaunch: flaunchAddress,
|
|
23169
|
+
tokenId,
|
|
23170
|
+
};
|
|
23171
|
+
const creatorAddress = creator ?? (await this.drift.getSignerAddress());
|
|
23172
|
+
return readWriteTreasuryManager.deposit(flaunchToken, creatorAddress, data);
|
|
23173
|
+
}
|
|
22624
23174
|
/**
|
|
22625
23175
|
* Imports a memecoin into the TokenImporter
|
|
22626
23176
|
* @param params.memecoin - The address of the memecoin to import
|
|
@@ -22677,5 +23227,5 @@ const FlaunchSDK = {
|
|
|
22677
23227
|
ReadWriteFlaunchSDK,
|
|
22678
23228
|
};
|
|
22679
23229
|
|
|
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 };
|
|
23230
|
+
export { AddressFeeSplitManagerAddress, AnyBidWallAddress, AnyFlaunchAddress, AnyPositionManagerAbi, AnyPositionManagerAddress, BidWallAddress, BidWallV1_1Abi, BidWallV1_1Address, BidwallAbi, ClankerWorldVerifierAddress, ClosedPermissionsAddress, 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, Permissions, Permit2Abi, Permit2Address, PoolManagerAbi, PoolManagerAddress, QuoterAbi, QuoterAddress, ReadFlaunchSDK, ReadWriteFlaunchSDK, ReferralEscrowAbi, ReferralEscrowAddress, RevenueManagerAbi, RevenueManagerAddress, StakingManagerAddress, StateViewAbi, StateViewAddress, TICK_SPACING, TickFinder, TokenImporterAddress, TreasuryManagerFactoryAbi, TreasuryManagerFactoryAddress, USDCETHPoolKeys, UniversalRouterAbi, UniversalRouterAddress, Verifier, VirtualsVerifierAddress, WhitelistVerifierAddress, WhitelistedPermissionsAddress, ZoraVerifierAddress, bytes32ToUint256, calculateUnderlyingTokenBalances, chainIdToChain, createDrift, createFlaunch, ethToMemecoin, generateTokenUri, getAmountWithSlippage, getPermissionsAddress, getPermit2TypedData, getPoolId, getSqrtPriceX96FromTick, getValidTick, memecoinToEthWithPermit2, orderPoolKey, parseSwapData, resolveIPFS, uint256ToBytes32, uploadFileToIPFS, uploadImageToIPFS, uploadJsonToIPFS };
|
|
22681
23231
|
//# sourceMappingURL=index.esm.js.map
|