four-flap-meme-sdk
Version:
SDK for Flap bonding curve and four.meme TokenManager
46 lines (45 loc) • 1.54 kB
TypeScript
/**
* 预测 vanity 地址(CREATE2 proxy bytecode 方案)
* 使用 ethers v6 的 getCreate2Address
*/
export declare function predictVanityTokenAddress(salt: string, portal: string, tokenImpl: string): string;
/**
* 预测 vanity 地址(使用链枚举)
* SDK 自动使用该链的 Portal 和 TokenImpl 地址
* 注意:使用 Flap 平台的原始 Portal 地址进行 CREATE2 计算
* BSC/MONAD 默认使用 NORMAL 实现(非税版)
*/
export declare function predictVanityTokenAddressByChain(chain: 'BSC' | 'BASE' | 'XLAYER' | 'MORPH' | 'MONAD', salt: string, taxed?: boolean): string;
/**
* 寻找满足后缀的 salt(默认 8888)
* 注意:该方法为同步 CPU 搜索,谨慎设置迭代限制
*/
export declare function findSaltEnding(opts: {
portal: string;
tokenImpl: string;
suffix?: string;
maxIterations?: number;
seed?: string;
}): Promise<{
salt: string;
address: string;
iterations: number;
}>;
/**
* 寻找满足后缀的 salt(使用链枚举)
* SDK 自动使用该链的 Portal 和 TokenImpl 地址
* 注意:使用 Flap 平台的原始 Portal 地址进行 CREATE2 计算
* BSC/MONAD 默认使用 NORMAL 实现(非税版)
* XLayer 只有标准版,后缀是 1111
*/
export declare function findSaltEndingByChain(opts: {
chain: 'BSC' | 'BASE' | 'XLAYER' | 'MORPH' | 'MONAD';
suffix?: string;
maxIterations?: number;
seed?: string;
taxed?: boolean;
}): Promise<{
salt: string;
address: string;
iterations: number;
}>;