diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md
index 26057e216e..0b2a44eb15 100644
--- a/docs/proto/proto-docs.md
+++ b/docs/proto/proto-docs.md
@@ -8,6 +8,7 @@
- [AbsoluteTxPosition](#cosmwasm.wasm.v1.AbsoluteTxPosition)
- [AccessConfig](#cosmwasm.wasm.v1.AccessConfig)
- [AccessTypeParam](#cosmwasm.wasm.v1.AccessTypeParam)
+ - [AllowedContract](#cosmwasm.wasm.v1.AllowedContract)
- [CodeInfo](#cosmwasm.wasm.v1.CodeInfo)
- [ContractCodeHistoryEntry](#cosmwasm.wasm.v1.ContractCodeHistoryEntry)
- [ContractInfo](#cosmwasm.wasm.v1.ContractInfo)
@@ -138,6 +139,25 @@ AccessTypeParam
+
+
+### AllowedContract
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `contract_address` | [string](#string) | | required |
+| `allowed_messages` | [string](#string) | repeated | optional |
+| `once` | [bool](#bool) | | optional
+
+if true, the contract is only allowed to be called once |
+
+
+
+
+
+
### CodeInfo
@@ -203,8 +223,7 @@ the provided method on behalf of the granter's account.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| `target_contracts` | [string](#string) | repeated | Msg, identified by it's type URL, to grant unrestricted permissions to execute |
-| `allowed_functions` | [string](#string) | repeated | |
+| `allowed_contracts` | [AllowedContract](#cosmwasm.wasm.v1.AllowedContract) | repeated | |
diff --git a/proto/cosmwasm/wasm/v1/types.proto b/proto/cosmwasm/wasm/v1/types.proto
index 84cc385574..5cf6b6bdd4 100644
--- a/proto/cosmwasm/wasm/v1/types.proto
+++ b/proto/cosmwasm/wasm/v1/types.proto
@@ -14,11 +14,19 @@ option (gogoproto.equal_all) = true;
message ExecuteContractAuthorization {
option (cosmos_proto.implements_interface) = "Authorization";
- // Msg, identified by it's type URL, to grant unrestricted permissions to execute
- repeated string target_contracts = 1;
- repeated string allowed_functions = 2;
+ repeated AllowedContract allowed_contracts = 1;
}
+message AllowedContract {
+ // required
+ string contract_address = 1;
+
+ // optional
+ repeated string allowed_messages = 2;
+
+ // optional
+ bool once = 3; // if true, the contract is only allowed to be called once
+}
// AccessType permission types
enum AccessType {
diff --git a/x/wasm/types/types.go b/x/wasm/types/types.go
index b1d616353e..28163137ef 100644
--- a/x/wasm/types/types.go
+++ b/x/wasm/types/types.go
@@ -1,6 +1,8 @@
package types
import (
+ "encoding/base64"
+ "encoding/json"
"fmt"
"reflect"
@@ -27,9 +29,18 @@ var (
_ authztypes.Authorization = &ExecuteContractAuthorization{}
)
+func NewAllowedContract(contractAddr sdk.AccAddress, allowedMessages []string) *AllowedContract {
+ return &AllowedContract{
+ ContractAddress: contractAddr.String(),
+ AllowedMessages: allowedMessages,
+ }
+}
+
// NewExecuteContractAuthorization creates a new ExecuteContractAuthorization object.
-func NewExecuteContractAuthorization(targetContracts, AllowedFunctions []string) *ExecuteContractAuthorization {
- return &ExecuteContractAuthorization{}
+func NewExecuteContractAuthorization(allowedContracts []*AllowedContract) *ExecuteContractAuthorization {
+ return &ExecuteContractAuthorization{
+ AllowedContracts: allowedContracts,
+ }
}
// MsgTypeURL implements Authorization.MsgTypeURL.
@@ -39,11 +50,81 @@ func (a ExecuteContractAuthorization) MsgTypeURL() string {
// Accept implements Authorization.Accept.
func (a ExecuteContractAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (authztypes.AcceptResponse, error) {
- return authztypes.AcceptResponse{Accept: true}, nil
+ exec, ok := msg.(*MsgExecuteContract)
+ if !ok {
+ return authztypes.AcceptResponse{}, sdkerrors.ErrInvalidType.Wrap("type mismatch")
+ }
+
+ update := []*AllowedContract{}
+ for _, allowedContract := range a.AllowedContracts {
+ if allowedContract.ContractAddress == exec.Contract {
+ // if the allowed contract contains the contract address and there aren't allowed messages,
+ // then we accept the message.
+ if len(allowedContract.AllowedMessages) == 0 && !allowedContract.Once {
+ // if the permission is for multiple executions, we accept the message and keep
+ // it in the update array
+ update = append(update, allowedContract)
+ continue
+ } else if len(allowedContract.AllowedMessages) > 0 {
+ // otherwise we exclude it from the update array
+ continue
+ }
+
+ // NOTE: exec.Msg is base64 encoded, so we need to decode it first
+ // If there are allowedMessages then decode the call and check if the message is allowed
+ callBz := []byte{}
+ if _, err := base64.RawStdEncoding.Decode(exec.Msg.Bytes(), callBz); err != nil {
+ return authztypes.AcceptResponse{}, sdkerrors.Wrap(err, "failed to decode base64")
+ }
+
+ messageName := map[string]interface{}{}
+ if err := json.Unmarshal(callBz, &messageName); err != nil {
+ return authztypes.AcceptResponse{}, sdkerrors.Wrap(err, "failed to unmarshal json")
+ }
+
+ for _, allowedFunction := range allowedContract.AllowedMessages {
+ if len(messageName) != 1 {
+ return authztypes.AcceptResponse{}, sdkerrors.ErrInvalidRequest.Wrap("too many message calls in the same transaction")
+ }
+ for k := range messageName {
+ if allowedFunction == k {
+ if allowedContract.Once {
+ continue
+ } else {
+ update = append(update, allowedContract)
+ continue
+ }
+ }
+ }
+ }
+ } else {
+ // if the allowed contract doesn't contain the contract address, we add it to the update array
+ update = append(update, allowedContract)
+ }
+ }
+ if len(update) == 0 {
+ return authztypes.AcceptResponse{Accept: true, Delete: true}, nil
+ }
+ return authztypes.AcceptResponse{Accept: true, Updated: NewExecuteContractAuthorization(update)}, nil
}
// ValidateBasic implements Authorization.ValidateBasic.
func (a ExecuteContractAuthorization) ValidateBasic() error {
+ for _, allowedContract := range a.AllowedContracts {
+ if err := allowedContract.ValidateBasic(); err != nil {
+ return sdkerrors.Wrap(err, "allowed contract")
+ }
+ }
+ return nil
+}
+
+func (a AllowedContract) ValidateBasic() error {
+ if len(a.ContractAddress) == 0 {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "contract address cannot be empty")
+ }
+ if _, err := sdk.AccAddressFromBech32(a.ContractAddress); err != nil {
+ return sdkerrors.Wrap(err, "contract address")
+ }
return nil
}
diff --git a/x/wasm/types/types.pb.go b/x/wasm/types/types.pb.go
index eed6df1f1c..3d68f2ec16 100644
--- a/x/wasm/types/types.pb.go
+++ b/x/wasm/types/types.pb.go
@@ -98,9 +98,7 @@ func (ContractCodeHistoryOperationType) EnumDescriptor() ([]byte, []int) {
// ExecuteContractAuthorization gives the grantee unrestricted permissions to execute
// the provided method on behalf of the granter's account.
type ExecuteContractAuthorization struct {
- // Msg, identified by it's type URL, to grant unrestricted permissions to execute
- TargetContracts []string `protobuf:"bytes,1,rep,name=target_contracts,json=targetContracts,proto3" json:"target_contracts,omitempty"`
- AllowedFunctions []string `protobuf:"bytes,2,rep,name=allowed_functions,json=allowedFunctions,proto3" json:"allowed_functions,omitempty"`
+ AllowedContracts []*AllowedContract `protobuf:"bytes,1,rep,name=allowed_contracts,json=allowedContracts,proto3" json:"allowed_contracts,omitempty"`
}
func (m *ExecuteContractAuthorization) Reset() { *m = ExecuteContractAuthorization{} }
@@ -136,6 +134,48 @@ func (m *ExecuteContractAuthorization) XXX_DiscardUnknown() {
var xxx_messageInfo_ExecuteContractAuthorization proto.InternalMessageInfo
+type AllowedContract struct {
+ // required
+ ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
+ // optional
+ AllowedMessages []string `protobuf:"bytes,2,rep,name=allowed_messages,json=allowedMessages,proto3" json:"allowed_messages,omitempty"`
+ // optional
+ Once bool `protobuf:"varint,3,opt,name=once,proto3" json:"once,omitempty"`
+}
+
+func (m *AllowedContract) Reset() { *m = AllowedContract{} }
+func (m *AllowedContract) String() string { return proto.CompactTextString(m) }
+func (*AllowedContract) ProtoMessage() {}
+func (*AllowedContract) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e6155d98fa173e02, []int{1}
+}
+func (m *AllowedContract) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *AllowedContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_AllowedContract.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *AllowedContract) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AllowedContract.Merge(m, src)
+}
+func (m *AllowedContract) XXX_Size() int {
+ return m.Size()
+}
+func (m *AllowedContract) XXX_DiscardUnknown() {
+ xxx_messageInfo_AllowedContract.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AllowedContract proto.InternalMessageInfo
+
// AccessTypeParam
type AccessTypeParam struct {
Value AccessType `protobuf:"varint,1,opt,name=value,proto3,enum=cosmwasm.wasm.v1.AccessType" json:"value,omitempty" yaml:"value"`
@@ -145,7 +185,7 @@ func (m *AccessTypeParam) Reset() { *m = AccessTypeParam{} }
func (m *AccessTypeParam) String() string { return proto.CompactTextString(m) }
func (*AccessTypeParam) ProtoMessage() {}
func (*AccessTypeParam) Descriptor() ([]byte, []int) {
- return fileDescriptor_e6155d98fa173e02, []int{1}
+ return fileDescriptor_e6155d98fa173e02, []int{2}
}
func (m *AccessTypeParam) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -184,7 +224,7 @@ func (m *AccessConfig) Reset() { *m = AccessConfig{} }
func (m *AccessConfig) String() string { return proto.CompactTextString(m) }
func (*AccessConfig) ProtoMessage() {}
func (*AccessConfig) Descriptor() ([]byte, []int) {
- return fileDescriptor_e6155d98fa173e02, []int{2}
+ return fileDescriptor_e6155d98fa173e02, []int{3}
}
func (m *AccessConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -223,7 +263,7 @@ type Params struct {
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
- return fileDescriptor_e6155d98fa173e02, []int{3}
+ return fileDescriptor_e6155d98fa173e02, []int{4}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -266,7 +306,7 @@ func (m *CodeInfo) Reset() { *m = CodeInfo{} }
func (m *CodeInfo) String() string { return proto.CompactTextString(m) }
func (*CodeInfo) ProtoMessage() {}
func (*CodeInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_e6155d98fa173e02, []int{4}
+ return fileDescriptor_e6155d98fa173e02, []int{5}
}
func (m *CodeInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -319,7 +359,7 @@ func (m *ContractInfo) Reset() { *m = ContractInfo{} }
func (m *ContractInfo) String() string { return proto.CompactTextString(m) }
func (*ContractInfo) ProtoMessage() {}
func (*ContractInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_e6155d98fa173e02, []int{5}
+ return fileDescriptor_e6155d98fa173e02, []int{6}
}
func (m *ContractInfo) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -362,7 +402,7 @@ func (m *ContractCodeHistoryEntry) Reset() { *m = ContractCodeHistoryEnt
func (m *ContractCodeHistoryEntry) String() string { return proto.CompactTextString(m) }
func (*ContractCodeHistoryEntry) ProtoMessage() {}
func (*ContractCodeHistoryEntry) Descriptor() ([]byte, []int) {
- return fileDescriptor_e6155d98fa173e02, []int{6}
+ return fileDescriptor_e6155d98fa173e02, []int{7}
}
func (m *ContractCodeHistoryEntry) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -405,7 +445,7 @@ func (m *AbsoluteTxPosition) Reset() { *m = AbsoluteTxPosition{} }
func (m *AbsoluteTxPosition) String() string { return proto.CompactTextString(m) }
func (*AbsoluteTxPosition) ProtoMessage() {}
func (*AbsoluteTxPosition) Descriptor() ([]byte, []int) {
- return fileDescriptor_e6155d98fa173e02, []int{7}
+ return fileDescriptor_e6155d98fa173e02, []int{8}
}
func (m *AbsoluteTxPosition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -446,7 +486,7 @@ func (m *Model) Reset() { *m = Model{} }
func (m *Model) String() string { return proto.CompactTextString(m) }
func (*Model) ProtoMessage() {}
func (*Model) Descriptor() ([]byte, []int) {
- return fileDescriptor_e6155d98fa173e02, []int{8}
+ return fileDescriptor_e6155d98fa173e02, []int{9}
}
func (m *Model) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -479,6 +519,7 @@ func init() {
proto.RegisterEnum("cosmwasm.wasm.v1.AccessType", AccessType_name, AccessType_value)
proto.RegisterEnum("cosmwasm.wasm.v1.ContractCodeHistoryOperationType", ContractCodeHistoryOperationType_name, ContractCodeHistoryOperationType_value)
proto.RegisterType((*ExecuteContractAuthorization)(nil), "cosmwasm.wasm.v1.ExecuteContractAuthorization")
+ proto.RegisterType((*AllowedContract)(nil), "cosmwasm.wasm.v1.AllowedContract")
proto.RegisterType((*AccessTypeParam)(nil), "cosmwasm.wasm.v1.AccessTypeParam")
proto.RegisterType((*AccessConfig)(nil), "cosmwasm.wasm.v1.AccessConfig")
proto.RegisterType((*Params)(nil), "cosmwasm.wasm.v1.Params")
@@ -492,85 +533,87 @@ func init() {
func init() { proto.RegisterFile("cosmwasm/wasm/v1/types.proto", fileDescriptor_e6155d98fa173e02) }
var fileDescriptor_e6155d98fa173e02 = []byte{
- // 1243 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6f, 0x1b, 0xc5,
- 0x17, 0xf7, 0xda, 0xce, 0x0f, 0x4f, 0xd3, 0x76, 0x33, 0xdf, 0xe4, 0x5b, 0xc7, 0x04, 0xdb, 0x5d,
- 0x0a, 0xa4, 0xbf, 0x6c, 0x1a, 0x10, 0xa0, 0x1c, 0x2a, 0xf9, 0xc7, 0xb6, 0xd9, 0x88, 0xd8, 0xd6,
- 0xd8, 0xa5, 0x0a, 0x52, 0xb5, 0x1a, 0xef, 0x4e, 0x9c, 0x55, 0xd7, 0x3b, 0xd6, 0xce, 0x38, 0xb5,
- 0xfb, 0x17, 0x40, 0x24, 0x24, 0x6e, 0x70, 0x89, 0x84, 0x00, 0xa1, 0xfe, 0x01, 0xbd, 0x72, 0x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5, 0x68,
+ 0xf2, 0xea, 0xc1, 0x61, 0xe6, 0xed, 0xb3, 0x7c, 0xef, 0x38, 0x4d, 0x1f, 0x73, 0x32, 0xb1, 0xfb,
+ 0x5b, 0x7a, 0x59, 0xaf, 0x19, 0x35, 0x35, 0x36, 0x99, 0xfb, 0x5b, 0xc4, 0x23, 0xcc, 0x61, 0xc9,
+ 0x78, 0xd0, 0xac, 0xc2, 0xd6, 0xe3, 0x3f, 0x52, 0x91, 0x87, 0x47, 0x29, 0xe5, 0xf1, 0x51, 0x4a,
+ 0x79, 0x72, 0x94, 0x52, 0x7e, 0x3f, 0x4a, 0x29, 0x5f, 0x3d, 0x4d, 0x45, 0x9e, 0x3c, 0x4d, 0x45,
+ 0x7e, 0x7d, 0x9a, 0x8a, 0x7c, 0xfa, 0xd6, 0xd8, 0x3b, 0x28, 0x52, 0xd6, 0xbe, 0x13, 0x7e, 0x37,
+ 0xda, 0xb9, 0x9e, 0xfc, 0x7e, 0x14, 0x1f, 0x8f, 0x8d, 0x69, 0x31, 0xd5, 0xde, 0xfd, 0x27, 0x00,
+ 0x00, 0xff, 0xff, 0x8a, 0x3c, 0x4a, 0xb6, 0x5d, 0x0a, 0x00, 0x00,
}
func (this *ExecuteContractAuthorization) Equal(that interface{}) bool {
@@ -592,22 +635,49 @@ func (this *ExecuteContractAuthorization) Equal(that interface{}) bool {
} else if this == nil {
return false
}
- if len(this.TargetContracts) != len(that1.TargetContracts) {
+ if len(this.AllowedContracts) != len(that1.AllowedContracts) {
return false
}
- for i := range this.TargetContracts {
- if this.TargetContracts[i] != that1.TargetContracts[i] {
+ for i := range this.AllowedContracts {
+ if !this.AllowedContracts[i].Equal(that1.AllowedContracts[i]) {
return false
}
}
- if len(this.AllowedFunctions) != len(that1.AllowedFunctions) {
+ return true
+}
+func (this *AllowedContract) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*AllowedContract)
+ if !ok {
+ that2, ok := that.(AllowedContract)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.ContractAddress != that1.ContractAddress {
return false
}
- for i := range this.AllowedFunctions {
- if this.AllowedFunctions[i] != that1.AllowedFunctions[i] {
+ if len(this.AllowedMessages) != len(that1.AllowedMessages) {
+ return false
+ }
+ for i := range this.AllowedMessages {
+ if this.AllowedMessages[i] != that1.AllowedMessages[i] {
return false
}
}
+ if this.Once != that1.Once {
+ return false
+ }
return true
}
func (this *AccessTypeParam) Equal(that interface{}) bool {
@@ -870,24 +940,69 @@ func (m *ExecuteContractAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, e
_ = i
var l int
_ = l
- if len(m.AllowedFunctions) > 0 {
- for iNdEx := len(m.AllowedFunctions) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.AllowedFunctions[iNdEx])
- copy(dAtA[i:], m.AllowedFunctions[iNdEx])
- i = encodeVarintTypes(dAtA, i, uint64(len(m.AllowedFunctions[iNdEx])))
+ if len(m.AllowedContracts) > 0 {
+ for iNdEx := len(m.AllowedContracts) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.AllowedContracts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintTypes(dAtA, i, uint64(size))
+ }
i--
- dAtA[i] = 0x12
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *AllowedContract) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AllowedContract) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *AllowedContract) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Once {
+ i--
+ if m.Once {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
}
+ i--
+ dAtA[i] = 0x18
}
- if len(m.TargetContracts) > 0 {
- for iNdEx := len(m.TargetContracts) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.TargetContracts[iNdEx])
- copy(dAtA[i:], m.TargetContracts[iNdEx])
- i = encodeVarintTypes(dAtA, i, uint64(len(m.TargetContracts[iNdEx])))
+ if len(m.AllowedMessages) > 0 {
+ for iNdEx := len(m.AllowedMessages) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.AllowedMessages[iNdEx])
+ copy(dAtA[i:], m.AllowedMessages[iNdEx])
+ i = encodeVarintTypes(dAtA, i, uint64(len(m.AllowedMessages[iNdEx])))
i--
- dAtA[i] = 0xa
+ dAtA[i] = 0x12
}
}
+ if len(m.ContractAddress) > 0 {
+ i -= len(m.ContractAddress)
+ copy(dAtA[i:], m.ContractAddress)
+ i = encodeVarintTypes(dAtA, i, uint64(len(m.ContractAddress)))
+ i--
+ dAtA[i] = 0xa
+ }
return len(dAtA) - i, nil
}
@@ -1263,18 +1378,34 @@ func (m *ExecuteContractAuthorization) Size() (n int) {
}
var l int
_ = l
- if len(m.TargetContracts) > 0 {
- for _, s := range m.TargetContracts {
- l = len(s)
+ if len(m.AllowedContracts) > 0 {
+ for _, e := range m.AllowedContracts {
+ l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
- if len(m.AllowedFunctions) > 0 {
- for _, s := range m.AllowedFunctions {
+ return n
+}
+
+func (m *AllowedContract) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.ContractAddress)
+ if l > 0 {
+ n += 1 + l + sovTypes(uint64(l))
+ }
+ if len(m.AllowedMessages) > 0 {
+ for _, s := range m.AllowedMessages {
l = len(s)
n += 1 + l + sovTypes(uint64(l))
}
}
+ if m.Once {
+ n += 2
+ }
return n
}
@@ -1470,7 +1601,91 @@ func (m *ExecuteContractAuthorization) Unmarshal(dAtA []byte) error {
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field TargetContracts", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field AllowedContracts", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTypes
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTypes
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTypes
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AllowedContracts = append(m.AllowedContracts, &AllowedContract{})
+ if err := m.AllowedContracts[len(m.AllowedContracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTypes(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTypes
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AllowedContract) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTypes
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AllowedContract: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AllowedContract: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -1498,11 +1713,11 @@ func (m *ExecuteContractAuthorization) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.TargetContracts = append(m.TargetContracts, string(dAtA[iNdEx:postIndex]))
+ m.ContractAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field AllowedFunctions", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field AllowedMessages", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -1530,8 +1745,28 @@ func (m *ExecuteContractAuthorization) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.AllowedFunctions = append(m.AllowedFunctions, string(dAtA[iNdEx:postIndex]))
+ m.AllowedMessages = append(m.AllowedMessages, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Once", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTypes
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Once = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])