-
Notifications
You must be signed in to change notification settings - Fork 62
Fix: EIP712Wrapper v1 #276
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
Merged
Merged
Conversation
This file contains hidden or 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
Collaborator
aarmoa
left a comment
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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
WrapTxToEIP712in sdk-go.This makes
web3gwservice ofinjective-indexerresult in wrong JSON representation forv1requests here:https://github.com/InjectiveLabs/injective-indexer/blob/289139bc9a5d0d270761319727bbc265b58b8138/service/web3gw/transactions_api.go#L359
Fixes
gogoproto.Messagecosmos 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
typeddataimplementation 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
🥕