four-flap-meme-sdk 4.3.20 → 4.3.21
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.
|
@@ -25,8 +25,8 @@ export declare const LONG_XYZ_HOOK: "0x4e3468951d49f2eea976ed0d6e75ffcb44a9a544"
|
|
|
25
25
|
export declare const LONG_XYZ_PROTOCOL_BENEFICIARY: "0x21e2ce70511e4fe542a97708e89520471daa7a66";
|
|
26
26
|
export declare const PONS_V2_FACTORY: "0x7eD598BcEf8bd9Edd8C97A195C6d13f40801EC7e";
|
|
27
27
|
export declare const PONS_V2_LAUNCH_AND_BUY: "0xe33E9E479dF8802cb0866d5d05258bEc4cF62948";
|
|
28
|
-
export declare const LONGETF_DEPLOY_VAULT_GAS_LIMIT:
|
|
29
|
-
export declare const LONGETF_LAUNCH_GAS_LIMIT:
|
|
28
|
+
export declare const LONGETF_DEPLOY_VAULT_GAS_LIMIT: 4500000n;
|
|
29
|
+
export declare const LONGETF_LAUNCH_GAS_LIMIT: 4500000n;
|
|
30
30
|
export declare const LONGETF_REGISTER_GAS_LIMIT: 500000n;
|
|
31
31
|
export declare const PONS_V2_LAUNCH_GAS_LIMIT: 3000000n;
|
|
32
32
|
export declare function robinhoodConfiguredGas(key: string, fallback: bigint): bigint;
|
|
@@ -9,7 +9,14 @@ export async function signRobinhoodTx(params) {
|
|
|
9
9
|
const wallet = new Wallet(params.privateKey, provider);
|
|
10
10
|
const nonce = params.nonce ?? (await wallet.getNonce());
|
|
11
11
|
const feeData = await provider.getFeeData();
|
|
12
|
-
const
|
|
12
|
+
const block = await provider.getBlock('latest');
|
|
13
|
+
const base = block?.baseFeePerGas ?? 0n;
|
|
14
|
+
const priority = feeData.maxPriorityFeePerGas ?? 0n;
|
|
15
|
+
const floor = base + base / 8n + priority;
|
|
16
|
+
let maxFeePerGas = params.gasPrice ?? feeData.maxFeePerGas ?? feeData.gasPrice ?? 1000000000n;
|
|
17
|
+
if (maxFeePerGas < floor)
|
|
18
|
+
maxFeePerGas = floor;
|
|
19
|
+
const maxPriorityFeePerGas = priority > maxFeePerGas ? maxFeePerGas : priority;
|
|
13
20
|
const signedTx = await wallet.signTransaction({
|
|
14
21
|
to: params.to,
|
|
15
22
|
value: params.value ?? 0n,
|
|
@@ -18,7 +25,7 @@ export async function signRobinhoodTx(params) {
|
|
|
18
25
|
chainId: ROBINHOOD_CHAIN_ID,
|
|
19
26
|
type: 2,
|
|
20
27
|
maxFeePerGas,
|
|
21
|
-
maxPriorityFeePerGas
|
|
28
|
+
maxPriorityFeePerGas,
|
|
22
29
|
gasLimit: params.gasLimit,
|
|
23
30
|
});
|
|
24
31
|
const tx = Transaction.from(signedTx);
|
|
@@ -43,10 +43,10 @@ export declare const GAS_LIMITS: {
|
|
|
43
43
|
readonly AA_PRE_VERIFICATION: 60000n;
|
|
44
44
|
/** AA 默认 Call Gas Limit */
|
|
45
45
|
readonly AA_CALL_GAS_LIMIT: 800000n;
|
|
46
|
-
/** LONGETF deployVault
|
|
47
|
-
readonly ROBINHOOD_LONGETF_DEPLOY_VAULT:
|
|
46
|
+
/** LONGETF deployVault。模拟约 270 万,3,000,000 余量不够时会执行失败。 */
|
|
47
|
+
readonly ROBINHOOD_LONGETF_DEPLOY_VAULT: 4500000n;
|
|
48
48
|
/** LONGETF long.xyz create() */
|
|
49
|
-
readonly ROBINHOOD_LONGETF_LAUNCH:
|
|
49
|
+
readonly ROBINHOOD_LONGETF_LAUNCH: 4500000n;
|
|
50
50
|
/** LONGETF factory register */
|
|
51
51
|
readonly ROBINHOOD_LONGETF_REGISTER: 500000n;
|
|
52
52
|
/** pons v2 launchToken / launchAndBuy */
|
|
@@ -53,10 +53,10 @@ export const GAS_LIMITS = {
|
|
|
53
53
|
/** AA 默认 Call Gas Limit */
|
|
54
54
|
AA_CALL_GAS_LIMIT: 800000n,
|
|
55
55
|
// ==================== Robinhood Chain 发币 ====================
|
|
56
|
-
/** LONGETF deployVault
|
|
57
|
-
ROBINHOOD_LONGETF_DEPLOY_VAULT:
|
|
56
|
+
/** LONGETF deployVault。模拟约 270 万,3,000,000 余量不够时会执行失败。 */
|
|
57
|
+
ROBINHOOD_LONGETF_DEPLOY_VAULT: 4500000n,
|
|
58
58
|
/** LONGETF long.xyz create() */
|
|
59
|
-
ROBINHOOD_LONGETF_LAUNCH:
|
|
59
|
+
ROBINHOOD_LONGETF_LAUNCH: 4500000n,
|
|
60
60
|
/** LONGETF factory register */
|
|
61
61
|
ROBINHOOD_LONGETF_REGISTER: 500000n,
|
|
62
62
|
/** pons v2 launchToken / launchAndBuy */
|