four-flap-meme-sdk 4.1.1 → 4.3.0
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/chains/index.d.ts +3 -0
- package/dist/chains/index.js +4 -0
- package/dist/chains/robinhood/constants.d.ts +48 -0
- package/dist/chains/robinhood/constants.js +55 -0
- package/dist/chains/robinhood/index.d.ts +11 -0
- package/dist/chains/robinhood/index.js +9 -0
- package/dist/chains/robinhood/longetf/assets.d.ts +11 -0
- package/dist/chains/robinhood/longetf/assets.js +4 -0
- package/dist/chains/robinhood/longetf/encode.d.ts +41 -0
- package/dist/chains/robinhood/longetf/encode.js +116 -0
- package/dist/chains/robinhood/longetf/index.d.ts +3 -0
- package/dist/chains/robinhood/longetf/index.js +3 -0
- package/dist/chains/robinhood/longetf/launch.d.ts +49 -0
- package/dist/chains/robinhood/longetf/launch.js +64 -0
- package/dist/chains/robinhood/pons-v2/encode.d.ts +62 -0
- package/dist/chains/robinhood/pons-v2/encode.js +111 -0
- package/dist/chains/robinhood/pons-v2/index.d.ts +2 -0
- package/dist/chains/robinhood/pons-v2/index.js +2 -0
- package/dist/chains/robinhood/pons-v2/launch.d.ts +48 -0
- package/dist/chains/robinhood/pons-v2/launch.js +107 -0
- package/dist/chains/robinhood/robinhood.test.d.ts +1 -0
- package/dist/chains/robinhood/robinhood.test.js +103 -0
- package/dist/chains/robinhood/sign.d.ts +20 -0
- package/dist/chains/robinhood/sign.js +31 -0
- package/dist/core/constants/addresses.d.ts +18 -0
- package/dist/core/constants/addresses.js +23 -0
- package/dist/core/constants/chains.d.ts +16 -0
- package/dist/core/constants/chains.js +20 -0
- package/dist/core/constants/gas.d.ts +8 -0
- package/dist/core/constants/gas.js +9 -0
- package/dist/core/constants/index.d.ts +1 -1
- package/dist/core/constants/index.js +1 -1
- package/dist/exports/root-foundations.d.ts +1 -1
- package/dist/exports/root-foundations.js +1 -1
- package/dist/exports/root-robinhood.d.ts +9 -0
- package/dist/exports/root-robinhood.js +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +1 -1
- package/package.json +1 -1
package/dist/chains/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * as bsc from './bsc/index.js';
|
|
|
7
7
|
export * as xlayer from './xlayer/index.js';
|
|
8
8
|
export * as monad from './monad/index.js';
|
|
9
9
|
export * as eni from './eni/index.js';
|
|
10
|
+
export * as robinhood from './robinhood/index.js';
|
|
10
11
|
/**
|
|
11
12
|
* 与包根 `export * as chains` 一致的命名空间(`chains.bsc` / `chains.eni` …)
|
|
12
13
|
*/
|
|
@@ -14,9 +15,11 @@ import * as bscNs from './bsc/index.js';
|
|
|
14
15
|
import * as xlayerNs from './xlayer/index.js';
|
|
15
16
|
import * as monadNs from './monad/index.js';
|
|
16
17
|
import * as eniNs from './eni/index.js';
|
|
18
|
+
import * as robinhoodNs from './robinhood/index.js';
|
|
17
19
|
export declare const chains: {
|
|
18
20
|
readonly bsc: typeof bscNs;
|
|
19
21
|
readonly xlayer: typeof xlayerNs;
|
|
20
22
|
readonly monad: typeof monadNs;
|
|
21
23
|
readonly eni: typeof eniNs;
|
|
24
|
+
readonly robinhood: typeof robinhoodNs;
|
|
22
25
|
};
|
package/dist/chains/index.js
CHANGED
|
@@ -11,6 +11,8 @@ export * as xlayer from './xlayer/index.js';
|
|
|
11
11
|
export * as monad from './monad/index.js';
|
|
12
12
|
// ENI 链
|
|
13
13
|
export * as eni from './eni/index.js';
|
|
14
|
+
// Robinhood Chain
|
|
15
|
+
export * as robinhood from './robinhood/index.js';
|
|
14
16
|
/**
|
|
15
17
|
* 与包根 `export * as chains` 一致的命名空间(`chains.bsc` / `chains.eni` …)
|
|
16
18
|
*/
|
|
@@ -18,9 +20,11 @@ import * as bscNs from './bsc/index.js';
|
|
|
18
20
|
import * as xlayerNs from './xlayer/index.js';
|
|
19
21
|
import * as monadNs from './monad/index.js';
|
|
20
22
|
import * as eniNs from './eni/index.js';
|
|
23
|
+
import * as robinhoodNs from './robinhood/index.js';
|
|
21
24
|
export const chains = {
|
|
22
25
|
bsc: bscNs,
|
|
23
26
|
xlayer: xlayerNs,
|
|
24
27
|
monad: monadNs,
|
|
25
28
|
eni: eniNs,
|
|
29
|
+
robinhood: robinhoodNs,
|
|
26
30
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Robinhood Chain 发币常量
|
|
3
|
+
*/
|
|
4
|
+
export declare const ROBINHOOD_CHAIN_ID: 4663;
|
|
5
|
+
export declare const ROBINHOOD_RPC_URL: "https://rpc.mainnet.chain.robinhood.com";
|
|
6
|
+
export declare const ROBINHOOD_EXPLORER: "https://robinhoodchain.blockscout.com";
|
|
7
|
+
export declare const ROBINHOOD_ADDRESSES: {
|
|
8
|
+
readonly WETH: "0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73";
|
|
9
|
+
readonly Multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
10
|
+
readonly LongetfFactory: "0xd2ba46aeffec4bfddde62c2dd3e8c76c5c9aeedc";
|
|
11
|
+
readonly LongXyzLauncher: "0x22e99278308B393ea1260859B181AD7E78f5eeED";
|
|
12
|
+
readonly LongXyzHook: "0x4e3468951d49f2eea976ed0d6e75ffcb44a9a544";
|
|
13
|
+
readonly LongXyzProtocolBeneficiary: "0x21e2ce70511e4fe542a97708e89520471daa7a66";
|
|
14
|
+
readonly PonsV2Factory: "0x7eD598BcEf8bd9Edd8C97A195C6d13f40801EC7e";
|
|
15
|
+
readonly PonsV2LaunchAndBuy: "0xe33E9E479dF8802cb0866d5d05258bEc4cF62948";
|
|
16
|
+
readonly PonsV2MemeHook: "0xE5e702641Ea86F4ae6cC3cDaeD2B886f976Be044";
|
|
17
|
+
readonly PonsV2Locker: "0x267444D099b10fB5Ed7c3Cc7B7c767AdcA574952";
|
|
18
|
+
};
|
|
19
|
+
export declare const LONGETF_FACTORY: "0xd2ba46aeffec4bfddde62c2dd3e8c76c5c9aeedc";
|
|
20
|
+
export declare const LONG_XYZ_LAUNCHER: "0x22e99278308B393ea1260859B181AD7E78f5eeED";
|
|
21
|
+
export declare const LONG_XYZ_HOOK: "0x4e3468951d49f2eea976ed0d6e75ffcb44a9a544";
|
|
22
|
+
export declare const LONG_XYZ_PROTOCOL_BENEFICIARY: "0x21e2ce70511e4fe542a97708e89520471daa7a66";
|
|
23
|
+
export declare const PONS_V2_FACTORY: "0x7eD598BcEf8bd9Edd8C97A195C6d13f40801EC7e";
|
|
24
|
+
export declare const PONS_V2_LAUNCH_AND_BUY: "0xe33E9E479dF8802cb0866d5d05258bEc4cF62948";
|
|
25
|
+
export declare const LONGETF_DEPLOY_VAULT_GAS_LIMIT: 3000000n;
|
|
26
|
+
export declare const LONGETF_LAUNCH_GAS_LIMIT: 3000000n;
|
|
27
|
+
export declare const LONGETF_REGISTER_GAS_LIMIT: 500000n;
|
|
28
|
+
export declare const PONS_V2_LAUNCH_GAS_LIMIT: 3000000n;
|
|
29
|
+
/** Word index after the 4-byte selector in long.xyz create() template. */
|
|
30
|
+
export declare const LONGETF_LAUNCH_WORDS: {
|
|
31
|
+
readonly salt: 13;
|
|
32
|
+
readonly nameLen: 26;
|
|
33
|
+
readonly name: 27;
|
|
34
|
+
readonly symLen: 28;
|
|
35
|
+
readonly sym: 29;
|
|
36
|
+
readonly uriLen: 34;
|
|
37
|
+
readonly uri: 35;
|
|
38
|
+
readonly numeraire0: 3;
|
|
39
|
+
readonly numeraire1: 65;
|
|
40
|
+
readonly beneficiary: 62;
|
|
41
|
+
};
|
|
42
|
+
export declare const LONGETF_URI_WORDS = 3;
|
|
43
|
+
export declare const LONGETF_MINE_SALT_MAX_TRIES = 5000;
|
|
44
|
+
export declare const LONGETF_FACTORY_ABI: readonly ["function deployVault(bytes32 salt, address creator, bytes initCode)", "function register(address token, address vault)"];
|
|
45
|
+
export declare const LONG_XYZ_LAUNCHER_ABI: readonly ["function isTickerAvailable(string ticker) view returns (bool)"];
|
|
46
|
+
export declare const PONS_V2_FACTORY_ABI: readonly ["function launchToken(tuple(string name, string symbol, string logo, string description, tuple(string twitter, string telegram, string discord, string website, string farcaster) socials, address creatorFeeRecipient, uint16 creatorTaxBps, bool buybackEnabled, bytes32 expectedEconomics, bytes32 salt) params, uint256 launchConfigId, address pairToken) payable returns (address token, address curve)", "function launchToken(tuple(string name, string symbol, string logo, string description, tuple(string twitter, string telegram, string discord, string website, string farcaster) socials, address creatorFeeRecipient, uint16 creatorTaxBps, bool buybackEnabled, bytes32 expectedEconomics, bytes32 salt) params, uint256 launchConfigId, address pairToken, address[] snipeTaxExemptions) payable returns (address token, address curve)", "function previewLaunchEconomics(uint256 launchConfigId, address pairToken) view returns (bytes32)", "function launchFee() view returns (uint256)", "function canLaunch(address account) view returns (bool)", "function launchConfigCount() view returns (uint256)", "function getLaunchConfig(uint256 id) view returns (tuple(uint256 supply, uint256 curveFeeBps, uint256 phantomQuote, uint256 graduationThreshold, uint24 poolFee, int24 tickSpacing, bool enabled))", "event TokenLaunched(address indexed token, address indexed curve, address indexed deployer, address pairToken, uint256 launchConfigId, uint256 graduationThreshold)"];
|
|
47
|
+
export declare const PONS_V2_LAUNCH_AND_BUY_ABI: readonly ["function launchAndBuy(tuple(string name, string symbol, string logo, string description, tuple(string twitter, string telegram, string discord, string website, string farcaster) socials, address creatorFeeRecipient, uint16 creatorTaxBps, bool buybackEnabled, bytes32 expectedEconomics, bytes32 salt) params, uint256 launchConfigId, address pairToken, uint256 quoteIn, uint256 minTokensOut, address recipient, address[] snipeTaxExemptions) payable returns (address token, address curve, uint256 tokensOut)"];
|
|
48
|
+
export type HexString = `0x${string}`;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Robinhood Chain 发币常量
|
|
3
|
+
*/
|
|
4
|
+
import { ADDRESSES, CHAINS, GAS_LIMITS } from '../../core/constants/index.js';
|
|
5
|
+
export const ROBINHOOD_CHAIN_ID = CHAINS.ROBINHOOD.chainId;
|
|
6
|
+
export const ROBINHOOD_RPC_URL = CHAINS.ROBINHOOD.rpcUrls.default;
|
|
7
|
+
export const ROBINHOOD_EXPLORER = CHAINS.ROBINHOOD.explorer;
|
|
8
|
+
export const ROBINHOOD_ADDRESSES = ADDRESSES.ROBINHOOD;
|
|
9
|
+
export const LONGETF_FACTORY = ADDRESSES.ROBINHOOD.LongetfFactory;
|
|
10
|
+
export const LONG_XYZ_LAUNCHER = ADDRESSES.ROBINHOOD.LongXyzLauncher;
|
|
11
|
+
export const LONG_XYZ_HOOK = ADDRESSES.ROBINHOOD.LongXyzHook;
|
|
12
|
+
export const LONG_XYZ_PROTOCOL_BENEFICIARY = ADDRESSES.ROBINHOOD.LongXyzProtocolBeneficiary;
|
|
13
|
+
export const PONS_V2_FACTORY = ADDRESSES.ROBINHOOD.PonsV2Factory;
|
|
14
|
+
export const PONS_V2_LAUNCH_AND_BUY = ADDRESSES.ROBINHOOD.PonsV2LaunchAndBuy;
|
|
15
|
+
export const LONGETF_DEPLOY_VAULT_GAS_LIMIT = GAS_LIMITS.ROBINHOOD_LONGETF_DEPLOY_VAULT;
|
|
16
|
+
export const LONGETF_LAUNCH_GAS_LIMIT = GAS_LIMITS.ROBINHOOD_LONGETF_LAUNCH;
|
|
17
|
+
export const LONGETF_REGISTER_GAS_LIMIT = GAS_LIMITS.ROBINHOOD_LONGETF_REGISTER;
|
|
18
|
+
export const PONS_V2_LAUNCH_GAS_LIMIT = GAS_LIMITS.ROBINHOOD_PONS_LAUNCH;
|
|
19
|
+
/** Word index after the 4-byte selector in long.xyz create() template. */
|
|
20
|
+
export const LONGETF_LAUNCH_WORDS = {
|
|
21
|
+
salt: 13,
|
|
22
|
+
nameLen: 26,
|
|
23
|
+
name: 27,
|
|
24
|
+
symLen: 28,
|
|
25
|
+
sym: 29,
|
|
26
|
+
uriLen: 34,
|
|
27
|
+
uri: 35,
|
|
28
|
+
numeraire0: 3,
|
|
29
|
+
numeraire1: 65,
|
|
30
|
+
beneficiary: 62,
|
|
31
|
+
};
|
|
32
|
+
export const LONGETF_URI_WORDS = 3;
|
|
33
|
+
export const LONGETF_MINE_SALT_MAX_TRIES = 5000;
|
|
34
|
+
export const LONGETF_FACTORY_ABI = [
|
|
35
|
+
'function deployVault(bytes32 salt, address creator, bytes initCode)',
|
|
36
|
+
'function register(address token, address vault)',
|
|
37
|
+
];
|
|
38
|
+
export const LONG_XYZ_LAUNCHER_ABI = [
|
|
39
|
+
'function isTickerAvailable(string ticker) view returns (bool)',
|
|
40
|
+
];
|
|
41
|
+
const PONS_SOCIALS_TUPLE = 'tuple(string twitter, string telegram, string discord, string website, string farcaster)';
|
|
42
|
+
const PONS_TOKEN_PARAMS_TUPLE = `tuple(string name, string symbol, string logo, string description, ${PONS_SOCIALS_TUPLE} socials, address creatorFeeRecipient, uint16 creatorTaxBps, bool buybackEnabled, bytes32 expectedEconomics, bytes32 salt)`;
|
|
43
|
+
export const PONS_V2_FACTORY_ABI = [
|
|
44
|
+
`function launchToken(${PONS_TOKEN_PARAMS_TUPLE} params, uint256 launchConfigId, address pairToken) payable returns (address token, address curve)`,
|
|
45
|
+
`function launchToken(${PONS_TOKEN_PARAMS_TUPLE} params, uint256 launchConfigId, address pairToken, address[] snipeTaxExemptions) payable returns (address token, address curve)`,
|
|
46
|
+
'function previewLaunchEconomics(uint256 launchConfigId, address pairToken) view returns (bytes32)',
|
|
47
|
+
'function launchFee() view returns (uint256)',
|
|
48
|
+
'function canLaunch(address account) view returns (bool)',
|
|
49
|
+
'function launchConfigCount() view returns (uint256)',
|
|
50
|
+
'function getLaunchConfig(uint256 id) view returns (tuple(uint256 supply, uint256 curveFeeBps, uint256 phantomQuote, uint256 graduationThreshold, uint24 poolFee, int24 tickSpacing, bool enabled))',
|
|
51
|
+
'event TokenLaunched(address indexed token, address indexed curve, address indexed deployer, address pairToken, uint256 launchConfigId, uint256 graduationThreshold)',
|
|
52
|
+
];
|
|
53
|
+
export const PONS_V2_LAUNCH_AND_BUY_ABI = [
|
|
54
|
+
`function launchAndBuy(${PONS_TOKEN_PARAMS_TUPLE} params, uint256 launchConfigId, address pairToken, uint256 quoteIn, uint256 minTokensOut, address recipient, address[] snipeTaxExemptions) payable returns (address token, address curve, uint256 tokensOut)`,
|
|
55
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Robinhood Chain:LONGETF(long.xyz 锁费)与 pons v2 发币
|
|
3
|
+
*/
|
|
4
|
+
export * from './constants.js';
|
|
5
|
+
export * from './sign.js';
|
|
6
|
+
export * as longetf from './longetf/index.js';
|
|
7
|
+
export * as ponsV2 from './pons-v2/index.js';
|
|
8
|
+
export { LONGETF_VAULT_INITCODE, LONGETF_LAUNCH_TEMPLATE, LONGETF_DEFAULT_ANCHORS, longetfVaultInitCodeHash, longetfEffectiveSalt, predictLongetfVault, mineLongetfVaultSalt, encodeLongetfDeployVault, encodeLongetfRegister, encodeLongetfIsTickerAvailable, patchLongetfLaunchCalldata, parseLongetfTokenFromLogs, isLongetfTickerAvailable, prepareLongetfVault, signLongetfDeployVault, signLongetfLaunch, signLongetfRegister, getLongetfVaultCode, } from './longetf/index.js';
|
|
9
|
+
export type { LongetfAnchor, LongetfMinedSalt, LongetfLaunchPatch, LongetfLaunchInput } from './longetf/index.js';
|
|
10
|
+
export { PONS_V2_TOKEN_LAUNCHED_TOPIC, randomPonsV2Salt, encodePonsV2LaunchToken, encodePonsV2LaunchAndBuy, parsePonsV2TokenFromLogs, buildPonsV2LaunchCall, getPonsV2LaunchFee, previewPonsV2LaunchEconomics, canPonsV2Launch, listOpenPonsV2LaunchConfigs, signPonsV2Launch, } from './pons-v2/index.js';
|
|
11
|
+
export type { PonsV2Socials, PonsV2TokenParams, PonsV2LaunchCall, PonsV2LaunchConfig, PonsV2LaunchParams, PonsV2LaunchSignResult, } from './pons-v2/index.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Robinhood Chain:LONGETF(long.xyz 锁费)与 pons v2 发币
|
|
3
|
+
*/
|
|
4
|
+
export * from './constants.js';
|
|
5
|
+
export * from './sign.js';
|
|
6
|
+
export * as longetf from './longetf/index.js';
|
|
7
|
+
export * as ponsV2 from './pons-v2/index.js';
|
|
8
|
+
export { LONGETF_VAULT_INITCODE, LONGETF_LAUNCH_TEMPLATE, LONGETF_DEFAULT_ANCHORS, longetfVaultInitCodeHash, longetfEffectiveSalt, predictLongetfVault, mineLongetfVaultSalt, encodeLongetfDeployVault, encodeLongetfRegister, encodeLongetfIsTickerAvailable, patchLongetfLaunchCalldata, parseLongetfTokenFromLogs, isLongetfTickerAvailable, prepareLongetfVault, signLongetfDeployVault, signLongetfLaunch, signLongetfRegister, getLongetfVaultCode, } from './longetf/index.js';
|
|
9
|
+
export { PONS_V2_TOKEN_LAUNCHED_TOPIC, randomPonsV2Salt, encodePonsV2LaunchToken, encodePonsV2LaunchAndBuy, parsePonsV2TokenFromLogs, buildPonsV2LaunchCall, getPonsV2LaunchFee, previewPonsV2LaunchEconomics, canPonsV2Launch, listOpenPonsV2LaunchConfigs, signPonsV2Launch, } from './pons-v2/index.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Bundled from https://longetf.xyz on 2026-09-16. Browser CORS blocks live fetch. */
|
|
2
|
+
export declare const LONGETF_VAULT_INITCODE: "0x60a06040526113886005556109c460085566b1a2bc2ec50000600a55615460600d55611b58600e55681b1ae4d6e2ef50000060105562093a806011556001601c55348015604a575f5ffd5b503360805260805161288a61006e5f395f818161071b015261083c015261288a5ff3fe608060405234801561000f575f5ffd5b50600436106103a8575f3560e01c806395ccea67116101ea578063c80fd45711610114578063e27ff2ba116100a9578063f350dc8711610079578063f350dc87146107a3578063f5799a54146107ad578063fa2af9da146107b6578063fccc2813146107c9575f5ffd5b8063e27ff2ba14610757578063eddcc96e1461076a578063f25f4b561461077d578063f2fde38b14610790575f5ffd5b8063d5f39488116100e4578063d5f3948814610716578063d725ccab1461073d578063de187cd214610745578063e1a452181461074e575f5ffd5b8063c80fd457146106f4578063c9e68a45146106fd578063ca2ecf2714610705578063d4bbacf51461070e575f5ffd5b8063addc831e1161018a578063baa8e7861161015a578063baa8e786146106bc578063bbed0e84146106cf578063bdcf1753146106d8578063c415b95c146106e1575f5ffd5b8063addc831e14610685578063aeeb8aa214610698578063b3ab15fb146106a1578063b8619efc146106b4575f5ffd5b8063a031fb7f116101c5578063a031fb7f1461062d578063a08dc0631461065a578063ab9f61be1461066d578063adc85dc714610676575f5ffd5b806395ccea67146105f457806395e7803b14610607578063972598e71461061a575f5ffd5b806350ee0b36116102d65780635dc13e271161026b578063903550871161023b57806390355087146105be57806390661460146105c757806390d49b9d146105d05780639349a3f5146105e3575f5ffd5b80635dc13e271461056657806362e0accb1461057957806363c82689146105825780638da5cb5b146105ac575f5ffd5b8063575c5248116102a6578063575c52481461053457806357ddbacb1461053d57806359be8c50146105465780635c975abb14610559575f5ffd5b806350ee0b36146104f257806352e199c51461050557806353deb3d614610518578063570ca73514610521575f5ffd5b80631e77b98e1161034c5780633cf3b5881161031c5780633cf3b588146104ba5780633e0dc34e146104c35780633f516018146104cc57806344b9dc75146104df575f5ffd5b80631e77b98e146104655780632929abe6146104955780632eb4a7ab146104a85780633b26156e146104b1575f5ffd5b8063156fad5211610387578063156fad5214610404578063158ef93e1461041b57806316c38b3c1461043f5780631a6d609114610452575f5ffd5b8062551046146103ac57806302d05d3f146103c15780631459457a146103f1575b5f5ffd5b6103bf6103ba36600461252d565b6107d2565b005b6006546103d4906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6103bf6103ff36600461255f565b610831565b61040d60105481565b6040519081526020016103e8565b600c5461042f90600160a01b900460ff1681565b60405190151581526020016103e8565b6103bf61044d3660046125d0565b610a0a565b6103bf61046036600461252d565b610a7c565b6104786104733660046125eb565b610bb1565b6040805193845260208401929092521515908201526060016103e8565b6103bf6104a336600461265c565b610f3b565b61040d601a5481565b61040d600d5481565b61040d610bb881565b61040d60045481565b6103bf6104da3660046126c8565b6112de565b6103bf6104ed3660046126e1565b611351565b6103bf610500366004612710565b6115f7565b6009546103d4906001600160a01b031681565b61040d60055481565b6001546103d4906001600160a01b031681565b61040d600a5481565b61040d60155481565b6103bf610554366004612710565b6116a5565b600f5461042f9060ff1681565b6103bf610574366004612710565b611728565b61040d60145481565b61059561059036600461252d565b6117d4565b6040805192151583529015156020830152016103e8565b5f546103d4906001600160a01b031681565b61040d60125481565b61040d60085481565b6103bf6105de3660046126c8565b611800565b61040d69152d02c7e14af680000081565b6103bf610602366004612710565b611873565b6103bf61061536600461252d565b61196f565b600b546103d4906001600160a01b031681565b61042f61063b366004612738565b601b60209081525f928352604080842090915290825290205460ff1681565b6103bf61066836600461252d565b6119ce565b61040d60165481565b61040d674563918244f4000081565b6103bf61069336600461252d565b611a5a565b61040d61138881565b6103bf6106af3660046126c8565b611ae8565b61040d611b94565b600c546103d4906001600160a01b031681565b61040d60185481565b61040d600e5481565b6003546103d4906001600160a01b031681565b61040d60175481565b61042f611c03565b61040d60115481565b61040d611cc4565b6103d47f000000000000000000000000000000000000000000000000000000000000000081565b61040d611ce5565b61040d60195481565b61040d61271081565b6103bf61076536600461252d565b611d04565b6103bf61077836600461252d565b611d5f565b6002546103d4906001600160a01b031681565b6103bf61079e3660046126c8565b611de9565b61040d62278d0081565b61040d60135481565b6007546103d4906001600160a01b031681565b6103d461dead81565b5f546001600160a01b031633146107fc576040516330cd747160e01b815260040160405180910390fd5b610e1081108061080e575062278d0081115b1561082c57604051630bba69fb60e01b815260040160405180910390fd5b600d55565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461087a576040516330cd747160e01b815260040160405180910390fd5b600c54600160a01b900460ff16156108a45760405162dc149f60e41b815260040160405180910390fd5b6001600160a01b03851615806108c157506001600160a01b038416155b806108d357506001600160a01b038316155b806108e557506001600160a01b038216155b806108f757506001600160a01b038116155b156109155760405163d92e233d60e01b815260040160405180910390fd5b836001600160a01b0316856001600160a01b03160361094757604051630bba69fb60e01b815260040160405180910390fd5b600c80545f80546001600160a01b038581166001600160a01b03199283168117909355600b80548b831690841681179091558982166001600160a81b03199095168517600160a01b17909555600280548983169084168117909155600180549289169290931682179092554260125560408051958652602086019490945292840152606083019190915260808201527f861a4cc57dab668426fda08bd86b4fbb9ece0265f464a6ff241725f6087d32419060a00160405180910390a15050505050565b5f546001600160a01b03163314610a34576040516330cd747160e01b815260040160405180910390fd5b600f805460ff19168215159081179091556040519081527f40db37ff5c0bdc2c427fbb2078c8f24afea940abac0e3c23bb4ea3bf2da2b212906020015b60405180910390a150565b600c54600160a01b900460ff16610aa6576040516321c4e35760e21b815260040160405180910390fd5b6001546001600160a01b03163314801590610acb57505f546001600160a01b03163314155b15610ae957604051631f0853c160e21b815260040160405180910390fd5b600f5460ff1615610b0d57604051631309a56360e01b815260040160405180910390fd5b601c54600114610b305760405163769dd35360e11b815260040160405180910390fd5b6002601c555f819003610b5657604051630bba69fb60e01b815260040160405180910390fd5b600b54600254610b76916001600160a01b03908116911661dead84611e93565b6040518181527fd83c63197e8e676d80ab0122beba9a9d20f3828839e9a1d6fe81d242e9cd7e6e9060200160405180910390a1506001601c55565b5f5f5f600c60149054906101000a900460ff16610be1576040516321c4e35760e21b815260040160405180910390fd5b6001546001600160a01b03163314801590610c0657505f546001600160a01b03163314155b15610c2457604051631f0853c160e21b815260040160405180910390fd5b600f5460ff1615610c4857604051631309a56360e01b815260040160405180910390fd5b601c54600114610c6b5760405163769dd35360e11b815260040160405180910390fd5b6002601c5560135415801590610c8f5750600d54601354610c8c9190612776565b42105b15610cad57604051636fed7d8560e01b815260040160405180910390fd5b841580610cbb575060195485105b15610cd957604051630bba69fb60e01b815260040160405180910390fd5b610ce1611c03565b15610cff57604051630d10f8f960e11b815260040160405180910390fd5b42601355610d0b611fa9565b50610d146120ac565b600c546002546040516370a0823160e01b81526001600160a01b03918216600482015292955016906370a0823190602401602060405180830381865afa158015610d60573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d84919061278f565b91508115610daa57600c54600254610daa916001600160a01b0390811691163085611e93565b600c546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610df0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e14919061278f565b90505f610e20886117d4565b50905080610e8f576014547f7b2000c705e99691ab153f73e8774af9bb51268d6eef2e7052ae0afbf8679b2d8960105485601154601254610e619190612776565b60408051948552602085019390935291830152606082015260800160405180910390a2505f9150610f2a9050565b6014805460010190554260158190556012555f6017556018879055601a869055600e5461271090610ec090846127a6565b610eca91906127bd565b60168190556014546040805187815260208101869052908101929092526060820189905260808201889052907f8d16b88748ae4260a721216d6d53bf33028349ce58b58b79b397eda0f89e19be9060a00160405180910390a26001925050505b6001601c8190555093509350939050565b600c54600160a01b900460ff16610f65576040516321c4e35760e21b815260040160405180910390fd5b6001546001600160a01b03163314801590610f8a57505f546001600160a01b03163314155b15610fa857604051631f0853c160e21b815260040160405180910390fd5b600f5460ff1615610fcc57604051631309a56360e01b815260040160405180910390fd5b601c54600114610fef5760405163769dd35360e11b815260040160405180910390fd5b6002601c5582818114611018576040516001621398b960e31b0319815260040160405180910390fd5b611020611c03565b1561103e57604051630d10f8f960e11b815260040160405180910390fd5b6014546017546016546018545f5b858110156112cb575f8a8a83818110611067576110676127dc565b905060200201602081019061107c91906126c8565b90505f898984818110611091576110916127dc565b5f8a8152601b602090815260408083206001600160a01b03891684528252909120549102929092013592505060ff16156110fb57604051600181526001600160a01b0383169088905f5160206128355f395f51905f52906020015b60405180910390a350506112c3565b600b546040516370a0823160e01b81526001600160a01b038481166004830152869216906370a0823190602401602060405180830381865afa158015611143573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611167919061278f565b101561119857604051600281526001600160a01b0383169088905f5160206128355f395f51905f52906020016110ec565b805f036111ca57604051600381526001600160a01b0383169088905f5160206128355f395f51905f52906020016110ec565b846111d58288612776565b11156111f45760405163a4875a4960e01b815260040160405180910390fd5b600c5461120b906001600160a01b03168383612354565b15611291575f878152601b602090815260408083206001600160a01b03861684529091529020805460ff191660011790556112468187612776565b9550816001600160a01b0316877fa7932e9c92f31e1ed56b29d00bbe669a97484dc24de28dd9c8c0429df7f358478360405161128491815260200190565b60405180910390a36112c0565b604051600481526001600160a01b0383169088905f5160206128355f395f51905f529060200160405180910390a35b50505b60010161104c565b50505060175550506001601c5550505050565b5f546001600160a01b03163314611308576040516330cd747160e01b815260040160405180910390fd5b600680546001600160a01b0319166001600160a01b0383169081179091556040517fd4396a7e1ee1013c611432f59b862687db5c35b5ae1fd43334ccba88fac8e678905f90a250565b600c54600160a01b900460ff1661137b576040516321c4e35760e21b815260040160405180910390fd5b6001546001600160a01b031633148015906113a057505f546001600160a01b03163314155b156113be57604051631f0853c160e21b815260040160405180910390fd5b600f5460ff16156113e257604051631309a56360e01b815260040160405180910390fd5b601c546001146114055760405163769dd35360e11b815260040160405180910390fd5b6002601c55601454158015906114295750600d546015546114269190612776565b42105b1561144757604051636fed7d8560e01b815260040160405180910390fd5b811580611455575060195482105b1561147357604051630bba69fb60e01b815260040160405180910390fd5b61147b611c03565b1561149957604051630d10f8f960e11b815260040160405180910390fd5b5f6114a3846117d4565b509050806114c45760405163086aef5960e01b815260040160405180910390fd5b84156114e857600c546002546114e8916001600160a01b0390811691163088611e93565b6014805460010190554260158190556012555f60178190556018849055601a839055600c546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611550573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611574919061278f565b9050612710600e548261158791906127a6565b61159191906127bd565b60168190556014546040805189815260208101859052908101929092526060820186905260808201859052907f8d16b88748ae4260a721216d6d53bf33028349ce58b58b79b397eda0f89e19be9060a00160405180910390a250506001601c5550505050565b5f546001600160a01b03163314611621576040516330cd747160e01b815260040160405180910390fd5b610bb881111561164457604051630bba69fb60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b038416908117909155600882905560408051918252602082018390527f86f4d8dd7a96a92ec6d4bdeeca4f705fc1f361d33abb36dcc072226f954711f991015b60405180910390a15050565b5f546001600160a01b031633146116cf576040516330cd747160e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b038416908117909155600482905560408051918252602082018390527f6717e1a643a475f7a42807f9266c4709a62c67c0738eff9798947b13e79db05a9101611699565b5f546001600160a01b03163314611752576040516330cd747160e01b815260040160405180910390fd5b674563918244f4000081111561177b57604051630bba69fb60e01b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b038416908117909155600a82905560408051918252602082018390527fdd860b45a27e02c08c806ee26c7938f11b0c303df0ad1bc112e6c2b4e9180d129101611699565b5f5f6011546012546117e69190612776565b421015905080806117f957506010548310155b9150915091565b5f546001600160a01b0316331461182a576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b0381166118515760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b0316331461189d576040516330cd747160e01b815260040160405180910390fd5b601c546001146118c05760405163769dd35360e11b815260040160405180910390fd5b6002601c55600b546001600160a01b03838116911614806118ee5750600c546001600160a01b038381169116145b1561190c57604051630aaba4f760e21b815260040160405180910390fd5b5f546119239083906001600160a01b031683612441565b816001600160a01b03167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96958260405161195e91815260200190565b60405180910390a250506001601c55565b5f546001600160a01b03163314611999576040516330cd747160e01b815260040160405180910390fd5b60198190556040518181527fa3e341ff714d851ca67a7e7694e5c7eec5ae911ca82543fe402be99aedf5121b90602001610a71565b5f546001600160a01b031633146119f8576040516330cd747160e01b815260040160405180910390fd5b801580611a07575062278d0081115b15611a2557604051630bba69fb60e01b815260040160405180910390fd5b60118190556040518181527fb64fcfdc31e87ea70a6273e84e6291709ff2d8f90794860d8975430078eb100890602001610a71565b5f546001600160a01b03163314611a84576040516330cd747160e01b815260040160405180910390fd5b611388811080611a95575061271081115b15611ab357604051630bba69fb60e01b815260040160405180910390fd5b60058190556040518181527fd9b5c7fbe5e4d94344475d7bca2decd1cd0c683a9c806619bda597c8ad046bd290602001610a71565b5f546001600160a01b03163314611b12576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b038116611b395760405163d92e233d60e01b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b600c546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bda573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bfe919061278f565b905090565b600c5460408051600481526024810182526020810180516001600160e01b0316635c975abb60e01b17905290515f92839283926001600160a01b0390921691611c4c91906127f0565b5f60405180830381855afa9150503d805f8114611c84576040519150601f19603f3d011682016040523d82523d5f602084013e611c89565b606091505b5091509150811580611c9c575060208151105b15611ca9575f9250505090565b80806020019051810190611cbd9190612806565b9250505090565b5f60175460165411611cd557505f90565b601754601654611bfe9190612821565b5f6014545f14611cff57600d54601554611bfe9190612776565b504290565b5f546001600160a01b03163314611d2e576040516330cd747160e01b815260040160405180910390fd5b801580611d3c575061271081115b15611d5a57604051630bba69fb60e01b815260040160405180910390fd5b600e55565b5f546001600160a01b03163314611d89576040516330cd747160e01b815260040160405180910390fd5b69152d02c7e14af6800000811115611db457604051630bba69fb60e01b815260040160405180910390fd5b60108190556040518181527f4590952fdf370158c67f32c5c67a933166d8e329b4b6c609ab5465d5054a6cbf90602001610a71565b5f546001600160a01b03163314611e13576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b038116611e3a5760405163d92e233d60e01b815260040160405180910390fd5b5f80546040516001600160a01b03808516939216917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a35f80546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b03841603611eb357611eae848383612441565b611fa3565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291515f92839290881691611f1691906127f0565b5f604051808303815f865af19150503d805f8114611f4f576040519150601f19603f3d011682016040523d82523d5f602084013e611f54565b606091505b5091509150811580611f825750805115801590611f82575080806020019051810190611f809190612806565b155b15611fa0576040516312171d8360e31b815260040160405180910390fd5b50505b50505050565b6003545f906001600160a01b03161580611fc35750600454155b15611fcd57505f90565b6003546004546040516001600160a01b039092169163817db73b91611ff89160240190815260200190565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161203191906127f0565b5f604051808303815f865af19150503d805f811461206a576040519150601f19603f3d011682016040523d82523d5f602084013e61206f565b606091505b505060405181151581529091507f759223378ca4e071bae84fc3be0a145794fab1619558cbc3be8481d369cedd929060200160405180910390a190565b600b546002546040516370a0823160e01b81526001600160a01b0391821660048201525f92839216906370a0823190602401602060405180830381865afa1580156120f9573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061211d919061278f565b9050805f0361212d575f91505090565b6127106005548261213e91906127a6565b61214891906127bd565b915081156121a457600b54600254612170916001600160a01b03908116911661dead85611e93565b6040518281527fd83c63197e8e676d80ab0122beba9a9d20f3828839e9a1d6fe81d242e9cd7e6e9060200160405180910390a15b5f6121af8383612821565b9050805f036121bd57505090565b6009546001600160a01b0316158015906121e45750600a546009546001600160a01b031631105b1561225757600b5460025460095461220c926001600160a01b03908116928116911684611e93565b60408051848152602081018390525f818301819052606082015290517f100f85822b73a4d7d3e08dcede25d51c863e19b47fa42612cad405b3db6c33869181900360800190a1505090565b6007545f906001600160a01b0316156122b0576127106008548361227b91906127a6565b61228591906127bd565b905080156122b057600b546002546007546122b0926001600160a01b03908116928116911684611e93565b5f6122bb8284612821565b905080158015906122d657506006546001600160a01b031615155b1561230357600b546002546006546122fe926001600160a01b03908116928116911684611e93565b612306565b505f5b604080518681525f6020820152908101829052606081018390527f100f85822b73a4d7d3e08dcede25d51c863e19b47fa42612cad405b3db6c33869060800160405180910390a15050505090565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291515f9283928392918816916123b191906127f0565b5f604051808303815f865af19150503d805f81146123ea576040519150601f19603f3d011682016040523d82523d5f602084013e6123ef565b606091505b509150915081612403575f9250505061243a565b8051158015906124245750808060200190518101906124229190612806565b155b15612433575f9250505061243a565b6001925050505b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291515f9283929087169161249c91906127f0565b5f604051808303815f865af19150503d805f81146124d5576040519150601f19603f3d011682016040523d82523d5f602084013e6124da565b606091505b509150915081158061250857508051158015906125085750808060200190518101906125069190612806565b155b15612526576040516312171d8360e31b815260040160405180910390fd5b5050505050565b5f6020828403121561253d575f5ffd5b5035919050565b80356001600160a01b038116811461255a575f5ffd5b919050565b5f5f5f5f5f60a08688031215612573575f5ffd5b61257c86612544565b945061258a60208701612544565b935061259860408701612544565b92506125a660608701612544565b91506125b460808701612544565b90509295509295909350565b80151581146125cd575f5ffd5b50565b5f602082840312156125e0575f5ffd5b813561243a816125c0565b5f5f5f606084860312156125fd575f5ffd5b505081359360208301359350604090920135919050565b5f5f83601f840112612624575f5ffd5b50813567ffffffffffffffff81111561263b575f5ffd5b6020830191508360208260051b8501011115612655575f5ffd5b9250929050565b5f5f5f5f6040858703121561266f575f5ffd5b843567ffffffffffffffff811115612685575f5ffd5b61269187828801612614565b909550935050602085013567ffffffffffffffff8111156126b0575f5ffd5b6126bc87828801612614565b95989497509550505050565b5f602082840312156126d8575f5ffd5b61243a82612544565b5f5f5f5f608085870312156126f4575f5ffd5b5050823594602084013594506040840135936060013592509050565b5f5f60408385031215612721575f5ffd5b61272a83612544565b946020939093013593505050565b5f5f60408385031215612749575f5ffd5b8235915061275960208401612544565b90509250929050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561278957612789612762565b92915050565b5f6020828403121561279f575f5ffd5b5051919050565b808202811582820484141761278957612789612762565b5f826127d757634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603260045260245ffd5b5f82518060208501845e5f920191825250919050565b5f60208284031215612816575f5ffd5b815161243a816125c0565b818103818111156127895761278961276256fe451f6c4aebcec5b0829e8edf8ffd3beca371d621cad02d40849bbdf4fe3b4522a26469706673582212209979a69f91ba115ab3fe75815513cfe600d6b4f4f506354f2c406616c286ae5964736f6c63430008240033";
|
|
3
|
+
export declare const LONGETF_LAUNCH_TEMPLATE: "0x882db70700000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000033b2e3c9fd0803ce80000000000000000000000000000000000000000000000033b2e3c9fd0803ce80000000000000000000000000000002e8c31162b855a2ffa90f6f8634643ad6f111e180000000000000000000000001b37d3a72082029c44b35b604ea473617580b69a00000000000000000000000000000000000000000000000000000000000001a000000000000000000000000085f37f74ef2478a770318bc810177a9835911ad700000000000000000000000000000000000000000000000000000000000004c00000000000000000000000004e3468951d49f2eea976ed0d6e75ffcb44a9a54400000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000ba2f330edb16cd8056f5988d8ce19bbc63475a0e0000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000092d435c96e63c43e12d6d0ab28f6b0b04072f7650000000000000000000000000000000008839fd0ab1986c3506683c6a33490b50000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000000763686164677074000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007434841444750540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042697066733a2f2f6261666b7265696861737678713269367233777537746c75707776646c666370677a64796b347a7237646872696a6c6578376467726c756164366100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000d89d8000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002200000000000000000000000006f02324d20cc679d0e585290caa6b16bacbc0f7700000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000000000000000000000000000000000000000002fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9df80000000000000000000000000000000000000000000000000000000000004d6000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000dc0bd3fdc6980000000000000000000000000000000000000000000000000000000000000004d6000000000000000000000000000000000000000000000000000000000000d89e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000001ff973cafa8000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000021e2ce70511e4fe542a97708e89520471daa7a6600000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000061e697835cb1bc6f0d3e7fccb83e6b819c066f1e0000000000000000000000000000000000000000000000000d2f13f7789f000000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000002e8c31162b855a2ffa90f6f8634643ad6f111e1800000000000000000000000035d217b10f974a49f1bfd369fc5c85b597ae09a100000000000000000000000000000000000000000000000000000000000c35000000000000000000000000000000000000000000000000000000000000000fa0000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
|
|
4
|
+
export type LongetfAnchor = {
|
|
5
|
+
s: string;
|
|
6
|
+
a: string;
|
|
7
|
+
n: string;
|
|
8
|
+
k: string;
|
|
9
|
+
u: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const LONGETF_DEFAULT_ANCHORS: readonly LongetfAnchor[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Bundled from https://longetf.xyz on 2026-09-16. Browser CORS blocks live fetch. */
|
|
2
|
+
export const LONGETF_VAULT_INITCODE = "0x60a06040526113886005556109c460085566b1a2bc2ec50000600a55615460600d55611b58600e55681b1ae4d6e2ef50000060105562093a806011556001601c55348015604a575f5ffd5b503360805260805161288a61006e5f395f818161071b015261083c015261288a5ff3fe608060405234801561000f575f5ffd5b50600436106103a8575f3560e01c806395ccea67116101ea578063c80fd45711610114578063e27ff2ba116100a9578063f350dc8711610079578063f350dc87146107a3578063f5799a54146107ad578063fa2af9da146107b6578063fccc2813146107c9575f5ffd5b8063e27ff2ba14610757578063eddcc96e1461076a578063f25f4b561461077d578063f2fde38b14610790575f5ffd5b8063d5f39488116100e4578063d5f3948814610716578063d725ccab1461073d578063de187cd214610745578063e1a452181461074e575f5ffd5b8063c80fd457146106f4578063c9e68a45146106fd578063ca2ecf2714610705578063d4bbacf51461070e575f5ffd5b8063addc831e1161018a578063baa8e7861161015a578063baa8e786146106bc578063bbed0e84146106cf578063bdcf1753146106d8578063c415b95c146106e1575f5ffd5b8063addc831e14610685578063aeeb8aa214610698578063b3ab15fb146106a1578063b8619efc146106b4575f5ffd5b8063a031fb7f116101c5578063a031fb7f1461062d578063a08dc0631461065a578063ab9f61be1461066d578063adc85dc714610676575f5ffd5b806395ccea67146105f457806395e7803b14610607578063972598e71461061a575f5ffd5b806350ee0b36116102d65780635dc13e271161026b578063903550871161023b57806390355087146105be57806390661460146105c757806390d49b9d146105d05780639349a3f5146105e3575f5ffd5b80635dc13e271461056657806362e0accb1461057957806363c82689146105825780638da5cb5b146105ac575f5ffd5b8063575c5248116102a6578063575c52481461053457806357ddbacb1461053d57806359be8c50146105465780635c975abb14610559575f5ffd5b806350ee0b36146104f257806352e199c51461050557806353deb3d614610518578063570ca73514610521575f5ffd5b80631e77b98e1161034c5780633cf3b5881161031c5780633cf3b588146104ba5780633e0dc34e146104c35780633f516018146104cc57806344b9dc75146104df575f5ffd5b80631e77b98e146104655780632929abe6146104955780632eb4a7ab146104a85780633b26156e146104b1575f5ffd5b8063156fad5211610387578063156fad5214610404578063158ef93e1461041b57806316c38b3c1461043f5780631a6d609114610452575f5ffd5b8062551046146103ac57806302d05d3f146103c15780631459457a146103f1575b5f5ffd5b6103bf6103ba36600461252d565b6107d2565b005b6006546103d4906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6103bf6103ff36600461255f565b610831565b61040d60105481565b6040519081526020016103e8565b600c5461042f90600160a01b900460ff1681565b60405190151581526020016103e8565b6103bf61044d3660046125d0565b610a0a565b6103bf61046036600461252d565b610a7c565b6104786104733660046125eb565b610bb1565b6040805193845260208401929092521515908201526060016103e8565b6103bf6104a336600461265c565b610f3b565b61040d601a5481565b61040d600d5481565b61040d610bb881565b61040d60045481565b6103bf6104da3660046126c8565b6112de565b6103bf6104ed3660046126e1565b611351565b6103bf610500366004612710565b6115f7565b6009546103d4906001600160a01b031681565b61040d60055481565b6001546103d4906001600160a01b031681565b61040d600a5481565b61040d60155481565b6103bf610554366004612710565b6116a5565b600f5461042f9060ff1681565b6103bf610574366004612710565b611728565b61040d60145481565b61059561059036600461252d565b6117d4565b6040805192151583529015156020830152016103e8565b5f546103d4906001600160a01b031681565b61040d60125481565b61040d60085481565b6103bf6105de3660046126c8565b611800565b61040d69152d02c7e14af680000081565b6103bf610602366004612710565b611873565b6103bf61061536600461252d565b61196f565b600b546103d4906001600160a01b031681565b61042f61063b366004612738565b601b60209081525f928352604080842090915290825290205460ff1681565b6103bf61066836600461252d565b6119ce565b61040d60165481565b61040d674563918244f4000081565b6103bf61069336600461252d565b611a5a565b61040d61138881565b6103bf6106af3660046126c8565b611ae8565b61040d611b94565b600c546103d4906001600160a01b031681565b61040d60185481565b61040d600e5481565b6003546103d4906001600160a01b031681565b61040d60175481565b61042f611c03565b61040d60115481565b61040d611cc4565b6103d47f000000000000000000000000000000000000000000000000000000000000000081565b61040d611ce5565b61040d60195481565b61040d61271081565b6103bf61076536600461252d565b611d04565b6103bf61077836600461252d565b611d5f565b6002546103d4906001600160a01b031681565b6103bf61079e3660046126c8565b611de9565b61040d62278d0081565b61040d60135481565b6007546103d4906001600160a01b031681565b6103d461dead81565b5f546001600160a01b031633146107fc576040516330cd747160e01b815260040160405180910390fd5b610e1081108061080e575062278d0081115b1561082c57604051630bba69fb60e01b815260040160405180910390fd5b600d55565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461087a576040516330cd747160e01b815260040160405180910390fd5b600c54600160a01b900460ff16156108a45760405162dc149f60e41b815260040160405180910390fd5b6001600160a01b03851615806108c157506001600160a01b038416155b806108d357506001600160a01b038316155b806108e557506001600160a01b038216155b806108f757506001600160a01b038116155b156109155760405163d92e233d60e01b815260040160405180910390fd5b836001600160a01b0316856001600160a01b03160361094757604051630bba69fb60e01b815260040160405180910390fd5b600c80545f80546001600160a01b038581166001600160a01b03199283168117909355600b80548b831690841681179091558982166001600160a81b03199095168517600160a01b17909555600280548983169084168117909155600180549289169290931682179092554260125560408051958652602086019490945292840152606083019190915260808201527f861a4cc57dab668426fda08bd86b4fbb9ece0265f464a6ff241725f6087d32419060a00160405180910390a15050505050565b5f546001600160a01b03163314610a34576040516330cd747160e01b815260040160405180910390fd5b600f805460ff19168215159081179091556040519081527f40db37ff5c0bdc2c427fbb2078c8f24afea940abac0e3c23bb4ea3bf2da2b212906020015b60405180910390a150565b600c54600160a01b900460ff16610aa6576040516321c4e35760e21b815260040160405180910390fd5b6001546001600160a01b03163314801590610acb57505f546001600160a01b03163314155b15610ae957604051631f0853c160e21b815260040160405180910390fd5b600f5460ff1615610b0d57604051631309a56360e01b815260040160405180910390fd5b601c54600114610b305760405163769dd35360e11b815260040160405180910390fd5b6002601c555f819003610b5657604051630bba69fb60e01b815260040160405180910390fd5b600b54600254610b76916001600160a01b03908116911661dead84611e93565b6040518181527fd83c63197e8e676d80ab0122beba9a9d20f3828839e9a1d6fe81d242e9cd7e6e9060200160405180910390a1506001601c55565b5f5f5f600c60149054906101000a900460ff16610be1576040516321c4e35760e21b815260040160405180910390fd5b6001546001600160a01b03163314801590610c0657505f546001600160a01b03163314155b15610c2457604051631f0853c160e21b815260040160405180910390fd5b600f5460ff1615610c4857604051631309a56360e01b815260040160405180910390fd5b601c54600114610c6b5760405163769dd35360e11b815260040160405180910390fd5b6002601c5560135415801590610c8f5750600d54601354610c8c9190612776565b42105b15610cad57604051636fed7d8560e01b815260040160405180910390fd5b841580610cbb575060195485105b15610cd957604051630bba69fb60e01b815260040160405180910390fd5b610ce1611c03565b15610cff57604051630d10f8f960e11b815260040160405180910390fd5b42601355610d0b611fa9565b50610d146120ac565b600c546002546040516370a0823160e01b81526001600160a01b03918216600482015292955016906370a0823190602401602060405180830381865afa158015610d60573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d84919061278f565b91508115610daa57600c54600254610daa916001600160a01b0390811691163085611e93565b600c546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015610df0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e14919061278f565b90505f610e20886117d4565b50905080610e8f576014547f7b2000c705e99691ab153f73e8774af9bb51268d6eef2e7052ae0afbf8679b2d8960105485601154601254610e619190612776565b60408051948552602085019390935291830152606082015260800160405180910390a2505f9150610f2a9050565b6014805460010190554260158190556012555f6017556018879055601a869055600e5461271090610ec090846127a6565b610eca91906127bd565b60168190556014546040805187815260208101869052908101929092526060820189905260808201889052907f8d16b88748ae4260a721216d6d53bf33028349ce58b58b79b397eda0f89e19be9060a00160405180910390a26001925050505b6001601c8190555093509350939050565b600c54600160a01b900460ff16610f65576040516321c4e35760e21b815260040160405180910390fd5b6001546001600160a01b03163314801590610f8a57505f546001600160a01b03163314155b15610fa857604051631f0853c160e21b815260040160405180910390fd5b600f5460ff1615610fcc57604051631309a56360e01b815260040160405180910390fd5b601c54600114610fef5760405163769dd35360e11b815260040160405180910390fd5b6002601c5582818114611018576040516001621398b960e31b0319815260040160405180910390fd5b611020611c03565b1561103e57604051630d10f8f960e11b815260040160405180910390fd5b6014546017546016546018545f5b858110156112cb575f8a8a83818110611067576110676127dc565b905060200201602081019061107c91906126c8565b90505f898984818110611091576110916127dc565b5f8a8152601b602090815260408083206001600160a01b03891684528252909120549102929092013592505060ff16156110fb57604051600181526001600160a01b0383169088905f5160206128355f395f51905f52906020015b60405180910390a350506112c3565b600b546040516370a0823160e01b81526001600160a01b038481166004830152869216906370a0823190602401602060405180830381865afa158015611143573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611167919061278f565b101561119857604051600281526001600160a01b0383169088905f5160206128355f395f51905f52906020016110ec565b805f036111ca57604051600381526001600160a01b0383169088905f5160206128355f395f51905f52906020016110ec565b846111d58288612776565b11156111f45760405163a4875a4960e01b815260040160405180910390fd5b600c5461120b906001600160a01b03168383612354565b15611291575f878152601b602090815260408083206001600160a01b03861684529091529020805460ff191660011790556112468187612776565b9550816001600160a01b0316877fa7932e9c92f31e1ed56b29d00bbe669a97484dc24de28dd9c8c0429df7f358478360405161128491815260200190565b60405180910390a36112c0565b604051600481526001600160a01b0383169088905f5160206128355f395f51905f529060200160405180910390a35b50505b60010161104c565b50505060175550506001601c5550505050565b5f546001600160a01b03163314611308576040516330cd747160e01b815260040160405180910390fd5b600680546001600160a01b0319166001600160a01b0383169081179091556040517fd4396a7e1ee1013c611432f59b862687db5c35b5ae1fd43334ccba88fac8e678905f90a250565b600c54600160a01b900460ff1661137b576040516321c4e35760e21b815260040160405180910390fd5b6001546001600160a01b031633148015906113a057505f546001600160a01b03163314155b156113be57604051631f0853c160e21b815260040160405180910390fd5b600f5460ff16156113e257604051631309a56360e01b815260040160405180910390fd5b601c546001146114055760405163769dd35360e11b815260040160405180910390fd5b6002601c55601454158015906114295750600d546015546114269190612776565b42105b1561144757604051636fed7d8560e01b815260040160405180910390fd5b811580611455575060195482105b1561147357604051630bba69fb60e01b815260040160405180910390fd5b61147b611c03565b1561149957604051630d10f8f960e11b815260040160405180910390fd5b5f6114a3846117d4565b509050806114c45760405163086aef5960e01b815260040160405180910390fd5b84156114e857600c546002546114e8916001600160a01b0390811691163088611e93565b6014805460010190554260158190556012555f60178190556018849055601a839055600c546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611550573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611574919061278f565b9050612710600e548261158791906127a6565b61159191906127bd565b60168190556014546040805189815260208101859052908101929092526060820186905260808201859052907f8d16b88748ae4260a721216d6d53bf33028349ce58b58b79b397eda0f89e19be9060a00160405180910390a250506001601c5550505050565b5f546001600160a01b03163314611621576040516330cd747160e01b815260040160405180910390fd5b610bb881111561164457604051630bba69fb60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b038416908117909155600882905560408051918252602082018390527f86f4d8dd7a96a92ec6d4bdeeca4f705fc1f361d33abb36dcc072226f954711f991015b60405180910390a15050565b5f546001600160a01b031633146116cf576040516330cd747160e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b038416908117909155600482905560408051918252602082018390527f6717e1a643a475f7a42807f9266c4709a62c67c0738eff9798947b13e79db05a9101611699565b5f546001600160a01b03163314611752576040516330cd747160e01b815260040160405180910390fd5b674563918244f4000081111561177b57604051630bba69fb60e01b815260040160405180910390fd5b600980546001600160a01b0319166001600160a01b038416908117909155600a82905560408051918252602082018390527fdd860b45a27e02c08c806ee26c7938f11b0c303df0ad1bc112e6c2b4e9180d129101611699565b5f5f6011546012546117e69190612776565b421015905080806117f957506010548310155b9150915091565b5f546001600160a01b0316331461182a576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b0381166118515760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b5f546001600160a01b0316331461189d576040516330cd747160e01b815260040160405180910390fd5b601c546001146118c05760405163769dd35360e11b815260040160405180910390fd5b6002601c55600b546001600160a01b03838116911614806118ee5750600c546001600160a01b038381169116145b1561190c57604051630aaba4f760e21b815260040160405180910390fd5b5f546119239083906001600160a01b031683612441565b816001600160a01b03167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96958260405161195e91815260200190565b60405180910390a250506001601c55565b5f546001600160a01b03163314611999576040516330cd747160e01b815260040160405180910390fd5b60198190556040518181527fa3e341ff714d851ca67a7e7694e5c7eec5ae911ca82543fe402be99aedf5121b90602001610a71565b5f546001600160a01b031633146119f8576040516330cd747160e01b815260040160405180910390fd5b801580611a07575062278d0081115b15611a2557604051630bba69fb60e01b815260040160405180910390fd5b60118190556040518181527fb64fcfdc31e87ea70a6273e84e6291709ff2d8f90794860d8975430078eb100890602001610a71565b5f546001600160a01b03163314611a84576040516330cd747160e01b815260040160405180910390fd5b611388811080611a95575061271081115b15611ab357604051630bba69fb60e01b815260040160405180910390fd5b60058190556040518181527fd9b5c7fbe5e4d94344475d7bca2decd1cd0c683a9c806619bda597c8ad046bd290602001610a71565b5f546001600160a01b03163314611b12576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b038116611b395760405163d92e233d60e01b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b600c546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611bda573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bfe919061278f565b905090565b600c5460408051600481526024810182526020810180516001600160e01b0316635c975abb60e01b17905290515f92839283926001600160a01b0390921691611c4c91906127f0565b5f60405180830381855afa9150503d805f8114611c84576040519150601f19603f3d011682016040523d82523d5f602084013e611c89565b606091505b5091509150811580611c9c575060208151105b15611ca9575f9250505090565b80806020019051810190611cbd9190612806565b9250505090565b5f60175460165411611cd557505f90565b601754601654611bfe9190612821565b5f6014545f14611cff57600d54601554611bfe9190612776565b504290565b5f546001600160a01b03163314611d2e576040516330cd747160e01b815260040160405180910390fd5b801580611d3c575061271081115b15611d5a57604051630bba69fb60e01b815260040160405180910390fd5b600e55565b5f546001600160a01b03163314611d89576040516330cd747160e01b815260040160405180910390fd5b69152d02c7e14af6800000811115611db457604051630bba69fb60e01b815260040160405180910390fd5b60108190556040518181527f4590952fdf370158c67f32c5c67a933166d8e329b4b6c609ab5465d5054a6cbf90602001610a71565b5f546001600160a01b03163314611e13576040516330cd747160e01b815260040160405180910390fd5b6001600160a01b038116611e3a5760405163d92e233d60e01b815260040160405180910390fd5b5f80546040516001600160a01b03808516939216917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a35f80546001600160a01b0319166001600160a01b0392909216919091179055565b306001600160a01b03841603611eb357611eae848383612441565b611fa3565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291515f92839290881691611f1691906127f0565b5f604051808303815f865af19150503d805f8114611f4f576040519150601f19603f3d011682016040523d82523d5f602084013e611f54565b606091505b5091509150811580611f825750805115801590611f82575080806020019051810190611f809190612806565b155b15611fa0576040516312171d8360e31b815260040160405180910390fd5b50505b50505050565b6003545f906001600160a01b03161580611fc35750600454155b15611fcd57505f90565b6003546004546040516001600160a01b039092169163817db73b91611ff89160240190815260200190565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161203191906127f0565b5f604051808303815f865af19150503d805f811461206a576040519150601f19603f3d011682016040523d82523d5f602084013e61206f565b606091505b505060405181151581529091507f759223378ca4e071bae84fc3be0a145794fab1619558cbc3be8481d369cedd929060200160405180910390a190565b600b546002546040516370a0823160e01b81526001600160a01b0391821660048201525f92839216906370a0823190602401602060405180830381865afa1580156120f9573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061211d919061278f565b9050805f0361212d575f91505090565b6127106005548261213e91906127a6565b61214891906127bd565b915081156121a457600b54600254612170916001600160a01b03908116911661dead85611e93565b6040518281527fd83c63197e8e676d80ab0122beba9a9d20f3828839e9a1d6fe81d242e9cd7e6e9060200160405180910390a15b5f6121af8383612821565b9050805f036121bd57505090565b6009546001600160a01b0316158015906121e45750600a546009546001600160a01b031631105b1561225757600b5460025460095461220c926001600160a01b03908116928116911684611e93565b60408051848152602081018390525f818301819052606082015290517f100f85822b73a4d7d3e08dcede25d51c863e19b47fa42612cad405b3db6c33869181900360800190a1505090565b6007545f906001600160a01b0316156122b0576127106008548361227b91906127a6565b61228591906127bd565b905080156122b057600b546002546007546122b0926001600160a01b03908116928116911684611e93565b5f6122bb8284612821565b905080158015906122d657506006546001600160a01b031615155b1561230357600b546002546006546122fe926001600160a01b03908116928116911684611e93565b612306565b505f5b604080518681525f6020820152908101829052606081018390527f100f85822b73a4d7d3e08dcede25d51c863e19b47fa42612cad405b3db6c33869060800160405180910390a15050505090565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291515f9283928392918816916123b191906127f0565b5f604051808303815f865af19150503d805f81146123ea576040519150601f19603f3d011682016040523d82523d5f602084013e6123ef565b606091505b509150915081612403575f9250505061243a565b8051158015906124245750808060200190518101906124229190612806565b155b15612433575f9250505061243a565b6001925050505b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291515f9283929087169161249c91906127f0565b5f604051808303815f865af19150503d805f81146124d5576040519150601f19603f3d011682016040523d82523d5f602084013e6124da565b606091505b509150915081158061250857508051158015906125085750808060200190518101906125069190612806565b155b15612526576040516312171d8360e31b815260040160405180910390fd5b5050505050565b5f6020828403121561253d575f5ffd5b5035919050565b80356001600160a01b038116811461255a575f5ffd5b919050565b5f5f5f5f5f60a08688031215612573575f5ffd5b61257c86612544565b945061258a60208701612544565b935061259860408701612544565b92506125a660608701612544565b91506125b460808701612544565b90509295509295909350565b80151581146125cd575f5ffd5b50565b5f602082840312156125e0575f5ffd5b813561243a816125c0565b5f5f5f606084860312156125fd575f5ffd5b505081359360208301359350604090920135919050565b5f5f83601f840112612624575f5ffd5b50813567ffffffffffffffff81111561263b575f5ffd5b6020830191508360208260051b8501011115612655575f5ffd5b9250929050565b5f5f5f5f6040858703121561266f575f5ffd5b843567ffffffffffffffff811115612685575f5ffd5b61269187828801612614565b909550935050602085013567ffffffffffffffff8111156126b0575f5ffd5b6126bc87828801612614565b95989497509550505050565b5f602082840312156126d8575f5ffd5b61243a82612544565b5f5f5f5f608085870312156126f4575f5ffd5b5050823594602084013594506040840135936060013592509050565b5f5f60408385031215612721575f5ffd5b61272a83612544565b946020939093013593505050565b5f5f60408385031215612749575f5ffd5b8235915061275960208401612544565b90509250929050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561278957612789612762565b92915050565b5f6020828403121561279f575f5ffd5b5051919050565b808202811582820484141761278957612789612762565b5f826127d757634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603260045260245ffd5b5f82518060208501845e5f920191825250919050565b5f60208284031215612816575f5ffd5b815161243a816125c0565b818103818111156127895761278961276256fe451f6c4aebcec5b0829e8edf8ffd3beca371d621cad02d40849bbdf4fe3b4522a26469706673582212209979a69f91ba115ab3fe75815513cfe600d6b4f4f506354f2c406616c286ae5964736f6c63430008240033";
|
|
3
|
+
export const LONGETF_LAUNCH_TEMPLATE = "0x882db70700000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000033b2e3c9fd0803ce80000000000000000000000000000000000000000000000033b2e3c9fd0803ce80000000000000000000000000000002e8c31162b855a2ffa90f6f8634643ad6f111e180000000000000000000000001b37d3a72082029c44b35b604ea473617580b69a00000000000000000000000000000000000000000000000000000000000001a000000000000000000000000085f37f74ef2478a770318bc810177a9835911ad700000000000000000000000000000000000000000000000000000000000004c00000000000000000000000004e3468951d49f2eea976ed0d6e75ffcb44a9a54400000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000ba2f330edb16cd8056f5988d8ce19bbc63475a0e0000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000092d435c96e63c43e12d6d0ab28f6b0b04072f7650000000000000000000000000000000008839fd0ab1986c3506683c6a33490b50000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000000763686164677074000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007434841444750540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042697066733a2f2f6261666b7265696861737678713269367233777537746c75707776646c666370677a64796b347a7237646872696a6c6578376467726c756164366100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000d89d8000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002200000000000000000000000006f02324d20cc679d0e585290caa6b16bacbc0f7700000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000000000000000000000000000000000000000002fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9df80000000000000000000000000000000000000000000000000000000000004d6000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000dc0bd3fdc6980000000000000000000000000000000000000000000000000000000000000004d6000000000000000000000000000000000000000000000000000000000000d89e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000001ff973cafa8000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000021e2ce70511e4fe542a97708e89520471daa7a6600000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000061e697835cb1bc6f0d3e7fccb83e6b819c066f1e0000000000000000000000000000000000000000000000000d2f13f7789f000000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000002e8c31162b855a2ffa90f6f8634643ad6f111e1800000000000000000000000035d217b10f974a49f1bfd369fc5c85b597ae09a100000000000000000000000000000000000000000000000000000000000c35000000000000000000000000000000000000000000000000000000000000000fa0000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
|
|
4
|
+
export const LONGETF_DEFAULT_ANCHORS = [{ "s": "AI", "a": "0x2e8c31162b855a2ffa90f6f8634643ad6f111e18", "n": "Artificial Inu", "k": "other", "u": 16 }, { "s": "SPCX", "a": "0x4a0e65a3eccec6dbe60ae065f2e7bb85fae35eea", "n": "Space Exploration Technologies Corp. Class A Common Stock", "k": "stock", "u": 11 }, { "s": "AAPL", "a": "0xaf3d76f1834a1d425780943c99ea8a608f8a93f9", "n": "Apple", "k": "stock", "u": 11 }, { "s": "NVDA", "a": "0xd0601ce157db5bdc3162bbac2a2c8af5320d9eec", "n": "NVIDIA", "k": "stock", "u": 8 }, { "s": "RDDT", "a": "0x05b37fb53a299a1b874a619e1c4c404d52c36f4c", "n": "Reddit", "k": "stock", "u": 7 }, { "s": "PLTR", "a": "0x894e1ec2d74ffe5aef8dc8a9e84686accb964f2a", "n": "Palantir Technologies", "k": "stock", "u": 6 }, { "s": "TTWO", "a": "0x5e81213613b6b86eab4c6c50d718d34359459786", "n": "Take-Two Interactive Software", "k": "stock", "u": 5 }, { "s": "SPY", "a": "0x117cc2133c37b721f49de2a7a74833232b3b4c0c", "n": "SPDR S&P 500 ETF Trust", "k": "stock", "u": 5 }, { "s": "RBLX", "a": "0xf0c4bf4c582cb3836e98394b1d4e7b7281101be8", "n": "Roblox", "k": "stock", "u": 4 }, { "s": "GOOGL", "a": "0x2e0847e8910a9732eb3fb1bb4b70a580adad4fe3", "n": "Alphabet Class A", "k": "stock", "u": 4 }, { "s": "AMZN", "a": "0x12f190a9f9d7d37a250758b26824b97ce941bf54", "n": "Amazon", "k": "stock", "u": 4 }, { "s": "QQQ", "a": "0xd5f3879160bc7c32ebb4dc785f8a4f505888de68", "n": "Invesco QQQ", "k": "stock", "u": 4 }, { "s": "TSLA", "a": "0x322f0929c4625ed5bad873c95208d54e1c003b2d", "n": "Tesla", "k": "stock", "u": 3 }, { "s": "MRNA", "a": "0x43b07d15ce533bec5476d70c22a78a1b2b662155", "n": "Moderna", "k": "stock", "u": 3 }, { "s": "GME", "a": "0x1b0e319c6a659f002271b69db8a7df2f911c153e", "n": "GameStop", "k": "stock", "u": 3 }, { "s": "SNDK", "a": "0xb90a19ff0af67f7779aff50a882a9cff42446400", "n": "Sandisk Corporation", "k": "stock", "u": 3 }, { "s": "HIMS", "a": "0xccee82fe024c36fa15e1005ede3e9e4787e23d09", "n": "Hims & Hers Health", "k": "stock", "u": 2 }, { "s": "MU", "a": "0xff080c8ce2e5feadaca0da81314ae59d232d4afd", "n": "Micron Technology", "k": "stock", "u": 2 }, { "s": "TSM", "a": "0x58ffe4a942d3885baa22d7520691f611ef09e7aa", "n": "Taiwan Semiconductor Manufacturing", "k": "stock", "u": 2 }, { "s": "MSFT", "a": "0xe93237c50d904957cf27e7b1133b510c669c2e74", "n": "Microsoft", "k": "stock", "u": 2 }, { "s": "GLD", "a": "0xc9a981fee1f9dec688bb123ccdecc63d0debfc4e", "n": "SPDR Gold Trust", "k": "stock", "u": 2 }, { "s": "COIN", "a": "0x6330d8c3178a418788df01a47479c0ce7ccf450b", "n": "Coinbase", "k": "stock", "u": 2 }, { "s": "COST", "a": "0x4ea005168d7f09a7a0ba9d1def21a479950e44c2", "n": "Costco", "k": "stock", "u": 2 }, { "s": "META", "a": "0xc0d6457c16cc70d6790dd43521c899c87ce02f35", "n": "Meta Platforms", "k": "stock", "u": 2 }, { "s": "SKHY", "a": "0x84cab63bc87912e71ad199ff14a0ba45de68fef8", "n": "SK hynix Inc. American Depositary Shares", "k": "stock", "u": 2 }, { "s": "DJT", "a": "0x1d11f0496982706c5e14a514d4e79f2e6bde4516", "n": "Trump Media & Technology Group", "k": "stock", "u": 2 }, { "s": "MSTR", "a": "0xec262a75e413fafd0df80480274532c79d42da09", "n": "Strategy Inc.", "k": "stock", "u": 1 }, { "s": "ASML", "a": "0x47f93d52cbec7c6d2cfc080e154002370a60daea", "n": "ASML Holding NV", "k": "stock", "u": 1 }, { "s": "BB", "a": "0x48e39e56acdba37b09020c0b734a613c9a2f100a", "n": "Blackberry", "k": "stock", "u": 1 }, { "s": "NET", "a": "0x116f00968269b7bfbad4109ce591d6e74c0601d4", "n": "Cloudflare, Inc. Class A common stock", "k": "stock", "u": 1 }, { "s": "DELL", "a": "0x941ae714ec6d8130c7b75d67160ca08f1e7d11dd", "n": "Dell", "k": "stock", "u": 1 }, { "s": "INTC", "a": "0xc72b96e0e48ecd4dc75e1e45396e26300bc39681", "n": "Intel", "k": "stock", "u": 1 }, { "s": "RUN", "a": "0x756bc80af765c82da966a788858d65adf14f3793", "n": "Sunrun", "k": "stock", "u": 1 }, { "s": "UPS", "a": "0xf23250dac154d05bb671cb0d0ebef3c635c79ce2", "n": "UPS", "k": "stock", "u": 1 }, { "s": "BONER", "a": "0x98096d17e191b3da1d5f99a6d7b3584351b11e18", "n": "Boner Coin", "k": "other", "u": 1 }, { "s": "SNAP", "a": "0xf6589f11bc40b669e584073f428b05562f568733", "n": "Snap", "k": "stock", "u": 1 }, { "s": "SOFI", "a": "0x98e75885157c80992a8d41b696d8c9c6fb30a926", "n": "SoFi Technologies", "k": "stock", "u": 1 }, { "s": "AMC", "a": "0x05a3d1cd21d0c88145e82600e62e7e496e0f222b", "n": "AMC Entertainment", "k": "stock", "u": 1 }, { "s": "AMD", "a": "0x86923f96303d656e4aa86d9d42d1e57ad2023fdc", "n": "AMD", "k": "stock", "u": 1 }, { "s": "NFLX", "a": "0xe0444ef8bf4ed74f74fd73686e2ddf4c1c5591e8", "n": "Netflix", "k": "stock", "u": 1 }, { "s": "USAR", "a": "0xd917b029c761d264c6a312bbbcda868658ef86a6", "n": "USA Rare Earth", "k": "stock", "u": 1 }, { "s": "NVDAx3L", "a": "0xf51fb54de60f6e16252e852a5ed0e60b8307606a", "n": "NVDA 3x Long", "k": "stock", "u": 0 }, { "s": "SPCXx3L", "a": "0x40f55bc783674bba29db641844b030e08c2fe5a1", "n": "SPCX 3x Long", "k": "stock", "u": 0 }, { "s": "GMEx3L", "a": "0x36c092a1ae464f46f77d5e55cffd9e39d4497d54", "n": "GME 3x Long", "k": "stock", "u": 0 }];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LONGETF / long.xyz 发币编码
|
|
3
|
+
*
|
|
4
|
+
* 对齐 longetf.xyz/launch:CREATE2 salt 绑 creator;create() 用页面模板改 word。
|
|
5
|
+
*/
|
|
6
|
+
import { LONG_XYZ_LAUNCHER } from '../constants.js';
|
|
7
|
+
export interface LongetfMinedSalt {
|
|
8
|
+
salt: string;
|
|
9
|
+
vault: string;
|
|
10
|
+
tries: number;
|
|
11
|
+
}
|
|
12
|
+
export interface LongetfLaunchPatch {
|
|
13
|
+
name: string;
|
|
14
|
+
symbol: string;
|
|
15
|
+
anchor: string;
|
|
16
|
+
vault: string;
|
|
17
|
+
metaUri?: string;
|
|
18
|
+
launchSalt?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function longetfVaultInitCodeHash(initCode?: string): string;
|
|
21
|
+
export declare function longetfEffectiveSalt(salt: string, creator: string): string;
|
|
22
|
+
export declare function predictLongetfVault(salt: string, creator: string, options?: {
|
|
23
|
+
factory?: string;
|
|
24
|
+
initCodeHash?: string;
|
|
25
|
+
}): string;
|
|
26
|
+
export declare function mineLongetfVaultSalt(creator: string, options?: {
|
|
27
|
+
factory?: string;
|
|
28
|
+
initCodeHash?: string;
|
|
29
|
+
protocolBeneficiary?: string;
|
|
30
|
+
maxTries?: number;
|
|
31
|
+
}): LongetfMinedSalt;
|
|
32
|
+
export declare function encodeLongetfDeployVault(salt: string, creator: string, initCode?: string): string;
|
|
33
|
+
export declare function encodeLongetfRegister(token: string, vault: string): string;
|
|
34
|
+
export declare function encodeLongetfIsTickerAvailable(ticker: string): string;
|
|
35
|
+
export declare function patchLongetfLaunchCalldata(patch: LongetfLaunchPatch, template?: string): string;
|
|
36
|
+
export declare function parseLongetfTokenFromLogs(logs: ReadonlyArray<{
|
|
37
|
+
topics: readonly string[];
|
|
38
|
+
address: string;
|
|
39
|
+
}>): string | undefined;
|
|
40
|
+
export declare function getLongetfLaunchSelector(): string;
|
|
41
|
+
export { LONG_XYZ_LAUNCHER };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LONGETF / long.xyz 发币编码
|
|
3
|
+
*
|
|
4
|
+
* 对齐 longetf.xyz/launch:CREATE2 salt 绑 creator;create() 用页面模板改 word。
|
|
5
|
+
*/
|
|
6
|
+
import { concat, getAddress, getBytes, getCreate2Address, hexlify, Interface, keccak256, randomBytes, toUtf8Bytes, zeroPadValue, } from 'ethers';
|
|
7
|
+
import { ZERO_ADDRESS } from '../../../core/constants/index.js';
|
|
8
|
+
import { LONGETF_FACTORY, LONGETF_FACTORY_ABI, LONGETF_LAUNCH_WORDS, LONGETF_MINE_SALT_MAX_TRIES, LONGETF_URI_WORDS, LONG_XYZ_LAUNCHER, LONG_XYZ_LAUNCHER_ABI, LONG_XYZ_PROTOCOL_BENEFICIARY, } from '../constants.js';
|
|
9
|
+
import { LONGETF_LAUNCH_TEMPLATE, LONGETF_VAULT_INITCODE } from './assets.js';
|
|
10
|
+
const factoryIface = new Interface(LONGETF_FACTORY_ABI);
|
|
11
|
+
const launcherIface = new Interface(LONG_XYZ_LAUNCHER_ABI);
|
|
12
|
+
const TRANSFER_TOPIC = keccak256(toUtf8Bytes('Transfer(address,address,uint256)'));
|
|
13
|
+
function asBytes32(hex) {
|
|
14
|
+
const h = hex.startsWith('0x') ? hex : `0x${hex}`;
|
|
15
|
+
return zeroPadValue(h, 32);
|
|
16
|
+
}
|
|
17
|
+
function wordHex(value) {
|
|
18
|
+
return asBytes32(value).slice(2);
|
|
19
|
+
}
|
|
20
|
+
function wordFromNumber(n) {
|
|
21
|
+
return BigInt(n).toString(16).padStart(64, '0');
|
|
22
|
+
}
|
|
23
|
+
function setWord(calldata, index, word64) {
|
|
24
|
+
if (word64.length !== 64) {
|
|
25
|
+
throw new Error(`LONGETF word must be 64 hex chars, got ${word64.length}`);
|
|
26
|
+
}
|
|
27
|
+
const start = 10 + index * 64;
|
|
28
|
+
return calldata.slice(0, start) + word64 + calldata.slice(start + 64);
|
|
29
|
+
}
|
|
30
|
+
function utf8HexPadded(text, words = 1) {
|
|
31
|
+
const hex = hexlify(toUtf8Bytes(text)).slice(2);
|
|
32
|
+
const cap = words * 64;
|
|
33
|
+
if (hex.length > cap) {
|
|
34
|
+
throw new Error(`LONGETF string exceeds ${words * 32} bytes`);
|
|
35
|
+
}
|
|
36
|
+
return hex.padEnd(cap, '0');
|
|
37
|
+
}
|
|
38
|
+
export function longetfVaultInitCodeHash(initCode = LONGETF_VAULT_INITCODE) {
|
|
39
|
+
return keccak256(getBytes(initCode));
|
|
40
|
+
}
|
|
41
|
+
export function longetfEffectiveSalt(salt, creator) {
|
|
42
|
+
return keccak256(concat([zeroPadValue(getAddress(creator), 32), asBytes32(salt)]));
|
|
43
|
+
}
|
|
44
|
+
export function predictLongetfVault(salt, creator, options) {
|
|
45
|
+
const factory = getAddress(options?.factory ?? LONGETF_FACTORY);
|
|
46
|
+
const initCodeHash = options?.initCodeHash ?? longetfVaultInitCodeHash();
|
|
47
|
+
return getCreate2Address(factory, longetfEffectiveSalt(salt, creator), initCodeHash);
|
|
48
|
+
}
|
|
49
|
+
export function mineLongetfVaultSalt(creator, options) {
|
|
50
|
+
const target = BigInt(options?.protocolBeneficiary ?? LONG_XYZ_PROTOCOL_BENEFICIARY);
|
|
51
|
+
const maxTries = options?.maxTries ?? LONGETF_MINE_SALT_MAX_TRIES;
|
|
52
|
+
for (let i = 0; i < maxTries; i++) {
|
|
53
|
+
const salt = hexlify(randomBytes(32));
|
|
54
|
+
const vault = predictLongetfVault(salt, creator, options);
|
|
55
|
+
if (BigInt(vault) > target) {
|
|
56
|
+
return { salt, vault, tries: i + 1 };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
throw new Error('Could not find a usable LONGETF vault salt');
|
|
60
|
+
}
|
|
61
|
+
export function encodeLongetfDeployVault(salt, creator, initCode = LONGETF_VAULT_INITCODE) {
|
|
62
|
+
return factoryIface.encodeFunctionData('deployVault', [asBytes32(salt), getAddress(creator), initCode]);
|
|
63
|
+
}
|
|
64
|
+
export function encodeLongetfRegister(token, vault) {
|
|
65
|
+
return factoryIface.encodeFunctionData('register', [getAddress(token), getAddress(vault)]);
|
|
66
|
+
}
|
|
67
|
+
export function encodeLongetfIsTickerAvailable(ticker) {
|
|
68
|
+
return launcherIface.encodeFunctionData('isTickerAvailable', [ticker]);
|
|
69
|
+
}
|
|
70
|
+
export function patchLongetfLaunchCalldata(patch, template = LONGETF_LAUNCH_TEMPLATE) {
|
|
71
|
+
const nameBytes = toUtf8Bytes(patch.name);
|
|
72
|
+
const symbolBytes = toUtf8Bytes(patch.symbol);
|
|
73
|
+
if (nameBytes.length === 0 || nameBytes.length > 32) {
|
|
74
|
+
throw new Error('LONGETF name must be 1–32 bytes');
|
|
75
|
+
}
|
|
76
|
+
if (!/^[A-Za-z]+$/.test(patch.symbol) || symbolBytes.length > 32) {
|
|
77
|
+
throw new Error('LONGETF ticker must be letters only');
|
|
78
|
+
}
|
|
79
|
+
const uri = patch.metaUri ?? '';
|
|
80
|
+
const uriBytes = toUtf8Bytes(uri);
|
|
81
|
+
if (uriBytes.length > LONGETF_URI_WORDS * 32) {
|
|
82
|
+
throw new Error('LONGETF metadata URI exceeds 96 bytes');
|
|
83
|
+
}
|
|
84
|
+
const launchSalt = patch.launchSalt ?? hexlify(randomBytes(32));
|
|
85
|
+
let data = template.startsWith('0x') ? template : `0x${template}`;
|
|
86
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.salt, wordHex(launchSalt));
|
|
87
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.nameLen, wordFromNumber(nameBytes.length));
|
|
88
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.name, utf8HexPadded(patch.name));
|
|
89
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.symLen, wordFromNumber(symbolBytes.length));
|
|
90
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.sym, utf8HexPadded(patch.symbol));
|
|
91
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.uriLen, wordFromNumber(uriBytes.length));
|
|
92
|
+
const uriPacked = utf8HexPadded(uri, LONGETF_URI_WORDS);
|
|
93
|
+
for (let i = 0; i < LONGETF_URI_WORDS; i++) {
|
|
94
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.uri + i, uriPacked.slice(i * 64, (i + 1) * 64));
|
|
95
|
+
}
|
|
96
|
+
const anchorWord = wordHex(getAddress(patch.anchor));
|
|
97
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.numeraire0, anchorWord);
|
|
98
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.numeraire1, anchorWord);
|
|
99
|
+
data = setWord(data, LONGETF_LAUNCH_WORDS.beneficiary, wordHex(getAddress(patch.vault)));
|
|
100
|
+
return data;
|
|
101
|
+
}
|
|
102
|
+
export function parseLongetfTokenFromLogs(logs) {
|
|
103
|
+
for (const log of logs) {
|
|
104
|
+
if (log.topics[0] !== TRANSFER_TOPIC || log.topics.length < 3)
|
|
105
|
+
continue;
|
|
106
|
+
const from = `0x${log.topics[1].slice(26)}`;
|
|
107
|
+
if (from.toLowerCase() === ZERO_ADDRESS) {
|
|
108
|
+
return getAddress(log.address);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
export function getLongetfLaunchSelector() {
|
|
114
|
+
return LONGETF_LAUNCH_TEMPLATE.slice(0, 10);
|
|
115
|
+
}
|
|
116
|
+
export { LONG_XYZ_LAUNCHER };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { LONGETF_VAULT_INITCODE, LONGETF_LAUNCH_TEMPLATE, LONGETF_DEFAULT_ANCHORS, type LongetfAnchor, } from './assets.js';
|
|
2
|
+
export { longetfVaultInitCodeHash, longetfEffectiveSalt, predictLongetfVault, mineLongetfVaultSalt, encodeLongetfDeployVault, encodeLongetfRegister, encodeLongetfIsTickerAvailable, patchLongetfLaunchCalldata, parseLongetfTokenFromLogs, getLongetfLaunchSelector, type LongetfMinedSalt, type LongetfLaunchPatch, } from './encode.js';
|
|
3
|
+
export { isLongetfTickerAvailable, prepareLongetfVault, signLongetfDeployVault, signLongetfLaunch, signLongetfRegister, getLongetfVaultCode, type LongetfLaunchInput, } from './launch.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { LONGETF_VAULT_INITCODE, LONGETF_LAUNCH_TEMPLATE, LONGETF_DEFAULT_ANCHORS, } from './assets.js';
|
|
2
|
+
export { longetfVaultInitCodeHash, longetfEffectiveSalt, predictLongetfVault, mineLongetfVaultSalt, encodeLongetfDeployVault, encodeLongetfRegister, encodeLongetfIsTickerAvailable, patchLongetfLaunchCalldata, parseLongetfTokenFromLogs, getLongetfLaunchSelector, } from './encode.js';
|
|
3
|
+
export { isLongetfTickerAvailable, prepareLongetfVault, signLongetfDeployVault, signLongetfLaunch, signLongetfRegister, getLongetfVaultCode, } from './launch.js';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LONGETF 三步发币:deployVault → long.xyz create() → register
|
|
3
|
+
* 必须逐笔等确认,不能一次签完再广播。
|
|
4
|
+
*/
|
|
5
|
+
import { type RobinhoodSignedTx } from '../sign.js';
|
|
6
|
+
import { type LongetfMinedSalt } from './encode.js';
|
|
7
|
+
export interface LongetfLaunchInput {
|
|
8
|
+
rpcUrl?: string;
|
|
9
|
+
privateKey: string;
|
|
10
|
+
name: string;
|
|
11
|
+
symbol: string;
|
|
12
|
+
anchor: string;
|
|
13
|
+
metaUri?: string;
|
|
14
|
+
gasPrice?: bigint;
|
|
15
|
+
nonce?: number;
|
|
16
|
+
vaultInitCode?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function isLongetfTickerAvailable(ticker: string, rpcUrl?: string): Promise<boolean>;
|
|
19
|
+
export declare function prepareLongetfVault(creator: string, vaultInitCode?: string): LongetfMinedSalt;
|
|
20
|
+
export declare function signLongetfDeployVault(params: {
|
|
21
|
+
rpcUrl?: string;
|
|
22
|
+
privateKey: string;
|
|
23
|
+
salt: string;
|
|
24
|
+
creator: string;
|
|
25
|
+
vaultInitCode?: string;
|
|
26
|
+
gasPrice?: bigint;
|
|
27
|
+
nonce?: number;
|
|
28
|
+
}): Promise<RobinhoodSignedTx>;
|
|
29
|
+
export declare function signLongetfLaunch(params: {
|
|
30
|
+
rpcUrl?: string;
|
|
31
|
+
privateKey: string;
|
|
32
|
+
name: string;
|
|
33
|
+
symbol: string;
|
|
34
|
+
anchor: string;
|
|
35
|
+
vault: string;
|
|
36
|
+
metaUri?: string;
|
|
37
|
+
launchTemplate?: string;
|
|
38
|
+
gasPrice?: bigint;
|
|
39
|
+
nonce?: number;
|
|
40
|
+
}): Promise<RobinhoodSignedTx>;
|
|
41
|
+
export declare function signLongetfRegister(params: {
|
|
42
|
+
rpcUrl?: string;
|
|
43
|
+
privateKey: string;
|
|
44
|
+
token: string;
|
|
45
|
+
vault: string;
|
|
46
|
+
gasPrice?: bigint;
|
|
47
|
+
nonce?: number;
|
|
48
|
+
}): Promise<RobinhoodSignedTx>;
|
|
49
|
+
export declare function getLongetfVaultCode(vault: string, rpcUrl?: string): Promise<string>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LONGETF 三步发币:deployVault → long.xyz create() → register
|
|
3
|
+
* 必须逐笔等确认,不能一次签完再广播。
|
|
4
|
+
*/
|
|
5
|
+
import { JsonRpcProvider } from 'ethers';
|
|
6
|
+
import { LONGETF_DEPLOY_VAULT_GAS_LIMIT, LONGETF_FACTORY, LONGETF_LAUNCH_GAS_LIMIT, LONGETF_REGISTER_GAS_LIMIT, LONG_XYZ_LAUNCHER, ROBINHOOD_CHAIN_ID, ROBINHOOD_RPC_URL, } from '../constants.js';
|
|
7
|
+
import { signRobinhoodTx } from '../sign.js';
|
|
8
|
+
import { LONGETF_VAULT_INITCODE } from './assets.js';
|
|
9
|
+
import { encodeLongetfDeployVault, encodeLongetfIsTickerAvailable, encodeLongetfRegister, longetfVaultInitCodeHash, mineLongetfVaultSalt, patchLongetfLaunchCalldata, } from './encode.js';
|
|
10
|
+
export async function isLongetfTickerAvailable(ticker, rpcUrl = ROBINHOOD_RPC_URL) {
|
|
11
|
+
const provider = new JsonRpcProvider(rpcUrl, ROBINHOOD_CHAIN_ID, { staticNetwork: true });
|
|
12
|
+
const data = encodeLongetfIsTickerAvailable(ticker);
|
|
13
|
+
const out = await provider.call({ to: LONG_XYZ_LAUNCHER, data });
|
|
14
|
+
return BigInt(out) === 1n;
|
|
15
|
+
}
|
|
16
|
+
export function prepareLongetfVault(creator, vaultInitCode) {
|
|
17
|
+
return mineLongetfVaultSalt(creator, {
|
|
18
|
+
initCodeHash: vaultInitCode ? longetfVaultInitCodeHash(vaultInitCode) : undefined,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export async function signLongetfDeployVault(params) {
|
|
22
|
+
const initCode = params.vaultInitCode ?? LONGETF_VAULT_INITCODE;
|
|
23
|
+
return signRobinhoodTx({
|
|
24
|
+
rpcUrl: params.rpcUrl,
|
|
25
|
+
privateKey: params.privateKey,
|
|
26
|
+
to: LONGETF_FACTORY,
|
|
27
|
+
data: encodeLongetfDeployVault(params.salt, params.creator, initCode),
|
|
28
|
+
gasLimit: LONGETF_DEPLOY_VAULT_GAS_LIMIT,
|
|
29
|
+
gasPrice: params.gasPrice,
|
|
30
|
+
nonce: params.nonce,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export async function signLongetfLaunch(params) {
|
|
34
|
+
return signRobinhoodTx({
|
|
35
|
+
rpcUrl: params.rpcUrl,
|
|
36
|
+
privateKey: params.privateKey,
|
|
37
|
+
to: LONG_XYZ_LAUNCHER,
|
|
38
|
+
data: patchLongetfLaunchCalldata({
|
|
39
|
+
name: params.name,
|
|
40
|
+
symbol: params.symbol,
|
|
41
|
+
anchor: params.anchor,
|
|
42
|
+
vault: params.vault,
|
|
43
|
+
metaUri: params.metaUri,
|
|
44
|
+
}, params.launchTemplate),
|
|
45
|
+
gasLimit: LONGETF_LAUNCH_GAS_LIMIT,
|
|
46
|
+
gasPrice: params.gasPrice,
|
|
47
|
+
nonce: params.nonce,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export async function signLongetfRegister(params) {
|
|
51
|
+
return signRobinhoodTx({
|
|
52
|
+
rpcUrl: params.rpcUrl,
|
|
53
|
+
privateKey: params.privateKey,
|
|
54
|
+
to: LONGETF_FACTORY,
|
|
55
|
+
data: encodeLongetfRegister(params.token, params.vault),
|
|
56
|
+
gasLimit: LONGETF_REGISTER_GAS_LIMIT,
|
|
57
|
+
gasPrice: params.gasPrice,
|
|
58
|
+
nonce: params.nonce,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
export async function getLongetfVaultCode(vault, rpcUrl = ROBINHOOD_RPC_URL) {
|
|
62
|
+
const provider = new JsonRpcProvider(rpcUrl, ROBINHOOD_CHAIN_ID, { staticNetwork: true });
|
|
63
|
+
return provider.getCode(vault);
|
|
64
|
+
}
|