Skip to content

Commit

Permalink
feat: support multiple messages for EIP712 (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
forcodedancing authored May 22, 2023
1 parent b0eb09e commit b0c3fdd
Show file tree
Hide file tree
Showing 6 changed files with 514 additions and 335 deletions.
386 changes: 222 additions & 164 deletions api/cosmos/tx/v1beta1/tx.pulsar.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/tx/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type Factory struct {
func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) (Factory, error) {
signModeStr := clientCtx.SignModeStr

signMode := signing.SignMode_SIGN_MODE_UNSPECIFIED
signMode := signing.SignMode_SIGN_MODE_EIP_712
switch signModeStr {
case flags.SignModeDirect:
signMode = signing.SignMode_SIGN_MODE_DIRECT
Expand Down
5 changes: 2 additions & 3 deletions proto/cosmos/tx/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ message SignDocDirectAux {
Tip tip = 6;
}

// SignDocEIP712 is the type used for generating sign bytes for
// SIGN_MODE_EIP_712.
// SignDocEIP712 is the type used for generating sign bytes for SIGN_MODE_EIP_712.
message SignDocEip712 {
// chain_id is the identifier of the chain this transaction targets.
// It prevents signed transactions from being used on another chain by an
Expand All @@ -117,7 +116,7 @@ message SignDocEip712 {
Fee fee = 4 [(gogoproto.nullable) = false];

// msg is the msg in the EIP712 transaction.
google.protobuf.Any msg = 5;
repeated google.protobuf.Any msgs = 5;

// timeout_height is the transaction's timeout height (if set).
uint64 timeout_height = 6 [(gogoproto.jsontag) = "timeout_height"];
Expand Down
189 changes: 95 additions & 94 deletions types/tx/tx.pb.go

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

Loading

0 comments on commit b0c3fdd

Please sign in to comment.