You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using ethers v6.0.2 and when I use a FallbackProvider with only one JsonRpcProvider in the provider array I get an error.
I'm working on a fix!
Code Snippet
providersArray.push({
provider: new ethers.JsonRpcProvider(providerUrls[i], network, {
polling: true,
staticNetwork: network,
}),
stallTimeout: 10000,
weight: 3,
priority: 1,
});
const provider = new ethers.FallbackProvider(providersArray, network); // Default Quorum is 2, so must have at least > 2 weight
provider.getBlockNumber().then((blockNumber) => { console.log(`Block Number: ${blockNumber}`);});
Contract ABI
No response
Errors
Error:
TypeError: invalid numeric value (argument="value", value=null, code=INVALID_ARGUMENT, version=6.0.2)
at makeError (file:///Users/user/project/node_modules/ethers/lib.esm/utils/errors.js:109:21)
at assert (file:///Users/user/project/node_modules/ethers/lib.esm/utils/errors.js:132:15)
at assertArgument (file:///Users/user/project/node_modules/ethers/lib.esm/utils/errors.js:143:5)
at getNumber (file:///Users/user/project/node_modules/ethers/lib.esm/utils/maths.js:139:5)
at #checkQuorum (file:///Users/user/project/node_modules/ethers/lib.esm/providers/provider-fallback.js:385:46)
at #waitForQuorum (file:///Users/user/project/node_modules/ethers/lib.esm/providers/provider-fallback.js:456:46)
at #waitForQuorum (file:///Users/user/project/node_modules/ethers/lib.esm/providers/provider-fallback.js:477:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async FallbackProvider._perform (file:///Users/user/project/node_modules/ethers/lib.esm/providers/provider-fallback.js:509:24)
at async #perform (file:///Users/user/project/node_modules/ethers/lib.esm/providers/abstract-provider.js:207:16) {
code: 'INVALID_ARGUMENT',
argument: 'value',
value: undefined
}
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered:
Ethers Version
6.0.2
Search Terms
FallbackProvider
Describe the Problem
I am using ethers v6.0.2 and when I use a FallbackProvider with only one JsonRpcProvider in the provider array I get an error.
I'm working on a fix!
Code Snippet
Contract ABI
No response
Errors
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: