Files
wasmd/proto/cosmwasm/wasm/v1/authz.proto
Alexander Peters cd66f786b2 SDK upgrade to v0.50 (branch) (#1611)
* Start implementation

* Add implementation + some e2e test

* Fix lint

* Squashed: sdk upgrade to v0.50

* rebuild protos with newer proto builder

(cherry picked from commit fd8f4c1d0d2163f0a504356c16cd2d250f6218f3)

* update ibc-go

(cherry picked from commit fb8667960fbeedb7d242baa644572986a154d4b6)

* bump cosmos-sdk and ibc in the v50 branch (#1616)

* tidy

* upgade ibc

* remove the toolchain command

* Bump sdk version

* Use correct bech32 prefix

* Bump SDK

* Enable fraud system test again

* Fix genesis param name

* Fix import/export simulations

* set log level for benchmarks

(cherry picked from commit 1cfb93008c596db62d22aba882f37a469546bfb9)

* Apply review comments

* Remove gov beta1 helpers

* Bump sdk version to latest in branch

* Fix linter

* Setup mergify for main

* Update mergify for better branch name

---------

Co-authored-by: Pino' Surace <pino.surace@live.it>
Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com>
2023-09-25 10:42:35 +02:00

157 lines
5.5 KiB
Protocol Buffer

syntax = "proto3";
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 {
option (amino.name) = "wasm/ContractExecutionAuthorization";
option (cosmos_proto.implements_interface) =
"cosmos.authz.v1beta1.Authorization";
// Grants for contract executions
repeated ContractGrant grants = 1
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ];
}
// ContractMigrationAuthorization defines authorization for wasm contract
// migration. Since: wasmd 0.30
message ContractMigrationAuthorization {
option (amino.name) = "wasm/ContractMigrationAuthorization";
option (cosmos_proto.implements_interface) =
"cosmos.authz.v1beta1.Authorization";
// Grants for contract migrations
repeated ContractGrant grants = 1
[ (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 [ (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.
google.protobuf.Any limit = 2 [ (cosmos_proto.accepts_interface) =
"cosmwasm.wasm.v1.ContractAuthzLimitX" ];
// Filter define more fine-grained control on the message payload passed
// to the contract in the operation. When no filter applies on execution, the
// operation is prohibited.
google.protobuf.Any filter = 3
[ (cosmos_proto.accepts_interface) =
"cosmwasm.wasm.v1.ContractAuthzFilterX" ];
}
// MaxCallsLimit limited number of calls to the contract. No funds transferable.
// Since: wasmd 0.30
message MaxCallsLimit {
option (amino.name) = "wasm/MaxCallsLimit";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzLimitX";
// Remaining number that is decremented on each execution
uint64 remaining = 1;
}
// MaxFundsLimit defines the maximal amounts that can be sent to the contract.
// Since: wasmd 0.30
message MaxFundsLimit {
option (amino.name) = "wasm/MaxFundsLimit";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzLimitX";
// Amounts is the maximal amount of tokens transferable to the contract.
repeated cosmos.base.v1beta1.Coin amounts = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
// CombinedLimit defines the maximal amounts that can be sent to a contract and
// the maximal number of calls executable. Both need to remain >0 to be valid.
// Since: wasmd 0.30
message CombinedLimit {
option (amino.name) = "wasm/CombinedLimit";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzLimitX";
// Remaining number that is decremented on each execution
uint64 calls_remaining = 1;
// Amounts is the maximal amount of tokens transferable to the contract.
repeated cosmos.base.v1beta1.Coin amounts = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
// AllowAllMessagesFilter is a wildcard to allow any type of contract payload
// message.
// Since: wasmd 0.30
message AllowAllMessagesFilter {
option (amino.name) = "wasm/AllowAllMessagesFilter";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzFilterX";
}
// AcceptedMessageKeysFilter accept only the specific contract message keys in
// the json object to be executed.
// Since: wasmd 0.30
message AcceptedMessageKeysFilter {
option (amino.name) = "wasm/AcceptedMessageKeysFilter";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzFilterX";
// Messages is the list of unique keys
repeated string keys = 1;
}
// AcceptedMessagesFilter accept only the specific raw contract messages to be
// executed.
// Since: wasmd 0.30
message AcceptedMessagesFilter {
option (amino.name) = "wasm/AcceptedMessagesFilter";
option (cosmos_proto.implements_interface) =
"cosmwasm.wasm.v1.ContractAuthzFilterX";
// Messages is the list of raw contract messages
repeated bytes messages = 1 [ (gogoproto.casttype) = "RawContractMessage" ];
}