Skip to content

Commit

Permalink
feat: add Injective EIP712 V2 sign mode (#17)
Browse files Browse the repository at this point in the history
* feat: add SIGNMODE_EIP712_V2

* chore: gen

* chore: use SIGN_MODE instead of SIGNMODE

* fix: re-order sign modes ascendingly

* chore: add comment to ExecCompat

* chore: gen
  • Loading branch information
vinhphuctadang authored Sep 15, 2023
1 parent 5c9627d commit 0427b6f
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 55 deletions.
2 changes: 2 additions & 0 deletions api/cosmos/authz/v1beta1/tx_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 26 additions & 19 deletions api/cosmos/tx/signing/v1beta1/signing.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions proto/cosmos/authz/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ service Msg {
// granter's account that has been granted to the grantee.
rpc Revoke(MsgRevoke) returns (MsgRevokeResponse);

// ExecCompat has same functionality as Exec but accepts array of json-encoded message string instead of []*Any
rpc ExecCompat(MsgExecCompat) returns (MsgExecCompatResponse);
}

Expand Down
4 changes: 4 additions & 0 deletions proto/cosmos/tx/signing/v1beta1/signing.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ enum SignMode {
// Amino JSON and will be removed in the future.
SIGN_MODE_LEGACY_AMINO_JSON = 127;

// Injective EIP712 support for any cosmos messages which uses proto-json encoded string for messages
// Signature verification is implemented in injective core
SIGN_MODE_EIP712_V2 = 128;

// SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos
// SDK. Ref: https://eips.ethereum.org/EIPS/eip-191
//
Expand Down
78 changes: 42 additions & 36 deletions types/tx/signing/signing.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions x/authz/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0427b6f

Please sign in to comment.