We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6.11.1
No response
assumption: A-chain's block number is extremely higher then B-chain's
Reproduction steps:
https://codesandbox.io/p/devbox/festive-cohen-8t7d6c
in this demo, sepolia(A)'s block number is 6498382 much higher than cronos_zkevm(B)'s block number (213236).
the possible cause I found is related to PollingBlockSubscriber, it will run a long foreach loop in this case, refer to this line:
PollingBlockSubscriber
for (let b = this.#blockNumber + 1; b <= blockNumber; b++) { // ... await this.#provider.emit("block", b); }
const provider = new BrowserProvider(window.ethereum); const signer = await provider.getSigner(); const contract = new BaseContract( "...", erc20Api, signer ); const tx = await contract.approve( "...", 10 ); tx.wait(); await window.ethereum.request({ method: "wallet_switchEthereumChain", params: [ { chainId: "0x11a", }, ], }); await sleep(3000); await window.ethereum.request({ method: "wallet_switchEthereumChain", params: [ { chainId: "0xaa36a7", }, ], });
page crashes
Browser (Chrome, Safari, etc)
The text was updated successfully, but these errors were encountered:
ricmoo
No branches or pull requests
Ethers Version
6.11.1
Search Terms
No response
Describe the Problem
assumption: A-chain's block number is extremely higher then B-chain's
Reproduction steps:
online demo
https://codesandbox.io/p/devbox/festive-cohen-8t7d6c
in this demo, sepolia(A)'s block number is 6498382 much higher than cronos_zkevm(B)'s block number (213236).
the possible cause I found is related to
PollingBlockSubscriber
, it will run a long foreach loop in this case, refer to this line:Code Snippet
Contract ABI
No response
Errors
Environment
Browser (Chrome, Safari, etc)
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: