-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add chain_id
when building transaction
#58
Conversation
I started getting this error when working with Polygon Mumbai (Polygon testnet): %{"code" => -32000, "message" => "only replay-protected (EIP-155) transactions allowed over RPC"} I tried adding the |
This commit -- 5c3860f -- allows the encoded The previous code fails when <<number>> = to_buffer(data) (data in this case is But by using this: data |> to_buffer() |> :binary.decode_unsigned() We allow the result to be an arbitrarily long integer (as EIP-155 specifies). |
Link to EIP-155: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md |
The changes so far looks good to me, I’ll read your comments in depth ;) Meanwhile Im thinking we might want to improve/refactor CI to use openethereum first, what do you think? |
I know nothing about it so far. Could read on it after this is completed. |
This is not ready for merge, no need to approve yet. I'll appreciate help on fixing the signer code -- although I am working on it myself and should be done soon. |
Hi @dimitarvp, any updates on this? I'm trying to continue with your work here quangacuity@48639ba. But this doesn't seem to be enough as I get this error now when trying to send the signed transaction. {:error, %{"code" => -32000, "message" => "invalid sender"}} @izelnakri Do you have any suggestions on how to make this work for Many thanks. Edited: Ok I manage to get it working by this commit. |
Hi @quangacuity , we need to change the CI entirely, it currently uses ganache-cli but I'd much rather like to use the test environment of openethereum first. Because we had mismatches in the past. at least relying on a real implementation/production code is what we should strive for going forward. |
Task list
chain_id
toBuilder
chain_id
-- allow it to be larger than one bytechain_id
toSigner