After setting up with (replaced some with placeholders):
const web3Archive = Moralis.web3ByChain("0x1");
web3Archive.setProvider("https://speedy-nodes-{...}/eth/mainnet/archive");
const archiveContract = new web3Archive.eth.Contract(abi, "0x...");
I can run:
const archiveSomethingRes = await archiveContract.methods["getSomething()"]().call();
And it returns the latest something from that view function no problem.
However, when adding a block filter it just ignores the filter and returns the latest anyway. The four syntax attempts I’ve tried within the .call()
portion:
.call({ block_number: 14000000 })
.call({ blockNumber: 14000000 })
.call({ block_identifier: 14000000 })
.call({ from_block: 14000000, to_block: 14000000 })
All to no avail. How can I filter to a specific block?
Thanks