-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: encode source address correctly in gateway #1548
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from two minor details which can also be ignored.
@@ -12,6 +12,7 @@ targets = ["x86_64-unknown-linux-gnu"] | |||
|
|||
[dependencies] | |||
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } | |||
hex = {version = "0.4.3", default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: We are importing hex
without std
here but not enabling the std
feature below.
// NOTE: Axelar simply provides the hexadecimal string of an EVM | ||
// address as the `sourceAddress` argument. Solidity does on the | ||
// other side recognize the hex-encoding and encode the hex bytes to | ||
// utf-8 bytes. | ||
// | ||
// Hence, we are reverting this process here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Formatting off.
// NOTE: Axelar simply provides the hexadecimal string of an EVM | |
// address as the `sourceAddress` argument. Solidity does on the | |
// other side recognize the hex-encoding and encode the hex bytes to | |
// utf-8 bytes. | |
// | |
// Hence, we are reverting this process here. | |
// NOTE: Axelar simply provides the hexadecimal string of an EVM | |
// address as the `sourceAddress` argument. Solidity does on the | |
// other side recognize the hex-encoding and encode the hex bytes to | |
// utf-8 bytes. | |
// | |
// Hence, we are reverting this process here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for applying my nits!
Description
The address that we are receiving from EVM chains is a
utf-8(hex(address))
encoded byte bloob. This was an issue before because we expected it to be just an[u8; 20]
.Changes and Descriptions
Checklist: