-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
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
getTransaction failing in version 5 for contract deployments #572
Comments
Hi, get the same issue, whenever I try to deploy a contract with v5 |
By the way, I can fix the issue by adding ethers.js/packages/address/src.ts/index.ts Line 143 in ebfca98
But not sure it will remove some necessary validity checks |
Hey @ricmoo I wanted to link ethers as a git dependencies but because ethers use lerna, it can't be done by simply providing the git repo url to the package.json (as usual). The root folder being called "root" and this cause issue Is there any way arround ? The only thing left for merging my code to switch to ethers v5 is this issue and I made a fix here https://github.com/wighawag/ethers.js/tree/wighawag-patch-1 that would work for me. |
I don’t quite understand what you are trying to do. What do you mean “link”? I can add the repo in the package.json, but it doesn’t make sense to publish the repo to npm or anything. I could given it a name under the org, like |
This should be fixed now in Thanks! :) |
I can confirm it fixes it! What I was asking was the following: Normally if you have a npm package whose source code is on git. you can fork it make changes and then use your own fork git uri as the version to use for the npm package in question. With lerna this is not possible and was wonderring if there was other options. |
Oh! I don't think there is an easy way to do that with a Lerna based package. I may be able to add a main of You can also use the normal Then you can, for example, This doesn't really work on environments like Heroku, but for local builds helps. |
Closing this now, but if there are any more issues, please feel free to re-open. Thanks! :) |
When calling
getTransaction
for a contract deployment transaction in version 4, theto
field was returned with anull
value.In version 5, the
to
value is calculated from thenonce
andfrom
fields if theto
field does not exist. see https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/providers/src.ts/formatter.ts#L308The problem is when the
nonce
is of odd length. eg0x1
or0xf
. This is because thearrayify
function validates that the hex string is of even length.https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bytes/src.ts/index.ts#L115
The full stack trace from the error
The text was updated successfully, but these errors were encountered: