This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
(node:73511) UnhandledPromiseRejectionWarning: Error: failed to meet quorum (method="call", params={"transaction":.. #39
Comments
I found the bug may be sourced from the "Fetcher" in the "@Uniswap/SDK". After replaced the default provider "Fetcher" in the with the existing websocket provider, old errors disapeard were repalced by new errors subsequently. const {ethers} = require("ethers");
const {
ChainId,
Token,
TokenAmount,
WETH,
Fetcher,
Trade,
} = require("@uniswap/sdk");
// @ts-ignore
clientConfig: {
// Useful if requests are large
maxReceivedFrameSize: 100000000, // bytes - default: 1MiB
maxReceivedMessageSize: 100000000, // bytes - default: 8MiB
// Useful to keep a connection alive
keepalive: true,
keepaliveInterval: 60000, // ms
},
// Enable auto reconnection
reconnect: {
auto: true,
delay: 1000, // ms
maxAttempts: 10,
onTimeout: false,
},
};
const ws = new Web3WsProvider(
"wss://mainnet.infura.io/ws/v3/" + process.env.INFURA_URL,
options
);
const web3 = new Web3(ws);
const daiWeth_Pair = await Fetcher.fetchPairData(
dai,
weth,
new ethers.providers.Web3Provider(ws) // to replace the default provider.
);
Here is the old code. const {
ChainId,
Token,
TokenAmount,
WETH,
Fetcher,
Trade,
} = require("@uniswap/sdk");
// @ts-ignore
clientConfig: {
// Useful if requests are large
maxReceivedFrameSize: 100000000, // bytes - default: 1MiB
maxReceivedMessageSize: 100000000, // bytes - default: 8MiB
// Useful to keep a connection alive.
keepalive: true,
keepaliveInterval: 60000, // ms
},
// Enable auto reconnection.
reconnect: {
auto: true,
delay: 1000, // ms
maxAttempts: 10,
onTimeout: false,
},
};
const ws = new Web3WsProvider(
"wss://mainnet.infura.io/ws/v3/" + process.env.INFURA_URL,
options
);
// use default provider which is omitted here.
const web3 = new Web3(ws);
const daiWeth_Pair = await Fetcher.fetchPairData(
dai,
weth
); Here are the new errors:
|
Fetcher was removed from this repository. Fetching data from the network to construct the classes in this repository is now the responsibility of a higher level library. The reason being, that different applications fetch data from the network in different ways (e.g. some may use in-memory caches, some may use multicall like the Uniswap interface, etc.) |
This was referenced Mar 7, 2021
royalaid
pushed a commit
to royalaid/qidao-sdk
that referenced
this issue
Feb 7, 2023
Token Descriptions, as const vault info
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I found a very similar issue like mine. But I cannot find the answer. So I posted a new issue here. Thanks for your help!
#ethers-io/ethers.js#841 (comment)
Part of my code below where @uniswap/sdk used ethers.js with @[email protected] :
Some Error information:
Error1:
Error2:
Error3:
The text was updated successfully, but these errors were encountered: