@circle-fin/usdckit 0.24.1 → 0.25.1
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/chains/ARB.d.ts +9 -0
- package/dist/cjs/chains/ARB_SEPOLIA.d.ts +9 -0
- package/dist/cjs/chains/ARC_TESTNET.d.ts +9 -0
- package/dist/cjs/chains/AVAX.d.ts +9 -0
- package/dist/cjs/chains/AVAX_FUJI.d.ts +9 -0
- package/dist/cjs/chains/BASE.d.ts +13 -3
- package/dist/cjs/chains/BASE_SEPOLIA.d.ts +13 -3
- package/dist/cjs/chains/ETH.d.ts +9 -0
- package/dist/cjs/chains/ETH_SEPOLIA.d.ts +9 -0
- package/dist/cjs/chains/MATIC.d.ts +11 -2
- package/dist/cjs/chains/MATIC_AMOY.d.ts +10 -1
- package/dist/cjs/chains/MONAD.d.ts +9 -0
- package/dist/cjs/chains/MONAD_TESTNET.d.ts +9 -0
- package/dist/cjs/chains/NEAR.d.ts +9 -0
- package/dist/cjs/chains/NEAR_TESTNET.d.ts +9 -0
- package/dist/cjs/chains/OP.d.ts +13 -3
- package/dist/cjs/chains/OP_SEPOLIA.d.ts +13 -3
- package/dist/cjs/chains/SOL.d.ts +9 -0
- package/dist/cjs/chains/SOL_DEVNET.d.ts +9 -0
- package/dist/cjs/chains/UNI.d.ts +13 -3
- package/dist/cjs/chains/UNI_SEPOLIA.d.ts +13 -3
- package/dist/cjs/extractChain.d.ts +216 -21
- package/dist/cjs/metadata.js +1 -1
- package/dist/cjs/providers/circle-wallets/actions/createAccount.d.ts +180 -21
- package/dist/cjs/providers/circle-wallets/actions/getAccounts.d.ts +180 -21
- package/dist/cjs/providers/circle-wallets/index.d.ts +597 -52
- package/dist/cjs/providers/circle-wallets/index.js +1 -0
- package/dist/cjs/providers/circle-wallets/transports/index.js +39 -9
- package/dist/cjs/providers/circle-wallets/transports/index.test.js +117 -67
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/ARB.d.ts +9 -0
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/ARB_SEPOLIA.d.ts +9 -0
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/AVAX.d.ts +9 -0
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/AVAX_FUJI.d.ts +9 -0
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/BASE.d.ts +13 -3
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/BASE_SEPOLIA.d.ts +13 -3
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/ETH.d.ts +9 -0
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/ETH_SEPOLIA.d.ts +9 -0
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/MATIC.d.ts +11 -2
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/MATIC_AMOY.d.ts +10 -1
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/OP.d.ts +13 -3
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/OP_SEPOLIA.d.ts +13 -3
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/UNI.d.ts +13 -3
- package/dist/cjs/providers/cross-chain-transfer-protocol/chains/UNI_SEPOLIA.d.ts +13 -3
- package/dist/cjs/providers/cross-chain-transfer-protocol/index.d.ts +153 -21
- package/dist/cjs/providers/solana/index.d.ts +18 -0
- package/dist/cjs/providers/uniswap/chains/ARB.d.ts +9 -0
- package/dist/cjs/providers/uniswap/chains/ARB_SEPOLIA.d.ts +9 -0
- package/dist/cjs/providers/uniswap/chains/AVAX.d.ts +9 -0
- package/dist/cjs/providers/uniswap/chains/BASE.d.ts +13 -3
- package/dist/cjs/providers/uniswap/chains/BASE_SEPOLIA.d.ts +13 -3
- package/dist/cjs/providers/uniswap/chains/ETH.d.ts +9 -0
- package/dist/cjs/providers/uniswap/chains/ETH_SEPOLIA.d.ts +9 -0
- package/dist/cjs/providers/uniswap/chains/MATIC.d.ts +11 -2
- package/dist/cjs/providers/uniswap/chains/OP.d.ts +13 -3
- package/dist/cjs/providers/uniswap/chains/OP_SEPOLIA.d.ts +13 -3
- package/dist/cjs/providers/uniswap/chains/UNI.d.ts +13 -3
- package/dist/cjs/providers/uniswap/chains/UNI_SEPOLIA.d.ts +13 -3
- package/dist/cjs/providers/uniswap/index.d.ts +134 -20
- package/dist/cjs/utils/getClient.d.ts +6 -3
- package/dist/cjs/utils/getContract.d.ts +16 -16
- package/dist/esm/chains/ARB.d.ts +9 -0
- package/dist/esm/chains/ARB_SEPOLIA.d.ts +9 -0
- package/dist/esm/chains/ARC_TESTNET.d.ts +9 -0
- package/dist/esm/chains/AVAX.d.ts +9 -0
- package/dist/esm/chains/AVAX_FUJI.d.ts +9 -0
- package/dist/esm/chains/BASE.d.ts +13 -3
- package/dist/esm/chains/BASE_SEPOLIA.d.ts +13 -3
- package/dist/esm/chains/ETH.d.ts +9 -0
- package/dist/esm/chains/ETH_SEPOLIA.d.ts +9 -0
- package/dist/esm/chains/MATIC.d.ts +11 -2
- package/dist/esm/chains/MATIC_AMOY.d.ts +10 -1
- package/dist/esm/chains/MONAD.d.ts +9 -0
- package/dist/esm/chains/MONAD_TESTNET.d.ts +9 -0
- package/dist/esm/chains/NEAR.d.ts +9 -0
- package/dist/esm/chains/NEAR_TESTNET.d.ts +9 -0
- package/dist/esm/chains/OP.d.ts +13 -3
- package/dist/esm/chains/OP_SEPOLIA.d.ts +13 -3
- package/dist/esm/chains/SOL.d.ts +9 -0
- package/dist/esm/chains/SOL_DEVNET.d.ts +9 -0
- package/dist/esm/chains/UNI.d.ts +13 -3
- package/dist/esm/chains/UNI_SEPOLIA.d.ts +13 -3
- package/dist/esm/extractChain.d.ts +216 -21
- package/dist/esm/metadata.js +1 -1
- package/dist/esm/providers/circle-wallets/actions/createAccount.d.ts +180 -21
- package/dist/esm/providers/circle-wallets/actions/getAccounts.d.ts +180 -21
- package/dist/esm/providers/circle-wallets/index.d.ts +597 -52
- package/dist/esm/providers/circle-wallets/index.js +1 -0
- package/dist/esm/providers/circle-wallets/transports/index.js +39 -9
- package/dist/esm/providers/circle-wallets/transports/index.test.js +117 -67
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/ARB.d.ts +9 -0
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/ARB_SEPOLIA.d.ts +9 -0
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/AVAX.d.ts +9 -0
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/AVAX_FUJI.d.ts +9 -0
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/BASE.d.ts +13 -3
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/BASE_SEPOLIA.d.ts +13 -3
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/ETH.d.ts +9 -0
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/ETH_SEPOLIA.d.ts +9 -0
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/MATIC.d.ts +11 -2
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/MATIC_AMOY.d.ts +10 -1
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/OP.d.ts +13 -3
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/OP_SEPOLIA.d.ts +13 -3
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/UNI.d.ts +13 -3
- package/dist/esm/providers/cross-chain-transfer-protocol/chains/UNI_SEPOLIA.d.ts +13 -3
- package/dist/esm/providers/cross-chain-transfer-protocol/index.d.ts +153 -21
- package/dist/esm/providers/solana/index.d.ts +18 -0
- package/dist/esm/providers/uniswap/chains/ARB.d.ts +9 -0
- package/dist/esm/providers/uniswap/chains/ARB_SEPOLIA.d.ts +9 -0
- package/dist/esm/providers/uniswap/chains/AVAX.d.ts +9 -0
- package/dist/esm/providers/uniswap/chains/BASE.d.ts +13 -3
- package/dist/esm/providers/uniswap/chains/BASE_SEPOLIA.d.ts +13 -3
- package/dist/esm/providers/uniswap/chains/ETH.d.ts +9 -0
- package/dist/esm/providers/uniswap/chains/ETH_SEPOLIA.d.ts +9 -0
- package/dist/esm/providers/uniswap/chains/MATIC.d.ts +11 -2
- package/dist/esm/providers/uniswap/chains/OP.d.ts +13 -3
- package/dist/esm/providers/uniswap/chains/OP_SEPOLIA.d.ts +13 -3
- package/dist/esm/providers/uniswap/chains/UNI.d.ts +13 -3
- package/dist/esm/providers/uniswap/chains/UNI_SEPOLIA.d.ts +13 -3
- package/dist/esm/providers/uniswap/index.d.ts +134 -20
- package/dist/esm/utils/getClient.d.ts +6 -3
- package/package.json +3 -3
|
@@ -120,17 +120,47 @@ class Provider extends index_js_2.Provider {
|
|
|
120
120
|
}
|
|
121
121
|
async eth_call(params, blockIdentifier = 'latest') {
|
|
122
122
|
// NOTE: https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
123
|
+
// Circle's query contract API has a narrow surface (blockchain, to, data, from). For anything
|
|
124
|
+
// it cannot represent, throw `MethodNotFoundRpcError` so `Provider.request` falls back to the
|
|
125
|
+
// embedded viem RPC transport instead of hard-failing the caller. This matters in particular
|
|
126
|
+
// for viem-based adapters (e.g. the Circle Wallets adapter's pre-flight `publicClient.call`
|
|
127
|
+
// during a swap), which forward `gas`/`value` into `eth_call` as a matter of course.
|
|
126
128
|
if (blockIdentifier !== 'latest') {
|
|
127
|
-
throw new index_js_1.ErrorWithCause('Only `latest` block identifier is supported')
|
|
129
|
+
throw new viem_1.MethodNotFoundRpcError(new index_js_1.ErrorWithCause('Only `latest` block identifier is supported by Circle queryContract'), {
|
|
130
|
+
method: 'eth_call',
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
// gas / gasPrice / maxFeePerGas / maxPriorityFeePerGas are EVM-visible during the target
|
|
134
|
+
// call: `gas` bounds `gasleft()` and affects out-of-gas behavior; the fee fields determine
|
|
135
|
+
// `tx.gasprice`, which contracts can read. Circle's queryContract cannot thread these
|
|
136
|
+
// through, so surface `MethodNotFoundRpcError` to trigger fallback rather than silently
|
|
137
|
+
// returning an SCP result that ignored the caller's explicit simulation constraints.
|
|
138
|
+
const gasPricingParams = ['gas', 'gasPrice', 'maxFeePerGas', 'maxPriorityFeePerGas'];
|
|
139
|
+
if (gasPricingParams.some((param) => params[param] !== undefined)) {
|
|
140
|
+
throw new viem_1.MethodNotFoundRpcError(new index_js_1.ErrorWithCause('gas / gasPrice / maxFeePerGas / maxPriorityFeePerGas are not supported by Circle queryContract'), { method: 'eth_call' });
|
|
141
|
+
}
|
|
142
|
+
// `nonce` is transaction-level and not EVM-visible inside eth_call, so silently drop it —
|
|
143
|
+
// forwarding would be a no-op and throwing would break callers that forward nonce for parity.
|
|
144
|
+
// `value` is the one remaining param with read semantics (payable view calls). `0x0` / `0n`
|
|
145
|
+
// mean "no native value" and are accepted; anything else cannot be expressed through
|
|
146
|
+
// queryContract, so fall back to the RPC transport. Accept both the typed `bigint` and the
|
|
147
|
+
// runtime JSON-RPC `Hex` shape (viem's `TransactionRequest.value` is typed `bigint`, but
|
|
148
|
+
// transports deliver hex).
|
|
149
|
+
const rawValue = params.value;
|
|
150
|
+
let valueAsBigInt;
|
|
151
|
+
if (rawValue === undefined) {
|
|
152
|
+
valueAsBigInt = 0n;
|
|
128
153
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
154
|
+
else if (typeof rawValue === 'bigint') {
|
|
155
|
+
valueAsBigInt = rawValue;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
valueAsBigInt = (0, viem_1.hexToBigInt)(rawValue);
|
|
159
|
+
}
|
|
160
|
+
if (valueAsBigInt !== 0n) {
|
|
161
|
+
throw new viem_1.MethodNotFoundRpcError(new index_js_1.ErrorWithCause('Non-zero `value` is not supported by Circle queryContract'), {
|
|
162
|
+
method: 'eth_call',
|
|
163
|
+
});
|
|
134
164
|
}
|
|
135
165
|
// Provider's chainId is used to determine the blockchain
|
|
136
166
|
// When the chain is not supported by Circle's query contract API, throw MethodNotFoundRpcError to fallback.
|
|
@@ -1886,12 +1886,21 @@ vitest_1.vi.mock('@circle-fin/developer-controlled-wallets', () => ({
|
|
|
1886
1886
|
});
|
|
1887
1887
|
});
|
|
1888
1888
|
(0, vitest_1.describe)('eth_call', () => {
|
|
1889
|
+
// Build a provider with `fallbackTransport: null` so the inner `eth_call` errors
|
|
1890
|
+
// surface raw instead of being silently retried on the fallback RPC transport.
|
|
1891
|
+
// The production default IS to fall back; these tests pin the inner contract.
|
|
1892
|
+
const makeProviderWithoutFallback = (chainId) => new index_js_4.Provider({
|
|
1893
|
+
apiKey: 'test-api-key',
|
|
1894
|
+
entitySecret: 'test-entity-secret',
|
|
1895
|
+
chainId,
|
|
1896
|
+
fallbackTransport: null,
|
|
1897
|
+
});
|
|
1898
|
+
const baseParams = {
|
|
1899
|
+
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1900
|
+
data: '0x70a08231000000000000000000000000742d35cc6634c0532925a3b8d0c8c0c8d8d8d8d8',
|
|
1901
|
+
from: '0x123456789abcdef123456789abcdef123456789a',
|
|
1902
|
+
};
|
|
1889
1903
|
(0, vitest_1.it)('should perform contract query successfully', async () => {
|
|
1890
|
-
const params = {
|
|
1891
|
-
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1892
|
-
data: '0x70a08231000000000000000000000000742d35cc6634c0532925a3b8d0c8c0c8d8d8d8d8',
|
|
1893
|
-
from: '0x123456789abcdef123456789abcdef123456789a',
|
|
1894
|
-
};
|
|
1895
1904
|
mockScp.queryContract.mockResolvedValue({
|
|
1896
1905
|
data: {
|
|
1897
1906
|
outputData: '0x0000000000000000000000000000000000000000000000000de0b6b3a7640000',
|
|
@@ -1899,36 +1908,18 @@ vitest_1.vi.mock('@circle-fin/developer-controlled-wallets', () => ({
|
|
|
1899
1908
|
});
|
|
1900
1909
|
const result = await provider.request({
|
|
1901
1910
|
method: 'eth_call',
|
|
1902
|
-
params: [
|
|
1911
|
+
params: [baseParams],
|
|
1903
1912
|
});
|
|
1904
1913
|
(0, vitest_1.expect)(result).toBe('0x0000000000000000000000000000000000000000000000000de0b6b3a7640000');
|
|
1905
1914
|
(0, vitest_1.expect)(mockScp.queryContract).toHaveBeenCalledWith({
|
|
1906
1915
|
blockchain: 'ETH',
|
|
1907
|
-
address:
|
|
1908
|
-
callData:
|
|
1909
|
-
fromAddress:
|
|
1916
|
+
address: baseParams.to,
|
|
1917
|
+
callData: baseParams.data,
|
|
1918
|
+
fromAddress: baseParams.from,
|
|
1910
1919
|
});
|
|
1911
1920
|
});
|
|
1912
|
-
(0, vitest_1.it)('should throw UnsupportedChainError when chainId is not supported for contract queries', async () => {
|
|
1913
|
-
const provider = new index_js_4.Provider({
|
|
1914
|
-
apiKey: 'test-api-key',
|
|
1915
|
-
entitySecret: 'test-entity-secret',
|
|
1916
|
-
chainId: 999999, // Unsupported chain
|
|
1917
|
-
});
|
|
1918
|
-
const params = {
|
|
1919
|
-
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1920
|
-
data: '0x70a08231',
|
|
1921
|
-
};
|
|
1922
|
-
await (0, vitest_1.expect)(provider.request({
|
|
1923
|
-
method: 'eth_call',
|
|
1924
|
-
params: [params],
|
|
1925
|
-
})).rejects.toThrow();
|
|
1926
|
-
});
|
|
1927
1921
|
(0, vitest_1.it)('should work without from parameter', async () => {
|
|
1928
|
-
const params = {
|
|
1929
|
-
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1930
|
-
data: '0x70a08231000000000000000000000000742d35cc6634c0532925a3b8d0c8c0c8d8d8d8d8',
|
|
1931
|
-
};
|
|
1922
|
+
const params = { to: baseParams.to, data: baseParams.data };
|
|
1932
1923
|
mockScp.queryContract.mockResolvedValue({
|
|
1933
1924
|
data: {
|
|
1934
1925
|
outputData: '0x0000000000000000000000000000000000000000000000000de0b6b3a7640000',
|
|
@@ -1946,52 +1937,111 @@ vitest_1.vi.mock('@circle-fin/developer-controlled-wallets', () => ({
|
|
|
1946
1937
|
fromAddress: undefined,
|
|
1947
1938
|
});
|
|
1948
1939
|
});
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1940
|
+
// gas / gasPrice / maxFeePerGas / maxPriorityFeePerGas are EVM-visible during the call:
|
|
1941
|
+
// `gas` affects `gasleft()` and the fee fields determine `tx.gasprice`. Circle's
|
|
1942
|
+
// queryContract cannot represent them, so surface MethodNotFoundRpcError to trigger
|
|
1943
|
+
// fallback rather than silently returning an SCP result that ignored the constraints.
|
|
1944
|
+
vitest_1.it.each([
|
|
1945
|
+
{ label: 'gas', param: { gas: (0, viem_1.numberToHex)(1000000n) } },
|
|
1946
|
+
{ label: 'gasPrice', param: { gasPrice: (0, viem_1.numberToHex)((0, viem_1.parseEther)('0.00000001')) } },
|
|
1947
|
+
{ label: 'maxFeePerGas', param: { maxFeePerGas: (0, viem_1.numberToHex)((0, viem_1.parseEther)('0.00000001')) } },
|
|
1948
|
+
{
|
|
1949
|
+
label: 'maxPriorityFeePerGas',
|
|
1950
|
+
param: { maxPriorityFeePerGas: (0, viem_1.numberToHex)((0, viem_1.parseEther)('0.000000001')) },
|
|
1951
|
+
},
|
|
1952
|
+
])('should throw MethodNotFoundRpcError when $label is set (fallback trigger)', async ({ param }) => {
|
|
1953
|
+
const provider = makeProviderWithoutFallback(1);
|
|
1954
1954
|
await (0, vitest_1.expect)(provider.request({
|
|
1955
1955
|
method: 'eth_call',
|
|
1956
|
-
params: [
|
|
1957
|
-
})).rejects.
|
|
1956
|
+
params: [{ ...baseParams, ...param }],
|
|
1957
|
+
})).rejects.toBeInstanceOf(viem_1.MethodNotFoundRpcError);
|
|
1958
|
+
(0, vitest_1.expect)(mockScp.queryContract).not.toHaveBeenCalled();
|
|
1959
|
+
});
|
|
1960
|
+
// `nonce` is transaction-level and not visible inside eth_call, so it's fine to silently
|
|
1961
|
+
// drop — forwarding would be a no-op and throwing would break callers (e.g. viem's
|
|
1962
|
+
// publicClient.call) that may surface nonce for parity with standard JSON-RPC shapes.
|
|
1963
|
+
(0, vitest_1.it)('should silently ignore nonce', async () => {
|
|
1964
|
+
mockScp.queryContract.mockResolvedValue({ data: { outputData: '0xok' } });
|
|
1965
|
+
const result = await provider.request({
|
|
1966
|
+
method: 'eth_call',
|
|
1967
|
+
params: [{ ...baseParams, nonce: (0, viem_1.numberToHex)(42n) }],
|
|
1968
|
+
});
|
|
1969
|
+
(0, vitest_1.expect)(result).toBe('0xok');
|
|
1970
|
+
// nonce must not be forwarded — queryContract only accepts {blockchain, to, data, from}.
|
|
1971
|
+
(0, vitest_1.expect)(mockScp.queryContract).toHaveBeenCalledWith({
|
|
1972
|
+
blockchain: 'ETH',
|
|
1973
|
+
address: baseParams.to,
|
|
1974
|
+
callData: baseParams.data,
|
|
1975
|
+
fromAddress: baseParams.from,
|
|
1976
|
+
});
|
|
1977
|
+
});
|
|
1978
|
+
// `value` arrives as a `Hex` at runtime from JSON-RPC transports, but the
|
|
1979
|
+
// TypeScript surface (`ExactPartial<TransactionRequest>`) admits `bigint`.
|
|
1980
|
+
// Exercise both shapes so the dual-type contract is regression-tested.
|
|
1981
|
+
vitest_1.it.each([
|
|
1982
|
+
{ label: 'hex 0x0', value: '0x0' },
|
|
1983
|
+
{ label: 'bigint 0n', value: 0n },
|
|
1984
|
+
])('should accept zero value ($label) as equivalent to no native value', async ({ value }) => {
|
|
1985
|
+
mockScp.queryContract.mockResolvedValue({ data: { outputData: '0xzero' } });
|
|
1986
|
+
const result = await provider.request({
|
|
1987
|
+
method: 'eth_call',
|
|
1988
|
+
params: [{ ...baseParams, value }],
|
|
1989
|
+
});
|
|
1990
|
+
(0, vitest_1.expect)(result).toBe('0xzero');
|
|
1991
|
+
(0, vitest_1.expect)(mockScp.queryContract).toHaveBeenCalledTimes(1);
|
|
1992
|
+
});
|
|
1993
|
+
// `value` is the one param with read semantics (payable view calls). Non-zero must
|
|
1994
|
+
// surface `MethodNotFoundRpcError` so `Provider.request` falls back to the RPC transport.
|
|
1995
|
+
// Again, cover both the hex and bigint shapes.
|
|
1996
|
+
vitest_1.it.each([
|
|
1997
|
+
{ label: 'hex 0x1', value: (0, viem_1.numberToHex)(1n) },
|
|
1998
|
+
{ label: 'bigint 1n', value: 1n },
|
|
1999
|
+
])('should throw MethodNotFoundRpcError for non-zero value ($label) (fallback trigger)', async ({ value }) => {
|
|
2000
|
+
const provider = makeProviderWithoutFallback(1);
|
|
1958
2001
|
await (0, vitest_1.expect)(provider.request({
|
|
1959
2002
|
method: 'eth_call',
|
|
1960
|
-
params: [
|
|
1961
|
-
})).rejects.
|
|
2003
|
+
params: [{ ...baseParams, value }],
|
|
2004
|
+
})).rejects.toBeInstanceOf(viem_1.MethodNotFoundRpcError);
|
|
2005
|
+
(0, vitest_1.expect)(mockScp.queryContract).not.toHaveBeenCalled();
|
|
1962
2006
|
});
|
|
1963
|
-
(0, vitest_1.it)('should throw
|
|
1964
|
-
const
|
|
1965
|
-
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1966
|
-
data: '0x70a08231',
|
|
1967
|
-
};
|
|
1968
|
-
// Test each unsupported parameter individually
|
|
1969
|
-
const unsupportedParams = [
|
|
1970
|
-
{ gas: '0x186A0' },
|
|
1971
|
-
{ gasPrice: '0x3B9ACA00' },
|
|
1972
|
-
{ maxFeePerGas: '0x3B9ACA00' },
|
|
1973
|
-
{ maxPriorityFeePerGas: '0x3B9ACA00' },
|
|
1974
|
-
{ nonce: '0x1' },
|
|
1975
|
-
{ value: '0x0' },
|
|
1976
|
-
];
|
|
1977
|
-
for (const param of unsupportedParams) {
|
|
1978
|
-
const testParams = { ...baseParams, ...param };
|
|
1979
|
-
await (0, vitest_1.expect)(provider.request({
|
|
1980
|
-
method: 'eth_call',
|
|
1981
|
-
params: [testParams],
|
|
1982
|
-
})).rejects.toThrow();
|
|
1983
|
-
}
|
|
1984
|
-
// Test multiple unsupported params together
|
|
1985
|
-
const multipleUnsupportedParams = {
|
|
1986
|
-
...baseParams,
|
|
1987
|
-
gas: '0x186A0',
|
|
1988
|
-
value: '0x0',
|
|
1989
|
-
nonce: '0x1',
|
|
1990
|
-
};
|
|
2007
|
+
(0, vitest_1.it)('should throw MethodNotFoundRpcError when blockIdentifier is not "latest" (fallback trigger)', async () => {
|
|
2008
|
+
const provider = makeProviderWithoutFallback(1);
|
|
1991
2009
|
await (0, vitest_1.expect)(provider.request({
|
|
1992
2010
|
method: 'eth_call',
|
|
1993
|
-
params: [
|
|
1994
|
-
})).rejects.
|
|
2011
|
+
params: [baseParams, 'earliest'],
|
|
2012
|
+
})).rejects.toBeInstanceOf(viem_1.MethodNotFoundRpcError);
|
|
2013
|
+
await (0, vitest_1.expect)(provider.request({
|
|
2014
|
+
method: 'eth_call',
|
|
2015
|
+
params: [baseParams, '0x1234'],
|
|
2016
|
+
})).rejects.toBeInstanceOf(viem_1.MethodNotFoundRpcError);
|
|
2017
|
+
(0, vitest_1.expect)(mockScp.queryContract).not.toHaveBeenCalled();
|
|
2018
|
+
});
|
|
2019
|
+
// AVAX_FUJI (43113) is in SUPPORTED_CHAINS but NOT SUPPORTED_CONTRACT_QUERY_CHAINS.
|
|
2020
|
+
(0, vitest_1.it)('should throw MethodNotFoundRpcError when chain is not supported by queryContract (fallback trigger)', async () => {
|
|
2021
|
+
const provider = makeProviderWithoutFallback(43113);
|
|
2022
|
+
await (0, vitest_1.expect)(provider.request({ method: 'eth_call', params: [baseParams] })).rejects.toBeInstanceOf(viem_1.MethodNotFoundRpcError);
|
|
2023
|
+
(0, vitest_1.expect)(mockScp.queryContract).not.toHaveBeenCalled();
|
|
2024
|
+
});
|
|
2025
|
+
// ARC_TESTNET (5042002) IS in SUPPORTED_CONTRACT_QUERY_CHAINS — reads flow through Circle's SCP.
|
|
2026
|
+
(0, vitest_1.it)('should route Arc Testnet eth_call through queryContract', async () => {
|
|
2027
|
+
// `vi.restoreAllMocks` in the outer beforeEach clears the module-level mock
|
|
2028
|
+
// return; re-prime it before constructing a second Provider for Arc Testnet.
|
|
2029
|
+
;
|
|
2030
|
+
smart_contract_platform_1.initiateSmartContractPlatformClient.mockReturnValue(mockScp);
|
|
2031
|
+
const arcProvider = new index_js_4.Provider({
|
|
2032
|
+
apiKey: 'test-api-key',
|
|
2033
|
+
entitySecret: 'test-entity-secret',
|
|
2034
|
+
chainId: 5042002, // ARC_TESTNET
|
|
2035
|
+
});
|
|
2036
|
+
mockScp.queryContract.mockResolvedValue({ data: { outputData: '0xarc' } });
|
|
2037
|
+
const result = await arcProvider.request({ method: 'eth_call', params: [baseParams] });
|
|
2038
|
+
(0, vitest_1.expect)(result).toBe('0xarc');
|
|
2039
|
+
(0, vitest_1.expect)(mockScp.queryContract).toHaveBeenCalledWith({
|
|
2040
|
+
blockchain: 'ARC-TESTNET',
|
|
2041
|
+
address: baseParams.to,
|
|
2042
|
+
callData: baseParams.data,
|
|
2043
|
+
fromAddress: baseParams.from,
|
|
2044
|
+
});
|
|
1995
2045
|
});
|
|
1996
2046
|
});
|
|
1997
2047
|
(0, vitest_1.describe)('eth_estimateGas', () => {
|
|
@@ -255,8 +255,17 @@ export declare const chain: {
|
|
|
255
255
|
sourceId?: number | undefined | undefined;
|
|
256
256
|
testnet?: boolean | undefined | undefined;
|
|
257
257
|
custom?: Record<string, unknown> | undefined;
|
|
258
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
258
259
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
260
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
261
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
262
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
263
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
264
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
265
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
266
|
+
}] | undefined;
|
|
259
267
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
|
|
268
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
260
269
|
readonly domainId: 3;
|
|
261
270
|
readonly blockchainId: "ARB";
|
|
262
271
|
readonly blockchainVm: "EVM";
|
|
@@ -255,8 +255,17 @@ export declare const chain: {
|
|
|
255
255
|
sourceId?: number | undefined | undefined;
|
|
256
256
|
testnet: true;
|
|
257
257
|
custom?: Record<string, unknown> | undefined;
|
|
258
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
258
259
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
260
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
261
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
262
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
263
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
264
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
265
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
266
|
+
}] | undefined;
|
|
259
267
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
|
|
268
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
260
269
|
readonly domainId: 3;
|
|
261
270
|
readonly blockchainId: "ARB-SEPOLIA";
|
|
262
271
|
readonly blockchainVm: "EVM";
|
|
@@ -537,8 +537,17 @@ export declare const chain: {
|
|
|
537
537
|
sourceId?: number | undefined | undefined;
|
|
538
538
|
testnet?: boolean | undefined | undefined;
|
|
539
539
|
custom?: Record<string, unknown> | undefined;
|
|
540
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
540
541
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
542
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
543
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
544
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
545
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
546
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
547
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
548
|
+
}] | undefined;
|
|
541
549
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
|
|
550
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
542
551
|
readonly domainId: 1;
|
|
543
552
|
readonly blockchainId: "AVAX";
|
|
544
553
|
readonly blockchainVm: "EVM";
|
|
@@ -396,8 +396,17 @@ export declare const chain: {
|
|
|
396
396
|
sourceId?: number | undefined | undefined;
|
|
397
397
|
testnet: true;
|
|
398
398
|
custom?: Record<string, unknown> | undefined;
|
|
399
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
399
400
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
401
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
402
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
403
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
404
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
405
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
406
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
407
|
+
}] | undefined;
|
|
400
408
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
|
|
409
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
401
410
|
readonly domainId: 1;
|
|
402
411
|
readonly blockchainId: "AVAX-FUJI";
|
|
403
412
|
readonly blockchainVm: "EVM";
|
|
@@ -436,6 +436,7 @@ export declare const chain: {
|
|
|
436
436
|
sourceId: 1;
|
|
437
437
|
testnet?: boolean | undefined | undefined;
|
|
438
438
|
custom?: Record<string, unknown> | undefined;
|
|
439
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
439
440
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
440
441
|
formatters: {
|
|
441
442
|
readonly block: {
|
|
@@ -501,16 +502,16 @@ export declare const chain: {
|
|
|
501
502
|
r: import("viem").Hex;
|
|
502
503
|
s: import("viem").Hex;
|
|
503
504
|
v: bigint;
|
|
504
|
-
value: bigint;
|
|
505
|
-
gas: bigint;
|
|
506
505
|
to: import("viem").Address | null;
|
|
507
506
|
from: import("viem").Address;
|
|
507
|
+
gas: bigint;
|
|
508
508
|
nonce: number;
|
|
509
|
+
value: bigint;
|
|
509
510
|
blockHash: `0x${string}` | null;
|
|
510
511
|
blockNumber: bigint | null;
|
|
511
|
-
transactionIndex: number | null;
|
|
512
512
|
hash: import("viem").Hash;
|
|
513
513
|
input: import("viem").Hex;
|
|
514
|
+
transactionIndex: number | null;
|
|
514
515
|
typeHex: import("viem").Hex | null;
|
|
515
516
|
accessList?: undefined | undefined;
|
|
516
517
|
authorizationList?: undefined | undefined;
|
|
@@ -647,6 +648,7 @@ export declare const chain: {
|
|
|
647
648
|
blobGasUsed?: bigint | undefined;
|
|
648
649
|
blockHash: import("viem").Hash;
|
|
649
650
|
blockNumber: bigint;
|
|
651
|
+
blockTimestamp?: bigint | undefined;
|
|
650
652
|
contractAddress: import("viem").Address | null | undefined;
|
|
651
653
|
cumulativeGasUsed: bigint;
|
|
652
654
|
effectiveGasPrice: bigint;
|
|
@@ -668,9 +670,17 @@ export declare const chain: {
|
|
|
668
670
|
type: "transactionReceipt";
|
|
669
671
|
};
|
|
670
672
|
};
|
|
673
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
674
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
675
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
676
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
677
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
678
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
679
|
+
}] | undefined;
|
|
671
680
|
serializers: {
|
|
672
681
|
readonly transaction: typeof import("viem/chains").serializeTransactionOpStack;
|
|
673
682
|
};
|
|
683
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
674
684
|
readonly domainId: 6;
|
|
675
685
|
readonly blockchainId: "BASE";
|
|
676
686
|
readonly blockchainVm: "EVM";
|
|
@@ -436,6 +436,7 @@ export declare const chain: {
|
|
|
436
436
|
sourceId: 11155111;
|
|
437
437
|
testnet: true;
|
|
438
438
|
custom?: Record<string, unknown> | undefined;
|
|
439
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
439
440
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
440
441
|
formatters: {
|
|
441
442
|
readonly block: {
|
|
@@ -501,16 +502,16 @@ export declare const chain: {
|
|
|
501
502
|
r: import("viem").Hex;
|
|
502
503
|
s: import("viem").Hex;
|
|
503
504
|
v: bigint;
|
|
504
|
-
value: bigint;
|
|
505
|
-
gas: bigint;
|
|
506
505
|
to: import("viem").Address | null;
|
|
507
506
|
from: import("viem").Address;
|
|
507
|
+
gas: bigint;
|
|
508
508
|
nonce: number;
|
|
509
|
+
value: bigint;
|
|
509
510
|
blockHash: `0x${string}` | null;
|
|
510
511
|
blockNumber: bigint | null;
|
|
511
|
-
transactionIndex: number | null;
|
|
512
512
|
hash: import("viem").Hash;
|
|
513
513
|
input: import("viem").Hex;
|
|
514
|
+
transactionIndex: number | null;
|
|
514
515
|
typeHex: import("viem").Hex | null;
|
|
515
516
|
accessList?: undefined | undefined;
|
|
516
517
|
authorizationList?: undefined | undefined;
|
|
@@ -647,6 +648,7 @@ export declare const chain: {
|
|
|
647
648
|
blobGasUsed?: bigint | undefined;
|
|
648
649
|
blockHash: import("viem").Hash;
|
|
649
650
|
blockNumber: bigint;
|
|
651
|
+
blockTimestamp?: bigint | undefined;
|
|
650
652
|
contractAddress: import("viem").Address | null | undefined;
|
|
651
653
|
cumulativeGasUsed: bigint;
|
|
652
654
|
effectiveGasPrice: bigint;
|
|
@@ -668,9 +670,17 @@ export declare const chain: {
|
|
|
668
670
|
type: "transactionReceipt";
|
|
669
671
|
};
|
|
670
672
|
};
|
|
673
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
674
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
675
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
676
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
677
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
678
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
679
|
+
}] | undefined;
|
|
671
680
|
serializers: {
|
|
672
681
|
readonly transaction: typeof import("viem/chains").serializeTransactionOpStack;
|
|
673
682
|
};
|
|
683
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
674
684
|
readonly domainId: 6;
|
|
675
685
|
readonly blockchainId: "BASE-SEPOLIA";
|
|
676
686
|
readonly blockchainVm: "EVM";
|
|
@@ -541,8 +541,17 @@ export declare const chain: {
|
|
|
541
541
|
sourceId?: number | undefined | undefined;
|
|
542
542
|
testnet?: boolean | undefined | undefined;
|
|
543
543
|
custom?: Record<string, unknown> | undefined;
|
|
544
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
544
545
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
546
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
547
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
548
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
549
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
550
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
551
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
552
|
+
}] | undefined;
|
|
545
553
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
|
|
554
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
546
555
|
readonly domainId: 0;
|
|
547
556
|
readonly blockchainId: "ETH";
|
|
548
557
|
readonly blockchainVm: "EVM";
|
|
@@ -400,8 +400,17 @@ export declare const chain: {
|
|
|
400
400
|
sourceId?: number | undefined | undefined;
|
|
401
401
|
testnet: true;
|
|
402
402
|
custom?: Record<string, unknown> | undefined;
|
|
403
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
403
404
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
405
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
406
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
407
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
408
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
409
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
410
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
411
|
+
}] | undefined;
|
|
404
412
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
|
|
413
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
405
414
|
readonly domainId: 0;
|
|
406
415
|
readonly blockchainId: "ETH-SEPOLIA";
|
|
407
416
|
readonly blockchainVm: "EVM";
|
|
@@ -3,7 +3,7 @@ export declare const chain: {
|
|
|
3
3
|
readonly default: {
|
|
4
4
|
readonly name: "PolygonScan";
|
|
5
5
|
readonly url: "https://polygonscan.com";
|
|
6
|
-
readonly apiUrl: "https://api.
|
|
6
|
+
readonly apiUrl: "https://api.etherscan.io/v2/api";
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
blockTime: 2000;
|
|
@@ -249,14 +249,23 @@ export declare const chain: {
|
|
|
249
249
|
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
250
250
|
rpcUrls: {
|
|
251
251
|
readonly default: {
|
|
252
|
-
readonly http: readonly ["https://polygon
|
|
252
|
+
readonly http: readonly ["https://polygon.drpc.org"];
|
|
253
253
|
};
|
|
254
254
|
};
|
|
255
255
|
sourceId?: number | undefined | undefined;
|
|
256
256
|
testnet?: boolean | undefined | undefined;
|
|
257
257
|
custom?: Record<string, unknown> | undefined;
|
|
258
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
258
259
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
260
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
261
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
262
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
263
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
264
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
265
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
266
|
+
}] | undefined;
|
|
259
267
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
|
|
268
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
260
269
|
readonly domainId: 7;
|
|
261
270
|
readonly blockchainId: "MATIC";
|
|
262
271
|
readonly blockchainVm: "EVM";
|
|
@@ -3,7 +3,7 @@ export declare const chain: {
|
|
|
3
3
|
readonly default: {
|
|
4
4
|
readonly name: "PolygonScan";
|
|
5
5
|
readonly url: "https://amoy.polygonscan.com";
|
|
6
|
-
readonly apiUrl: "https://api
|
|
6
|
+
readonly apiUrl: "https://api.etherscan.io/v2/api";
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
blockTime?: number | undefined | undefined;
|
|
@@ -255,8 +255,17 @@ export declare const chain: {
|
|
|
255
255
|
sourceId?: number | undefined | undefined;
|
|
256
256
|
testnet: true;
|
|
257
257
|
custom?: Record<string, unknown> | undefined;
|
|
258
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
258
259
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
260
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
261
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
262
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
263
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
264
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
265
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
266
|
+
}] | undefined;
|
|
259
267
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable<bigint, number>> | undefined;
|
|
268
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
260
269
|
readonly domainId: 7;
|
|
261
270
|
readonly blockchainId: "MATIC-AMOY";
|
|
262
271
|
readonly blockchainVm: "EVM";
|
|
@@ -293,6 +293,7 @@ export declare const chain: {
|
|
|
293
293
|
sourceId: 1;
|
|
294
294
|
testnet?: boolean | undefined | undefined;
|
|
295
295
|
custom?: Record<string, unknown> | undefined;
|
|
296
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
296
297
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
297
298
|
formatters: {
|
|
298
299
|
readonly block: {
|
|
@@ -358,16 +359,16 @@ export declare const chain: {
|
|
|
358
359
|
r: import("viem").Hex;
|
|
359
360
|
s: import("viem").Hex;
|
|
360
361
|
v: bigint;
|
|
361
|
-
value: bigint;
|
|
362
|
-
gas: bigint;
|
|
363
362
|
to: import("viem").Address | null;
|
|
364
363
|
from: import("viem").Address;
|
|
364
|
+
gas: bigint;
|
|
365
365
|
nonce: number;
|
|
366
|
+
value: bigint;
|
|
366
367
|
blockHash: `0x${string}` | null;
|
|
367
368
|
blockNumber: bigint | null;
|
|
368
|
-
transactionIndex: number | null;
|
|
369
369
|
hash: import("viem").Hash;
|
|
370
370
|
input: import("viem").Hex;
|
|
371
|
+
transactionIndex: number | null;
|
|
371
372
|
typeHex: import("viem").Hex | null;
|
|
372
373
|
accessList?: undefined | undefined;
|
|
373
374
|
authorizationList?: undefined | undefined;
|
|
@@ -504,6 +505,7 @@ export declare const chain: {
|
|
|
504
505
|
blobGasUsed?: bigint | undefined;
|
|
505
506
|
blockHash: import("viem").Hash;
|
|
506
507
|
blockNumber: bigint;
|
|
508
|
+
blockTimestamp?: bigint | undefined;
|
|
507
509
|
contractAddress: import("viem").Address | null | undefined;
|
|
508
510
|
cumulativeGasUsed: bigint;
|
|
509
511
|
effectiveGasPrice: bigint;
|
|
@@ -525,9 +527,17 @@ export declare const chain: {
|
|
|
525
527
|
type: "transactionReceipt";
|
|
526
528
|
};
|
|
527
529
|
};
|
|
530
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
531
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
532
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
533
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
534
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
535
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
536
|
+
}] | undefined;
|
|
528
537
|
serializers: {
|
|
529
538
|
readonly transaction: typeof import("viem/chains").serializeTransactionOpStack;
|
|
530
539
|
};
|
|
540
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
531
541
|
readonly domainId: 2;
|
|
532
542
|
readonly blockchainId: "OP";
|
|
533
543
|
readonly blockchainVm: "EVM";
|