Closed HikariShine closed 2 months ago
I have read the source code in this file: https://github.com/ethers-io/ethers.js/blob/master/packages/contracts/src.ts/index.ts and i found the chainId field is in the PopulatedTransaction struct, and in populateTransaction method, it return the object type is PopulatedTransaction. It looks like will support chainId override. But why the code havn't override chainId field and also not delete the chainId in override?
+1
right now i have to manually override "chainId" in the transaction because the native ether override for chainId can't be applied in the populateTransaction method.
My solution:
let unsigned = await contract.populateTransaction.zzzzz
unsigned.chainId = XXX;
Apparently this was partially fixed in https://github.com/ethers-io/ethers.js/releases/tag/v5.6.0
Partially because now at least the promise of populateTx returns the chainId of the provider (or signer?) and there is no need to override it anymore.
However not possible to change to other chain Id, so would be great to finalise the fix for this issue
Closing older issues. But this was addressed some time ago in both v5 and v6. :)
Thanks! :)
Describe the bug When i use the code above
I got a message: cannot override "chainId"
Reproduction steps abi
Environment: Node etherjs 5.5.2
Search Terms cannot override "chainId"