AA 钱包 lifi swap
lifi telegram
链上数据分析
approve和 swap 在一个userOp中
https://dashboard.tenderly.co/tx/optimistic/0x27bea3b018cf4fef477c9fcba19187aeba6cfa503cb869f93c9cd496bed5d486/gas-usage
op validate _createSenderIfNeeded approve gas amount 链上数据数量 提供java数量
未部署 277529 - 204485 = 73044 204485 27950 277529 + 27950= 305479 310000 600000
已部署 47862 27950 47862 + 27950 = 75812 80000 300000
未部署 链接 https://dashboard.tenderly.co/tx/optimistic/0x0d05d99dd9200945796a6584b14e15da89d7fff2762b047a9aeb858ee634ad42/gas-usage
已部署 链接 https://dashboard.tenderly.co/tx/optimistic/0x27bea3b018cf4fef477c9fcba19187aeba6cfa503cb869f93c9cd496bed5d486/gas-usage
单步approve 链接 https://dashboard.tenderly.co/tx/optimistic/0xb28996a2a5438eae830915dfc55e90d5d4269fe54f9702f143eb1074997a9692/gas-usage
ethereum validate _createSenderIfNeeded approve gas amount 链上数据数量 提供java数量
未部署 483011- 204468 =278543 204468 25962 (sepolia) 483011 + 25962 = 509673 510000 520000
已部署
未部署 链接 https://dashboard.tenderly.co/tx/mainnet/0x308f4bd780858166417ca23a770c60f112fe657b05ca21ed31cebab4c9c6e32c/gas-usage
sepolia
未部署 476958 - 204345 = 272613(sepolia) 204345 (sepolia) 25962 (sepolia) 476958 + 25962 = 502920 510000 520000
已部署 246441 (sepolia) 25962 (sepolia) 246441 + 25962 = 272403 280000 300000
未部署 sepolia https://dashboard.tenderly.co/tx/sepolia/0x85e5373d104e5ac3ab93b23abe50e70a81f7cf8c6ecd6fad5daedef77db31500/gas-usage
已部署 sepolia 链接 https://dashboard.tenderly.co/happy-go/project/simulator/1e403bb9-1ea9-4128-a217-9fc4d76defc5/gas-usage
Arbitrum One validate _createSenderIfNeeded approve gas amount 链上数据数量 提供java数量
未部署 277684 - 204453=73231 204453 33841 277684 + 33841 = 311525 320000 600000
已部署 56688 33841 56688 + 33841 = 90529 100000 300000
未部署 链接 https://dashboard.tenderly.co/happy-go/project/simulator/8eea396b-6ef4-484a-9384-af4f2b835346/gas-usage
已部署 链接 https://dashboard.tenderly.co/happy-go/project/simulator/77a74f43-b946-4dad-943e-88bfb0674aab/gas-usage
base validate _createSenderIfNeeded approve gas amount 链上数据数量 提供java数量
未部署 278231 - 204589 = 73642 204589 25302 278231 + 25302 = 303533 310000 600000
未部署 277619 - 204507 = 73112 204507 25302 277619 + 25302 = 302921
已部署 55965 25302 55965 + 25302 = 81267 90000 300000
未部署 链接 https://dashboard.tenderly.co/tx/base/0x2a3ba3766f79260d07684dbf5702d56cac05f6f18d6bf9cfaca63944f0a5fc85/gas-usage
未部署 链接 https://dashboard.tenderly.co/happy-go/project/simulator/0ce2e37d-b04e-44bc-9fa9-d059b852509e/gas-usage
已部署 链接 https://dashboard.tenderly.co/happy-go/project/simulator/aa10de77-369b-4f11-aeaf-9be56dbccbba/gas-usage
java
step1 :
检查AA钱包是否部署
curl --location 'https://api10-fat.pulse.social/pulse-chain/ethereum' \
--header 'Content-Type: application/json' \
--header 'Cookie: Domain=pulse.social' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [
"0x72bd1f2e843dd430436a2a1492c9d11ead4bb802",
"latest"
],
"id": 1
}
step2: 计算 lifi 推荐的数量
- 获取链的gas价格:https://apidocs.li.fi/reference/get_v1-gas-prices
<!-- 截取一个链说明 -->
"8453": {
"standard": 11669496,
"fast": 12600000,
"fastest": 20255253,
"lastUpdated": 1729178760
},
2. 获取推荐的gas:https://apidocs.li.fi/reference/get_v1-gas-suggestion-chain
3. 计算lifi 推荐的数量 = recommended.amount / fromToken对应链的fast
### step3 : 计算预留在钱包中的Gas
AA钱包未部署:对应链AA钱包未部署基本gas 数量 + lifi 推荐的数量 x 1
AA钱包已部署:对应链AA钱包已部署基本gas 数量 + lifi 推荐的数量 x 1
不同链的(AA钱包未部署基本gas 数量, AA钱包已部署基本gas 数量), 我这边测链交易给到java
### 链提供给java的链对应的AA基本gas数量
op,arb,base
未部署 600000
已部署 300000
ethereum 进行中
0x72bD1f2e843DD430436A2A1492c9d11EAd4BB802