Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "persistenceonejs",
"version": "3.0.1",
"version": "3.0.2",
"description": "Client side JS libraries for persistenceSDK transaction generation, signing and broadcasting.",
"main": "main/index.js",
"module": "module/index.js",
Expand Down
38 changes: 34 additions & 4 deletions proto/cosmwasm/wasm/v1/authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@ package cosmwasm.wasm.v1;
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmwasm/wasm/v1/types.proto";
import "google/protobuf/any.proto";
import "amino/amino.proto";

option go_package = "github.com/CosmWasm/wasmd/x/wasm/types";
option (gogoproto.goproto_getters_all) = false;

// StoreCodeAuthorization defines authorization for wasm code upload.
// Since: wasmd 0.42
message StoreCodeAuthorization {
option (amino.name) = "wasm/StoreCodeAuthorization";
option (cosmos_proto.implements_interface) =
"cosmos.authz.v1beta1.Authorization";

// Grants for code upload
repeated CodeGrant grants = 1
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ];
}

// ContractExecutionAuthorization defines authorization for wasm execute.
// Since: wasmd 0.30
message ContractExecutionAuthorization {
Expand All @@ -34,11 +47,23 @@ message ContractMigrationAuthorization {
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ];
}

// CodeGrant a granted permission for a single code
message CodeGrant {
// CodeHash is the unique identifier created by wasmvm
// Wildcard "*" is used to specify any kind of grant.
bytes code_hash = 1;

// InstantiatePermission is the superset access control to apply
// on contract creation.
// Optional
AccessConfig instantiate_permission = 2;
}

// ContractGrant a granted permission for a single contract
// Since: wasmd 0.30
message ContractGrant {
// Contract is the bech32 address of the smart contract
string contract = 1;
string contract = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];

