You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message test {
uint64 a = 1 [jstype = JS_STRING];
repeated uint64 b = 2 [jstype = JS_STRING];
}
and we want to encode the message
{a: 10, b: [54, 55, 56]}
koilib (protobuffers.js) encodes it as:
hex value: 08 0a 12 03 36 37 38
However, as-proto encodes it as:
hex value: 08 0a 10 36 10 37 10 38
This inconsistency makes the contracts exit with transaction reverted: module exited due to trap because as-proto is not able to decode the data created in koilib.
Let's say we have the following proto:
and we want to encode the message
koilib (protobuffers.js) encodes it as:
However, as-proto encodes it as:
This inconsistency makes the contracts exit with
transaction reverted: module exited due to trap
because as-proto is not able to decode the data created in koilib.By looking to the documentation it seems that as-proto is using the correct encoding https://protobuf.dev/programming-guides/encoding/#optional.
Verify this and report the issue to the corresponding library.
The text was updated successfully, but these errors were encountered: