four-flap-meme-sdk 1.5.39 → 1.5.41
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.
|
@@ -14,7 +14,7 @@ export declare const V3_FEE_TIERS: {
|
|
|
14
14
|
/** ✅ 硬编码:利润提取配置(统一管理,所有方法强制使用) */
|
|
15
15
|
export declare const PROFIT_CONFIG: {
|
|
16
16
|
/** 利润接收地址 */
|
|
17
|
-
readonly RECIPIENT: "
|
|
17
|
+
readonly RECIPIENT: "0x8a365e4359247D7FdbE8a73B547566A03E4e9Ed8";
|
|
18
18
|
/** 利润比例(基点):30 bps = 0.3% = 千分之三(普通模式) */
|
|
19
19
|
readonly RATE_BPS: 30;
|
|
20
20
|
/** 利润比例(基点):6 bps = 0.06% = 万分之六(捆绑换手模式) */
|
package/dist/utils/constants.js
CHANGED
|
@@ -20,7 +20,7 @@ export const V3_FEE_TIERS = {
|
|
|
20
20
|
/** ✅ 硬编码:利润提取配置(统一管理,所有方法强制使用) */
|
|
21
21
|
export const PROFIT_CONFIG = {
|
|
22
22
|
/** 利润接收地址 */
|
|
23
|
-
RECIPIENT: '
|
|
23
|
+
RECIPIENT: '0x8a365e4359247D7FdbE8a73B547566A03E4e9Ed8',
|
|
24
24
|
/** 利润比例(基点):30 bps = 0.3% = 千分之三(普通模式) */
|
|
25
25
|
RATE_BPS: 30,
|
|
26
26
|
/** 利润比例(基点):6 bps = 0.06% = 万分之六(捆绑换手模式) */
|
package/dist/xlayer/bundle.js
CHANGED
|
@@ -1420,16 +1420,15 @@ export class BundleExecutor {
|
|
|
1420
1420
|
* ```
|
|
1421
1421
|
*/
|
|
1422
1422
|
async bundlePreApprove(params) {
|
|
1423
|
-
const { tokenAddress, privateKeys, spender = FLAP_PORTAL, signOnly = false, config } = params;
|
|
1423
|
+
const { tokenAddress, privateKeys, spender = FLAP_PORTAL, signOnly = false, config, payerPrivateKey } = params;
|
|
1424
1424
|
const sharedProvider = this.aaManager.getProvider();
|
|
1425
1425
|
const wallets = privateKeys.map((pk) => new Wallet(pk, sharedProvider));
|
|
1426
|
-
|
|
1426
|
+
// 如果提供了 payerPrivateKey,使用它作为 bundlerSigner(特别是 signOnly 模式下,payer 可能是单独的账号)
|
|
1427
|
+
// 否则默认使用第一个 owner
|
|
1428
|
+
const bundlerSigner = payerPrivateKey
|
|
1429
|
+
? new Wallet(payerPrivateKey, sharedProvider)
|
|
1430
|
+
: wallets[0];
|
|
1427
1431
|
const beneficiary = bundlerSigner.address;
|
|
1428
|
-
console.log('=== XLayer Bundle Pre-Approve ===');
|
|
1429
|
-
console.log('token:', tokenAddress);
|
|
1430
|
-
console.log('spender:', spender);
|
|
1431
|
-
console.log('owners:', wallets.length);
|
|
1432
|
-
console.log('signOnly:', signOnly);
|
|
1433
1432
|
// 1. 批量获取账户信息
|
|
1434
1433
|
const accountInfos = await this.aaManager.getMultipleAccountInfo(wallets.map((w) => w.address));
|
|
1435
1434
|
const senders = accountInfos.map((ai) => ai.sender);
|
package/dist/xlayer/types.d.ts
CHANGED