How do I use ethers with the Astar network? #3270
Replies: 4 comments 1 reply
-
To be fair, other libraries are very loose with what they accept as valid. In general, I want a caller to be able to rely on some things. What network are you on that doesn’t have extraData? I have an upcoming minor numb soon, d as bd while this isn’t technically backwards compatible, if it is a strong use case I could consider it. |
Beta Was this translation helpful? Give feedback.
-
I am part of VMware Blockchain team (https://www.vmware.com/products/blockchain.html). I was trying to use Ethers.js with our network. But the transactions involving signer, did not go through, as there was no |
Beta Was this translation helpful? Give feedback.
-
Other similar chains have historically just included a Fortunately, the Provider is meant to be trivial to sub-class to solve this exact problem. If you sub-class Provider to use a custom Formatter sub-class, which ignores the extraData. This isolates the change for just consumers of your chain, and is a great place to include any other chain-dependent functions you may wish to provide. Does that make sense? |
Beta Was this translation helpful? Give feedback.
-
(I’m going to move this to discussions and update the title with your chains name, and feel free to post a link to a package with a custom provider for others in the future to come across) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Ethers Version
v5.6.9
Search Terms
network, block format
Describe the Problem
extraData
parameter inside a block is expected as mandatoryAn interaction with a Blockchain such as writing new information into Blockchain using a Signer, fails at Block format check if
extraData
parameter is not present in the Block returned (i.e wheneth_getBlockByNumber
is called)extraData
parameter should be treated as optional(also, just a note, in other libraries such as Web3.js or Web3j, the
extraData
parameter is not treated as mandatory)Code Snippet
No response
Contract ABI
No response
Errors
Environment
No response
Environment (Other)
No response
Beta Was this translation helpful? Give feedback.
All reactions