@across-protocol/sdk 4.4.16 → 4.4.18
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/cjs/src/arch/evm/BlockUtils.js +11 -6
- package/dist/cjs/src/arch/evm/BlockUtils.js.map +1 -1
- package/dist/cjs/src/arch/tvm/TransactionUtils.js +15 -2
- package/dist/cjs/src/arch/tvm/TransactionUtils.js.map +1 -1
- package/dist/cjs/src/utils/abi/typechain/Constants.d.ts +9 -1
- package/dist/cjs/src/utils/abi/typechain/CounterfactualConfig.d.ts +9 -1
- package/dist/cjs/src/utils/abi/typechain/DeploymentUtils.d.ts +9 -1
- package/dist/cjs/src/utils/abi/typechain/ERC6492SignatureHandler.d.ts +42 -0
- package/dist/cjs/src/utils/abi/typechain/ERC6492SignatureHandler.js +3 -0
- package/dist/cjs/src/utils/abi/typechain/ERC6492SignatureHandler.js.map +1 -0
- package/dist/cjs/src/utils/abi/typechain/HubPoolTestBase.d.ts +9 -1
- package/dist/cjs/src/utils/abi/typechain/IERC20AuthBytes.d.ts +58 -0
- package/dist/cjs/src/utils/abi/typechain/IERC20AuthBytes.js +3 -0
- package/dist/cjs/src/utils/abi/typechain/IERC20AuthBytes.js.map +1 -0
- package/dist/cjs/src/utils/abi/typechain/IMulticall3.d.ts +2 -226
- package/dist/cjs/src/utils/abi/typechain/SpokePoolPeriphery.d.ts +53 -1
- package/dist/cjs/src/utils/abi/typechain/SpokePoolPeripheryInterface.d.ts +45 -1
- package/dist/cjs/src/utils/abi/typechain/factories/Constants__factory.d.ts +10 -0
- package/dist/cjs/src/utils/abi/typechain/factories/Constants__factory.js +13 -0
- package/dist/cjs/src/utils/abi/typechain/factories/Constants__factory.js.map +1 -1
- package/dist/cjs/src/utils/abi/typechain/factories/CounterfactualConfig__factory.d.ts +10 -0
- package/dist/cjs/src/utils/abi/typechain/factories/CounterfactualConfig__factory.js +13 -0
- package/dist/cjs/src/utils/abi/typechain/factories/CounterfactualConfig__factory.js.map +1 -1
- package/dist/cjs/src/utils/abi/typechain/factories/DeploymentUtils__factory.d.ts +10 -0
- package/dist/cjs/src/utils/abi/typechain/factories/DeploymentUtils__factory.js +13 -0
- package/dist/cjs/src/utils/abi/typechain/factories/DeploymentUtils__factory.js.map +1 -1
- package/dist/cjs/src/utils/abi/typechain/factories/ERC6492SignatureHandler__factory.d.ts +18 -0
- package/dist/cjs/src/utils/abi/typechain/factories/ERC6492SignatureHandler__factory.js +30 -0
- package/dist/cjs/src/utils/abi/typechain/factories/ERC6492SignatureHandler__factory.js.map +1 -0
- package/dist/cjs/src/utils/abi/typechain/factories/HubPoolTestBase__factory.d.ts +10 -0
- package/dist/cjs/src/utils/abi/typechain/factories/HubPoolTestBase__factory.js +13 -0
- package/dist/cjs/src/utils/abi/typechain/factories/HubPoolTestBase__factory.js.map +1 -1
- package/dist/cjs/src/utils/abi/typechain/factories/IERC20AuthBytes__factory.d.ts +42 -0
- package/dist/cjs/src/utils/abi/typechain/factories/IERC20AuthBytes__factory.js +60 -0
- package/dist/cjs/src/utils/abi/typechain/factories/IERC20AuthBytes__factory.js.map +1 -0
- package/dist/cjs/src/utils/abi/typechain/factories/IMulticall3__factory.d.ts +1 -296
- package/dist/cjs/src/utils/abi/typechain/factories/IMulticall3__factory.js +1 -391
- package/dist/cjs/src/utils/abi/typechain/factories/IMulticall3__factory.js.map +1 -1
- package/dist/cjs/src/utils/abi/typechain/factories/SpokePoolPeripheryInterface__factory.d.ts +226 -0
- package/dist/cjs/src/utils/abi/typechain/factories/SpokePoolPeripheryInterface__factory.js +288 -0
- package/dist/cjs/src/utils/abi/typechain/factories/SpokePoolPeripheryInterface__factory.js.map +1 -1
- package/dist/cjs/src/utils/abi/typechain/factories/SpokePoolPeriphery__factory.d.ts +240 -0
- package/dist/cjs/src/utils/abi/typechain/factories/SpokePoolPeriphery__factory.js +306 -0
- package/dist/cjs/src/utils/abi/typechain/factories/SpokePoolPeriphery__factory.js.map +1 -1
- package/dist/cjs/src/utils/abi/typechain/factories/index.d.ts +2 -0
- package/dist/cjs/src/utils/abi/typechain/factories/index.js +10 -6
- package/dist/cjs/src/utils/abi/typechain/factories/index.js.map +1 -1
- package/dist/cjs/src/utils/abi/typechain/index.d.ts +4 -0
- package/dist/cjs/src/utils/abi/typechain/index.js +10 -6
- package/dist/cjs/src/utils/abi/typechain/index.js.map +1 -1
- package/dist/esm/src/arch/evm/BlockUtils.js +18 -6
- package/dist/esm/src/arch/evm/BlockUtils.js.map +1 -1
- package/dist/esm/src/arch/tvm/TransactionUtils.d.ts +7 -1
- package/dist/esm/src/arch/tvm/TransactionUtils.js +40 -4
- package/dist/esm/src/arch/tvm/TransactionUtils.js.map +1 -1
- package/dist/esm/src/utils/abi/typechain/Constants.d.ts +9 -1
- package/dist/esm/src/utils/abi/typechain/CounterfactualConfig.d.ts +9 -1
- package/dist/esm/src/utils/abi/typechain/DeploymentUtils.d.ts +9 -1
- package/dist/esm/src/utils/abi/typechain/ERC6492SignatureHandler.d.ts +42 -0
- package/dist/esm/src/utils/abi/typechain/ERC6492SignatureHandler.js +2 -0
- package/dist/esm/src/utils/abi/typechain/ERC6492SignatureHandler.js.map +1 -0
- package/dist/esm/src/utils/abi/typechain/HubPoolTestBase.d.ts +9 -1
- package/dist/esm/src/utils/abi/typechain/IERC20AuthBytes.d.ts +58 -0
- package/dist/esm/src/utils/abi/typechain/IERC20AuthBytes.js +2 -0
- package/dist/esm/src/utils/abi/typechain/IERC20AuthBytes.js.map +1 -0
- package/dist/esm/src/utils/abi/typechain/IMulticall3.d.ts +2 -226
- package/dist/esm/src/utils/abi/typechain/SpokePoolPeriphery.d.ts +53 -1
- package/dist/esm/src/utils/abi/typechain/SpokePoolPeripheryInterface.d.ts +45 -1
- package/dist/esm/src/utils/abi/typechain/factories/Constants__factory.d.ts +10 -0
- package/dist/esm/src/utils/abi/typechain/factories/Constants__factory.js +13 -0
- package/dist/esm/src/utils/abi/typechain/factories/Constants__factory.js.map +1 -1
- package/dist/esm/src/utils/abi/typechain/factories/CounterfactualConfig__factory.d.ts +10 -0
- package/dist/esm/src/utils/abi/typechain/factories/CounterfactualConfig__factory.js +13 -0
- package/dist/esm/src/utils/abi/typechain/factories/CounterfactualConfig__factory.js.map +1 -1
- package/dist/esm/src/utils/abi/typechain/factories/DeploymentUtils__factory.d.ts +10 -0
- package/dist/esm/src/utils/abi/typechain/factories/DeploymentUtils__factory.js +13 -0
- package/dist/esm/src/utils/abi/typechain/factories/DeploymentUtils__factory.js.map +1 -1
- package/dist/esm/src/utils/abi/typechain/factories/ERC6492SignatureHandler__factory.d.ts +18 -0
- package/dist/esm/src/utils/abi/typechain/factories/ERC6492SignatureHandler__factory.js +30 -0
- package/dist/esm/src/utils/abi/typechain/factories/ERC6492SignatureHandler__factory.js.map +1 -0
- package/dist/esm/src/utils/abi/typechain/factories/HubPoolTestBase__factory.d.ts +10 -0
- package/dist/esm/src/utils/abi/typechain/factories/HubPoolTestBase__factory.js +13 -0
- package/dist/esm/src/utils/abi/typechain/factories/HubPoolTestBase__factory.js.map +1 -1
- package/dist/esm/src/utils/abi/typechain/factories/IERC20AuthBytes__factory.d.ts +42 -0
- package/dist/esm/src/utils/abi/typechain/factories/IERC20AuthBytes__factory.js +60 -0
- package/dist/esm/src/utils/abi/typechain/factories/IERC20AuthBytes__factory.js.map +1 -0
- package/dist/esm/src/utils/abi/typechain/factories/IMulticall3__factory.d.ts +1 -296
- package/dist/esm/src/utils/abi/typechain/factories/IMulticall3__factory.js +1 -391
- package/dist/esm/src/utils/abi/typechain/factories/IMulticall3__factory.js.map +1 -1
- package/dist/esm/src/utils/abi/typechain/factories/SpokePoolPeripheryInterface__factory.d.ts +226 -0
- package/dist/esm/src/utils/abi/typechain/factories/SpokePoolPeripheryInterface__factory.js +288 -0
- package/dist/esm/src/utils/abi/typechain/factories/SpokePoolPeripheryInterface__factory.js.map +1 -1
- package/dist/esm/src/utils/abi/typechain/factories/SpokePoolPeriphery__factory.d.ts +240 -0
- package/dist/esm/src/utils/abi/typechain/factories/SpokePoolPeriphery__factory.js +306 -0
- package/dist/esm/src/utils/abi/typechain/factories/SpokePoolPeriphery__factory.js.map +1 -1
- package/dist/esm/src/utils/abi/typechain/factories/index.d.ts +2 -0
- package/dist/esm/src/utils/abi/typechain/factories/index.js +2 -0
- package/dist/esm/src/utils/abi/typechain/factories/index.js.map +1 -1
- package/dist/esm/src/utils/abi/typechain/index.d.ts +4 -0
- package/dist/esm/src/utils/abi/typechain/index.js +2 -0
- package/dist/esm/src/utils/abi/typechain/index.js.map +1 -1
- package/dist/types/src/arch/evm/BlockUtils.d.ts.map +1 -1
- package/dist/types/src/arch/tvm/TransactionUtils.d.ts +7 -1
- package/dist/types/src/arch/tvm/TransactionUtils.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/Constants.d.ts +9 -1
- package/dist/types/src/utils/abi/typechain/Constants.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/CounterfactualConfig.d.ts +9 -1
- package/dist/types/src/utils/abi/typechain/CounterfactualConfig.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/DeploymentUtils.d.ts +9 -1
- package/dist/types/src/utils/abi/typechain/DeploymentUtils.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/ERC6492SignatureHandler.d.ts +43 -0
- package/dist/types/src/utils/abi/typechain/ERC6492SignatureHandler.d.ts.map +1 -0
- package/dist/types/src/utils/abi/typechain/HubPoolTestBase.d.ts +9 -1
- package/dist/types/src/utils/abi/typechain/HubPoolTestBase.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/IERC20AuthBytes.d.ts +59 -0
- package/dist/types/src/utils/abi/typechain/IERC20AuthBytes.d.ts.map +1 -0
- package/dist/types/src/utils/abi/typechain/IMulticall3.d.ts +2 -226
- package/dist/types/src/utils/abi/typechain/IMulticall3.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/SpokePoolPeriphery.d.ts +53 -1
- package/dist/types/src/utils/abi/typechain/SpokePoolPeriphery.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/SpokePoolPeripheryInterface.d.ts +45 -1
- package/dist/types/src/utils/abi/typechain/SpokePoolPeripheryInterface.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/factories/Constants__factory.d.ts +10 -0
- package/dist/types/src/utils/abi/typechain/factories/Constants__factory.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/factories/CounterfactualConfig__factory.d.ts +10 -0
- package/dist/types/src/utils/abi/typechain/factories/CounterfactualConfig__factory.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/factories/DeploymentUtils__factory.d.ts +10 -0
- package/dist/types/src/utils/abi/typechain/factories/DeploymentUtils__factory.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/factories/ERC6492SignatureHandler__factory.d.ts +19 -0
- package/dist/types/src/utils/abi/typechain/factories/ERC6492SignatureHandler__factory.d.ts.map +1 -0
- package/dist/types/src/utils/abi/typechain/factories/HubPoolTestBase__factory.d.ts +10 -0
- package/dist/types/src/utils/abi/typechain/factories/HubPoolTestBase__factory.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/factories/IERC20AuthBytes__factory.d.ts +43 -0
- package/dist/types/src/utils/abi/typechain/factories/IERC20AuthBytes__factory.d.ts.map +1 -0
- package/dist/types/src/utils/abi/typechain/factories/IMulticall3__factory.d.ts +1 -296
- package/dist/types/src/utils/abi/typechain/factories/IMulticall3__factory.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/factories/SpokePoolPeripheryInterface__factory.d.ts +226 -0
- package/dist/types/src/utils/abi/typechain/factories/SpokePoolPeripheryInterface__factory.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/factories/SpokePoolPeriphery__factory.d.ts +240 -0
- package/dist/types/src/utils/abi/typechain/factories/SpokePoolPeriphery__factory.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/factories/index.d.ts +2 -0
- package/dist/types/src/utils/abi/typechain/factories/index.d.ts.map +1 -1
- package/dist/types/src/utils/abi/typechain/index.d.ts +4 -0
- package/dist/types/src/utils/abi/typechain/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/arch/evm/BlockUtils.ts +20 -6
- package/src/arch/tvm/TransactionUtils.ts +44 -4
- package/src/utils/abi/contracts/Constants.json +13 -0
- package/src/utils/abi/contracts/CounterfactualConfig.json +13 -0
- package/src/utils/abi/contracts/DeploymentUtils.json +13 -0
- package/src/utils/abi/contracts/ERC6492SignatureHandler.json +15 -0
- package/src/utils/abi/contracts/HubPoolTestBase.json +13 -0
- package/src/utils/abi/contracts/IERC20AuthBytes.json +45 -0
- package/src/utils/abi/contracts/IMulticall3.json +1 -391
- package/src/utils/abi/contracts/SpokePoolPeriphery.json +306 -0
- package/src/utils/abi/contracts/SpokePoolPeripheryInterface.json +288 -0
- package/src/utils/abi/typechain/Constants.ts +20 -0
- package/src/utils/abi/typechain/CounterfactualConfig.ts +20 -0
- package/src/utils/abi/typechain/DeploymentUtils.ts +20 -0
- package/src/utils/abi/typechain/ERC6492SignatureHandler.ts +85 -0
- package/src/utils/abi/typechain/HubPoolTestBase.ts +20 -0
- package/src/utils/abi/typechain/IERC20AuthBytes.ts +146 -0
- package/src/utils/abi/typechain/IMulticall3.ts +1 -458
- package/src/utils/abi/typechain/SpokePoolPeriphery.ts +139 -0
- package/src/utils/abi/typechain/SpokePoolPeripheryInterface.ts +122 -0
- package/src/utils/abi/typechain/factories/Constants__factory.ts +13 -0
- package/src/utils/abi/typechain/factories/CounterfactualConfig__factory.ts +13 -0
- package/src/utils/abi/typechain/factories/DeploymentUtils__factory.ts +13 -0
- package/src/utils/abi/typechain/factories/ERC6492SignatureHandler__factory.ts +44 -0
- package/src/utils/abi/typechain/factories/HubPoolTestBase__factory.ts +13 -0
- package/src/utils/abi/typechain/factories/IERC20AuthBytes__factory.ts +70 -0
- package/src/utils/abi/typechain/factories/IMulticall3__factory.ts +1 -391
- package/src/utils/abi/typechain/factories/SpokePoolPeripheryInterface__factory.ts +288 -0
- package/src/utils/abi/typechain/factories/SpokePoolPeriphery__factory.ts +306 -0
- package/src/utils/abi/typechain/factories/index.ts +2 -0
- package/src/utils/abi/typechain/index.ts +4 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TronWeb } from "tronweb";
|
|
2
2
|
import { PopulatedTransaction } from "ethers";
|
|
3
|
-
import { TvmAddress } from "../../utils";
|
|
3
|
+
import { isDefined, TvmAddress } from "../../utils";
|
|
4
4
|
|
|
5
5
|
export interface TronTransactionResult {
|
|
6
6
|
txid: string;
|
|
@@ -25,8 +25,14 @@ export interface TronSimulationResult {
|
|
|
25
25
|
* converts the target address to TRON Base58 format, and uses TronWeb's
|
|
26
26
|
* `triggerSmartContract` → `sign` → `sendRawTransaction` pipeline.
|
|
27
27
|
*
|
|
28
|
+
* TRON models a native TRX transfer as its own transaction type (`TransferContract`), distinct from
|
|
29
|
+
* the `TriggerSmartContract` used for calls. A populated transaction with no `data` field is
|
|
30
|
+
* therefore dispatched to TronWeb's `sendTransaction` instead; see {@link transferNative}. Note that
|
|
31
|
+
* this turns on `data` being absent, not empty: an explicit `"0x"` remains a contract call, since
|
|
32
|
+
* that is how TronWeb encodes a `receive`/`fallback` invocation.
|
|
33
|
+
*
|
|
28
34
|
* @param tronWeb An authenticated TronWeb instance (with private key set).
|
|
29
|
-
* @param populatedTx The populated transaction containing `to
|
|
35
|
+
* @param populatedTx The populated transaction containing `to`, and `data` for a contract call.
|
|
30
36
|
* @param feeLimit The maximum TRX to burn for energy consumption, in SUN (1 TRX = 1,000,000 SUN).
|
|
31
37
|
* @returns The transaction ID and result status.
|
|
32
38
|
*/
|
|
@@ -37,8 +43,8 @@ export async function submitTransaction(
|
|
|
37
43
|
callValue: number = 0
|
|
38
44
|
): Promise<TronTransactionResult> {
|
|
39
45
|
const { to, data } = populatedTx;
|
|
40
|
-
if (!to
|
|
41
|
-
throw new Error("submitTransaction: populatedTx must have
|
|
46
|
+
if (!to) {
|
|
47
|
+
throw new Error("submitTransaction: populatedTx must have a 'to' field");
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
const tronAddress = TvmAddress.from(to).toNative();
|
|
@@ -47,6 +53,16 @@ export async function submitTransaction(
|
|
|
47
53
|
throw new Error("submitTransaction: TronWeb instance must have a default address configured");
|
|
48
54
|
}
|
|
49
55
|
|
|
56
|
+
// No calldata at all means this is a value transfer, which triggerSmartContract cannot express: it
|
|
57
|
+
// requires a deployed contract at the target address, so it can never fund an EOA.
|
|
58
|
+
//
|
|
59
|
+
// Empty-but-present calldata ("0x") is deliberately *not* treated as a transfer. That is TronWeb's
|
|
60
|
+
// own encoding for a `receive`/`fallback` selector, which it submits as a TriggerSmartContract; a
|
|
61
|
+
// TransferContract would move the TRX without running the recipient's code.
|
|
62
|
+
if (!isDefined(data)) {
|
|
63
|
+
return transferNative(tronWeb, tronAddress, callValue);
|
|
64
|
+
}
|
|
65
|
+
|
|
50
66
|
// Use triggerSmartContract with the `input` option to pass pre-encoded calldata.
|
|
51
67
|
// The function selector is empty — the full calldata (selector + params) is in `input`.
|
|
52
68
|
const input = data.startsWith("0x") ? data.slice(2) : data;
|
|
@@ -73,6 +89,30 @@ export async function submitTransaction(
|
|
|
73
89
|
};
|
|
74
90
|
}
|
|
75
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Transfer native TRX to an account via a `TransferContract` transaction.
|
|
94
|
+
*
|
|
95
|
+
* TronWeb's `sendTransaction` builds, signs and broadcasts in one call, using the instance's default
|
|
96
|
+
* private key. No fee limit applies, since transfers consume bandwidth rather than energy.
|
|
97
|
+
*
|
|
98
|
+
* @param tronWeb An authenticated TronWeb instance (with private key set).
|
|
99
|
+
* @param recipient Base58 recipient address.
|
|
100
|
+
* @param amount Transfer amount in SUN (1 TRX = 1,000,000 SUN).
|
|
101
|
+
* @returns The transaction ID and result status.
|
|
102
|
+
*/
|
|
103
|
+
async function transferNative(tronWeb: TronWeb, recipient: string, amount: number): Promise<TronTransactionResult> {
|
|
104
|
+
if (amount <= 0) {
|
|
105
|
+
throw new Error("submitTransaction: a transaction with no calldata must transfer a non-zero value");
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const broadcast = await tronWeb.trx.sendTransaction(recipient, amount);
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
txid: broadcast.txid ?? broadcast.transaction.txID,
|
|
112
|
+
result: broadcast.result ?? false,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
76
116
|
/**
|
|
77
117
|
* Simulate a populated EVM transaction against TRON via TronWeb (constant call / `eth_call`-style).
|
|
78
118
|
*
|
|
@@ -278,6 +278,19 @@
|
|
|
278
278
|
],
|
|
279
279
|
"stateMutability": "view"
|
|
280
280
|
},
|
|
281
|
+
{
|
|
282
|
+
"type": "function",
|
|
283
|
+
"name": "getMulticall3",
|
|
284
|
+
"inputs": [],
|
|
285
|
+
"outputs": [
|
|
286
|
+
{
|
|
287
|
+
"name": "",
|
|
288
|
+
"type": "address",
|
|
289
|
+
"internalType": "address"
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
"stateMutability": "pure"
|
|
293
|
+
},
|
|
281
294
|
{
|
|
282
295
|
"type": "function",
|
|
283
296
|
"name": "getOftEid",
|
|
@@ -589,6 +589,19 @@
|
|
|
589
589
|
],
|
|
590
590
|
"stateMutability": "view"
|
|
591
591
|
},
|
|
592
|
+
{
|
|
593
|
+
"type": "function",
|
|
594
|
+
"name": "getMulticall3",
|
|
595
|
+
"inputs": [],
|
|
596
|
+
"outputs": [
|
|
597
|
+
{
|
|
598
|
+
"name": "",
|
|
599
|
+
"type": "address",
|
|
600
|
+
"internalType": "address"
|
|
601
|
+
}
|
|
602
|
+
],
|
|
603
|
+
"stateMutability": "pure"
|
|
604
|
+
},
|
|
592
605
|
{
|
|
593
606
|
"type": "function",
|
|
594
607
|
"name": "getOftEid",
|
|
@@ -594,6 +594,19 @@
|
|
|
594
594
|
],
|
|
595
595
|
"stateMutability": "view"
|
|
596
596
|
},
|
|
597
|
+
{
|
|
598
|
+
"type": "function",
|
|
599
|
+
"name": "getMulticall3",
|
|
600
|
+
"inputs": [],
|
|
601
|
+
"outputs": [
|
|
602
|
+
{
|
|
603
|
+
"name": "",
|
|
604
|
+
"type": "address",
|
|
605
|
+
"internalType": "address"
|
|
606
|
+
}
|
|
607
|
+
],
|
|
608
|
+
"stateMutability": "pure"
|
|
609
|
+
},
|
|
597
610
|
{
|
|
598
611
|
"type": "function",
|
|
599
612
|
"name": "getOftEid",
|
|
@@ -623,6 +623,19 @@
|
|
|
623
623
|
],
|
|
624
624
|
"stateMutability": "view"
|
|
625
625
|
},
|
|
626
|
+
{
|
|
627
|
+
"type": "function",
|
|
628
|
+
"name": "getMulticall3",
|
|
629
|
+
"inputs": [],
|
|
630
|
+
"outputs": [
|
|
631
|
+
{
|
|
632
|
+
"name": "",
|
|
633
|
+
"type": "address",
|
|
634
|
+
"internalType": "address"
|
|
635
|
+
}
|
|
636
|
+
],
|
|
637
|
+
"stateMutability": "pure"
|
|
638
|
+
},
|
|
626
639
|
{
|
|
627
640
|
"type": "function",
|
|
628
641
|
"name": "getOftEid",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "receiveWithAuthorization",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "from",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"internalType": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "to",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "address"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "value",
|
|
18
|
+
"type": "uint256",
|
|
19
|
+
"internalType": "uint256"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "validAfter",
|
|
23
|
+
"type": "uint256",
|
|
24
|
+
"internalType": "uint256"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "validBefore",
|
|
28
|
+
"type": "uint256",
|
|
29
|
+
"internalType": "uint256"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "nonce",
|
|
33
|
+
"type": "bytes32",
|
|
34
|
+
"internalType": "bytes32"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "signature",
|
|
38
|
+
"type": "bytes",
|
|
39
|
+
"internalType": "bytes"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"outputs": [],
|
|
43
|
+
"stateMutability": "nonpayable"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
@@ -1,336 +1,4 @@
|
|
|
1
1
|
[
|
|
2
|
-
{
|
|
3
|
-
"type": "function",
|
|
4
|
-
"name": "aggregate",
|
|
5
|
-
"inputs": [
|
|
6
|
-
{
|
|
7
|
-
"name": "calls",
|
|
8
|
-
"type": "tuple[]",
|
|
9
|
-
"internalType": "struct IMulticall3.Call[]",
|
|
10
|
-
"components": [
|
|
11
|
-
{
|
|
12
|
-
"name": "target",
|
|
13
|
-
"type": "address",
|
|
14
|
-
"internalType": "address"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"name": "callData",
|
|
18
|
-
"type": "bytes",
|
|
19
|
-
"internalType": "bytes"
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"outputs": [
|
|
25
|
-
{
|
|
26
|
-
"name": "blockNumber",
|
|
27
|
-
"type": "uint256",
|
|
28
|
-
"internalType": "uint256"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "returnData",
|
|
32
|
-
"type": "bytes[]",
|
|
33
|
-
"internalType": "bytes[]"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"stateMutability": "payable"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"type": "function",
|
|
40
|
-
"name": "aggregate3",
|
|
41
|
-
"inputs": [
|
|
42
|
-
{
|
|
43
|
-
"name": "calls",
|
|
44
|
-
"type": "tuple[]",
|
|
45
|
-
"internalType": "struct IMulticall3.Call3[]",
|
|
46
|
-
"components": [
|
|
47
|
-
{
|
|
48
|
-
"name": "target",
|
|
49
|
-
"type": "address",
|
|
50
|
-
"internalType": "address"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"name": "allowFailure",
|
|
54
|
-
"type": "bool",
|
|
55
|
-
"internalType": "bool"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": "callData",
|
|
59
|
-
"type": "bytes",
|
|
60
|
-
"internalType": "bytes"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"outputs": [
|
|
66
|
-
{
|
|
67
|
-
"name": "returnData",
|
|
68
|
-
"type": "tuple[]",
|
|
69
|
-
"internalType": "struct IMulticall3.Result[]",
|
|
70
|
-
"components": [
|
|
71
|
-
{
|
|
72
|
-
"name": "success",
|
|
73
|
-
"type": "bool",
|
|
74
|
-
"internalType": "bool"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"name": "returnData",
|
|
78
|
-
"type": "bytes",
|
|
79
|
-
"internalType": "bytes"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
"stateMutability": "payable"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"type": "function",
|
|
88
|
-
"name": "aggregate3Value",
|
|
89
|
-
"inputs": [
|
|
90
|
-
{
|
|
91
|
-
"name": "calls",
|
|
92
|
-
"type": "tuple[]",
|
|
93
|
-
"internalType": "struct IMulticall3.Call3Value[]",
|
|
94
|
-
"components": [
|
|
95
|
-
{
|
|
96
|
-
"name": "target",
|
|
97
|
-
"type": "address",
|
|
98
|
-
"internalType": "address"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"name": "allowFailure",
|
|
102
|
-
"type": "bool",
|
|
103
|
-
"internalType": "bool"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "value",
|
|
107
|
-
"type": "uint256",
|
|
108
|
-
"internalType": "uint256"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"name": "callData",
|
|
112
|
-
"type": "bytes",
|
|
113
|
-
"internalType": "bytes"
|
|
114
|
-
}
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
],
|
|
118
|
-
"outputs": [
|
|
119
|
-
{
|
|
120
|
-
"name": "returnData",
|
|
121
|
-
"type": "tuple[]",
|
|
122
|
-
"internalType": "struct IMulticall3.Result[]",
|
|
123
|
-
"components": [
|
|
124
|
-
{
|
|
125
|
-
"name": "success",
|
|
126
|
-
"type": "bool",
|
|
127
|
-
"internalType": "bool"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"name": "returnData",
|
|
131
|
-
"type": "bytes",
|
|
132
|
-
"internalType": "bytes"
|
|
133
|
-
}
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
],
|
|
137
|
-
"stateMutability": "payable"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"type": "function",
|
|
141
|
-
"name": "blockAndAggregate",
|
|
142
|
-
"inputs": [
|
|
143
|
-
{
|
|
144
|
-
"name": "calls",
|
|
145
|
-
"type": "tuple[]",
|
|
146
|
-
"internalType": "struct IMulticall3.Call[]",
|
|
147
|
-
"components": [
|
|
148
|
-
{
|
|
149
|
-
"name": "target",
|
|
150
|
-
"type": "address",
|
|
151
|
-
"internalType": "address"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"name": "callData",
|
|
155
|
-
"type": "bytes",
|
|
156
|
-
"internalType": "bytes"
|
|
157
|
-
}
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
"outputs": [
|
|
162
|
-
{
|
|
163
|
-
"name": "blockNumber",
|
|
164
|
-
"type": "uint256",
|
|
165
|
-
"internalType": "uint256"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"name": "blockHash",
|
|
169
|
-
"type": "bytes32",
|
|
170
|
-
"internalType": "bytes32"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
"name": "returnData",
|
|
174
|
-
"type": "tuple[]",
|
|
175
|
-
"internalType": "struct IMulticall3.Result[]",
|
|
176
|
-
"components": [
|
|
177
|
-
{
|
|
178
|
-
"name": "success",
|
|
179
|
-
"type": "bool",
|
|
180
|
-
"internalType": "bool"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"name": "returnData",
|
|
184
|
-
"type": "bytes",
|
|
185
|
-
"internalType": "bytes"
|
|
186
|
-
}
|
|
187
|
-
]
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
"stateMutability": "payable"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"type": "function",
|
|
194
|
-
"name": "getBasefee",
|
|
195
|
-
"inputs": [],
|
|
196
|
-
"outputs": [
|
|
197
|
-
{
|
|
198
|
-
"name": "basefee",
|
|
199
|
-
"type": "uint256",
|
|
200
|
-
"internalType": "uint256"
|
|
201
|
-
}
|
|
202
|
-
],
|
|
203
|
-
"stateMutability": "view"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
"type": "function",
|
|
207
|
-
"name": "getBlockHash",
|
|
208
|
-
"inputs": [
|
|
209
|
-
{
|
|
210
|
-
"name": "blockNumber",
|
|
211
|
-
"type": "uint256",
|
|
212
|
-
"internalType": "uint256"
|
|
213
|
-
}
|
|
214
|
-
],
|
|
215
|
-
"outputs": [
|
|
216
|
-
{
|
|
217
|
-
"name": "blockHash",
|
|
218
|
-
"type": "bytes32",
|
|
219
|
-
"internalType": "bytes32"
|
|
220
|
-
}
|
|
221
|
-
],
|
|
222
|
-
"stateMutability": "view"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"type": "function",
|
|
226
|
-
"name": "getBlockNumber",
|
|
227
|
-
"inputs": [],
|
|
228
|
-
"outputs": [
|
|
229
|
-
{
|
|
230
|
-
"name": "blockNumber",
|
|
231
|
-
"type": "uint256",
|
|
232
|
-
"internalType": "uint256"
|
|
233
|
-
}
|
|
234
|
-
],
|
|
235
|
-
"stateMutability": "view"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"type": "function",
|
|
239
|
-
"name": "getChainId",
|
|
240
|
-
"inputs": [],
|
|
241
|
-
"outputs": [
|
|
242
|
-
{
|
|
243
|
-
"name": "chainid",
|
|
244
|
-
"type": "uint256",
|
|
245
|
-
"internalType": "uint256"
|
|
246
|
-
}
|
|
247
|
-
],
|
|
248
|
-
"stateMutability": "view"
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
"type": "function",
|
|
252
|
-
"name": "getCurrentBlockCoinbase",
|
|
253
|
-
"inputs": [],
|
|
254
|
-
"outputs": [
|
|
255
|
-
{
|
|
256
|
-
"name": "coinbase",
|
|
257
|
-
"type": "address",
|
|
258
|
-
"internalType": "address"
|
|
259
|
-
}
|
|
260
|
-
],
|
|
261
|
-
"stateMutability": "view"
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"type": "function",
|
|
265
|
-
"name": "getCurrentBlockDifficulty",
|
|
266
|
-
"inputs": [],
|
|
267
|
-
"outputs": [
|
|
268
|
-
{
|
|
269
|
-
"name": "difficulty",
|
|
270
|
-
"type": "uint256",
|
|
271
|
-
"internalType": "uint256"
|
|
272
|
-
}
|
|
273
|
-
],
|
|
274
|
-
"stateMutability": "view"
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"type": "function",
|
|
278
|
-
"name": "getCurrentBlockGasLimit",
|
|
279
|
-
"inputs": [],
|
|
280
|
-
"outputs": [
|
|
281
|
-
{
|
|
282
|
-
"name": "gaslimit",
|
|
283
|
-
"type": "uint256",
|
|
284
|
-
"internalType": "uint256"
|
|
285
|
-
}
|
|
286
|
-
],
|
|
287
|
-
"stateMutability": "view"
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"type": "function",
|
|
291
|
-
"name": "getCurrentBlockTimestamp",
|
|
292
|
-
"inputs": [],
|
|
293
|
-
"outputs": [
|
|
294
|
-
{
|
|
295
|
-
"name": "timestamp",
|
|
296
|
-
"type": "uint256",
|
|
297
|
-
"internalType": "uint256"
|
|
298
|
-
}
|
|
299
|
-
],
|
|
300
|
-
"stateMutability": "view"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"type": "function",
|
|
304
|
-
"name": "getEthBalance",
|
|
305
|
-
"inputs": [
|
|
306
|
-
{
|
|
307
|
-
"name": "addr",
|
|
308
|
-
"type": "address",
|
|
309
|
-
"internalType": "address"
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
"outputs": [
|
|
313
|
-
{
|
|
314
|
-
"name": "balance",
|
|
315
|
-
"type": "uint256",
|
|
316
|
-
"internalType": "uint256"
|
|
317
|
-
}
|
|
318
|
-
],
|
|
319
|
-
"stateMutability": "view"
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"type": "function",
|
|
323
|
-
"name": "getLastBlockHash",
|
|
324
|
-
"inputs": [],
|
|
325
|
-
"outputs": [
|
|
326
|
-
{
|
|
327
|
-
"name": "blockHash",
|
|
328
|
-
"type": "bytes32",
|
|
329
|
-
"internalType": "bytes32"
|
|
330
|
-
}
|
|
331
|
-
],
|
|
332
|
-
"stateMutability": "view"
|
|
333
|
-
},
|
|
334
2
|
{
|
|
335
3
|
"type": "function",
|
|
336
4
|
"name": "tryAggregate",
|
|
@@ -360,65 +28,7 @@
|
|
|
360
28
|
],
|
|
361
29
|
"outputs": [
|
|
362
30
|
{
|
|
363
|
-
"name": "
|
|
364
|
-
"type": "tuple[]",
|
|
365
|
-
"internalType": "struct IMulticall3.Result[]",
|
|
366
|
-
"components": [
|
|
367
|
-
{
|
|
368
|
-
"name": "success",
|
|
369
|
-
"type": "bool",
|
|
370
|
-
"internalType": "bool"
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
"name": "returnData",
|
|
374
|
-
"type": "bytes",
|
|
375
|
-
"internalType": "bytes"
|
|
376
|
-
}
|
|
377
|
-
]
|
|
378
|
-
}
|
|
379
|
-
],
|
|
380
|
-
"stateMutability": "payable"
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"type": "function",
|
|
384
|
-
"name": "tryBlockAndAggregate",
|
|
385
|
-
"inputs": [
|
|
386
|
-
{
|
|
387
|
-
"name": "requireSuccess",
|
|
388
|
-
"type": "bool",
|
|
389
|
-
"internalType": "bool"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
"name": "calls",
|
|
393
|
-
"type": "tuple[]",
|
|
394
|
-
"internalType": "struct IMulticall3.Call[]",
|
|
395
|
-
"components": [
|
|
396
|
-
{
|
|
397
|
-
"name": "target",
|
|
398
|
-
"type": "address",
|
|
399
|
-
"internalType": "address"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"name": "callData",
|
|
403
|
-
"type": "bytes",
|
|
404
|
-
"internalType": "bytes"
|
|
405
|
-
}
|
|
406
|
-
]
|
|
407
|
-
}
|
|
408
|
-
],
|
|
409
|
-
"outputs": [
|
|
410
|
-
{
|
|
411
|
-
"name": "blockNumber",
|
|
412
|
-
"type": "uint256",
|
|
413
|
-
"internalType": "uint256"
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
"name": "blockHash",
|
|
417
|
-
"type": "bytes32",
|
|
418
|
-
"internalType": "bytes32"
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
"name": "returnData",
|
|
31
|
+
"name": "",
|
|
422
32
|
"type": "tuple[]",
|
|
423
33
|
"internalType": "struct IMulticall3.Result[]",
|
|
424
34
|
"components": [
|