Skip to content

Commit

Permalink
Merge pull request #1238 from scrtlabs/master
Browse files Browse the repository at this point in the history
Remove redundant field in proto files for SecretNetwork v1.15
  • Loading branch information
Thunnini authored Nov 13, 2024
2 parents 8d52bb7 + 46e8e2c commit 385c003
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 41 deletions.
2 changes: 1 addition & 1 deletion packages/proto-types/outputHash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
47xVj6yH8GxPnu1BOIH1MiJVtlE6POLMYvtUZYTBu/5MPH+/VZKmDSx8zscGTLTJpxn9rxdR/+cPKXJdeaqXzulJEYlXTSU7x80PSUD7rlp2mWT0RYGFDIN+Fik5sFOv7Um1WRmAnzsEu+hDNatREyB47p1Gxms6JX0klLRyAyxUnUJRvDIjqQiAHvjtBGK0z5Fgtw08ei6MwIGQTf1GQHMO/FAQfd3uq8plIG5KNxinIvHEViD2YjIK7cmuvNIFc5CdQK0lzAoIV73pCYbInRh3jcatX/QI80oBDMXBo9DCv5IaZQQs1G7JPcfzThPm
47xVj6yH8GxPnu1BOIH1MiJVtlE6POLMYvtUZYTBu/5MPH+/VZKmDSx8zscGTLTJpxn9rxdR/+cPKXJdeaqXzulJEYlXTSU7x80PSUD7rlp2mWT0RYGFDIN+Fik5sFOv7Um1WRmAnzsEu+hDNatREyB47p1Gxms6JX0klLRyAyxUnUJRvDIjqQiAHvjtBGK0z5Fgtw08ei6MwIGQTf1GQHMO/FAQfd3uq8plIG5KNxinIvHEhmHGgaIg4xI/FZ/rWiyM34f1rcsIV73pCYbInRh3jcatX/QI80oBDMXBo9DCv5IaZQQs1G7JPcfzThPm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package secret.compute.v1beta1;
package secret.compute.v1;

