-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix: EIP712Wrapper v1 #276
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…d output. - Implemented Amino-based packaging of gogoproto.Message cosmos messages. - Added a unit-test with a fixture to ensure that the output matches the expected output.
bangjelkoski
approved these changes
Jan 23, 2025
cd0a879
to
e8625f9
Compare
aarmoa
approved these changes
Jan 23, 2025
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.
Changes look good to me
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
After some recent update injective-core switched the protobuf implementation gogoproto to protobufv2 causing JSON marshaling of messages to behave differently. Changes that made inside injective-core were not reflected in
WrapTxToEIP712
in sdk-go.This makes
web3gw
service ofinjective-indexer
result in wrong JSON representation forv1
requests here:https://github.com/InjectiveLabs/injective-indexer/blob/289139bc9a5d0d270761319727bbc265b58b8138/service/web3gw/transactions_api.go#L359
Fixes
gogoproto.Message
cosmos messages.Test
Additionally, there is a playground repo to exercise parity in marshaling between Go and TypeScript:
https://github.com/InjectiveLabs/eip712v1
The outputs must match.
Additional features
Updated eip712 wrapper
typeddata
implementation up to date with injective-core.Exact file copy of https://github.com/InjectiveLabs/injective-core/blob/dev-v1.14/injective-chain/app/ante/typeddata/typed_data.go
How to use this inside Injective Indexer
Update
go.mod
:Summary by CodeRabbit
🥕