// Limit defines execution limits that are enforced and updated when the grant
// is applied. When the limit lapsed the grant is removed.
Expand Down Expand Up @@ -75,7 +100,8 @@ message MaxFundsLimit {
repeated cosmos.base.v1beta1.Coin amounts = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand All @@ -93,7 +119,8 @@ message CombinedLimit {
repeated cosmos.base.v1beta1.Coin amounts = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand Down Expand Up @@ -127,5 +154,8 @@ message AcceptedMessagesFilter {
"cosmwasm.wasm.v1.ContractAuthzFilterX";

// Messages is the list of raw contract messages
repeated bytes messages = 1 [ (gogoproto.casttype) = "RawContractMessage" ];
repeated bytes messages = 1 [
(gogoproto.casttype) = "RawContractMessage",
(amino.encoding) = "inline_json"
];
}
4 changes: 3 additions & 1 deletion proto/cosmwasm/wasm/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package cosmwasm.wasm.v1;
import "gogoproto/gogo.proto";
import "cosmwasm/wasm/v1/types.proto";
import "amino/amino.proto";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/CosmWasm/wasmd/x/wasm/types";

Expand Down Expand Up @@ -40,7 +41,8 @@ message Code {

// Contract struct encompasses ContractAddress, ContractInfo, and ContractState
message Contract {
string contract_address = 1;
string contract_address = 1
[ (cosmos_proto.scalar) = "cosmos.AddressString" ];
ContractInfo contract_info = 2
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ];
repeated Model contract_state = 3
Expand Down
3 changes: 3 additions & 0 deletions proto/cosmwasm/wasm/v1/ibc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ message MsgIBCSendResponse {
uint64 sequence = 1;
}

// MsgIBCWriteAcknowledgementResponse
message MsgIBCWriteAcknowledgementResponse {}

// MsgIBCCloseChannel port and channel need to be owned by the contract
message MsgIBCCloseChannel {
string channel = 2 [ (gogoproto.moretags) = "yaml:\"source_channel\"" ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ message StoreCodeProposal {
// Description is a human readable text
string description = 2;
// RunAs is the address that is passed to the contract's environment as sender
string run_as = 3;
string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// WASMByteCode can be raw or gzip compressed
bytes wasm_byte_code = 4 [ (gogoproto.customname) = "WASMByteCode" ];
// Used in v1beta1
Expand Down Expand Up @@ -59,20 +59,24 @@ message InstantiateContractProposal {
// Description is a human readable text
string description = 2;
// RunAs is the address that is passed to the contract's environment as sender
string run_as = 3;
string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Admin is an optional address that can execute migrations
string admin = 4;
string admin = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// CodeID is the reference to the stored WASM code
uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ];
// Label is optional metadata to be stored with a constract instance.
// Label is optional metadata to be stored with a contract instance.
string label = 6;
// Msg json encoded message to be passed to the contract on instantiation
bytes msg = 7 [ (gogoproto.casttype) = "RawContractMessage" ];
bytes msg = 7 [
(gogoproto.casttype) = "RawContractMessage",
(amino.encoding) = "inline_json"
];
// Funds coins that are transferred to the contract on instantiation
repeated cosmos.base.v1beta1.Coin funds = 8 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand All @@ -89,21 +93,25 @@ message InstantiateContract2Proposal {
string title = 1;
// Description is a human readable text
string description = 2;
// RunAs is the address that is passed to the contract's enviroment as sender
string run_as = 3;
// RunAs is the address that is passed to the contract's environment as sender
string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Admin is an optional address that can execute migrations
string admin = 4;
string admin = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// CodeID is the reference to the stored WASM code
uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ];
// Label is optional metadata to be stored with a constract instance.
// Label is optional metadata to be stored with a contract instance.
string label = 6;
// Msg json encode message to be passed to the contract on instantiation
bytes msg = 7 [ (gogoproto.casttype) = "RawContractMessage" ];
bytes msg = 7 [
(gogoproto.casttype) = "RawContractMessage",
(amino.encoding) = "inline_json"
];
// Funds coins that are transferred to the contract on instantiation
repeated cosmos.base.v1beta1.Coin funds = 8 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
// Salt is an arbitrary value provided by the sender. Size can be 1 to 64.
bytes salt = 9;
Expand All @@ -128,11 +136,14 @@ message MigrateContractProposal {
// Note: skipping 3 as this was previously used for unneeded run_as

// Contract is the address of the smart contract
string contract = 4;
string contract = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// CodeID references the new WASM code
uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ];
// Msg json encoded message to be passed to the contract on migration
bytes msg = 6 [ (gogoproto.casttype) = "RawContractMessage" ];
bytes msg = 6 [
(gogoproto.casttype) = "RawContractMessage",
(amino.encoding) = "inline_json"
];
}

// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
Expand All @@ -149,9 +160,12 @@ message SudoContractProposal {
// Description is a human readable text
string description = 2;
// Contract is the address of the smart contract
string contract = 3;
string contract = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Msg json encoded message to be passed to the contract as sudo
bytes msg = 4 [ (gogoproto.casttype) = "RawContractMessage" ];
bytes msg = 4 [
(gogoproto.casttype) = "RawContractMessage",
(amino.encoding) = "inline_json"
];
}

// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
Expand All @@ -168,16 +182,20 @@ message ExecuteContractProposal {
// Description is a human readable text
string description = 2;
// RunAs is the address that is passed to the contract's environment as sender
string run_as = 3;
string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Contract is the address of the smart contract
string contract = 4;
string contract = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Msg json encoded message to be passed to the contract as execute
bytes msg = 5 [ (gogoproto.casttype) = "RawContractMessage" ];
bytes msg = 5 [
(gogoproto.casttype) = "RawContractMessage",
(amino.encoding) = "inline_json"
];
// Funds coins that are transferred to the contract on instantiation
repeated cosmos.base.v1beta1.Coin funds = 6 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand All @@ -195,9 +213,12 @@ message UpdateAdminProposal {
// Description is a human readable text
string description = 2;
// NewAdmin address to be set
string new_admin = 3 [ (gogoproto.moretags) = "yaml:\"new_admin\"" ];
string new_admin = 3 [
(gogoproto.moretags) = "yaml:\"new_admin\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
];
// Contract is the address of the smart contract
string contract = 4;
string contract = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
}

// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
Expand All @@ -214,7 +235,7 @@ message ClearAdminProposal {
// Description is a human readable text
string description = 2;
// Contract is the address of the smart contract
string contract = 3;
string contract = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
}

// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for
Expand All @@ -227,9 +248,9 @@ message PinCodesProposal {
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

// Title is a short summary
string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ];
string title = 1;
// Description is a human readable text
string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ];
string description = 2;
// CodeIDs references the new WASM codes
repeated uint64 code_ids = 3 [
(gogoproto.customname) = "CodeIDs",
Expand All @@ -247,9 +268,9 @@ message UnpinCodesProposal {
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";

// Title is a short summary
string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ];
string title = 1;
// Description is a human readable text
string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ];
string description = 2;
// CodeIDs references the WASM codes
repeated uint64 code_ids = 3 [
(gogoproto.customname) = "CodeIDs",
Expand Down Expand Up @@ -300,7 +321,7 @@ message StoreAndInstantiateContractProposal {
// Description is a human readable text
string description = 2;
// RunAs is the address that is passed to the contract's environment as sender
string run_as = 3;
string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// WASMByteCode can be raw or gzip compressed
bytes wasm_byte_code = 4 [ (gogoproto.customname) = "WASMByteCode" ];
// InstantiatePermission to apply on contract creation, optional
Expand All @@ -309,15 +330,19 @@ message StoreAndInstantiateContractProposal {
bool unpin_code = 6;
// Admin is an optional address that can execute migrations
string admin = 7;
// Label is optional metadata to be stored with a constract instance.
// Label is optional metadata to be stored with a contract instance.
string label = 8;
// Msg json encoded message to be passed to the contract on instantiation
bytes msg = 9 [ (gogoproto.casttype) = "RawContractMessage" ];
bytes msg = 9 [
(gogoproto.casttype) = "RawContractMessage",
(amino.encoding) = "inline_json"
];
// Funds coins that are transferred to the contract on instantiation
repeated cosmos.base.v1beta1.Coin funds = 10 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
// Source is the URL where the code is hosted
string source = 11;
Expand Down
Loading