import "gogoproto/gogo.proto";
import "secret/compute/v1beta1/types.proto";
Expand Down Expand Up @@ -42,4 +42,4 @@ message Contract {
message Sequence {
bytes id_key = 1 [ (gogoproto.customname) = "IDKey" ];
uint64 value = 2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package secret.compute.v1;
option go_package = "github.com/scrtlabs/SecretNetwork/x/compute/internal/types";

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos/base/v1beta1/coin.proto";
import "amino/amino.proto";
Expand Down Expand Up @@ -32,11 +31,9 @@ message MsgStoreCode {
option (cosmos.msg.v1.signer) = "sender";
option (amino.name) = "wasm/MsgStoreCode";

// // sender is the canonical address of the sender
// bytes sender = 1 [ (gogoproto.casttype) =
// "github.com/cosmos/cosmos-sdk/types.AccAddress" ];
// Sender is the actor that signed the messages
string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// sender is the canonical address of the sender
bytes sender = 1 [ (gogoproto.casttype) =
"github.com/cosmos/cosmos-sdk/types.AccAddress" ];
// WASMByteCode can be raw or gzip compressed
bytes wasm_byte_code = 2 [ (gogoproto.customname) = "WASMByteCode" ];
// Source is a valid absolute HTTPS URI to the contract's source code,
Expand All @@ -53,12 +50,11 @@ message MsgStoreCodeResponse {
}

message MsgInstantiateContract {
// option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "sender_address";
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "sender";
option (amino.name) = "wasm/MsgInstantiateContract";

// sender is the canonical address of the sender
// string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
bytes sender = 1 [ (gogoproto.casttype) =
"github.com/cosmos/cosmos-sdk/types.AccAddress" ];
string callback_code_hash = 2;
Expand All @@ -77,9 +73,6 @@ message MsgInstantiateContract {
bytes callback_sig = 7 [ (gogoproto.customname) = "CallbackSig" ];
// Admin is an optional address that can execute migrations
string admin = 8;
// To get the message signer define sender_address as human adress for sender,
// as a work around without the need to modify cosmwasm valiation logic
string sender_address = 9 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
}

// MsgInstantiateContractResponse return instantiation result data
Expand All @@ -92,7 +85,7 @@ message MsgInstantiateContractResponse {

message MsgExecuteContract {
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "sender_address";
option (cosmos.msg.v1.signer) = "sender";
option (amino.name) = "wasm/MsgExecuteContract";

// sender is the canonical address of the sender
Expand All @@ -115,7 +108,6 @@ message MsgExecuteContract {
// used internally for encryption, should always be empty in a signed
// transaction
bytes callback_sig = 6 [ (gogoproto.customname) = "CallbackSig" ];
string sender_address = 7;
}

// MsgExecuteContractResponse returns execution result data.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package secret.compute.v1beta1;
package secret.compute.v1;

import "gogoproto/gogo.proto";
import "secret/compute/v1beta1/types.proto";
Expand Down Expand Up @@ -169,4 +169,4 @@ message QueryContractHistoryResponse {

repeated ContractCodeHistoryEntry entries = 1
[ (gogoproto.nullable) = false ];
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package secret.compute.v1beta1;
package secret.compute.v1;

import "gogoproto/gogo.proto";

Expand Down Expand Up @@ -107,4 +107,4 @@ message ContractCodeHistoryEntry {
// Updated Tx position when the operation was executed.
AbsoluteTxPosition updated = 3;
bytes msg = 4;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package secret.registration.v1beta1;
package secret.registration.v1;

import "gogoproto/gogo.proto";
import "secret/registration/v1beta1/types.proto";
Expand All @@ -14,4 +14,4 @@ message GenesisState {
[ (gogoproto.jsontag) = "reg_info" ];
MasterKey node_exch_master_key = 2 [ (gogoproto.jsontag) = "node_exch_key" ];
MasterKey io_master_key = 3 [ (gogoproto.jsontag) = "io_exch_key" ];
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
syntax = "proto3";
package secret.registration.v1beta1;
package secret.registration.v1;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/scrtlabs/SecretNetwork/x/registration/internal/types";
option (gogoproto.goproto_getters_all) = false;
Expand All @@ -20,19 +18,13 @@ service Msg {
message RaAuthenticate {
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "sender";

// bytes sender = 1 [ (gogoproto.casttype) =
// "github.com/cosmos/cosmos-sdk/types.AccAddress" ];
string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
bytes sender = 1 [ (gogoproto.casttype) =
"github.com/cosmos/cosmos-sdk/types.AccAddress" ];
bytes certificate = 2 [
(gogoproto.casttype) = "github.com/scrtlabs/SecretNetwork/x/registration/"
"remote_attestation.Certificate",
(gogoproto.jsontag) = "ra_cert"
];
// string sender_address = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString"
// ];
bytes sender_addr = 3 [ (gogoproto.casttype) =
"github.com/cosmos/cosmos-sdk/types.AccAddress" ];
}

message RaAuthenticateResponse {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package secret.registration.v1beta1;
package secret.registration.v1;

import "gogoproto/gogo.proto";
import "google/protobuf/empty.proto";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package secret.registration.remote_attestation.v1beta1;
package secret.registration.remote_attestation.v1;

import "gogoproto/gogo.proto";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package secret.registration.v1beta1;
package secret.registration.v1;

import "gogoproto/gogo.proto";

Expand Down
4 changes: 0 additions & 4 deletions packages/stores/src/account/secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ export class SecretAccountImpl {
? {
type: this.msgOpts.executeSecretWasm.type,
value: {
sender_address: this.base.bech32Address,
sender: Buffer.from(
Bech32Address.fromBech32(this.base.bech32Address).address
).toString("base64"),
Expand Down Expand Up @@ -269,7 +268,6 @@ export class SecretAccountImpl {
value: MsgExecuteContractV1.encode(
MsgExecuteContractV1.fromPartial({
sender: Buffer.from(msg.value.sender, "base64"),
senderAddress: msg.value.sender_address,
contract: Buffer.from(msg.value.contract, "base64"),
msg: Buffer.from(msg.value.msg, "base64"),
sentFunds: msg.value.sent_funds,
Expand Down Expand Up @@ -340,7 +338,6 @@ export class SecretAccountImpl {
? {
type: this.msgOpts.executeSecretWasm.type,
value: {
sender_address: this.base.bech32Address,
sender: Buffer.from(
Bech32Address.fromBech32(this.base.bech32Address).address
).toString("base64"),
Expand Down Expand Up @@ -372,7 +369,6 @@ export class SecretAccountImpl {
value: MsgExecuteContractV1.encode(
MsgExecuteContractV1.fromPartial({
sender: Buffer.from(msg.value.sender, "base64"),
senderAddress: msg.value.sender_address,
contract: Buffer.from(msg.value.contract, "base64"),
msg: Buffer.from(msg.value.msg, "base64"),
sentFunds: msg.value.sent_funds,
Expand Down

0 comments on commit 385c003

Please sign in to comment.