@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
|
@@ -116,17 +116,47 @@ export class Provider extends BaseProvider {
|
|
|
116
116
|
}
|
|
117
117
|
async eth_call(params, blockIdentifier = 'latest') {
|
|
118
118
|
// NOTE: https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call
|
|
119
|
-
//
|
|
120
|
-
//
|
|
121
|
-
//
|
|
119
|
+
// Circle's query contract API has a narrow surface (blockchain, to, data, from). For anything
|
|
120
|
+
// it cannot represent, throw `MethodNotFoundRpcError` so `Provider.request` falls back to the
|
|
121
|
+
// embedded viem RPC transport instead of hard-failing the caller. This matters in particular
|
|
122
|
+
// for viem-based adapters (e.g. the Circle Wallets adapter's pre-flight `publicClient.call`
|
|
123
|
+
// during a swap), which forward `gas`/`value` into `eth_call` as a matter of course.
|
|
122
124
|
if (blockIdentifier !== 'latest') {
|
|
123
|
-
throw new Error('Only `latest` block identifier is supported')
|
|
125
|
+
throw new MethodNotFoundRpcError(new Error('Only `latest` block identifier is supported by Circle queryContract'), {
|
|
126
|
+
method: 'eth_call',
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
// gas / gasPrice / maxFeePerGas / maxPriorityFeePerGas are EVM-visible during the target
|
|
130
|
+
// call: `gas` bounds `gasleft()` and affects out-of-gas behavior; the fee fields determine
|
|
131
|
+
// `tx.gasprice`, which contracts can read. Circle's queryContract cannot thread these
|
|
132
|
+
// through, so surface `MethodNotFoundRpcError` to trigger fallback rather than silently
|
|
133
|
+
// returning an SCP result that ignored the caller's explicit simulation constraints.
|
|
134
|
+
const gasPricingParams = ['gas', 'gasPrice', 'maxFeePerGas', 'maxPriorityFeePerGas'];
|
|
135
|
+
if (gasPricingParams.some((param) => params[param] !== undefined)) {
|
|
136
|
+
throw new MethodNotFoundRpcError(new Error('gas / gasPrice / maxFeePerGas / maxPriorityFeePerGas are not supported by Circle queryContract'), { method: 'eth_call' });
|
|
137
|
+
}
|
|
138
|
+
// `nonce` is transaction-level and not EVM-visible inside eth_call, so silently drop it —
|
|
139
|
+
// forwarding would be a no-op and throwing would break callers that forward nonce for parity.
|
|
140
|
+
// `value` is the one remaining param with read semantics (payable view calls). `0x0` / `0n`
|
|
141
|
+
// mean "no native value" and are accepted; anything else cannot be expressed through
|
|
142
|
+
// queryContract, so fall back to the RPC transport. Accept both the typed `bigint` and the
|
|
143
|
+
// runtime JSON-RPC `Hex` shape (viem's `TransactionRequest.value` is typed `bigint`, but
|
|
144
|
+
// transports deliver hex).
|
|
145
|
+
const rawValue = params.value;
|
|
146
|
+
let valueAsBigInt;
|
|
147
|
+
if (rawValue === undefined) {
|
|
148
|
+
valueAsBigInt = 0n;
|
|
124
149
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
150
|
+
else if (typeof rawValue === 'bigint') {
|
|
151
|
+
valueAsBigInt = rawValue;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
valueAsBigInt = hexToBigInt(rawValue);
|
|
155
|
+
}
|
|
156
|
+
if (valueAsBigInt !== 0n) {
|
|
157
|
+
throw new MethodNotFoundRpcError(new Error('Non-zero `value` is not supported by Circle queryContract'), {
|
|
158
|
+
method: 'eth_call',
|
|
159
|
+
});
|
|
130
160
|
}
|
|
131
161
|
// Provider's chainId is used to determine the blockchain
|
|
132
162
|
// When the chain is not supported by Circle's query contract API, throw MethodNotFoundRpcError to fallback.
|
|
@@ -1851,12 +1851,21 @@ describe('Provider', () => {
|
|
|
1851
1851
|
});
|
|
1852
1852
|
});
|
|
1853
1853
|
describe('eth_call', () => {
|
|
1854
|
+
// Build a provider with `fallbackTransport: null` so the inner `eth_call` errors
|
|
1855
|
+
// surface raw instead of being silently retried on the fallback RPC transport.
|
|
1856
|
+
// The production default IS to fall back; these tests pin the inner contract.
|
|
1857
|
+
const makeProviderWithoutFallback = (chainId) => new Provider({
|
|
1858
|
+
apiKey: 'test-api-key',
|
|
1859
|
+
entitySecret: 'test-entity-secret',
|
|
1860
|
+
chainId,
|
|
1861
|
+
fallbackTransport: null,
|
|
1862
|
+
});
|
|
1863
|
+
const baseParams = {
|
|
1864
|
+
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1865
|
+
data: '0x70a08231000000000000000000000000742d35cc6634c0532925a3b8d0c8c0c8d8d8d8d8',
|
|
1866
|
+
from: '0x123456789abcdef123456789abcdef123456789a',
|
|
1867
|
+
};
|
|
1854
1868
|
it('should perform contract query successfully', async () => {
|
|
1855
|
-
const params = {
|
|
1856
|
-
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1857
|
-
data: '0x70a08231000000000000000000000000742d35cc6634c0532925a3b8d0c8c0c8d8d8d8d8',
|
|
1858
|
-
from: '0x123456789abcdef123456789abcdef123456789a',
|
|
1859
|
-
};
|
|
1860
1869
|
mockScp.queryContract.mockResolvedValue({
|
|
1861
1870
|
data: {
|
|
1862
1871
|
outputData: '0x0000000000000000000000000000000000000000000000000de0b6b3a7640000',
|
|
@@ -1864,36 +1873,18 @@ describe('Provider', () => {
|
|
|
1864
1873
|
});
|
|
1865
1874
|
const result = await provider.request({
|
|
1866
1875
|
method: 'eth_call',
|
|
1867
|
-
params: [
|
|
1876
|
+
params: [baseParams],
|
|
1868
1877
|
});
|
|
1869
1878
|
expect(result).toBe('0x0000000000000000000000000000000000000000000000000de0b6b3a7640000');
|
|
1870
1879
|
expect(mockScp.queryContract).toHaveBeenCalledWith({
|
|
1871
1880
|
blockchain: 'ETH',
|
|
1872
|
-
address:
|
|
1873
|
-
callData:
|
|
1874
|
-
fromAddress:
|
|
1881
|
+
address: baseParams.to,
|
|
1882
|
+
callData: baseParams.data,
|
|
1883
|
+
fromAddress: baseParams.from,
|
|
1875
1884
|
});
|
|
1876
1885
|
});
|
|
1877
|
-
it('should throw UnsupportedChainError when chainId is not supported for contract queries', async () => {
|
|
1878
|
-
const provider = new Provider({
|
|
1879
|
-
apiKey: 'test-api-key',
|
|
1880
|
-
entitySecret: 'test-entity-secret',
|
|
1881
|
-
chainId: 999999, // Unsupported chain
|
|
1882
|
-
});
|
|
1883
|
-
const params = {
|
|
1884
|
-
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1885
|
-
data: '0x70a08231',
|
|
1886
|
-
};
|
|
1887
|
-
await expect(provider.request({
|
|
1888
|
-
method: 'eth_call',
|
|
1889
|
-
params: [params],
|
|
1890
|
-
})).rejects.toThrow();
|
|
1891
|
-
});
|
|
1892
1886
|
it('should work without from parameter', async () => {
|
|
1893
|
-
const params = {
|
|
1894
|
-
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1895
|
-
data: '0x70a08231000000000000000000000000742d35cc6634c0532925a3b8d0c8c0c8d8d8d8d8',
|
|
1896
|
-
};
|
|
1887
|
+
const params = { to: baseParams.to, data: baseParams.data };
|
|
1897
1888
|
mockScp.queryContract.mockResolvedValue({
|
|
1898
1889
|
data: {
|
|
1899
1890
|
outputData: '0x0000000000000000000000000000000000000000000000000de0b6b3a7640000',
|
|
@@ -1911,52 +1902,111 @@ describe('Provider', () => {
|
|
|
1911
1902
|
fromAddress: undefined,
|
|
1912
1903
|
});
|
|
1913
1904
|
});
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1905
|
+
// gas / gasPrice / maxFeePerGas / maxPriorityFeePerGas are EVM-visible during the call:
|
|
1906
|
+
// `gas` affects `gasleft()` and the fee fields determine `tx.gasprice`. Circle's
|
|
1907
|
+
// queryContract cannot represent them, so surface MethodNotFoundRpcError to trigger
|
|
1908
|
+
// fallback rather than silently returning an SCP result that ignored the constraints.
|
|
1909
|
+
it.each([
|
|
1910
|
+
{ label: 'gas', param: { gas: numberToHex(1000000n) } },
|
|
1911
|
+
{ label: 'gasPrice', param: { gasPrice: numberToHex(parseEther('0.00000001')) } },
|
|
1912
|
+
{ label: 'maxFeePerGas', param: { maxFeePerGas: numberToHex(parseEther('0.00000001')) } },
|
|
1913
|
+
{
|
|
1914
|
+
label: 'maxPriorityFeePerGas',
|
|
1915
|
+
param: { maxPriorityFeePerGas: numberToHex(parseEther('0.000000001')) },
|
|
1916
|
+
},
|
|
1917
|
+
])('should throw MethodNotFoundRpcError when $label is set (fallback trigger)', async ({ param }) => {
|
|
1918
|
+
const provider = makeProviderWithoutFallback(1);
|
|
1919
1919
|
await expect(provider.request({
|
|
1920
1920
|
method: 'eth_call',
|
|
1921
|
-
params: [
|
|
1922
|
-
})).rejects.
|
|
1921
|
+
params: [{ ...baseParams, ...param }],
|
|
1922
|
+
})).rejects.toBeInstanceOf(MethodNotFoundRpcError);
|
|
1923
|
+
expect(mockScp.queryContract).not.toHaveBeenCalled();
|
|
1924
|
+
});
|
|
1925
|
+
// `nonce` is transaction-level and not visible inside eth_call, so it's fine to silently
|
|
1926
|
+
// drop — forwarding would be a no-op and throwing would break callers (e.g. viem's
|
|
1927
|
+
// publicClient.call) that may surface nonce for parity with standard JSON-RPC shapes.
|
|
1928
|
+
it('should silently ignore nonce', async () => {
|
|
1929
|
+
mockScp.queryContract.mockResolvedValue({ data: { outputData: '0xok' } });
|
|
1930
|
+
const result = await provider.request({
|
|
1931
|
+
method: 'eth_call',
|
|
1932
|
+
params: [{ ...baseParams, nonce: numberToHex(42n) }],
|
|
1933
|
+
});
|
|
1934
|
+
expect(result).toBe('0xok');
|
|
1935
|
+
// nonce must not be forwarded — queryContract only accepts {blockchain, to, data, from}.
|
|
1936
|
+
expect(mockScp.queryContract).toHaveBeenCalledWith({
|
|
1937
|
+
blockchain: 'ETH',
|
|
1938
|
+
address: baseParams.to,
|
|
1939
|
+
callData: baseParams.data,
|
|
1940
|
+
fromAddress: baseParams.from,
|
|
1941
|
+
});
|
|
1942
|
+
});
|
|
1943
|
+
// `value` arrives as a `Hex` at runtime from JSON-RPC transports, but the
|
|
1944
|
+
// TypeScript surface (`ExactPartial<TransactionRequest>`) admits `bigint`.
|
|
1945
|
+
// Exercise both shapes so the dual-type contract is regression-tested.
|
|
1946
|
+
it.each([
|
|
1947
|
+
{ label: 'hex 0x0', value: '0x0' },
|
|
1948
|
+
{ label: 'bigint 0n', value: 0n },
|
|
1949
|
+
])('should accept zero value ($label) as equivalent to no native value', async ({ value }) => {
|
|
1950
|
+
mockScp.queryContract.mockResolvedValue({ data: { outputData: '0xzero' } });
|
|
1951
|
+
const result = await provider.request({
|
|
1952
|
+
method: 'eth_call',
|
|
1953
|
+
params: [{ ...baseParams, value }],
|
|
1954
|
+
});
|
|
1955
|
+
expect(result).toBe('0xzero');
|
|
1956
|
+
expect(mockScp.queryContract).toHaveBeenCalledTimes(1);
|
|
1957
|
+
});
|
|
1958
|
+
// `value` is the one param with read semantics (payable view calls). Non-zero must
|
|
1959
|
+
// surface `MethodNotFoundRpcError` so `Provider.request` falls back to the RPC transport.
|
|
1960
|
+
// Again, cover both the hex and bigint shapes.
|
|
1961
|
+
it.each([
|
|
1962
|
+
{ label: 'hex 0x1', value: numberToHex(1n) },
|
|
1963
|
+
{ label: 'bigint 1n', value: 1n },
|
|
1964
|
+
])('should throw MethodNotFoundRpcError for non-zero value ($label) (fallback trigger)', async ({ value }) => {
|
|
1965
|
+
const provider = makeProviderWithoutFallback(1);
|
|
1923
1966
|
await expect(provider.request({
|
|
1924
1967
|
method: 'eth_call',
|
|
1925
|
-
params: [
|
|
1926
|
-
})).rejects.
|
|
1968
|
+
params: [{ ...baseParams, value }],
|
|
1969
|
+
})).rejects.toBeInstanceOf(MethodNotFoundRpcError);
|
|
1970
|
+
expect(mockScp.queryContract).not.toHaveBeenCalled();
|
|
1927
1971
|
});
|
|
1928
|
-
it('should throw
|
|
1929
|
-
const
|
|
1930
|
-
to: '0x742d35cc6634C0532925a3b8D0c8c0C8D8d8d8d8',
|
|
1931
|
-
data: '0x70a08231',
|
|
1932
|
-
};
|
|
1933
|
-
// Test each unsupported parameter individually
|
|
1934
|
-
const unsupportedParams = [
|
|
1935
|
-
{ gas: '0x186A0' },
|
|
1936
|
-
{ gasPrice: '0x3B9ACA00' },
|
|
1937
|
-
{ maxFeePerGas: '0x3B9ACA00' },
|
|
1938
|
-
{ maxPriorityFeePerGas: '0x3B9ACA00' },
|
|
1939
|
-
{ nonce: '0x1' },
|
|
1940
|
-
{ value: '0x0' },
|
|
1941
|
-
];
|
|
1942
|
-
for (const param of unsupportedParams) {
|
|
1943
|
-
const testParams = { ...baseParams, ...param };
|
|
1944
|
-
await expect(provider.request({
|
|
1945
|
-
method: 'eth_call',
|
|
1946
|
-
params: [testParams],
|
|
1947
|
-
})).rejects.toThrow();
|
|
1948
|
-
}
|
|
1949
|
-
// Test multiple unsupported params together
|
|
1950
|
-
const multipleUnsupportedParams = {
|
|
1951
|
-
...baseParams,
|
|
1952
|
-
gas: '0x186A0',
|
|
1953
|
-
value: '0x0',
|
|
1954
|
-
nonce: '0x1',
|
|
1955
|
-
};
|
|
1972
|
+
it('should throw MethodNotFoundRpcError when blockIdentifier is not "latest" (fallback trigger)', async () => {
|
|
1973
|
+
const provider = makeProviderWithoutFallback(1);
|
|
1956
1974
|
await expect(provider.request({
|
|
1957
1975
|
method: 'eth_call',
|
|
1958
|
-
params: [
|
|
1959
|
-
})).rejects.
|
|
1976
|
+
params: [baseParams, 'earliest'],
|
|
1977
|
+
})).rejects.toBeInstanceOf(MethodNotFoundRpcError);
|
|
1978
|
+
await expect(provider.request({
|
|
1979
|
+
method: 'eth_call',
|
|
1980
|
+
params: [baseParams, '0x1234'],
|
|
1981
|
+
})).rejects.toBeInstanceOf(MethodNotFoundRpcError);
|
|
1982
|
+
expect(mockScp.queryContract).not.toHaveBeenCalled();
|
|
1983
|
+
});
|
|
1984
|
+
// AVAX_FUJI (43113) is in SUPPORTED_CHAINS but NOT SUPPORTED_CONTRACT_QUERY_CHAINS.
|
|
1985
|
+
it('should throw MethodNotFoundRpcError when chain is not supported by queryContract (fallback trigger)', async () => {
|
|
1986
|
+
const provider = makeProviderWithoutFallback(43113);
|
|
1987
|
+
await expect(provider.request({ method: 'eth_call', params: [baseParams] })).rejects.toBeInstanceOf(MethodNotFoundRpcError);
|
|
1988
|
+
expect(mockScp.queryContract).not.toHaveBeenCalled();
|
|
1989
|
+
});
|
|
1990
|
+
// ARC_TESTNET (5042002) IS in SUPPORTED_CONTRACT_QUERY_CHAINS — reads flow through Circle's SCP.
|
|
1991
|
+
it('should route Arc Testnet eth_call through queryContract', async () => {
|
|
1992
|
+
// `vi.restoreAllMocks` in the outer beforeEach clears the module-level mock
|
|
1993
|
+
// return; re-prime it before constructing a second Provider for Arc Testnet.
|
|
1994
|
+
;
|
|
1995
|
+
initiateSmartContractPlatformClient.mockReturnValue(mockScp);
|
|
1996
|
+
const arcProvider = new Provider({
|
|
1997
|
+
apiKey: 'test-api-key',
|
|
1998
|
+
entitySecret: 'test-entity-secret',
|
|
1999
|
+
chainId: 5042002, // ARC_TESTNET
|
|
2000
|
+
});
|
|
2001
|
+
mockScp.queryContract.mockResolvedValue({ data: { outputData: '0xarc' } });
|
|
2002
|
+
const result = await arcProvider.request({ method: 'eth_call', params: [baseParams] });
|
|
2003
|
+
expect(result).toBe('0xarc');
|
|
2004
|
+
expect(mockScp.queryContract).toHaveBeenCalledWith({
|
|
2005
|
+
blockchain: 'ARC-TESTNET',
|
|
2006
|
+
address: baseParams.to,
|
|
2007
|
+
callData: baseParams.data,
|
|
2008
|
+
fromAddress: baseParams.from,
|
|
2009
|
+
});
|
|
1960
2010
|
});
|
|
1961
2011
|
});
|
|
1962
2012
|
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";
|