diff --git a/app/app.go b/app/app.go
index 1154264a..9aae2a22 100644
--- a/app/app.go
+++ b/app/app.go
@@ -32,6 +32,7 @@ import (
"github.com/ixofoundation/ixo-blockchain/v2/app/keepers"
"github.com/ixofoundation/ixo-blockchain/v2/app/upgrades"
v2 "github.com/ixofoundation/ixo-blockchain/v2/app/upgrades/v2"
+ v3 "github.com/ixofoundation/ixo-blockchain/v2/app/upgrades/v3"
"github.com/ixofoundation/ixo-blockchain/v2/lib/ixo"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
@@ -52,7 +53,7 @@ var (
DefaultNodeHome = os.ExpandEnv("$HOME/.ixod")
// scheduled upgrades and forks
- Upgrades = []upgrades.Upgrade{v2.Upgrade}
+ Upgrades = []upgrades.Upgrade{v2.Upgrade, v3.Upgrade}
Forks = []upgrades.Fork{}
// If EnableSpecificWasmProposals is "", and this is "true", then enable all x/wasm proposals.
diff --git a/app/upgrades/v3/README.md b/app/upgrades/v3/README.md
new file mode 100644
index 00000000..1f4007ff
--- /dev/null
+++ b/app/upgrades/v3/README.md
@@ -0,0 +1,3 @@
+# v3
+
+v3 release changes is availabale [here](https://github.com/ixofoundation/ixo-blockchain/releases/tag/v3.0.0).
diff --git a/app/upgrades/v3/constants.go b/app/upgrades/v3/constants.go
new file mode 100644
index 00000000..68eaaacf
--- /dev/null
+++ b/app/upgrades/v3/constants.go
@@ -0,0 +1,16 @@
+package v3
+
+import (
+ store "github.com/cosmos/cosmos-sdk/store/types"
+
+ "github.com/ixofoundation/ixo-blockchain/v2/app/upgrades"
+)
+
+// UpgradeName defines the on-chain upgrade name for the Ixo v3 upgrade.
+const UpgradeName = "v3"
+
+var Upgrade = upgrades.Upgrade{
+ UpgradeName: UpgradeName,
+ CreateUpgradeHandler: CreateUpgradeHandler,
+ StoreUpgrades: store.StoreUpgrades{},
+}
diff --git a/app/upgrades/v3/upgrades.go b/app/upgrades/v3/upgrades.go
new file mode 100644
index 00000000..ddbc3ebe
--- /dev/null
+++ b/app/upgrades/v3/upgrades.go
@@ -0,0 +1,25 @@
+package v3
+
+import (
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ "github.com/cosmos/cosmos-sdk/types/module"
+ upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
+)
+
+func CreateUpgradeHandler(
+ mm *module.Manager,
+ configurator module.Configurator,
+) upgradetypes.UpgradeHandler {
+ return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
+ ctx.Logger().Info("🚀 executing Ixo v3 upgrade 🚀")
+
+ // Run migrations before applying any other state changes.
+ // NOTE: DO NOT PUT ANY STATE CHANGES BEFORE RunMigrations().
+ migrations, err := mm.RunMigrations(ctx, configurator, fromVM)
+ if err != nil {
+ return nil, err
+ }
+
+ return migrations, nil
+ }
+}
diff --git a/docs/core/proto-docs.html b/docs/core/proto-docs.html
index 7541261f..4d1e7879 100644
--- a/docs/core/proto-docs.html
+++ b/docs/core/proto-docs.html
@@ -815,6 +815,30 @@
Table of Contents
MMsgSubmitClaimResponse
+
+ MMsgUpdateCollectionDates
+
+
+
+ MMsgUpdateCollectionDatesResponse
+
+
+
+ MMsgUpdateCollectionPayments
+
+
+
+ MMsgUpdateCollectionPaymentsResponse
+
+
+
+ MMsgUpdateCollectionState
+
+
+
+ MMsgUpdateCollectionStateResponse
+
+
MMsgWithdrawPayment
@@ -942,6 +966,10 @@ Table of Contents
MEntityAccountAuthzCreatedEvent
+
+ MEntityAccountAuthzRevokedEvent
+
+
MEntityAccountCreatedEvent
@@ -1269,6 +1297,14 @@ Table of Contents
MMsgGrantEntityAccountAuthzResponse
+
+ MMsgRevokeEntityAccountAuthz
+
+
+
+ MMsgRevokeEntityAccountAuthzResponse
+
+
MMsgTransferEntity
@@ -4822,7 +4858,7 @@ Collection
string |
|
admin is the account address that will authorize or revoke agents and
-payments (the grantor) |
+payments (the grantor), and can update the collection
@@ -4915,6 +4951,14 @@ Collection
signer address |
+
+ invalidated |
+ uint64 |
+ |
+ invalidated is the number of claims that have been evaluated as invalid
+(internally calculated) |
+
+
@@ -5334,6 +5378,12 @@ EvaluationStatus
|
+
+ INVALIDATED |
+ 4 |
+ |
+
+
@@ -6711,7 +6761,7 @@ MsgEvaluateClaim
collection_id |
string |
|
- claimID is the unique identifier of the claim to make evaluation against |
+ collection_id indicates to which Collection this claim belongs |
@@ -6846,6 +6896,151 @@ MsgSubmitClaimResponse
+ MsgUpdateCollectionDates
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ collection_id |
+ string |
+ |
+ collection_id indicates which Collection to update |
+
+
+
+ start_date |
+ google.protobuf.Timestamp |
+ |
+ startDate is the date after which claims may be submitted |
+
+
+
+ end_date |
+ google.protobuf.Timestamp |
+ |
+ endDate is the date after which no more claims may be submitted (no endDate
+is allowed) |
+
+
+
+ admin_address |
+ string |
+ |
+ admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+
+ MsgUpdateCollectionDatesResponse
+
+
+
+
+
+
+ MsgUpdateCollectionPayments
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ collection_id |
+ string |
+ |
+ collection_id indicates which Collection to update |
+
+
+
+ payments |
+ Payments |
+ |
+ payments is the amount paid for claim submission, evaluation, approval, or
+rejection |
+
+
+
+ admin_address |
+ string |
+ |
+ admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+
+ MsgUpdateCollectionPaymentsResponse
+
+
+
+
+
+
+ MsgUpdateCollectionState
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ collection_id |
+ string |
+ |
+ collection_id indicates which Collection to update |
+
+
+
+ state |
+ CollectionState |
+ |
+ state is the state of this Collection (open, paused, closed) you want to
+update to |
+
+
+
+ admin_address |
+ string |
+ |
+ admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+
+ MsgUpdateCollectionStateResponse
+
+
+
+
+
+
MsgWithdrawPayment
@@ -6984,6 +7179,27 @@ Msg
|
+
+ UpdateCollectionState |
+ MsgUpdateCollectionState |
+ MsgUpdateCollectionStateResponse |
+ |
+
+
+
+ UpdateCollectionDates |
+ MsgUpdateCollectionDates |
+ MsgUpdateCollectionDatesResponse |
+ |
+
+
+
+ UpdateCollectionPayments |
+ MsgUpdateCollectionPayments |
+ MsgUpdateCollectionPaymentsResponse |
+ |
+
+
@@ -7684,7 +7900,7 @@ Entity
relayer_node |
string |
|
- Address of the operator through which the Entity was created |
+ Did of the operator through which the Entity was created |
@@ -7845,7 +8061,7 @@ ixo/entity/v1beta1/event.proto
EntityAccountAuthzCreatedEvent
- EntityAccountCreatedEvent is an event triggered on a entity account creation
+ EntityAccountCreatedEvent is an event triggered on a entity account authz
creation
@@ -7903,6 +8119,65 @@ EntityAccountAuthzCre
+ EntityAccountAuthzRevokedEvent
+
EntityAccountAuthzRevokedEvent is an event triggered on a entity account
authz revocation
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ id |
+ string |
+ |
+ |
+
+
+
+ signer |
+ string |
+ |
+ |
+
+
+
+ account_name |
+ string |
+ |
+ |
+
+
+
+ granter |
+ string |
+ |
+ |
+
+
+
+ grantee |
+ string |
+ |
+ |
+
+
+
+ msg_type_url |
+ string |
+ |
+ |
+
+
+
+
+
+
+
+
+
EntityAccountCreatedEvent
EntityAccountCreatedEvent is an event triggered on a entity account creation
@@ -9943,7 +10218,7 @@ MsgCreateEntity
relayer_node |
string |
|
- Address of the operator through which the Entity was created |
+ Did of the operator through which the Entity was created |
@@ -9997,7 +10272,7 @@ MsgCreateEntity
MsgCreateEntityAccount
- create a module account for an entity, account details will be added as a
linkedEntity on entity iid doc where linkedEntity id is didfragment: did#name
+ create a module account for an entity
@@ -10110,7 +10385,7 @@ MsgGrantEntityAccountAuth
id |
string |
|
- entity id (did) to create account for |
+ entity id (did) which has the account |
@@ -10155,6 +10430,65 @@ MsgGrantEntityAcc
+ MsgRevokeEntityAccountAuthz
+
Revoke an existing authz grant from entity account (as grantor) to recipient
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ id |
+ string |
+ |
+ entity id (did) which has the account |
+
+
+
+ name |
+ string |
+ |
+ name of account |
+
+
+
+ grantee_address |
+ string |
+ |
+ the grantee address for which the authz grant will be revoked |
+
+
+
+ msg_type_url |
+ string |
+ |
+ the msg type url of the grant to be revoked for the specific grantee |
+
+
+
+ owner_address |
+ string |
+ |
+ the owner_address used to sign this transaction. |
+
+
+
+
+
+
+
+
+
+ MsgRevokeEntityAccountAuthzResponse
+
+
+
+
+
+
MsgTransferEntity
@@ -10389,7 +10723,14 @@ Msg
GrantEntityAccountAuthz |
MsgGrantEntityAccountAuthz |
MsgGrantEntityAccountAuthzResponse |
- Create a authz grant from entity account |
+ Create an authz grant from entity account |
+
+
+
+ RevokeEntityAccountAuthz |
+ MsgRevokeEntityAccountAuthz |
+ MsgRevokeEntityAccountAuthzResponse |
+ Revoke an authz grant from entity account |
@@ -10730,7 +11071,7 @@ Token
contract_address |
string |
|
- generated on token intiation through MsgSetupMinter |
+ generated on token initiation |
diff --git a/docs/core/proto-docs.json b/docs/core/proto-docs.json
index b7483156..0360dfd5 100644
--- a/docs/core/proto-docs.json
+++ b/docs/core/proto-docs.json
@@ -4016,6 +4016,11 @@
"name": "DISPUTED",
"number": "3",
"description": ""
+ },
+ {
+ "name": "INVALIDATED",
+ "number": "4",
+ "description": ""
}
]
},
@@ -4285,7 +4290,7 @@
},
{
"name": "admin",
- "description": "admin is the account address that will authorize or revoke agents and\npayments (the grantor)",
+ "description": "admin is the account address that will authorize or revoke agents and\npayments (the grantor), and can update the collection",
"label": "",
"type": "string",
"longType": "string",
@@ -4438,6 +4443,18 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "invalidated",
+ "description": "invalidated is the number of claims that have been evaluated as invalid\n(internally calculated)",
+ "label": "",
+ "type": "uint64",
+ "longType": "uint64",
+ "fullType": "uint64",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
},
@@ -6389,7 +6406,7 @@
},
{
"name": "collection_id",
- "description": "claimID is the unique identifier of the claim to make evaluation against",
+ "description": "collection_id indicates to which Collection this claim belongs",
"label": "",
"type": "string",
"longType": "string",
@@ -6591,6 +6608,195 @@
"extensions": [],
"fields": []
},
+ {
+ "name": "MsgUpdateCollectionDates",
+ "longName": "MsgUpdateCollectionDates",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionDates",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "collection_id",
+ "description": "collection_id indicates which Collection to update",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "start_date",
+ "description": "startDate is the date after which claims may be submitted",
+ "label": "",
+ "type": "Timestamp",
+ "longType": "google.protobuf.Timestamp",
+ "fullType": "google.protobuf.Timestamp",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "end_date",
+ "description": "endDate is the date after which no more claims may be submitted (no endDate\nis allowed)",
+ "label": "",
+ "type": "Timestamp",
+ "longType": "google.protobuf.Timestamp",
+ "fullType": "google.protobuf.Timestamp",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "admin_address",
+ "description": "admin address used to sign this message, validated against Collection Admin",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgUpdateCollectionDatesResponse",
+ "longName": "MsgUpdateCollectionDatesResponse",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": false,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": []
+ },
+ {
+ "name": "MsgUpdateCollectionPayments",
+ "longName": "MsgUpdateCollectionPayments",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionPayments",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "collection_id",
+ "description": "collection_id indicates which Collection to update",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "payments",
+ "description": "payments is the amount paid for claim submission, evaluation, approval, or\nrejection",
+ "label": "",
+ "type": "Payments",
+ "longType": "Payments",
+ "fullType": "ixo.claims.v1beta1.Payments",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "admin_address",
+ "description": "admin address used to sign this message, validated against Collection Admin",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgUpdateCollectionPaymentsResponse",
+ "longName": "MsgUpdateCollectionPaymentsResponse",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": false,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": []
+ },
+ {
+ "name": "MsgUpdateCollectionState",
+ "longName": "MsgUpdateCollectionState",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionState",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "collection_id",
+ "description": "collection_id indicates which Collection to update",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "state",
+ "description": "state is the state of this Collection (open, paused, closed) you want to\nupdate to",
+ "label": "",
+ "type": "CollectionState",
+ "longType": "CollectionState",
+ "fullType": "ixo.claims.v1beta1.CollectionState",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "admin_address",
+ "description": "admin address used to sign this message, validated against Collection Admin",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgUpdateCollectionStateResponse",
+ "longName": "MsgUpdateCollectionStateResponse",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionStateResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": false,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": []
+ },
{
"name": "MsgWithdrawPayment",
"longName": "MsgWithdrawPayment",
@@ -6789,6 +6995,42 @@
"responseLongType": "MsgWithdrawPaymentResponse",
"responseFullType": "ixo.claims.v1beta1.MsgWithdrawPaymentResponse",
"responseStreaming": false
+ },
+ {
+ "name": "UpdateCollectionState",
+ "description": "",
+ "requestType": "MsgUpdateCollectionState",
+ "requestLongType": "MsgUpdateCollectionState",
+ "requestFullType": "ixo.claims.v1beta1.MsgUpdateCollectionState",
+ "requestStreaming": false,
+ "responseType": "MsgUpdateCollectionStateResponse",
+ "responseLongType": "MsgUpdateCollectionStateResponse",
+ "responseFullType": "ixo.claims.v1beta1.MsgUpdateCollectionStateResponse",
+ "responseStreaming": false
+ },
+ {
+ "name": "UpdateCollectionDates",
+ "description": "",
+ "requestType": "MsgUpdateCollectionDates",
+ "requestLongType": "MsgUpdateCollectionDates",
+ "requestFullType": "ixo.claims.v1beta1.MsgUpdateCollectionDates",
+ "requestStreaming": false,
+ "responseType": "MsgUpdateCollectionDatesResponse",
+ "responseLongType": "MsgUpdateCollectionDatesResponse",
+ "responseFullType": "ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse",
+ "responseStreaming": false
+ },
+ {
+ "name": "UpdateCollectionPayments",
+ "description": "",
+ "requestType": "MsgUpdateCollectionPayments",
+ "requestLongType": "MsgUpdateCollectionPayments",
+ "requestFullType": "ixo.claims.v1beta1.MsgUpdateCollectionPayments",
+ "requestStreaming": false,
+ "responseType": "MsgUpdateCollectionPaymentsResponse",
+ "responseLongType": "MsgUpdateCollectionPaymentsResponse",
+ "responseFullType": "ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse",
+ "responseStreaming": false
}
]
}
@@ -7735,7 +7977,7 @@
},
{
"name": "relayer_node",
- "description": "Address of the operator through which the Entity was created",
+ "description": "Did of the operator through which the Entity was created",
"label": "",
"type": "string",
"longType": "string",
@@ -7945,7 +8187,7 @@
"name": "EntityAccountAuthzCreatedEvent",
"longName": "EntityAccountAuthzCreatedEvent",
"fullName": "ixo.entity.v1beta1.EntityAccountAuthzCreatedEvent",
- "description": "EntityAccountCreatedEvent is an event triggered on a entity account creation",
+ "description": "EntityAccountCreatedEvent is an event triggered on a entity account authz\ncreation",
"hasExtensions": false,
"hasFields": true,
"hasOneofs": false,
@@ -8025,6 +8267,90 @@
}
]
},
+ {
+ "name": "EntityAccountAuthzRevokedEvent",
+ "longName": "EntityAccountAuthzRevokedEvent",
+ "fullName": "ixo.entity.v1beta1.EntityAccountAuthzRevokedEvent",
+ "description": "EntityAccountAuthzRevokedEvent is an event triggered on a entity account\nauthz revocation",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "id",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "signer",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "account_name",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "granter",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "grantee",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "msg_type_url",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
{
"name": "EntityAccountCreatedEvent",
"longName": "EntityAccountCreatedEvent",
@@ -10660,7 +10986,7 @@
},
{
"name": "relayer_node",
- "description": "Address of the operator through which the Entity was created",
+ "description": "Did of the operator through which the Entity was created",
"label": "",
"type": "string",
"longType": "string",
@@ -10748,7 +11074,7 @@
"name": "MsgCreateEntityAccount",
"longName": "MsgCreateEntityAccount",
"fullName": "ixo.entity.v1beta1.MsgCreateEntityAccount",
- "description": "create a module account for an entity, account details will be added as a\nlinkedEntity on entity iid doc where linkedEntity id is didfragment: did#name",
+ "description": "create a module account for an entity",
"hasExtensions": false,
"hasFields": true,
"hasOneofs": false,
@@ -10876,7 +11202,7 @@
"fields": [
{
"name": "id",
- "description": "entity id (did) to create account for",
+ "description": "entity id (did) which has the account",
"label": "",
"type": "string",
"longType": "string",
@@ -10947,6 +11273,89 @@
"extensions": [],
"fields": []
},
+ {
+ "name": "MsgRevokeEntityAccountAuthz",
+ "longName": "MsgRevokeEntityAccountAuthz",
+ "fullName": "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthz",
+ "description": "Revoke an existing authz grant from entity account (as grantor) to recipient",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "id",
+ "description": "entity id (did) which has the account",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "name",
+ "description": "name of account",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "grantee_address",
+ "description": "the grantee address for which the authz grant will be revoked",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "msg_type_url",
+ "description": "the msg type url of the grant to be revoked for the specific grantee",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "owner_address",
+ "description": "the owner_address used to sign this transaction.",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgRevokeEntityAccountAuthzResponse",
+ "longName": "MsgRevokeEntityAccountAuthzResponse",
+ "fullName": "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthzResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": false,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": []
+ },
{
"name": "MsgTransferEntity",
"longName": "MsgTransferEntity",
@@ -11266,7 +11675,7 @@
},
{
"name": "GrantEntityAccountAuthz",
- "description": "Create a authz grant from entity account",
+ "description": "Create an authz grant from entity account",
"requestType": "MsgGrantEntityAccountAuthz",
"requestLongType": "MsgGrantEntityAccountAuthz",
"requestFullType": "ixo.entity.v1beta1.MsgGrantEntityAccountAuthz",
@@ -11275,6 +11684,18 @@
"responseLongType": "MsgGrantEntityAccountAuthzResponse",
"responseFullType": "ixo.entity.v1beta1.MsgGrantEntityAccountAuthzResponse",
"responseStreaming": false
+ },
+ {
+ "name": "RevokeEntityAccountAuthz",
+ "description": "Revoke an authz grant from entity account",
+ "requestType": "MsgRevokeEntityAccountAuthz",
+ "requestLongType": "MsgRevokeEntityAccountAuthz",
+ "requestFullType": "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthz",
+ "requestStreaming": false,
+ "responseType": "MsgRevokeEntityAccountAuthzResponse",
+ "responseLongType": "MsgRevokeEntityAccountAuthzResponse",
+ "responseFullType": "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthzResponse",
+ "responseStreaming": false
}
]
}
@@ -11614,7 +12035,7 @@
},
{
"name": "contract_address",
- "description": "generated on token intiation through MsgSetupMinter",
+ "description": "generated on token initiation",
"label": "",
"type": "string",
"longType": "string",
diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md
index 8fe3d1dc..ee279a30 100644
--- a/docs/core/proto-docs.md
+++ b/docs/core/proto-docs.md
@@ -159,6 +159,12 @@
- [MsgEvaluateClaimResponse](#ixo.claims.v1beta1.MsgEvaluateClaimResponse)
- [MsgSubmitClaim](#ixo.claims.v1beta1.MsgSubmitClaim)
- [MsgSubmitClaimResponse](#ixo.claims.v1beta1.MsgSubmitClaimResponse)
+ - [MsgUpdateCollectionDates](#ixo.claims.v1beta1.MsgUpdateCollectionDates)
+ - [MsgUpdateCollectionDatesResponse](#ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse)
+ - [MsgUpdateCollectionPayments](#ixo.claims.v1beta1.MsgUpdateCollectionPayments)
+ - [MsgUpdateCollectionPaymentsResponse](#ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse)
+ - [MsgUpdateCollectionState](#ixo.claims.v1beta1.MsgUpdateCollectionState)
+ - [MsgUpdateCollectionStateResponse](#ixo.claims.v1beta1.MsgUpdateCollectionStateResponse)
- [MsgWithdrawPayment](#ixo.claims.v1beta1.MsgWithdrawPayment)
- [MsgWithdrawPaymentResponse](#ixo.claims.v1beta1.MsgWithdrawPaymentResponse)
@@ -188,6 +194,7 @@
- [ixo/entity/v1beta1/event.proto](#ixo/entity/v1beta1/event.proto)
- [EntityAccountAuthzCreatedEvent](#ixo.entity.v1beta1.EntityAccountAuthzCreatedEvent)
+ - [EntityAccountAuthzRevokedEvent](#ixo.entity.v1beta1.EntityAccountAuthzRevokedEvent)
- [EntityAccountCreatedEvent](#ixo.entity.v1beta1.EntityAccountCreatedEvent)
- [EntityCreatedEvent](#ixo.entity.v1beta1.EntityCreatedEvent)
- [EntityTransferredEvent](#ixo.entity.v1beta1.EntityTransferredEvent)
@@ -268,6 +275,8 @@
- [MsgCreateEntityResponse](#ixo.entity.v1beta1.MsgCreateEntityResponse)
- [MsgGrantEntityAccountAuthz](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthz)
- [MsgGrantEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthzResponse)
+ - [MsgRevokeEntityAccountAuthz](#ixo.entity.v1beta1.MsgRevokeEntityAccountAuthz)
+ - [MsgRevokeEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgRevokeEntityAccountAuthzResponse)
- [MsgTransferEntity](#ixo.entity.v1beta1.MsgTransferEntity)
- [MsgTransferEntityResponse](#ixo.entity.v1beta1.MsgTransferEntityResponse)
- [MsgUpdateEntity](#ixo.entity.v1beta1.MsgUpdateEntity)
@@ -1755,7 +1764,7 @@ Msg defines the bonds Msg service.
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | collection id is the incremented internal id for the collection of claims |
| entity | [string](#string) | | entity is the DID of the entity for which the claims are being created |
-| admin | [string](#string) | | admin is the account address that will authorize or revoke agents and payments (the grantor) |
+| admin | [string](#string) | | admin is the account address that will authorize or revoke agents and payments (the grantor), and can update the collection |
| protocol | [string](#string) | | protocol is the DID of the claim protocol |
| start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | startDate is the date after which claims may be submitted |
| end_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | endDate is the date after which no more claims may be submitted (no endDate is allowed) |
@@ -1768,6 +1777,7 @@ Msg defines the bonds Msg service.
| state | [CollectionState](#ixo.claims.v1beta1.CollectionState) | | state is the current state of this Collection (open, paused, closed) |
| payments | [Payments](#ixo.claims.v1beta1.Payments) | | payments is the amount paid for claim submission, evaluation, approval, or rejection |
| signer | [string](#string) | | signer address |
+| invalidated | [uint64](#uint64) | | invalidated is the number of claims that have been evaluated as invalid (internally calculated) |
@@ -1930,6 +1940,7 @@ Msg defines the bonds Msg service.
| APPROVED | 1 | |
| REJECTED | 2 | |
| DISPUTED | 3 | |
+| INVALIDATED | 4 | |
@@ -2628,7 +2639,7 @@ Collection entity, or have authz cap, aka is agent
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| claim_id | [string](#string) | | claimID is the unique identifier of the claim to make evaluation against |
-| collection_id | [string](#string) | | claimID is the unique identifier of the claim to make evaluation against |
+| collection_id | [string](#string) | | collection_id indicates to which Collection this claim belongs |
| oracle | [string](#string) | | oracle is the DID of the Oracle entity that evaluates the claim |
| agent_did | [string](#string) | | agent is the DID of the agent that submits the evaluation |
| agent_address | [string](#string) | | |
@@ -2682,6 +2693,88 @@ Collection entity, or have authz cap, aka is agent
+
+
+### MsgUpdateCollectionDates
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| collection_id | [string](#string) | | collection_id indicates which Collection to update |
+| start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | startDate is the date after which claims may be submitted |
+| end_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | endDate is the date after which no more claims may be submitted (no endDate is allowed) |
+| admin_address | [string](#string) | | admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionDatesResponse
+
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionPayments
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| collection_id | [string](#string) | | collection_id indicates which Collection to update |
+| payments | [Payments](#ixo.claims.v1beta1.Payments) | | payments is the amount paid for claim submission, evaluation, approval, or rejection |
+| admin_address | [string](#string) | | admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionPaymentsResponse
+
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionState
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| collection_id | [string](#string) | | collection_id indicates which Collection to update |
+| state | [CollectionState](#ixo.claims.v1beta1.CollectionState) | | state is the state of this Collection (open, paused, closed) you want to update to |
+| admin_address | [string](#string) | | admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionStateResponse
+
+
+
+
+
+
+
### MsgWithdrawPayment
@@ -2733,6 +2826,9 @@ Msg defines the Msg service.
| EvaluateClaim | [MsgEvaluateClaim](#ixo.claims.v1beta1.MsgEvaluateClaim) | [MsgEvaluateClaimResponse](#ixo.claims.v1beta1.MsgEvaluateClaimResponse) | |
| DisputeClaim | [MsgDisputeClaim](#ixo.claims.v1beta1.MsgDisputeClaim) | [MsgDisputeClaimResponse](#ixo.claims.v1beta1.MsgDisputeClaimResponse) | |
| WithdrawPayment | [MsgWithdrawPayment](#ixo.claims.v1beta1.MsgWithdrawPayment) | [MsgWithdrawPaymentResponse](#ixo.claims.v1beta1.MsgWithdrawPaymentResponse) | |
+| UpdateCollectionState | [MsgUpdateCollectionState](#ixo.claims.v1beta1.MsgUpdateCollectionState) | [MsgUpdateCollectionStateResponse](#ixo.claims.v1beta1.MsgUpdateCollectionStateResponse) | |
+| UpdateCollectionDates | [MsgUpdateCollectionDates](#ixo.claims.v1beta1.MsgUpdateCollectionDates) | [MsgUpdateCollectionDatesResponse](#ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse) | |
+| UpdateCollectionPayments | [MsgUpdateCollectionPayments](#ixo.claims.v1beta1.MsgUpdateCollectionPayments) | [MsgUpdateCollectionPaymentsResponse](#ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse) | |
@@ -3006,7 +3102,7 @@ relationship entity account
| start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | Start Date of the Entity as defined by the implementer and interpreted by Client applications |
| end_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | End Date of the Entity as defined by the implementer and interpreted by Client applications |
| status | [int32](#int32) | | Status of the Entity as defined by the implementer and interpreted by Client applications |
-| relayer_node | [string](#string) | | Address of the operator through which the Entity was created |
+| relayer_node | [string](#string) | | Did of the operator through which the Entity was created |
| credentials | [string](#string) | repeated | Credentials of the enitity to be verified |
| entity_verified | [bool](#bool) | | Used as check whether the credentials of entity is verified |
| metadata | [EntityMetadata](#ixo.entity.v1beta1.EntityMetadata) | | Metadata concerning the Entity such as versionId, created, updated and deactivated |
@@ -3086,7 +3182,8 @@ EntityMetadata defines metadata associated to a entity
### EntityAccountAuthzCreatedEvent
-EntityAccountCreatedEvent is an event triggered on a entity account creation
+EntityAccountCreatedEvent is an event triggered on a entity account authz
+creation
| Field | Type | Label | Description |
@@ -3103,6 +3200,27 @@ EntityAccountCreatedEvent is an event triggered on a entity account creation
+
+
+### EntityAccountAuthzRevokedEvent
+EntityAccountAuthzRevokedEvent is an event triggered on a entity account
+authz revocation
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [string](#string) | | |
+| signer | [string](#string) | | |
+| account_name | [string](#string) | | |
+| granter | [string](#string) | | |
+| grantee | [string](#string) | | |
+| msg_type_url | [string](#string) | | |
+
+
+
+
+
+
### EntityAccountCreatedEvent
@@ -4118,7 +4236,7 @@ Msg defines the identity Msg service.
| linked_entity | [ixo.iid.v1beta1.LinkedEntity](#ixo.iid.v1beta1.LinkedEntity) | repeated | DID of a linked Entity and its relationship with the Subject |
| start_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | Start Date of the Entity as defined by the implementer and interpreted by Client applications |
| end_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | End Date of the Entity as defined by the implementer and interpreted by Client applications |
-| relayer_node | [string](#string) | | Address of the operator through which the Entity was created |
+| relayer_node | [string](#string) | | Did of the operator through which the Entity was created |
| credentials | [string](#string) | repeated | Content ID or Hash of public Verifiable Credentials associated with the subject |
| owner_did | [string](#string) | | Owner of the Entity NFT | The ownersdid used to sign this transaction. |
| owner_address | [string](#string) | | The ownersdid address used to sign this transaction. |
@@ -4134,8 +4252,7 @@ Msg defines the identity Msg service.
### MsgCreateEntityAccount
-create a module account for an entity, account details will be added as a
-linkedEntity on entity iid doc where linkedEntity id is didfragment: did#name
+create a module account for an entity
| Field | Type | Label | Description |
@@ -4190,7 +4307,7 @@ grantee for the specific authorization
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| id | [string](#string) | | entity id (did) to create account for |
+| id | [string](#string) | | entity id (did) which has the account |
| name | [string](#string) | | name of account |
| grantee_address | [string](#string) | | the grantee address that will be able to execute the authz authorization |
| grant | [Grant](#ixo.entity.v1beta1.Grant) | | grant to be Authorized in authz grant |
@@ -4211,6 +4328,35 @@ grantee for the specific authorization
+
+
+### MsgRevokeEntityAccountAuthz
+Revoke an existing authz grant from entity account (as grantor) to recipient
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [string](#string) | | entity id (did) which has the account |
+| name | [string](#string) | | name of account |
+| grantee_address | [string](#string) | | the grantee address for which the authz grant will be revoked |
+| msg_type_url | [string](#string) | | the msg type url of the grant to be revoked for the specific grantee |
+| owner_address | [string](#string) | | the owner_address used to sign this transaction. |
+
+
+
+
+
+
+
+
+### MsgRevokeEntityAccountAuthzResponse
+
+
+
+
+
+
+
### MsgTransferEntity
@@ -4317,7 +4463,8 @@ Msg defines the project Msg service.
| UpdateEntityVerified | [MsgUpdateEntityVerified](#ixo.entity.v1beta1.MsgUpdateEntityVerified) | [MsgUpdateEntityVerifiedResponse](#ixo.entity.v1beta1.MsgUpdateEntityVerifiedResponse) | UpdateEntityVerified defines a method for updating if an entity is verified |
| TransferEntity | [MsgTransferEntity](#ixo.entity.v1beta1.MsgTransferEntity) | [MsgTransferEntityResponse](#ixo.entity.v1beta1.MsgTransferEntityResponse) | Transfers an entity and its nft to the recipient |
| CreateEntityAccount | [MsgCreateEntityAccount](#ixo.entity.v1beta1.MsgCreateEntityAccount) | [MsgCreateEntityAccountResponse](#ixo.entity.v1beta1.MsgCreateEntityAccountResponse) | Create a module account for an entity, |
-| GrantEntityAccountAuthz | [MsgGrantEntityAccountAuthz](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthz) | [MsgGrantEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthzResponse) | Create a authz grant from entity account |
+| GrantEntityAccountAuthz | [MsgGrantEntityAccountAuthz](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthz) | [MsgGrantEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgGrantEntityAccountAuthzResponse) | Create an authz grant from entity account |
+| RevokeEntityAccountAuthz | [MsgRevokeEntityAccountAuthz](#ixo.entity.v1beta1.MsgRevokeEntityAccountAuthz) | [MsgRevokeEntityAccountAuthzResponse](#ixo.entity.v1beta1.MsgRevokeEntityAccountAuthzResponse) | Revoke an authz grant from entity account |
@@ -4519,7 +4666,7 @@ Query defines the gRPC querier service.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| minter | [string](#string) | | address of minter |
-| contract_address | [string](#string) | | generated on token intiation through MsgSetupMinter |
+| contract_address | [string](#string) | | generated on token initiation |
| class | [string](#string) | | class is the token protocol entity DID (validated) |
| name | [string](#string) | | name is the token name, which must be unique (namespace) |
| description | [string](#string) | | description is any arbitrary description |
diff --git a/go.mod b/go.mod
index 8ad7cea8..63eeb2b5 100644
--- a/go.mod
+++ b/go.mod
@@ -62,7 +62,7 @@ require (
github.com/cosmos/gogoproto v1.4.6 // indirect
github.com/cosmos/gorocksdb v1.2.0 // indirect
github.com/cosmos/iavl v0.19.5 // indirect
- github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect
+ github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect
github.com/creachadair/taskgroup v0.3.2 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -138,8 +138,8 @@ require (
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tidwall/btree v1.5.0 // indirect
- github.com/zondax/hid v0.9.1 // indirect
- github.com/zondax/ledger-go v0.14.1 // indirect
+ github.com/zondax/hid v0.9.2 // indirect
+ github.com/zondax/ledger-go v0.14.3 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
diff --git a/go.sum b/go.sum
index abf48cfa..2a39a6b5 100644
--- a/go.sum
+++ b/go.sum
@@ -248,8 +248,8 @@ github.com/cosmos/interchain-accounts v0.2.6 h1:TV2M2g1/Rb9MCNw1YePdBKE0rcEczNj1
github.com/cosmos/interchain-accounts v0.2.6/go.mod h1:lUzWNzCiCtIEYZefac5+YgEBz2aR39nMS374jIv1c7o=
github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU=
github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8=
-github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA=
-github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI=
+github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw=
+github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
@@ -1024,10 +1024,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
-github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo=
-github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
-github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c=
-github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320=
+github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
+github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
+github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw=
+github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
diff --git a/lib/ixo/types.go b/lib/ixo/types.go
index 4f11c2da..b8cd3612 100644
--- a/lib/ixo/types.go
+++ b/lib/ixo/types.go
@@ -1,6 +1,8 @@
package ixo
-import "strings"
+import (
+ "strings"
+)
const IxoNativeToken = "uixo"
@@ -31,3 +33,8 @@ func RemoveOrdered[T any](slice []T, s int) []T {
func IsEmpty(input string) bool {
return strings.TrimSpace(input) == ""
}
+
+func IsEnumValueValid(nameMap map[int32]string, value int32) bool {
+ _, ok := nameMap[value]
+ return ok
+}
diff --git a/proto/ixo/claims/v1beta1/claims.proto b/proto/ixo/claims/v1beta1/claims.proto
index f4d09486..c6e2f55d 100644
--- a/proto/ixo/claims/v1beta1/claims.proto
+++ b/proto/ixo/claims/v1beta1/claims.proto
@@ -32,6 +32,7 @@ enum EvaluationStatus {
APPROVED = 1 [ (gogoproto.enumvalue_customname) = "approved" ];
REJECTED = 2 [ (gogoproto.enumvalue_customname) = "rejected" ];
DISPUTED = 3 [ (gogoproto.enumvalue_customname) = "disputed" ];
+ INVALIDATED = 4 [ (gogoproto.enumvalue_customname) = "invalidated" ];
}
enum PaymentType {
@@ -60,7 +61,7 @@ message Collection {
// entity is the DID of the entity for which the claims are being created
string entity = 2;
// admin is the account address that will authorize or revoke agents and
- // payments (the grantor)
+ // payments (the grantor), and can update the collection
string admin = 3;
// protocol is the DID of the claim protocol
string protocol = 4;
@@ -92,6 +93,9 @@ message Collection {
Payments payments = 14;
// signer address
string signer = 15;
+ // invalidated is the number of claims that have been evaluated as invalid
+ // (internally calculated)
+ uint64 invalidated = 16;
}
message Payments {
diff --git a/proto/ixo/claims/v1beta1/tx.proto b/proto/ixo/claims/v1beta1/tx.proto
index cf1f5134..7fc556ec 100644
--- a/proto/ixo/claims/v1beta1/tx.proto
+++ b/proto/ixo/claims/v1beta1/tx.proto
@@ -17,6 +17,12 @@ service Msg {
rpc EvaluateClaim(MsgEvaluateClaim) returns (MsgEvaluateClaimResponse);
rpc DisputeClaim(MsgDisputeClaim) returns (MsgDisputeClaimResponse);
rpc WithdrawPayment(MsgWithdrawPayment) returns (MsgWithdrawPaymentResponse);
+ rpc UpdateCollectionState(MsgUpdateCollectionState)
+ returns (MsgUpdateCollectionStateResponse);
+ rpc UpdateCollectionDates(MsgUpdateCollectionDates)
+ returns (MsgUpdateCollectionDatesResponse);
+ rpc UpdateCollectionPayments(MsgUpdateCollectionPayments)
+ returns (MsgUpdateCollectionPaymentsResponse);
}
message MsgCreateCollection {
@@ -62,7 +68,7 @@ message MsgSubmitClaimResponse {}
message MsgEvaluateClaim {
// claimID is the unique identifier of the claim to make evaluation against
string claim_id = 1;
- // claimID is the unique identifier of the claim to make evaluation against
+ // collection_id indicates to which Collection this claim belongs
string collection_id = 2;
// oracle is the DID of the Oracle entity that evaluates the claim
string oracle = 3;
@@ -141,4 +147,42 @@ message MsgWithdrawPayment {
string admin_address = 9;
}
-message MsgWithdrawPaymentResponse {}
\ No newline at end of file
+message MsgWithdrawPaymentResponse {}
+
+message MsgUpdateCollectionState {
+ // collection_id indicates which Collection to update
+ string collection_id = 1;
+ // state is the state of this Collection (open, paused, closed) you want to
+ // update to
+ CollectionState state = 2;
+ // admin address used to sign this message, validated against Collection Admin
+ string admin_address = 3;
+}
+
+message MsgUpdateCollectionStateResponse {}
+
+message MsgUpdateCollectionDates {
+ // collection_id indicates which Collection to update
+ string collection_id = 1;
+ // startDate is the date after which claims may be submitted
+ google.protobuf.Timestamp start_date = 2 [ (gogoproto.stdtime) = true ];
+ // endDate is the date after which no more claims may be submitted (no endDate
+ // is allowed)
+ google.protobuf.Timestamp end_date = 3 [ (gogoproto.stdtime) = true ];
+ // admin address used to sign this message, validated against Collection Admin
+ string admin_address = 4;
+}
+
+message MsgUpdateCollectionDatesResponse {}
+
+message MsgUpdateCollectionPayments {
+ // collection_id indicates which Collection to update
+ string collection_id = 1;
+ // payments is the amount paid for claim submission, evaluation, approval, or
+ // rejection
+ Payments payments = 2;
+ // admin address used to sign this message, validated against Collection Admin
+ string admin_address = 3;
+}
+
+message MsgUpdateCollectionPaymentsResponse {}
\ No newline at end of file
diff --git a/proto/ixo/entity/v1beta1/entity.proto b/proto/ixo/entity/v1beta1/entity.proto
index 6145f430..3d88ff01 100644
--- a/proto/ixo/entity/v1beta1/entity.proto
+++ b/proto/ixo/entity/v1beta1/entity.proto
@@ -29,7 +29,7 @@ message Entity {
// Status of the Entity as defined by the implementer and interpreted by
// Client applications
int32 status = 5;
- // Address of the operator through which the Entity was created
+ // Did of the operator through which the Entity was created
string relayer_node = 6;
// Credentials of the enitity to be verified
repeated string credentials = 7;
diff --git a/proto/ixo/entity/v1beta1/event.proto b/proto/ixo/entity/v1beta1/event.proto
index 28259e45..2a2ca26a 100644
--- a/proto/ixo/entity/v1beta1/event.proto
+++ b/proto/ixo/entity/v1beta1/event.proto
@@ -42,7 +42,8 @@ message EntityAccountCreatedEvent {
string account_address = 4;
}
-// EntityAccountCreatedEvent is an event triggered on a entity account creation
+// EntityAccountCreatedEvent is an event triggered on a entity account authz
+// creation
message EntityAccountAuthzCreatedEvent {
string id = 1;
string signer = 2;
@@ -50,4 +51,15 @@ message EntityAccountAuthzCreatedEvent {
string granter = 4;
string grantee = 5;
Grant grant = 6;
+}
+
+// EntityAccountAuthzRevokedEvent is an event triggered on a entity account
+// authz revocation
+message EntityAccountAuthzRevokedEvent {
+ string id = 1;
+ string signer = 2;
+ string account_name = 3;
+ string granter = 4;
+ string grantee = 5;
+ string msg_type_url = 6;
}
\ No newline at end of file
diff --git a/proto/ixo/entity/v1beta1/tx.proto b/proto/ixo/entity/v1beta1/tx.proto
index 9a4ea7f7..2c8a51df 100644
--- a/proto/ixo/entity/v1beta1/tx.proto
+++ b/proto/ixo/entity/v1beta1/tx.proto
@@ -30,9 +30,13 @@ service Msg {
rpc CreateEntityAccount(MsgCreateEntityAccount)
returns (MsgCreateEntityAccountResponse);
- // Create a authz grant from entity account
+ // Create an authz grant from entity account
rpc GrantEntityAccountAuthz(MsgGrantEntityAccountAuthz)
returns (MsgGrantEntityAccountAuthzResponse);
+
+ // Revoke an authz grant from entity account
+ rpc RevokeEntityAccountAuthz(MsgRevokeEntityAccountAuthz)
+ returns (MsgRevokeEntityAccountAuthzResponse);
}
message MsgCreateEntity {
@@ -59,7 +63,7 @@ message MsgCreateEntity {
// End Date of the Entity as defined by the implementer and interpreted by
// Client applications
google.protobuf.Timestamp end_date = 11 [ (gogoproto.stdtime) = true ];
- // Address of the operator through which the Entity was created
+ // Did of the operator through which the Entity was created
string relayer_node = 12;
// Content ID or Hash of public Verifiable Credentials associated with the
// subject
@@ -161,7 +165,7 @@ message MsgCreateEntityAccountResponse {
// Create a authz grant from entity account (as grantor) to recipient in msg as
// grantee for the specific authorization
message MsgGrantEntityAccountAuthz {
- // entity id (did) to create account for
+ // entity id (did) which has the account
string id = 1;
// name of account
string name = 2;
@@ -177,3 +181,19 @@ message MsgGrantEntityAccountAuthz {
}
message MsgGrantEntityAccountAuthzResponse {}
+
+// Revoke an existing authz grant from entity account (as grantor) to recipient
+message MsgRevokeEntityAccountAuthz {
+ // entity id (did) which has the account
+ string id = 1;
+ // name of account
+ string name = 2;
+ // the grantee address for which the authz grant will be revoked
+ string grantee_address = 3;
+ // the msg type url of the grant to be revoked for the specific grantee
+ string msg_type_url = 4;
+ // the owner_address used to sign this transaction.
+ string owner_address = 5;
+}
+
+message MsgRevokeEntityAccountAuthzResponse {}
diff --git a/scripts/run_only.sh b/scripts/run_only.sh
index cb5ef727..1a5a4202 100755
--- a/scripts/run_only.sh
+++ b/scripts/run_only.sh
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
ixod start --pruning "nothing"
+# ixod start --pruning "nothing" --log_level "trace" --trace
diff --git a/scripts/run_with_all_data.sh b/scripts/run_with_all_data.sh
index 335fff81..9e0220a1 100755
--- a/scripts/run_with_all_data.sh
+++ b/scripts/run_with_all_data.sh
@@ -52,6 +52,12 @@ FROM="\"reserved_bond_tokens\": \[\]"
TO="\"reserved_bond_tokens\": \[$RESERVED_BOND_TOKENS\]"
sed -i "s/$FROM/$TO/" "$HOME"/.ixod/config/genesis.json
+# Set bank denom metadata
+DENOM_METADATA="\{\"base\":\"uixo\",\"denom_units\":\[\{\"aliases\":\[\"microixo\"\],\"denom\":\"uixo\",\"exponent\":0\},\{\"aliases\":\[\"milliixo\"\],\"denom\":\"mixo\",\"exponent\":3\},\{\"aliases\":\[\],\"denom\":\"ixo\",\"exponent\":6\}\],\"description\":\"The native staking token of ixo.\",\"display\":\"ixo\",\"name\":\"ixo\",\"symbol\":\"ixo\"\}"
+FROM="\"denom_metadata\": \[\]"
+TO="\"denom_metadata\": \[$DENOM_METADATA\]"
+sed -i "s/$FROM/$TO/" "$HOME"/.ixod/config/genesis.json
+
# Set min-gas-prices (using fee token)
FROM="minimum-gas-prices = \"\""
TO="minimum-gas-prices = \"0.025$FEE_TOKEN\""
diff --git a/wasmbinding/query_plugin.go b/wasmbinding/query_plugin.go
index d77f30af..fac334fb 100644
--- a/wasmbinding/query_plugin.go
+++ b/wasmbinding/query_plugin.go
@@ -14,11 +14,15 @@ import (
// StargateQuerier dispatches whitelisted stargate queries
func StargateQuerier(queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) {
return func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error) {
- protoResponseType, err := GetWhitelistedQuery(request.Path)
+ protoResponseType, err := getWhitelistedQuery(request.Path)
if err != nil {
return nil, err
}
+ // no matter what happens after this point, we must return
+ // the response type to prevent sync.Pool from leaking.
+ defer returnStargateResponseToPool(request.Path, protoResponseType)
+
route := queryRouter.Route(request.Path)
if route == nil {
return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("No route to query '%s'", request.Path)}
@@ -32,6 +36,11 @@ func StargateQuerier(queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec) func(
return nil, err
}
- return wasmkeeper.ConvertProtoToJSONMarshal(cdc, protoResponseType, res.Value)
+ bz, err := wasmkeeper.ConvertProtoToJSONMarshal(cdc, protoResponseType, res.Value)
+ if err != nil {
+ return nil, err
+ }
+
+ return bz, nil
}
}
diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go
index 6b8d0738..b6cf0647 100644
--- a/wasmbinding/stargate_whitelist.go
+++ b/wasmbinding/stargate_whitelist.go
@@ -21,12 +21,15 @@ import (
tokentypes "github.com/ixofoundation/ixo-blockchain/v2/x/token/types"
)
-// stargateWhitelist keeps whitelist and its deterministic
+// stargateResponsePools keeps whitelist and its deterministic
// response binding for stargate queries.
+// CONTRACT: since results of queries go into blocks, queries being added here should always be
+// deterministic or can cause non-determinism in the state machine.
//
-// The query can be multi-thread, so we have to use
-// thread safe sync.Map.
-var stargateWhitelist sync.Map
+// The query is multi-threaded so we're using a sync.Pool
+// to manage the allocation and de-allocation of newly created
+// pb objects.
+var stargateResponsePools = make(map[string]*sync.Pool)
// Note: When adding a migration here, we should also add it to the Async ICQ params in the upgrade.
// In the future we may want to find a better way to keep these in sync
@@ -47,7 +50,8 @@ func init() {
// bank
setWhitelistedQuery("/cosmos.bank.v1beta1.Query/Balance", &banktypes.QueryBalanceResponse{})
setWhitelistedQuery("/cosmos.bank.v1beta1.Query/AllBalances", &banktypes.QueryAllBalancesResponse{})
- setWhitelistedQuery("/cosmos.bank.v1beta1.Query/DenomMetadata", &banktypes.QueryDenomsMetadataResponse{})
+ setWhitelistedQuery("/cosmos.bank.v1beta1.Query/DenomMetadata", &banktypes.QueryDenomMetadataResponse{})
+ setWhitelistedQuery("/cosmos.bank.v1beta1.Query/DenomsMetadata", &banktypes.QueryDenomsMetadataResponse{})
setWhitelistedQuery("/cosmos.bank.v1beta1.Query/Params", &banktypes.QueryParamsResponse{})
setWhitelistedQuery("/cosmos.bank.v1beta1.Query/SupplyOf", &banktypes.QuerySupplyOfResponse{})
@@ -106,34 +110,57 @@ func init() {
setWhitelistedQuery("/ixo.token.v1beta1.Query/TokenMetadata", &tokentypes.QueryTokenMetadataResponse{})
}
-// GetWhitelistedQuery returns the whitelisted query at the provided path.
+// IsWhitelistedQuery returns if the query is not whitelisted.
+func IsWhitelistedQuery(queryPath string) error {
+ _, isWhitelisted := stargateResponsePools[queryPath]
+ if !isWhitelisted {
+ return wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", queryPath)}
+ }
+ return nil
+}
+
+// getWhitelistedQuery returns the whitelisted query at the provided path.
// If the query does not exist, or it was setup wrong by the chain, this returns an error.
-func GetWhitelistedQuery(queryPath string) (codec.ProtoMarshaler, error) {
- protoResponseAny, isWhitelisted := stargateWhitelist.Load(queryPath)
+// CONTRACT: must call returnStargateResponseToPool in order to avoid pointless allocs.
+func getWhitelistedQuery(queryPath string) (codec.ProtoMarshaler, error) {
+ protoResponseAny, isWhitelisted := stargateResponsePools[queryPath]
if !isWhitelisted {
return nil, wasmvmtypes.UnsupportedRequest{Kind: fmt.Sprintf("'%s' path is not allowed from the contract", queryPath)}
}
- protoResponseType, ok := protoResponseAny.(codec.ProtoMarshaler)
+ protoMarshaler, ok := protoResponseAny.Get().(codec.ProtoMarshaler)
if !ok {
- return nil, wasmvmtypes.Unknown{}
+ return nil, fmt.Errorf("failed to assert type to codec.ProtoMarshaler")
}
- return protoResponseType, nil
+ return protoMarshaler, nil
}
-func setWhitelistedQuery(queryPath string, protoType codec.ProtoMarshaler) {
- stargateWhitelist.Store(queryPath, protoType)
+type protoTypeG[T any] interface {
+ *T
+ codec.ProtoMarshaler
+}
+
+// setWhitelistedQuery sets the whitelisted query at the provided path.
+// This method also creates a sync.Pool for the provided protoMarshaler.
+// We use generics so we can properly instantiate an object that the
+// queryPath expects as a response.
+func setWhitelistedQuery[T any, PT protoTypeG[T]](queryPath string, _ PT) {
+ stargateResponsePools[queryPath] = &sync.Pool{
+ New: func() any {
+ return PT(new(T))
+ },
+ }
+}
+
+// returnStargateResponseToPool returns the provided protoMarshaler to the appropriate pool based on it's query path.
+func returnStargateResponseToPool(queryPath string, pb codec.ProtoMarshaler) {
+ stargateResponsePools[queryPath].Put(pb)
}
func GetStargateWhitelistedPaths() (keys []string) {
// Iterate over the map and collect the keys
- stargateWhitelist.Range(func(key, value interface{}) bool {
- keyStr, ok := key.(string)
- if !ok {
- panic("key is not a string")
- }
- keys = append(keys, keyStr)
- return true
- })
-
+ keys = make([]string, 0, len(stargateResponsePools))
+ for k := range stargateResponsePools {
+ keys = append(keys, k)
+ }
return keys
}
diff --git a/x/claims/keeper/migrations.go b/x/claims/keeper/migrations.go
new file mode 100644
index 00000000..9056cec6
--- /dev/null
+++ b/x/claims/keeper/migrations.go
@@ -0,0 +1,21 @@
+package keeper
+
+import (
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ v2claims "github.com/ixofoundation/ixo-blockchain/v2/x/claims/migrations/v2"
+)
+
+// Migrator is a struct for handling in-place store migrations.
+type Migrator struct {
+ keeper Keeper
+}
+
+// NewMigrator returns a new Migrator.
+func NewMigrator(keeper Keeper) Migrator {
+ return Migrator{keeper: keeper}
+}
+
+// Migrate1to2 migrates from version 1 to 2.
+func (m Migrator) Migrate1to2(ctx sdk.Context) error {
+ return v2claims.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc)
+}
diff --git a/x/claims/keeper/msg_server.go b/x/claims/keeper/msg_server.go
index 3c03e021..270818c1 100644
--- a/x/claims/keeper/msg_server.go
+++ b/x/claims/keeper/msg_server.go
@@ -66,20 +66,21 @@ func (s msgServer) CreateCollection(goCtx context.Context, msg *types.MsgCreateC
var collection types.Collection
collectionId := fmt.Sprint(params.CollectionSequence)
collection = types.Collection{
- Id: collectionId,
- Entity: msg.Entity,
- Admin: admin.Address,
- Protocol: msg.Protocol,
- StartDate: msg.StartDate,
- EndDate: msg.EndDate,
- Quota: msg.Quota,
- Count: 0,
- Evaluated: 0,
- Approved: 0,
- Rejected: 0,
- Disputed: 0,
- State: msg.State,
- Payments: msg.Payments,
+ Id: collectionId,
+ Entity: msg.Entity,
+ Admin: admin.Address,
+ Protocol: msg.Protocol,
+ StartDate: msg.StartDate,
+ EndDate: msg.EndDate,
+ Quota: msg.Quota,
+ Count: 0,
+ Evaluated: 0,
+ Approved: 0,
+ Rejected: 0,
+ Disputed: 0,
+ Invalidated: 0,
+ State: msg.State,
+ Payments: msg.Payments,
}
s.Keeper.SetCollection(ctx, collection)
@@ -252,13 +253,17 @@ func (s msgServer) EvaluateClaim(goCtx context.Context, msg *types.MsgEvaluateCl
claim.Evaluation = &evaluation
s.Keeper.SetClaim(ctx, claim)
- // start payout process for evaluation submission
- if err = processPayment(ctx, s.Keeper, evalAgent, collection.Payments.Evaluation, types.PaymentType_evaluation, msg.ClaimId); err != nil {
- return nil, err
+ // start payout process for evaluation submission, if evaluation has status invalidated, dont run evaluation payout process
+ if msg.Status != types.EvaluationStatus_invalidated {
+ if err = processPayment(ctx, s.Keeper, evalAgent, collection.Payments.Evaluation, types.PaymentType_evaluation, msg.ClaimId); err != nil {
+ return nil, err
+ }
+
+ // update evaluated count for collection
+ collection.Evaluated++
}
// update amounts for collection, make payouts and persist
- collection.Evaluated++
if msg.Status == types.EvaluationStatus_approved {
collection.Approved++
// payout process for evaluation approval to claim agent
@@ -278,6 +283,9 @@ func (s msgServer) EvaluateClaim(goCtx context.Context, msg *types.MsgEvaluateCl
collection.Disputed++
// update payment status to disputed
updatePaymentStatus(ctx, s.Keeper, types.PaymentType_approval, msg.ClaimId, types.PaymentStatus_disputed)
+ } else if msg.Status == types.EvaluationStatus_invalidated {
+ // no payment for invalidated
+ collection.Invalidated++
}
s.Keeper.SetCollection(ctx, collection)
@@ -431,3 +439,125 @@ func (s msgServer) WithdrawPayment(goCtx context.Context, msg *types.MsgWithdraw
}
return &types.MsgWithdrawPaymentResponse{}, nil
}
+
+// --------------------------
+// UPDATE COLLECTION STATE
+// --------------------------
+func (s msgServer) UpdateCollectionState(goCtx context.Context, msg *types.MsgUpdateCollectionState) (*types.MsgUpdateCollectionStateResponse, error) {
+ ctx := sdk.UnwrapSDKContext(goCtx)
+
+ // Get Collection
+ collection, err := s.Keeper.GetCollection(ctx, msg.CollectionId)
+ if err != nil {
+ return nil, err
+ }
+
+ // check that signer is collection admin
+ if collection.Admin != msg.AdminAddress {
+ return nil, sdkerrors.Wrapf(types.ErrClaimUnauthorized, "collection admin %s, msg admin address %s", collection.Admin, msg.AdminAddress)
+ }
+
+ // update state
+ collection.State = msg.State
+
+ // persist the Collection
+ s.Keeper.SetCollection(ctx, collection)
+
+ // emit the events
+ if err := ctx.EventManager().EmitTypedEvents(
+ &types.CollectionUpdatedEvent{
+ Collection: &collection,
+ },
+ ); err != nil {
+ return nil, err
+ }
+
+ return &types.MsgUpdateCollectionStateResponse{}, nil
+}
+
+// --------------------------
+// UPDATE COLLECTION DATES
+// --------------------------
+func (s msgServer) UpdateCollectionDates(goCtx context.Context, msg *types.MsgUpdateCollectionDates) (*types.MsgUpdateCollectionDatesResponse, error) {
+ ctx := sdk.UnwrapSDKContext(goCtx)
+
+ // Get Collection
+ collection, err := s.Keeper.GetCollection(ctx, msg.CollectionId)
+ if err != nil {
+ return nil, err
+ }
+
+ // check that signer is collection admin
+ if collection.Admin != msg.AdminAddress {
+ return nil, sdkerrors.Wrapf(types.ErrClaimUnauthorized, "collection admin %s, msg admin address %s", collection.Admin, msg.AdminAddress)
+ }
+
+ // update state
+ collection.StartDate = msg.StartDate
+ collection.EndDate = msg.EndDate
+
+ // persist the Collection
+ s.Keeper.SetCollection(ctx, collection)
+
+ // emit the events
+ if err := ctx.EventManager().EmitTypedEvents(
+ &types.CollectionUpdatedEvent{
+ Collection: &collection,
+ },
+ ); err != nil {
+ return nil, err
+ }
+
+ return &types.MsgUpdateCollectionDatesResponse{}, nil
+}
+
+// --------------------------
+// UPDATE COLLECTION PAYMENTS
+// --------------------------
+func (s msgServer) UpdateCollectionPayments(goCtx context.Context, msg *types.MsgUpdateCollectionPayments) (*types.MsgUpdateCollectionPaymentsResponse, error) {
+ ctx := sdk.UnwrapSDKContext(goCtx)
+
+ // Get Collection
+ collection, err := s.Keeper.GetCollection(ctx, msg.CollectionId)
+ if err != nil {
+ return nil, err
+ }
+
+ // check that signer is collection admin
+ if collection.Admin != msg.AdminAddress {
+ return nil, sdkerrors.Wrapf(types.ErrClaimUnauthorized, "collection admin %s, msg admin address %s", collection.Admin, msg.AdminAddress)
+ }
+
+ // check that entity exists
+ _, entity, err := s.Keeper.EntityKeeper.ResolveEntity(ctx, collection.Entity)
+ if err != nil {
+ return nil, sdkerrors.Wrapf(iidtypes.ErrDidDocumentNotFound, "for entity %s", collection.Entity)
+ }
+
+ // check that Evaluation Payment does not have 1155 payment
+ if msg.Payments.Evaluation.Contract_1155Payment != nil {
+ return nil, types.ErrCollectionEvalError
+ }
+
+ // check that all payments accounts is part of entity module accounts
+ if !msg.Payments.AccountsIsEntityAccounts(entity) {
+ return nil, types.ErrCollNotEntityAcc
+ }
+
+ // update state
+ collection.Payments = msg.Payments
+
+ // persist the Collection
+ s.Keeper.SetCollection(ctx, collection)
+
+ // emit the events
+ if err := ctx.EventManager().EmitTypedEvents(
+ &types.CollectionUpdatedEvent{
+ Collection: &collection,
+ },
+ ); err != nil {
+ return nil, err
+ }
+
+ return &types.MsgUpdateCollectionPaymentsResponse{}, nil
+}
diff --git a/x/claims/keeper/payments.go b/x/claims/keeper/payments.go
index 4ac41307..3d3ee0de 100644
--- a/x/claims/keeper/payments.go
+++ b/x/claims/keeper/payments.go
@@ -70,7 +70,7 @@ func processPayment(ctx sdk.Context, k Keeper, receiver sdk.AccAddress, payment
}
relayerAddr, err := relayerDidDoc.GetVerificationMethodBlockchainAddress(entity.RelayerNode)
if err != nil {
- return sdkerrors.Wrapf(err, "address not found in iid doc for %s", entity.RelayerNode)
+ return sdkerrors.Wrapf(err, "did not found in iid doc verification methods for %s", entity.RelayerNode)
}
// Calculate evaluator pay share (totals to 100) for ixo, node, and oracle
@@ -95,18 +95,28 @@ func processPayment(ctx sdk.Context, k Keeper, receiver sdk.AccAddress, payment
// Calculate list of outputs and calculate the total output to payees based
// on the calculated wallet distributions
- distributions := recipients.GetDistributionsFor(payment.Amount)
+ distributions, err := recipients.GetDistributionsFor(payment.Amount)
+ if err != nil {
+ return err
+ }
+
+ var countOutputs sdk.Coins
for i, share := range distributions {
// Get integer output
outputAmt, _ := share.TruncateDecimal()
+ address, err := recipients[i].GetAddress()
+ if err != nil {
+ return err
+ }
- // If amount not zero, add as output
- if !outputAmt.IsZero() {
- address, err := recipients[i].GetAddress()
- if err != nil {
- return err
- }
+ // If receiver address(last address in the distribution), then add the remainder to the receiver
+ if address.Equals(receiver) {
+ outputAmt = payment.Amount.Sub(countOutputs)
+ outputs = append(outputs, banktypes.NewOutput(address, outputAmt))
+ } else if !outputAmt.IsZero() {
+ // If amount not zero, add as output, for network and node
outputs = append(outputs, banktypes.NewOutput(address, outputAmt))
+ countOutputs = countOutputs.Sort().Add(outputAmt.Sort()...)
}
}
} else {
diff --git a/x/claims/message_handler.go b/x/claims/message_handler.go
index dd333ce1..7d1b5e6a 100644
--- a/x/claims/message_handler.go
+++ b/x/claims/message_handler.go
@@ -28,6 +28,15 @@ func NewHandler(k keeper.Keeper) sdk.Handler {
case *types.MsgDisputeClaim:
res, err := msgServer.DisputeClaim(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
+ case *types.MsgUpdateCollectionState:
+ res, err := msgServer.UpdateCollectionState(sdk.WrapSDKContext(ctx), msg)
+ return sdk.WrapServiceResult(ctx, res, err)
+ case *types.MsgUpdateCollectionDates:
+ res, err := msgServer.UpdateCollectionDates(sdk.WrapSDKContext(ctx), msg)
+ return sdk.WrapServiceResult(ctx, res, err)
+ case *types.MsgUpdateCollectionPayments:
+ res, err := msgServer.UpdateCollectionPayments(sdk.WrapSDKContext(ctx), msg)
+ return sdk.WrapServiceResult(ctx, res, err)
default:
errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg)
return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg)
diff --git a/x/claims/migrations/v2/legacy_types.go b/x/claims/migrations/v2/legacy_types.go
new file mode 100644
index 00000000..26e71dfa
--- /dev/null
+++ b/x/claims/migrations/v2/legacy_types.go
@@ -0,0 +1,4417 @@
+package v2claims
+
+import (
+ fmt "fmt"
+ io "io"
+ math_bits "math/bits"
+ time "time"
+
+ types "github.com/cosmos/cosmos-sdk/types"
+ _ "github.com/gogo/protobuf/gogoproto"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
+ _ "google.golang.org/protobuf/types/known/durationpb"
+ _ "google.golang.org/protobuf/types/known/timestamppb"
+)
+
+type CollectionState int32
+
+const (
+ CollectionState_open CollectionState = 0
+ CollectionState_paused CollectionState = 1
+ CollectionState_closed CollectionState = 2
+)
+
+var CollectionState_name = map[int32]string{
+ 0: "OPEN",
+ 1: "PAUSED",
+ 2: "CLOSED",
+}
+
+var CollectionState_value = map[string]int32{
+ "OPEN": 0,
+ "PAUSED": 1,
+ "CLOSED": 2,
+}
+
+func (x CollectionState) String() string {
+ return proto.EnumName(CollectionState_name, int32(x))
+}
+
+func (CollectionState) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{0}
+}
+
+type EvaluationStatus int32
+
+const (
+ EvaluationStatus_pending EvaluationStatus = 0
+ EvaluationStatus_approved EvaluationStatus = 1
+ EvaluationStatus_rejected EvaluationStatus = 2
+ EvaluationStatus_disputed EvaluationStatus = 3
+)
+
+var EvaluationStatus_name = map[int32]string{
+ 0: "PENDING",
+ 1: "APPROVED",
+ 2: "REJECTED",
+ 3: "DISPUTED",
+}
+
+var EvaluationStatus_value = map[string]int32{
+ "PENDING": 0,
+ "APPROVED": 1,
+ "REJECTED": 2,
+ "DISPUTED": 3,
+}
+
+func (x EvaluationStatus) String() string {
+ return proto.EnumName(EvaluationStatus_name, int32(x))
+}
+
+func (EvaluationStatus) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{1}
+}
+
+type PaymentType int32
+
+const (
+ PaymentType_submission PaymentType = 0
+ PaymentType_approval PaymentType = 1
+ PaymentType_evaluation PaymentType = 2
+ PaymentType_rejection PaymentType = 3
+)
+
+var PaymentType_name = map[int32]string{
+ 0: "SUBMISSION",
+ 1: "APPROVAL",
+ 2: "EVALUATION",
+ 3: "REJECTION",
+}
+
+var PaymentType_value = map[string]int32{
+ "SUBMISSION": 0,
+ "APPROVAL": 1,
+ "EVALUATION": 2,
+ "REJECTION": 3,
+}
+
+func (x PaymentType) String() string {
+ return proto.EnumName(PaymentType_name, int32(x))
+}
+
+func (PaymentType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{2}
+}
+
+type PaymentStatus int32
+
+const (
+ PaymentStatus_no_payment PaymentStatus = 0
+ PaymentStatus_promised PaymentStatus = 1
+ PaymentStatus_authorized PaymentStatus = 2
+ PaymentStatus_gauranteed PaymentStatus = 3
+ PaymentStatus_paid PaymentStatus = 4
+ PaymentStatus_failed PaymentStatus = 5
+ PaymentStatus_disputed PaymentStatus = 6
+)
+
+var PaymentStatus_name = map[int32]string{
+ 0: "NO_PAYMENT",
+ 1: "PROMISED",
+ 2: "AUTHORIZED",
+ 3: "GAURANTEED",
+ 4: "PAID",
+ 5: "FAILED",
+ 6: "DISPUTED",
+}
+
+var PaymentStatus_value = map[string]int32{
+ "NO_PAYMENT": 0,
+ "PROMISED": 1,
+ "AUTHORIZED": 2,
+ "GAURANTEED": 3,
+ "PAID": 4,
+ "FAILED": 5,
+ "DISPUTED": 6,
+}
+
+func (x PaymentStatus) String() string {
+ return proto.EnumName(PaymentStatus_name, int32(x))
+}
+
+func (PaymentStatus) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{3}
+}
+
+type Params struct {
+ CollectionSequence uint64 `protobuf:"varint,1,opt,name=collection_sequence,json=collectionSequence,proto3" json:"collection_sequence,omitempty"`
+ IxoAccount string `protobuf:"bytes,2,opt,name=ixo_account,json=ixoAccount,proto3" json:"ixo_account,omitempty"`
+ NetworkFeePercentage types.Dec `protobuf:"bytes,3,opt,name=network_fee_percentage,json=networkFeePercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"network_fee_percentage"`
+ NodeFeePercentage types.Dec `protobuf:"bytes,4,opt,name=node_fee_percentage,json=nodeFeePercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"node_fee_percentage"`
+}
+
+func (m *Params) Reset() { *m = Params{} }
+func (m *Params) String() string { return proto.CompactTextString(m) }
+func (*Params) ProtoMessage() {}
+func (*Params) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{0}
+}
+func (m *Params) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Params.Merge(m, src)
+}
+func (m *Params) XXX_Size() int {
+ return m.Size()
+}
+func (m *Params) XXX_DiscardUnknown() {
+ xxx_messageInfo_Params.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Params proto.InternalMessageInfo
+
+func (m *Params) GetCollectionSequence() uint64 {
+ if m != nil {
+ return m.CollectionSequence
+ }
+ return 0
+}
+
+func (m *Params) GetIxoAccount() string {
+ if m != nil {
+ return m.IxoAccount
+ }
+ return ""
+}
+
+type Collection struct {
+ // collection id is the incremented internal id for the collection of claims
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // entity is the DID of the entity for which the claims are being created
+ Entity string `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
+ // admin is the account address that will authorize or revoke agents and
+ // payments (the grantor)
+ Admin string `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty"`
+ // protocol is the DID of the claim protocol
+ Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"`
+ // startDate is the date after which claims may be submitted
+ StartDate *time.Time `protobuf:"bytes,5,opt,name=start_date,json=startDate,proto3,stdtime" json:"start_date,omitempty"`
+ // endDate is the date after which no more claims may be submitted (no endDate
+ // is allowed)
+ EndDate *time.Time `protobuf:"bytes,6,opt,name=end_date,json=endDate,proto3,stdtime" json:"end_date,omitempty"`
+ // quota is the maximum number of claims that may be submitted, 0 is unlimited
+ Quota uint64 `protobuf:"varint,7,opt,name=quota,proto3" json:"quota,omitempty"`
+ // count is the number of claims already submitted (internally calculated)
+ Count uint64 `protobuf:"varint,8,opt,name=count,proto3" json:"count,omitempty"`
+ // evaluated is the number of claims that have been evaluated (internally
+ // calculated)
+ Evaluated uint64 `protobuf:"varint,9,opt,name=evaluated,proto3" json:"evaluated,omitempty"`
+ // approved is the number of claims that have been evaluated and approved
+ // (internally calculated)
+ Approved uint64 `protobuf:"varint,10,opt,name=approved,proto3" json:"approved,omitempty"`
+ // rejected is the number of claims that have been evaluated and rejected
+ // (internally calculated)
+ Rejected uint64 `protobuf:"varint,11,opt,name=rejected,proto3" json:"rejected,omitempty"`
+ // disputed is the number of claims that have disputed status (internally
+ // calculated)
+ Disputed uint64 `protobuf:"varint,12,opt,name=disputed,proto3" json:"disputed,omitempty"`
+ // state is the current state of this Collection (open, paused, closed)
+ State CollectionState `protobuf:"varint,13,opt,name=state,proto3,enum=ixo.claims.v1beta1.CollectionState" json:"state,omitempty"`
+ // payments is the amount paid for claim submission, evaluation, approval, or
+ // rejection
+ Payments *Payments `protobuf:"bytes,14,opt,name=payments,proto3" json:"payments,omitempty"`
+ // signer address
+ Signer string `protobuf:"bytes,15,opt,name=signer,proto3" json:"signer,omitempty"`
+}
+
+func (m *Collection) Reset() { *m = Collection{} }
+func (m *Collection) String() string { return proto.CompactTextString(m) }
+func (*Collection) ProtoMessage() {}
+func (*Collection) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{1}
+}
+func (m *Collection) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Collection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Collection.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 *Collection) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Collection.Merge(m, src)
+}
+func (m *Collection) XXX_Size() int {
+ return m.Size()
+}
+func (m *Collection) XXX_DiscardUnknown() {
+ xxx_messageInfo_Collection.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Collection proto.InternalMessageInfo
+
+func (m *Collection) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *Collection) GetEntity() string {
+ if m != nil {
+ return m.Entity
+ }
+ return ""
+}
+
+func (m *Collection) GetAdmin() string {
+ if m != nil {
+ return m.Admin
+ }
+ return ""
+}
+
+func (m *Collection) GetProtocol() string {
+ if m != nil {
+ return m.Protocol
+ }
+ return ""
+}
+
+func (m *Collection) GetStartDate() *time.Time {
+ if m != nil {
+ return m.StartDate
+ }
+ return nil
+}
+
+func (m *Collection) GetEndDate() *time.Time {
+ if m != nil {
+ return m.EndDate
+ }
+ return nil
+}
+
+func (m *Collection) GetQuota() uint64 {
+ if m != nil {
+ return m.Quota
+ }
+ return 0
+}
+
+func (m *Collection) GetCount() uint64 {
+ if m != nil {
+ return m.Count
+ }
+ return 0
+}
+
+func (m *Collection) GetEvaluated() uint64 {
+ if m != nil {
+ return m.Evaluated
+ }
+ return 0
+}
+
+func (m *Collection) GetApproved() uint64 {
+ if m != nil {
+ return m.Approved
+ }
+ return 0
+}
+
+func (m *Collection) GetRejected() uint64 {
+ if m != nil {
+ return m.Rejected
+ }
+ return 0
+}
+
+func (m *Collection) GetDisputed() uint64 {
+ if m != nil {
+ return m.Disputed
+ }
+ return 0
+}
+
+func (m *Collection) GetState() CollectionState {
+ if m != nil {
+ return m.State
+ }
+ return CollectionState_open
+}
+
+func (m *Collection) GetPayments() *Payments {
+ if m != nil {
+ return m.Payments
+ }
+ return nil
+}
+
+func (m *Collection) GetSigner() string {
+ if m != nil {
+ return m.Signer
+ }
+ return ""
+}
+
+type Payments struct {
+ Submission *Payment `protobuf:"bytes,1,opt,name=submission,proto3" json:"submission,omitempty"`
+ Evaluation *Payment `protobuf:"bytes,2,opt,name=evaluation,proto3" json:"evaluation,omitempty"`
+ Approval *Payment `protobuf:"bytes,3,opt,name=approval,proto3" json:"approval,omitempty"`
+ Rejection *Payment `protobuf:"bytes,4,opt,name=rejection,proto3" json:"rejection,omitempty"`
+}
+
+func (m *Payments) Reset() { *m = Payments{} }
+func (m *Payments) String() string { return proto.CompactTextString(m) }
+func (*Payments) ProtoMessage() {}
+func (*Payments) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{2}
+}
+func (m *Payments) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Payments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Payments.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 *Payments) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Payments.Merge(m, src)
+}
+func (m *Payments) XXX_Size() int {
+ return m.Size()
+}
+func (m *Payments) XXX_DiscardUnknown() {
+ xxx_messageInfo_Payments.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Payments proto.InternalMessageInfo
+
+func (m *Payments) GetSubmission() *Payment {
+ if m != nil {
+ return m.Submission
+ }
+ return nil
+}
+
+func (m *Payments) GetEvaluation() *Payment {
+ if m != nil {
+ return m.Evaluation
+ }
+ return nil
+}
+
+func (m *Payments) GetApproval() *Payment {
+ if m != nil {
+ return m.Approval
+ }
+ return nil
+}
+
+func (m *Payments) GetRejection() *Payment {
+ if m != nil {
+ return m.Rejection
+ }
+ return nil
+}
+
+type Payment struct {
+ // account is the entity account address from which the payment will be made
+ Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
+ Amount types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
+ // if empty(nil) then no contract payment, not allowed for Evaluation Payment
+ Contract_1155Payment *Contract1155Payment `protobuf:"bytes,3,opt,name=contract_1155_payment,json=contract1155Payment,proto3" json:"contract_1155_payment,omitempty"`
+ // timeout after claim/evaluation to create authZ for payment, if 0 then
+ // immidiate direct payment
+ TimeoutNs time.Duration `protobuf:"bytes,4,opt,name=timeout_ns,json=timeoutNs,proto3,stdduration" json:"timeout_ns"`
+}
+
+func (m *Payment) Reset() { *m = Payment{} }
+func (m *Payment) String() string { return proto.CompactTextString(m) }
+func (*Payment) ProtoMessage() {}
+func (*Payment) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{3}
+}
+func (m *Payment) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Payment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Payment.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 *Payment) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Payment.Merge(m, src)
+}
+func (m *Payment) XXX_Size() int {
+ return m.Size()
+}
+func (m *Payment) XXX_DiscardUnknown() {
+ xxx_messageInfo_Payment.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Payment proto.InternalMessageInfo
+
+func (m *Payment) GetAccount() string {
+ if m != nil {
+ return m.Account
+ }
+ return ""
+}
+
+func (m *Payment) GetAmount() types.Coins {
+ if m != nil {
+ return m.Amount
+ }
+ return nil
+}
+
+func (m *Payment) GetContract_1155Payment() *Contract1155Payment {
+ if m != nil {
+ return m.Contract_1155Payment
+ }
+ return nil
+}
+
+func (m *Payment) GetTimeoutNs() time.Duration {
+ if m != nil {
+ return m.TimeoutNs
+ }
+ return 0
+}
+
+type Contract1155Payment struct {
+ Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
+ TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
+ Amount uint32 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
+}
+
+func (m *Contract1155Payment) Reset() { *m = Contract1155Payment{} }
+func (m *Contract1155Payment) String() string { return proto.CompactTextString(m) }
+func (*Contract1155Payment) ProtoMessage() {}
+func (*Contract1155Payment) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{4}
+}
+func (m *Contract1155Payment) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Contract1155Payment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Contract1155Payment.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 *Contract1155Payment) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Contract1155Payment.Merge(m, src)
+}
+func (m *Contract1155Payment) XXX_Size() int {
+ return m.Size()
+}
+func (m *Contract1155Payment) XXX_DiscardUnknown() {
+ xxx_messageInfo_Contract1155Payment.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Contract1155Payment proto.InternalMessageInfo
+
+func (m *Contract1155Payment) GetAddress() string {
+ if m != nil {
+ return m.Address
+ }
+ return ""
+}
+
+func (m *Contract1155Payment) GetTokenId() string {
+ if m != nil {
+ return m.TokenId
+ }
+ return ""
+}
+
+func (m *Contract1155Payment) GetAmount() uint32 {
+ if m != nil {
+ return m.Amount
+ }
+ return 0
+}
+
+type Claim struct {
+ // collection_id indicates to which Collection this claim belongs
+ CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
+ // agent is the DID of the agent submitting the claim
+ AgentDid string `protobuf:"bytes,2,opt,name=agent_did,json=agentDid,proto3" json:"agent_did,omitempty"`
+ AgentAddress string `protobuf:"bytes,3,opt,name=agent_address,json=agentAddress,proto3" json:"agent_address,omitempty"`
+ // submissionDate is the date and time that the claim was submitted on-chain
+ SubmissionDate *time.Time `protobuf:"bytes,4,opt,name=submission_date,json=submissionDate,proto3,stdtime" json:"submission_date,omitempty"`
+ // claimID is the unique identifier of the claim in the cid hash format
+ ClaimId string `protobuf:"bytes,5,opt,name=claim_id,json=claimId,proto3" json:"claim_id,omitempty"`
+ // evaluation is the result of one or more claim evaluations
+ Evaluation *Evaluation `protobuf:"bytes,6,opt,name=evaluation,proto3" json:"evaluation,omitempty"`
+ PaymentsStatus *ClaimPayments `protobuf:"bytes,7,opt,name=payments_status,json=paymentsStatus,proto3" json:"payments_status,omitempty"`
+}
+
+func (m *Claim) Reset() { *m = Claim{} }
+func (m *Claim) String() string { return proto.CompactTextString(m) }
+func (*Claim) ProtoMessage() {}
+func (*Claim) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{5}
+}
+func (m *Claim) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Claim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Claim.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 *Claim) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Claim.Merge(m, src)
+}
+func (m *Claim) XXX_Size() int {
+ return m.Size()
+}
+func (m *Claim) XXX_DiscardUnknown() {
+ xxx_messageInfo_Claim.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Claim proto.InternalMessageInfo
+
+func (m *Claim) GetCollectionId() string {
+ if m != nil {
+ return m.CollectionId
+ }
+ return ""
+}
+
+func (m *Claim) GetAgentDid() string {
+ if m != nil {
+ return m.AgentDid
+ }
+ return ""
+}
+
+func (m *Claim) GetAgentAddress() string {
+ if m != nil {
+ return m.AgentAddress
+ }
+ return ""
+}
+
+func (m *Claim) GetSubmissionDate() *time.Time {
+ if m != nil {
+ return m.SubmissionDate
+ }
+ return nil
+}
+
+func (m *Claim) GetClaimId() string {
+ if m != nil {
+ return m.ClaimId
+ }
+ return ""
+}
+
+func (m *Claim) GetEvaluation() *Evaluation {
+ if m != nil {
+ return m.Evaluation
+ }
+ return nil
+}
+
+func (m *Claim) GetPaymentsStatus() *ClaimPayments {
+ if m != nil {
+ return m.PaymentsStatus
+ }
+ return nil
+}
+
+type ClaimPayments struct {
+ Submission PaymentStatus `protobuf:"varint,1,opt,name=submission,proto3,enum=ixo.claims.v1beta1.PaymentStatus" json:"submission,omitempty"`
+ Evaluation PaymentStatus `protobuf:"varint,2,opt,name=evaluation,proto3,enum=ixo.claims.v1beta1.PaymentStatus" json:"evaluation,omitempty"`
+ Approval PaymentStatus `protobuf:"varint,3,opt,name=approval,proto3,enum=ixo.claims.v1beta1.PaymentStatus" json:"approval,omitempty"`
+ Rejection PaymentStatus `protobuf:"varint,4,opt,name=rejection,proto3,enum=ixo.claims.v1beta1.PaymentStatus" json:"rejection,omitempty"`
+}
+
+func (m *ClaimPayments) Reset() { *m = ClaimPayments{} }
+func (m *ClaimPayments) String() string { return proto.CompactTextString(m) }
+func (*ClaimPayments) ProtoMessage() {}
+func (*ClaimPayments) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{6}
+}
+func (m *ClaimPayments) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ClaimPayments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ClaimPayments.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 *ClaimPayments) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ClaimPayments.Merge(m, src)
+}
+func (m *ClaimPayments) XXX_Size() int {
+ return m.Size()
+}
+func (m *ClaimPayments) XXX_DiscardUnknown() {
+ xxx_messageInfo_ClaimPayments.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ClaimPayments proto.InternalMessageInfo
+
+func (m *ClaimPayments) GetSubmission() PaymentStatus {
+ if m != nil {
+ return m.Submission
+ }
+ return PaymentStatus_no_payment
+}
+
+func (m *ClaimPayments) GetEvaluation() PaymentStatus {
+ if m != nil {
+ return m.Evaluation
+ }
+ return PaymentStatus_no_payment
+}
+
+func (m *ClaimPayments) GetApproval() PaymentStatus {
+ if m != nil {
+ return m.Approval
+ }
+ return PaymentStatus_no_payment
+}
+
+func (m *ClaimPayments) GetRejection() PaymentStatus {
+ if m != nil {
+ return m.Rejection
+ }
+ return PaymentStatus_no_payment
+}
+
+type Evaluation struct {
+ // claim_id indicates which Claim this evaluation is for
+ ClaimId string `protobuf:"bytes,1,opt,name=claim_id,json=claimId,proto3" json:"claim_id,omitempty"`
+ // collection_id indicates to which Collection the claim being evaluated
+ // belongs to
+ CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
+ // oracle is the DID of the Oracle entity that evaluates the claim
+ Oracle string `protobuf:"bytes,3,opt,name=oracle,proto3" json:"oracle,omitempty"`
+ // agent is the DID of the agent that submits the evaluation
+ AgentDid string `protobuf:"bytes,4,opt,name=agent_did,json=agentDid,proto3" json:"agent_did,omitempty"`
+ AgentAddress string `protobuf:"bytes,5,opt,name=agent_address,json=agentAddress,proto3" json:"agent_address,omitempty"`
+ // status is the evaluation status expressed as an integer (2=approved,
+ // 3=rejected, ...)
+ Status EvaluationStatus `protobuf:"varint,6,opt,name=status,proto3,enum=ixo.claims.v1beta1.EvaluationStatus" json:"status,omitempty"`
+ // reason is the code expressed as an integer, for why the evaluation result
+ // was given (codes defined by evaluator)
+ Reason uint32 `protobuf:"varint,7,opt,name=reason,proto3" json:"reason,omitempty"`
+ // verificationProof is the cid of the evaluation Verfiable Credential
+ VerificationProof string `protobuf:"bytes,8,opt,name=verification_proof,json=verificationProof,proto3" json:"verification_proof,omitempty"`
+ // evaluationDate is the date and time that the claim evaluation was submitted
+ // on-chain
+ EvaluationDate *time.Time `protobuf:"bytes,9,opt,name=evaluation_date,json=evaluationDate,proto3,stdtime" json:"evaluation_date,omitempty"`
+ // custom amount specified by evaluator for claim approval, if empty list then
+ // use default by Collection
+ Amount types.Coins `protobuf:"bytes,10,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
+}
+
+func (m *Evaluation) Reset() { *m = Evaluation{} }
+func (m *Evaluation) String() string { return proto.CompactTextString(m) }
+func (*Evaluation) ProtoMessage() {}
+func (*Evaluation) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{7}
+}
+func (m *Evaluation) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Evaluation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Evaluation.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 *Evaluation) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Evaluation.Merge(m, src)
+}
+func (m *Evaluation) XXX_Size() int {
+ return m.Size()
+}
+func (m *Evaluation) XXX_DiscardUnknown() {
+ xxx_messageInfo_Evaluation.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Evaluation proto.InternalMessageInfo
+
+func (m *Evaluation) GetClaimId() string {
+ if m != nil {
+ return m.ClaimId
+ }
+ return ""
+}
+
+func (m *Evaluation) GetCollectionId() string {
+ if m != nil {
+ return m.CollectionId
+ }
+ return ""
+}
+
+func (m *Evaluation) GetOracle() string {
+ if m != nil {
+ return m.Oracle
+ }
+ return ""
+}
+
+func (m *Evaluation) GetAgentDid() string {
+ if m != nil {
+ return m.AgentDid
+ }
+ return ""
+}
+
+func (m *Evaluation) GetAgentAddress() string {
+ if m != nil {
+ return m.AgentAddress
+ }
+ return ""
+}
+
+func (m *Evaluation) GetStatus() EvaluationStatus {
+ if m != nil {
+ return m.Status
+ }
+ return EvaluationStatus_pending
+}
+
+func (m *Evaluation) GetReason() uint32 {
+ if m != nil {
+ return m.Reason
+ }
+ return 0
+}
+
+func (m *Evaluation) GetVerificationProof() string {
+ if m != nil {
+ return m.VerificationProof
+ }
+ return ""
+}
+
+func (m *Evaluation) GetEvaluationDate() *time.Time {
+ if m != nil {
+ return m.EvaluationDate
+ }
+ return nil
+}
+
+func (m *Evaluation) GetAmount() types.Coins {
+ if m != nil {
+ return m.Amount
+ }
+ return nil
+}
+
+type Dispute struct {
+ SubjectId string `protobuf:"bytes,1,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"`
+ // type is expressed as an integer, interpreted by the client
+ Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
+ Data *DisputeData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+}
+
+func (m *Dispute) Reset() { *m = Dispute{} }
+func (m *Dispute) String() string { return proto.CompactTextString(m) }
+func (*Dispute) ProtoMessage() {}
+func (*Dispute) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{8}
+}
+func (m *Dispute) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Dispute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Dispute.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 *Dispute) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Dispute.Merge(m, src)
+}
+func (m *Dispute) XXX_Size() int {
+ return m.Size()
+}
+func (m *Dispute) XXX_DiscardUnknown() {
+ xxx_messageInfo_Dispute.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Dispute proto.InternalMessageInfo
+
+func (m *Dispute) GetSubjectId() string {
+ if m != nil {
+ return m.SubjectId
+ }
+ return ""
+}
+
+func (m *Dispute) GetType() int32 {
+ if m != nil {
+ return m.Type
+ }
+ return 0
+}
+
+func (m *Dispute) GetData() *DisputeData {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+type DisputeData struct {
+ Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
+ Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ Proof string `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"`
+ Encrypted bool `protobuf:"varint,4,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
+}
+
+func (m *DisputeData) Reset() { *m = DisputeData{} }
+func (m *DisputeData) String() string { return proto.CompactTextString(m) }
+func (*DisputeData) ProtoMessage() {}
+func (*DisputeData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{9}
+}
+func (m *DisputeData) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DisputeData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DisputeData.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 *DisputeData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DisputeData.Merge(m, src)
+}
+func (m *DisputeData) XXX_Size() int {
+ return m.Size()
+}
+func (m *DisputeData) XXX_DiscardUnknown() {
+ xxx_messageInfo_DisputeData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DisputeData proto.InternalMessageInfo
+
+func (m *DisputeData) GetUri() string {
+ if m != nil {
+ return m.Uri
+ }
+ return ""
+}
+
+func (m *DisputeData) GetType() string {
+ if m != nil {
+ return m.Type
+ }
+ return ""
+}
+
+func (m *DisputeData) GetProof() string {
+ if m != nil {
+ return m.Proof
+ }
+ return ""
+}
+
+func (m *DisputeData) GetEncrypted() bool {
+ if m != nil {
+ return m.Encrypted
+ }
+ return false
+}
+
+var fileDescriptor_619c1a0876cd0592 = []byte{
+ // 1507 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45,
+ 0x1b, 0xcf, 0x3a, 0xb6, 0x63, 0x3f, 0xce, 0x57, 0x27, 0x79, 0x2b, 0xc7, 0xed, 0x6b, 0xfb, 0x75,
+ 0x5f, 0x41, 0x14, 0xa9, 0x36, 0x49, 0x55, 0x41, 0x29, 0x50, 0x39, 0xb1, 0x5b, 0x5c, 0xa5, 0x89,
+ 0xb5, 0x4e, 0x2a, 0x51, 0x24, 0xac, 0xc9, 0xee, 0xc4, 0x19, 0x62, 0xef, 0x6c, 0x77, 0x67, 0x43,
+ 0xc2, 0x89, 0x1b, 0x52, 0x2e, 0xf4, 0x82, 0xc4, 0x25, 0x52, 0xaf, 0xf0, 0x97, 0xf4, 0x58, 0x89,
+ 0x0b, 0x02, 0xa9, 0xad, 0xda, 0x0b, 0x7f, 0x02, 0x47, 0x34, 0x1f, 0xeb, 0xb5, 0x13, 0xab, 0xb5,
+ 0x90, 0x38, 0xc5, 0xcf, 0xc7, 0xef, 0x99, 0x79, 0xbe, 0x7e, 0x3b, 0x81, 0x02, 0x3d, 0x66, 0x15,
+ 0xab, 0x8b, 0x69, 0xcf, 0xaf, 0x1c, 0xad, 0xee, 0x11, 0x8e, 0x57, 0xb5, 0x58, 0x76, 0x3d, 0xc6,
+ 0x19, 0x42, 0xf4, 0x98, 0x95, 0xb5, 0x46, 0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, 0x6e, 0xed, 0xd4, 0x65, 0x55, 0xa4, 0xbd, 0x83,
+ 0x03, 0x0f, 0x3b, 0x9c, 0x10, 0x39, 0xa3, 0xcd, 0x6a, 0xa3, 0x36, 0x1f, 0x57, 0xed, 0x75, 0xb1,
+ 0x7a, 0xbe, 0xdf, 0xad, 0x36, 0x36, 0xeb, 0xb5, 0xf9, 0x84, 0x6a, 0xe3, 0x3e, 0xa6, 0xdd, 0x73,
+ 0xf5, 0x4d, 0x0e, 0xd7, 0x77, 0xbd, 0xf5, 0xec, 0x75, 0xde, 0x78, 0xfe, 0x3a, 0x6f, 0xbc, 0x7a,
+ 0x9d, 0x37, 0x9e, 0xbc, 0xc9, 0x4f, 0x3c, 0x7f, 0x93, 0x9f, 0xf8, 0xed, 0x4d, 0x7e, 0xe2, 0xd1,
+ 0xad, 0x81, 0x0d, 0xa3, 0xc7, 0x6c, 0x9f, 0x05, 0x8e, 0x2d, 0xeb, 0x24, 0xa4, 0xeb, 0x7b, 0x5d,
+ 0x66, 0x1d, 0x5a, 0x07, 0x98, 0x3a, 0x95, 0xa3, 0xb5, 0xca, 0x71, 0xf8, 0x3f, 0xa2, 0x5c, 0xbc,
+ 0xbd, 0xa4, 0xdc, 0xfc, 0x1b, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xef, 0x10, 0xad, 0xdc, 0x3e,
+ 0x0e, 0x00, 0x00,
+}
+
+func (this *Contract1155Payment) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*Contract1155Payment)
+ if !ok {
+ that2, ok := that.(Contract1155Payment)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.Address != that1.Address {
+ return false
+ }
+ if this.TokenId != that1.TokenId {
+ return false
+ }
+ if this.Amount != that1.Amount {
+ return false
+ }
+ return true
+}
+func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size := m.NodeFeePercentage.Size()
+ i -= size
+ if _, err := m.NodeFeePercentage.MarshalTo(dAtA[i:]); err != nil {
+ return 0, err
+ }
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ {
+ size := m.NetworkFeePercentage.Size()
+ i -= size
+ if _, err := m.NetworkFeePercentage.MarshalTo(dAtA[i:]); err != nil {
+ return 0, err
+ }
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ if len(m.IxoAccount) > 0 {
+ i -= len(m.IxoAccount)
+ copy(dAtA[i:], m.IxoAccount)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.IxoAccount)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.CollectionSequence != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.CollectionSequence))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Collection) 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 *Collection) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Collection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Signer) > 0 {
+ i -= len(m.Signer)
+ copy(dAtA[i:], m.Signer)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Signer)))
+ i--
+ dAtA[i] = 0x7a
+ }
+ if m.Payments != nil {
+ {
+ size, err := m.Payments.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x72
+ }
+ if m.State != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.State))
+ i--
+ dAtA[i] = 0x68
+ }
+ if m.Disputed != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Disputed))
+ i--
+ dAtA[i] = 0x60
+ }
+ if m.Rejected != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Rejected))
+ i--
+ dAtA[i] = 0x58
+ }
+ if m.Approved != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Approved))
+ i--
+ dAtA[i] = 0x50
+ }
+ if m.Evaluated != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Evaluated))
+ i--
+ dAtA[i] = 0x48
+ }
+ if m.Count != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Count))
+ i--
+ dAtA[i] = 0x40
+ }
+ if m.Quota != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Quota))
+ i--
+ dAtA[i] = 0x38
+ }
+ if m.EndDate != nil {
+ n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.EndDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate):])
+ if err2 != nil {
+ return 0, err2
+ }
+ i -= n2
+ i = encodeVarintClaims(dAtA, i, uint64(n2))
+ i--
+ dAtA[i] = 0x32
+ }
+ if m.StartDate != nil {
+ n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StartDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate):])
+ if err3 != nil {
+ return 0, err3
+ }
+ i -= n3
+ i = encodeVarintClaims(dAtA, i, uint64(n3))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.Protocol) > 0 {
+ i -= len(m.Protocol)
+ copy(dAtA[i:], m.Protocol)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Protocol)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Admin) > 0 {
+ i -= len(m.Admin)
+ copy(dAtA[i:], m.Admin)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Admin)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Entity) > 0 {
+ i -= len(m.Entity)
+ copy(dAtA[i:], m.Entity)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Entity)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Id) > 0 {
+ i -= len(m.Id)
+ copy(dAtA[i:], m.Id)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Id)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Payments) 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 *Payments) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Payments) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Rejection != nil {
+ {
+ size, err := m.Rejection.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Approval != nil {
+ {
+ size, err := m.Approval.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Evaluation != nil {
+ {
+ size, err := m.Evaluation.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Submission != nil {
+ {
+ size, err := m.Submission.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Payment) 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 *Payment) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Payment) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TimeoutNs, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TimeoutNs):])
+ if err8 != nil {
+ return 0, err8
+ }
+ i -= n8
+ i = encodeVarintClaims(dAtA, i, uint64(n8))
+ i--
+ dAtA[i] = 0x22
+ if m.Contract_1155Payment != nil {
+ {
+ size, err := m.Contract_1155Payment.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Amount) > 0 {
+ for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Account) > 0 {
+ i -= len(m.Account)
+ copy(dAtA[i:], m.Account)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Account)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Contract1155Payment) 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 *Contract1155Payment) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Contract1155Payment) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Amount != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Amount))
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.TokenId) > 0 {
+ i -= len(m.TokenId)
+ copy(dAtA[i:], m.TokenId)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.TokenId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Address) > 0 {
+ i -= len(m.Address)
+ copy(dAtA[i:], m.Address)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Address)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Claim) 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 *Claim) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Claim) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.PaymentsStatus != nil {
+ {
+ size, err := m.PaymentsStatus.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.Evaluation != nil {
+ {
+ size, err := m.Evaluation.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.ClaimId) > 0 {
+ i -= len(m.ClaimId)
+ copy(dAtA[i:], m.ClaimId)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.ClaimId)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.SubmissionDate != nil {
+ n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.SubmissionDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.SubmissionDate):])
+ if err12 != nil {
+ return 0, err12
+ }
+ i -= n12
+ i = encodeVarintClaims(dAtA, i, uint64(n12))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.AgentAddress) > 0 {
+ i -= len(m.AgentAddress)
+ copy(dAtA[i:], m.AgentAddress)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.AgentAddress)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.AgentDid) > 0 {
+ i -= len(m.AgentDid)
+ copy(dAtA[i:], m.AgentDid)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.AgentDid)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.CollectionId) > 0 {
+ i -= len(m.CollectionId)
+ copy(dAtA[i:], m.CollectionId)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.CollectionId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ClaimPayments) 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 *ClaimPayments) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *ClaimPayments) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Rejection != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Rejection))
+ i--
+ dAtA[i] = 0x20
+ }
+ if m.Approval != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Approval))
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.Evaluation != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Evaluation))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.Submission != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Submission))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Evaluation) 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 *Evaluation) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Evaluation) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Amount) > 0 {
+ for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x52
+ }
+ }
+ if m.EvaluationDate != nil {
+ n13, err13 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.EvaluationDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.EvaluationDate):])
+ if err13 != nil {
+ return 0, err13
+ }
+ i -= n13
+ i = encodeVarintClaims(dAtA, i, uint64(n13))
+ i--
+ dAtA[i] = 0x4a
+ }
+ if len(m.VerificationProof) > 0 {
+ i -= len(m.VerificationProof)
+ copy(dAtA[i:], m.VerificationProof)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.VerificationProof)))
+ i--
+ dAtA[i] = 0x42
+ }
+ if m.Reason != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Reason))
+ i--
+ dAtA[i] = 0x38
+ }
+ if m.Status != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Status))
+ i--
+ dAtA[i] = 0x30
+ }
+ if len(m.AgentAddress) > 0 {
+ i -= len(m.AgentAddress)
+ copy(dAtA[i:], m.AgentAddress)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.AgentAddress)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.AgentDid) > 0 {
+ i -= len(m.AgentDid)
+ copy(dAtA[i:], m.AgentDid)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.AgentDid)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Oracle) > 0 {
+ i -= len(m.Oracle)
+ copy(dAtA[i:], m.Oracle)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Oracle)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.CollectionId) > 0 {
+ i -= len(m.CollectionId)
+ copy(dAtA[i:], m.CollectionId)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.CollectionId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.ClaimId) > 0 {
+ i -= len(m.ClaimId)
+ copy(dAtA[i:], m.ClaimId)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.ClaimId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Dispute) 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 *Dispute) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *Dispute) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Data != nil {
+ {
+ size, err := m.Data.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Type != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Type))
+ i--
+ dAtA[i] = 0x10
+ }
+ if len(m.SubjectId) > 0 {
+ i -= len(m.SubjectId)
+ copy(dAtA[i:], m.SubjectId)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.SubjectId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DisputeData) 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 *DisputeData) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *DisputeData) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Encrypted {
+ i--
+ if m.Encrypted {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if len(m.Proof) > 0 {
+ i -= len(m.Proof)
+ copy(dAtA[i:], m.Proof)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Proof)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Type) > 0 {
+ i -= len(m.Type)
+ copy(dAtA[i:], m.Type)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Type)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Uri) > 0 {
+ i -= len(m.Uri)
+ copy(dAtA[i:], m.Uri)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Uri)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintClaims(dAtA []byte, offset int, v uint64) int {
+ offset -= sovClaims(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *Params) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CollectionSequence != 0 {
+ n += 1 + sovClaims(uint64(m.CollectionSequence))
+ }
+ l = len(m.IxoAccount)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = m.NetworkFeePercentage.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ l = m.NodeFeePercentage.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ return n
+}
+
+func (m *Collection) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.Entity)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.Admin)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.Protocol)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.StartDate != nil {
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate)
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.EndDate != nil {
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate)
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Quota != 0 {
+ n += 1 + sovClaims(uint64(m.Quota))
+ }
+ if m.Count != 0 {
+ n += 1 + sovClaims(uint64(m.Count))
+ }
+ if m.Evaluated != 0 {
+ n += 1 + sovClaims(uint64(m.Evaluated))
+ }
+ if m.Approved != 0 {
+ n += 1 + sovClaims(uint64(m.Approved))
+ }
+ if m.Rejected != 0 {
+ n += 1 + sovClaims(uint64(m.Rejected))
+ }
+ if m.Disputed != 0 {
+ n += 1 + sovClaims(uint64(m.Disputed))
+ }
+ if m.State != 0 {
+ n += 1 + sovClaims(uint64(m.State))
+ }
+ if m.Payments != nil {
+ l = m.Payments.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.Signer)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ return n
+}
+
+func (m *Payments) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Submission != nil {
+ l = m.Submission.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Evaluation != nil {
+ l = m.Evaluation.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Approval != nil {
+ l = m.Approval.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Rejection != nil {
+ l = m.Rejection.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ return n
+}
+
+func (m *Payment) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Account)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if len(m.Amount) > 0 {
+ for _, e := range m.Amount {
+ l = e.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ }
+ if m.Contract_1155Payment != nil {
+ l = m.Contract_1155Payment.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.TimeoutNs)
+ n += 1 + l + sovClaims(uint64(l))
+ return n
+}
+
+func (m *Contract1155Payment) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Address)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.TokenId)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Amount != 0 {
+ n += 1 + sovClaims(uint64(m.Amount))
+ }
+ return n
+}
+
+func (m *Claim) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.AgentDid)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.AgentAddress)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.SubmissionDate != nil {
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.SubmissionDate)
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.ClaimId)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Evaluation != nil {
+ l = m.Evaluation.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.PaymentsStatus != nil {
+ l = m.PaymentsStatus.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ return n
+}
+
+func (m *ClaimPayments) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Submission != 0 {
+ n += 1 + sovClaims(uint64(m.Submission))
+ }
+ if m.Evaluation != 0 {
+ n += 1 + sovClaims(uint64(m.Evaluation))
+ }
+ if m.Approval != 0 {
+ n += 1 + sovClaims(uint64(m.Approval))
+ }
+ if m.Rejection != 0 {
+ n += 1 + sovClaims(uint64(m.Rejection))
+ }
+ return n
+}
+
+func (m *Evaluation) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.ClaimId)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.Oracle)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.AgentDid)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.AgentAddress)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Status != 0 {
+ n += 1 + sovClaims(uint64(m.Status))
+ }
+ if m.Reason != 0 {
+ n += 1 + sovClaims(uint64(m.Reason))
+ }
+ l = len(m.VerificationProof)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.EvaluationDate != nil {
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.EvaluationDate)
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if len(m.Amount) > 0 {
+ for _, e := range m.Amount {
+ l = e.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *Dispute) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SubjectId)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Type != 0 {
+ n += 1 + sovClaims(uint64(m.Type))
+ }
+ if m.Data != nil {
+ l = m.Data.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ return n
+}
+
+func (m *DisputeData) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Uri)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.Type)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.Proof)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Encrypted {
+ n += 2
+ }
+ return n
+}
+
+func sovClaims(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
+}
+func sozClaims(x uint64) (n int) {
+ return sovClaims(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (m *Params) 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 ErrIntOverflowClaims
+ }
+ 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: Params: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionSequence", wireType)
+ }
+ m.CollectionSequence = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.CollectionSequence |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IxoAccount", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IxoAccount = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NetworkFeePercentage", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.NetworkFeePercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NodeFeePercentage", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.NodeFeePercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Collection) 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 ErrIntOverflowClaims
+ }
+ 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: Collection: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Collection: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Entity = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Admin = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Protocol = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartDate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StartDate == nil {
+ m.StartDate = new(time.Time)
+ }
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.StartDate, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EndDate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.EndDate == nil {
+ m.EndDate = new(time.Time)
+ }
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.EndDate, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Quota", wireType)
+ }
+ m.Quota = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Quota |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
+ }
+ m.Count = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Count |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Evaluated", wireType)
+ }
+ m.Evaluated = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Evaluated |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 10:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Approved", wireType)
+ }
+ m.Approved = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Approved |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 11:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rejected", wireType)
+ }
+ m.Rejected = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Rejected |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 12:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Disputed", wireType)
+ }
+ m.Disputed = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Disputed |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 13:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ m.State = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.State |= CollectionState(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Payments", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Payments == nil {
+ m.Payments = &Payments{}
+ }
+ if err := m.Payments.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Signer = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Payments) 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 ErrIntOverflowClaims
+ }
+ 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: Payments: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Payments: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Submission", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Submission == nil {
+ m.Submission = &Payment{}
+ }
+ if err := m.Submission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Evaluation", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Evaluation == nil {
+ m.Evaluation = &Payment{}
+ }
+ if err := m.Evaluation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Approval", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Approval == nil {
+ m.Approval = &Payment{}
+ }
+ if err := m.Approval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rejection", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Rejection == nil {
+ m.Rejection = &Payment{}
+ }
+ if err := m.Rejection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Payment) 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 ErrIntOverflowClaims
+ }
+ 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: Payment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Payment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Account = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Amount = append(m.Amount, types.Coin{})
+ if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Contract_1155Payment", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Contract_1155Payment == nil {
+ m.Contract_1155Payment = &Contract1155Payment{}
+ }
+ if err := m.Contract_1155Payment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TimeoutNs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.TimeoutNs, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Contract1155Payment) 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 ErrIntOverflowClaims
+ }
+ 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: Contract1155Payment: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Contract1155Payment: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Address = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TokenId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TokenId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
+ }
+ m.Amount = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Amount |= uint32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Claim) 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 ErrIntOverflowClaims
+ }
+ 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: Claim: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Claim: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CollectionId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AgentDid", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AgentDid = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AgentAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AgentAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubmissionDate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SubmissionDate == nil {
+ m.SubmissionDate = new(time.Time)
+ }
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.SubmissionDate, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClaimId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClaimId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Evaluation", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Evaluation == nil {
+ m.Evaluation = &Evaluation{}
+ }
+ if err := m.Evaluation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PaymentsStatus", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PaymentsStatus == nil {
+ m.PaymentsStatus = &ClaimPayments{}
+ }
+ if err := m.PaymentsStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ClaimPayments) 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 ErrIntOverflowClaims
+ }
+ 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: ClaimPayments: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ClaimPayments: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Submission", wireType)
+ }
+ m.Submission = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Submission |= PaymentStatus(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Evaluation", wireType)
+ }
+ m.Evaluation = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Evaluation |= PaymentStatus(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Approval", wireType)
+ }
+ m.Approval = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Approval |= PaymentStatus(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Rejection", wireType)
+ }
+ m.Rejection = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Rejection |= PaymentStatus(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Evaluation) 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 ErrIntOverflowClaims
+ }
+ 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: Evaluation: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Evaluation: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClaimId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClaimId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CollectionId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Oracle", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Oracle = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AgentDid", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AgentDid = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AgentAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AgentAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ m.Status = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Status |= EvaluationStatus(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
+ }
+ m.Reason = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Reason |= uint32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field VerificationProof", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.VerificationProof = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.EvaluationDate == nil {
+ m.EvaluationDate = new(time.Time)
+ }
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.EvaluationDate, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Amount = append(m.Amount, types.Coin{})
+ if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Dispute) 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 ErrIntOverflowClaims
+ }
+ 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: Dispute: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Dispute: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ m.Type = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Type |= int32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Data == nil {
+ m.Data = &DisputeData{}
+ }
+ if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DisputeData) 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 ErrIntOverflowClaims
+ }
+ 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: DisputeData: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DisputeData: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Uri", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Uri = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Proof = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Encrypted", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Encrypted = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipClaims(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ depth := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ case 1:
+ iNdEx += 8
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if length < 0 {
+ return 0, ErrInvalidLengthClaims
+ }
+ iNdEx += length
+ case 3:
+ depth++
+ case 4:
+ if depth == 0 {
+ return 0, ErrUnexpectedEndOfGroupClaims
+ }
+ depth--
+ case 5:
+ iNdEx += 4
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthClaims
+ }
+ if depth == 0 {
+ return iNdEx, nil
+ }
+ }
+ return 0, io.ErrUnexpectedEOF
+}
+
+var (
+ ErrInvalidLengthClaims = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowClaims = fmt.Errorf("proto: integer overflow")
+ ErrUnexpectedEndOfGroupClaims = fmt.Errorf("proto: unexpected end of group")
+)
diff --git a/x/claims/migrations/v2/store.go b/x/claims/migrations/v2/store.go
new file mode 100644
index 00000000..d814ef0c
--- /dev/null
+++ b/x/claims/migrations/v2/store.go
@@ -0,0 +1,95 @@
+package v2claims
+
+import (
+ "github.com/cosmos/cosmos-sdk/codec"
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
+ "github.com/ixofoundation/ixo-blockchain/v2/x/claims/types"
+)
+
+// MigrateStore performs in-place store migrations from ConsensusVersion 1 to 2.
+func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, cdc codec.BinaryCodec) error {
+ store := ctx.KVStore(storeKey)
+ // Get all existing collections from the store
+ iterator := sdk.KVStorePrefixIterator(store, types.CollectionKey)
+ defer iterator.Close()
+
+ for ; iterator.Valid(); iterator.Next() {
+ var oldCollection Collection // Define struct for v1 collections
+ err := cdc.Unmarshal(iterator.Value(), &oldCollection)
+ if err != nil {
+ return sdkerrors.Wrap(err, "failed to unmarshal collection")
+ }
+
+ // Convert v1 collection to v2 collection
+ newCollection := types.Collection{
+ Id: oldCollection.Id,
+ Entity: oldCollection.Entity,
+ Admin: oldCollection.Admin,
+ Protocol: oldCollection.Protocol,
+ StartDate: oldCollection.StartDate,
+ EndDate: oldCollection.EndDate,
+ Quota: oldCollection.Quota,
+ Count: oldCollection.Count,
+ Evaluated: oldCollection.Evaluated,
+ Approved: oldCollection.Approved,
+ Rejected: oldCollection.Rejected,
+ Disputed: oldCollection.Disputed,
+ State: types.CollectionState(oldCollection.State),
+ Payments: convertPayments(*oldCollection.Payments),
+ Signer: oldCollection.Signer,
+ // Add the new field "Invalidated" with a default value of 0.
+ Invalidated: 0,
+ }
+
+ // Marshal the new collection and store it with the same key
+ marshaled, err := cdc.Marshal(&newCollection)
+ if err != nil {
+ return sdkerrors.Wrap(err, "failed to marshal new collection")
+ }
+ store.Set(iterator.Key(), marshaled)
+ }
+
+ return nil
+}
+
+// Define a function to convert old Contract1155Payment type to new Contract1155Payment type
+func convertContract1155Payment(oldContract *Contract1155Payment) *types.Contract1155Payment {
+ if oldContract == nil {
+ return nil
+ }
+
+ return &types.Contract1155Payment{
+ Address: oldContract.Address,
+ TokenId: oldContract.TokenId,
+ Amount: oldContract.Amount,
+ }
+}
+
+// Define a function to convert old Payment type to new Payment type
+func convertPayment(oldPayment *Payment) *types.Payment {
+ if oldPayment == nil {
+ return nil
+ }
+
+ newPayment := &types.Payment{
+ Account: oldPayment.Account,
+ Amount: oldPayment.Amount,
+ TimeoutNs: oldPayment.TimeoutNs,
+ }
+
+ // Convert Contract1155Payment if present
+ newPayment.Contract_1155Payment = convertContract1155Payment(oldPayment.Contract_1155Payment)
+
+ return newPayment
+}
+
+// Define a function to convert old Payments type to new Payments type
+func convertPayments(oldPayments Payments) *types.Payments {
+ return &types.Payments{
+ Submission: convertPayment(oldPayments.Submission),
+ Evaluation: convertPayment(oldPayments.Evaluation),
+ Approval: convertPayment(oldPayments.Approval),
+ Rejection: convertPayment(oldPayments.Rejection),
+ }
+}
diff --git a/x/claims/module.go b/x/claims/module.go
index a87ffd39..7e63b89c 100644
--- a/x/claims/module.go
+++ b/x/claims/module.go
@@ -134,6 +134,11 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd
func (am AppModule) RegisterServices(cfg module.Configurator) {
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper))
types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(am.keeper))
+
+ m := keeper.NewMigrator(am.keeper)
+ if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil {
+ panic(err)
+ }
}
// InitGenesis performs genesis initialization for the module. It returns
@@ -165,5 +170,5 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val
// introduced by the module. To avoid wrong/empty versions, the initial version
// should be set to 1.
func (am AppModule) ConsensusVersion() uint64 {
- return 1
+ return 2
}
diff --git a/x/claims/spec/01_concepts.md b/x/claims/spec/01_concepts.md
index 7584d172..cceaecbb 100644
--- a/x/claims/spec/01_concepts.md
+++ b/x/claims/spec/01_concepts.md
@@ -79,15 +79,17 @@ An ixo entity can have one or more claim protocols represented as a `linkedClaim
- Claims are organized under a [Collection](02_state.md#collection), where each collection contains claims submitted under a specific protocol for a distinct entity. Collections are identified by an `id` which is the [CollectionSequence](05_params.md).
- Every claim has a unique `id`, which is typically the CID, doubling as its cryptographic proof.
- - Claims have a default `status` of `1`, indicating they've been `submitted`. Enum is [EvaluationStatus](02_state.md#evaluationstatus)
+ - Claims have a default `status` of `0`, indicating they've been `submitted`. Enum is [EvaluationStatus](02_state.md#evaluationstatus)
- After evaluation, a claim's status can change to:
- - `approved` (=2)
- - `rejected` (=3)
- - `disputed` (=4)
+ - `approved` (=1)
+ - `rejected` (=2)
+ - `disputed` (=3)
+ - `invalidated` (=4)
4. **Payment Authorization:**
- Payments can be authorized to agents or evaluators' `account` upon various claim activities like submission, evaluation, approval, or when disputes arise.
+ - For claim evaluations with status `invalidated` no evaluation payment will be made.
5. **Recording Counter-Claims Evidence:**
- In case of disputes, evidence for counter-claims can be recorded, facilitating transparency and conflict resolution.
diff --git a/x/claims/spec/02_state.md b/x/claims/spec/02_state.md
index 7220752c..17b9d828 100644
--- a/x/claims/spec/02_state.md
+++ b/x/claims/spec/02_state.md
@@ -24,20 +24,21 @@ A Dispute is stored in the state and is accessed by the SubjectId of the dispute
```go
type Collection struct {
- Id string
- Entity string
- Admin string
- Protocol string
- StartDate *time.Time
- EndDate *time.Time
- Quota uint64
- Count uint64
- Evaluated uint64
- Approved uint64
- Rejected uint64
- Disputed uint64
- State CollectionState
- Payments *Payments
+ Id string
+ Entity string
+ Admin string
+ Protocol string
+ StartDate *time.Time
+ EndDate *time.Time
+ Quota uint64
+ Count uint64
+ Evaluated uint64
+ Approved uint64
+ Rejected uint64
+ Disputed uint64
+ Invalidated uint64
+ State CollectionState
+ Payments *Payments
}
```
@@ -55,6 +56,7 @@ The field's descriptions is as follows:
- `approved` - a integer containing the number of claims that have been evaluated and approved (internally calculated)
- `rejected` - a integer containing the number of claims that have been evaluated and rejected (internally calculated)
- `disputed` - a integer containing the number of claims that have disputed status (internally calculated)
+- `invalidated` - a integer containing the number of claims that have invalidated status (internally calculated)
- `state` - a [CollectionState](#collectionstate)
- `payments` - a [Payments](#payments)
@@ -93,9 +95,9 @@ type Payment struct {
The field's descriptions is as follows:
-- `account` - a string containing the account address from which the payment will be made (ideally a [EntityAccount](/x/entity/spec/02_state.md#entityaccount))
+- `account` - a string containing the account address from which the payment will be made (must be an [EntityAccount](/x/entity/spec/02_state.md#entityaccount) of the `Entity` field for the Collection)
- `amount` - a [Coins](https://github.com/cosmos/cosmos-sdk/blob/main/types/coin.go#L180) object which denotes the coins and amount to be paid on payment
-- `contract_1155Payment` - a [Contract1155Payment](#contract1155payment)
+- `contract_1155Payment` - a [Contract1155Payment](#contract1155payment), not allowed for `Evaluation` Payment
- `timeoutNs` - a duration containing the timeout after claim/evaluation to create authZ for payment, if 0 then immidiate direct payment is made
### Contract1155Payment
@@ -256,6 +258,7 @@ var EvaluationStatus_name = map[int32]string{
1: "APPROVED",
2: "REJECTED",
3: "DISPUTED",
+ 4: "INVALIDATED"
}
```
@@ -401,6 +404,6 @@ The field's descriptions is as follows:
- `claimIds` - a list of strings containing all the id's of the claimsthe grantee is allowed to evaluate, can be an empty list to allow any claim
- `collectionId` - a string containing the Collection `id` the constraints is for
-- `agentQuota` - a integer containing the quota for amount of time the grantee can execute the given authorization(authz)
+- `agentQuota` - a integer containing the quota for amount of time the grantee can execute the given authorization(authz), note: it won't subtract one on evaluation if agent evaluates claim with status `invalidated`
- `beforeDate` - a timestamp of the date after which the grantee can't execute this authz anymore, a cut off date
- `MaxCustomAmount` - a [Coins](https://github.com/cosmos/cosmos-sdk/blob/main/types/coin.go#L180) object which denotes the coins and amount that indicates the maximum the evaluator is allowed to change the `APPROVED` payout to, since claims can be made for specific amount an evaluator is allowed to change the `APPROVED` payout amount.
diff --git a/x/claims/spec/03_messages.md b/x/claims/spec/03_messages.md
index 63a212fa..7e334521 100644
--- a/x/claims/spec/03_messages.md
+++ b/x/claims/spec/03_messages.md
@@ -30,6 +30,62 @@ The field's descriptions is as follows:
- `state` - a [CollectionState](02_state.md#collectionstate)
- `payments` - a [Payments](02_state.md#payments)
+## MsgUpdateCollectionState
+
+A `MsgUpdateCollectionState` updates a Collection's `state` field.
+
+```go
+type MsgUpdateCollectionState struct {
+ CollectionId string
+ State CollectionState
+ AdminAddress string
+}
+```
+
+The field's descriptions is as follows:
+
+- `collectionId` - a string containing the Collection `id` to make the update to
+- `state` - a [CollectionState](02_state.md#collectionstate)
+- `adminAddress` - a string containing the account address of the private key signing the transaction, must be same as [Collection](02_state.md#collection) admin field
+
+## MsgUpdateCollectionDates
+
+A `MsgUpdateCollectionDates` updates a Collection's `startDate` and `endDate` fields.
+
+```go
+type MsgUpdateCollectionDates struct {
+ CollectionId string
+ StartDate *time.Time
+ EndDate *time.Time
+ AdminAddress string
+}
+```
+
+The field's descriptions is as follows:
+
+- `collectionId` - a string containing the Collection `id` to make the update to
+- `startDate` - a timestamp of the start date for the collection, after which claims may be submitted
+- `endDate` - a timestamp of the end date for the collection, after which no more claims may be submitted (no endDate is allowed)
+- `adminAddress` - a string containing the account address of the private key signing the transaction, must be same as [Collection](02_state.md#collection) admin field
+
+## MsgUpdateCollectionPayments
+
+A `MsgUpdateCollectionPayments` updates a Collection's `state` field.
+
+```go
+type MsgUpdateCollectionPayments struct {
+ CollectionId string
+ Payments *Payments
+ AdminAddress string
+}
+```
+
+The field's descriptions is as follows:
+
+- `collectionId` - a string containing the Collection `id` to make the update to
+- `payments` - a [Payments](02_state.md#payments)
+- `adminAddress` - a string containing the account address of the private key signing the transaction, must be same as [Collection](02_state.md#collection) admin field
+
## MsgSubmitClaim
A `MsgSubmitClaim` creates and stores a new Claim made towards a `Collection`. On Submission of claim `SUBMISSION` payments will be made if there is any defined in the [Collection](02_state.md#collection) `Payments`.
@@ -53,7 +109,7 @@ The field's descriptions is as follows:
## MsgEvaluateClaim
-A `MsgEvaluateClaim` updates the `Evaluation` for a claim. On evaluation payments will be made for both the evaluation of the claim (towards the agent or oracle) as well as if the claim was `APPROVED` then the claim submitter will also get a payment, which will the preset amount defined on th [Collection](02_state.md#collection) `Payments` field or the evaluator can also define a custom `Amount` that can be paid out on approval.
+A `MsgEvaluateClaim` updates the `Evaluation` for a claim. On evaluation payments will be made for both the evaluation of the claim (towards the agent or oracle) as well as if the claim was `APPROVED` then the claim submitter will also get a payment, which will the preset amount defined on th [Collection](02_state.md#collection) `Payments` field or the evaluator can also define a custom `Amount` that can be paid out on approval. Note: no payments will be made if agent evaluates claim with status `invalidated`
```go
type MsgEvaluateClaim struct {
diff --git a/x/claims/spec/04_events.md b/x/claims/spec/04_events.md
index 3d29b43b..d8aa9ce4 100644
--- a/x/claims/spec/04_events.md
+++ b/x/claims/spec/04_events.md
@@ -18,7 +18,7 @@ The field's descriptions is as follows:
### CollectionUpdatedEvent
-Emitted after a successfull `MsgSubmitClaim`, `EvaluateClaim` since collection holds a count of claims
+Emitted after a successfull collection update event or `MsgSubmitClaim` and `EvaluateClaim` since collection holds a count of claims
```go
type CollectionUpdatedEvent struct {
diff --git a/x/claims/types/authz.go b/x/claims/types/authz.go
index 1b05fb1c..a02855f6 100644
--- a/x/claims/types/authz.go
+++ b/x/claims/types/authz.go
@@ -199,9 +199,13 @@ func (a EvaluateClaimAuthorization) Accept(ctx sdk.Context, msg sdk.Msg) (authz.
// if reaches here it means there is a matching constraint for the specific batch
matched = true
- // subtract quota by one and if not 0 re-add to constraints
- if constraint.AgentQuota > 1 {
- constraint.AgentQuota--
+ // subtract quota by one (if eval status is not invalidated) and if not 0 re-add to constraints
+ if constraint.AgentQuota > 1 || mEval.Status == EvaluationStatus_invalidated {
+ // if evaluation status is invalidated then dont subtract quota
+ if mEval.Status != EvaluationStatus_invalidated {
+ constraint.AgentQuota--
+ }
+
// if constraint based of ClaimId then remove claimId once done
if iidtypes.IsEmpty(constraint.CollectionId) {
// if current constraint only has one ClaimId, which used now, dont re-add constraint once done
diff --git a/x/claims/types/claims.go b/x/claims/types/claims.go
index 27d03e1d..466a5d51 100644
--- a/x/claims/types/claims.go
+++ b/x/claims/types/claims.go
@@ -73,18 +73,13 @@ func HasBalances(ctx sdk.Context, bankKeeper bankkeeper.Keeper, payerAddr sdk.Ac
return true
}
-func (p Payment) Validate() error {
- _, err := sdk.AccAddressFromBech32(p.Account)
- if err != nil {
- return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "err %s", err)
- }
-
- if p.Contract_1155Payment != nil {
- _, err := sdk.AccAddressFromBech32(p.Contract_1155Payment.Address)
+func (p *Contract1155Payment) Validate() error {
+ if p != nil {
+ _, err := sdk.AccAddressFromBech32(p.Address)
if err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "err %s", err)
}
- if iidtypes.IsEmpty(p.Contract_1155Payment.TokenId) {
+ if iidtypes.IsEmpty(p.TokenId) {
return fmt.Errorf("token id cannot be empty")
}
// if p.Contract_1155Payment.Amount == 0 {
@@ -95,9 +90,47 @@ func (p Payment) Validate() error {
return nil
}
+func (p Payment) Validate() error {
+ _, err := sdk.AccAddressFromBech32(p.Account)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "err %s", err)
+ }
+
+ if err = p.Contract_1155Payment.Validate(); err != nil {
+ return err
+ }
+
+ if p.Amount.IsAnyNegative() {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "payment amount must be positive")
+ }
+
+ return nil
+}
+
func (p Payments) AccountsIsEntityAccounts(entity entitytypes.Entity) bool {
if !entity.ContainsAccountAddress(p.Approval.Account) || !entity.ContainsAccountAddress(p.Submission.Account) || !entity.ContainsAccountAddress(p.Rejection.Account) || !entity.ContainsAccountAddress(p.Evaluation.Account) {
return false
}
return true
}
+
+func (p Payments) Validate() error {
+ if p.Evaluation.Contract_1155Payment != nil {
+ return ErrCollectionEvalError
+ }
+
+ if err := p.Submission.Validate(); err != nil {
+ return err
+ }
+ if err := p.Evaluation.Validate(); err != nil {
+ return err
+ }
+ if err := p.Approval.Validate(); err != nil {
+ return err
+ }
+ if err := p.Rejection.Validate(); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/x/claims/types/claims.pb.go b/x/claims/types/claims.pb.go
index d844c1c1..559ca5b4 100644
--- a/x/claims/types/claims.pb.go
+++ b/x/claims/types/claims.pb.go
@@ -61,10 +61,11 @@ func (CollectionState) EnumDescriptor() ([]byte, []int) {
type EvaluationStatus int32
const (
- EvaluationStatus_pending EvaluationStatus = 0
- EvaluationStatus_approved EvaluationStatus = 1
- EvaluationStatus_rejected EvaluationStatus = 2
- EvaluationStatus_disputed EvaluationStatus = 3
+ EvaluationStatus_pending EvaluationStatus = 0
+ EvaluationStatus_approved EvaluationStatus = 1
+ EvaluationStatus_rejected EvaluationStatus = 2
+ EvaluationStatus_disputed EvaluationStatus = 3
+ EvaluationStatus_invalidated EvaluationStatus = 4
)
var EvaluationStatus_name = map[int32]string{
@@ -72,13 +73,15 @@ var EvaluationStatus_name = map[int32]string{
1: "APPROVED",
2: "REJECTED",
3: "DISPUTED",
+ 4: "INVALIDATED",
}
var EvaluationStatus_value = map[string]int32{
- "PENDING": 0,
- "APPROVED": 1,
- "REJECTED": 2,
- "DISPUTED": 3,
+ "PENDING": 0,
+ "APPROVED": 1,
+ "REJECTED": 2,
+ "DISPUTED": 3,
+ "INVALIDATED": 4,
}
func (x EvaluationStatus) String() string {
@@ -220,7 +223,7 @@ type Collection struct {
// entity is the DID of the entity for which the claims are being created
Entity string `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
// admin is the account address that will authorize or revoke agents and
- // payments (the grantor)
+ // payments (the grantor), and can update the collection
Admin string `protobuf:"bytes,3,opt,name=admin,proto3" json:"admin,omitempty"`
// protocol is the DID of the claim protocol
Protocol string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"`
@@ -252,6 +255,9 @@ type Collection struct {
Payments *Payments `protobuf:"bytes,14,opt,name=payments,proto3" json:"payments,omitempty"`
// signer address
Signer string `protobuf:"bytes,15,opt,name=signer,proto3" json:"signer,omitempty"`
+ // invalidated is the number of claims that have been evaluated as invalid
+ // (internally calculated)
+ Invalidated uint64 `protobuf:"varint,16,opt,name=invalidated,proto3" json:"invalidated,omitempty"`
}
func (m *Collection) Reset() { *m = Collection{} }
@@ -392,6 +398,13 @@ func (m *Collection) GetSigner() string {
return ""
}
+func (m *Collection) GetInvalidated() uint64 {
+ if m != nil {
+ return m.Invalidated
+ }
+ return 0
+}
+
type Payments struct {
Submission *Payment `protobuf:"bytes,1,opt,name=submission,proto3" json:"submission,omitempty"`
Evaluation *Payment `protobuf:"bytes,2,opt,name=evaluation,proto3" json:"evaluation,omitempty"`
@@ -1036,102 +1049,104 @@ func init() {
func init() { proto.RegisterFile("ixo/claims/v1beta1/claims.proto", fileDescriptor_619c1a0876cd0592) }
var fileDescriptor_619c1a0876cd0592 = []byte{
- // 1507 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45,
- 0x1b, 0xcf, 0x3a, 0xb6, 0x63, 0x3f, 0xce, 0x57, 0x27, 0x79, 0x2b, 0xc7, 0xed, 0x6b, 0xfb, 0x75,
- 0x5f, 0x41, 0x14, 0xa9, 0x36, 0x49, 0x55, 0x41, 0x29, 0x50, 0x39, 0xb1, 0x5b, 0x5c, 0xa5, 0x89,
- 0xb5, 0x4e, 0x2a, 0x51, 0x24, 0xac, 0xc9, 0xee, 0xc4, 0x19, 0x62,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6, 0xd1, 0x2f, 0xa5, 0xfd, 0x81, 0xbe, 0x67, 0xea, 0xcd, 0xdd,
+ 0x86, 0xa8, 0x9b, 0xb0, 0x77, 0x71, 0xe8, 0x61, 0x27, 0x20, 0x44, 0x4c, 0x71, 0x4b, 0x37, 0x78,
+ 0xc9, 0xc4, 0x00, 0xb8, 0x58, 0xfe, 0x0b, 0x70, 0x5f, 0x37, 0xb6, 0x1b, 0xf5, 0xc5, 0x94, 0x6c,
+ 0xf4, 0x01, 0xa6, 0xbd, 0x0b, 0x1d, 0x48, 0x8f, 0x76, 0x60, 0xb3, 0xfd, 0xe2, 0x6d, 0x51, 0x7b,
+ 0xf9, 0xb6, 0xa8, 0xbd, 0x79, 0x5b, 0xd4, 0x9e, 0xbd, 0x2b, 0x4e, 0xbd, 0x7c, 0x57, 0x9c, 0xfa,
+ 0xe9, 0x5d, 0x71, 0xea, 0xc9, 0x9d, 0xa1, 0x1d, 0xa4, 0x27, 0xec, 0x80, 0x85, 0x8e, 0x2d, 0xea,
+ 0xc4, 0xa5, 0x9b, 0xfb, 0x3d, 0x66, 0x1d, 0x59, 0x87, 0x98, 0x3a, 0xb5, 0xe3, 0x8d, 0xda, 0x49,
+ 0xf4, 0x7f, 0xa6, 0x58, 0xcd, 0xfd, 0xb4, 0xe0, 0x86, 0x5b, 0xbf, 0x07, 0x00, 0x00, 0xff, 0xff,
+ 0xdc, 0x89, 0xf6, 0xbf, 0x82, 0x0e, 0x00, 0x00,
}
func (this *Contract1155Payment) Equal(that interface{}) bool {
@@ -1239,6 +1254,13 @@ func (m *Collection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.Invalidated != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Invalidated))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x80
+ }
if len(m.Signer) > 0 {
i -= len(m.Signer)
copy(dAtA[i:], m.Signer)
@@ -1939,6 +1961,9 @@ func (m *Collection) Size() (n int) {
if l > 0 {
n += 1 + l + sovClaims(uint64(l))
}
+ if m.Invalidated != 0 {
+ n += 2 + sovClaims(uint64(m.Invalidated))
+ }
return n
}
@@ -2768,6 +2793,25 @@ func (m *Collection) Unmarshal(dAtA []byte) error {
}
m.Signer = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
+ case 16:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Invalidated", wireType)
+ }
+ m.Invalidated = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Invalidated |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
default:
iNdEx = preIndex
skippy, err := skipClaims(dAtA[iNdEx:])
diff --git a/x/claims/types/codec.go b/x/claims/types/codec.go
index c5ed04e7..e5d255b7 100644
--- a/x/claims/types/codec.go
+++ b/x/claims/types/codec.go
@@ -15,6 +15,9 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgEvaluateClaim{}, "claims/EvaluateClaim", nil)
cdc.RegisterConcrete(&MsgDisputeClaim{}, "claims/DisputeClaim", nil)
cdc.RegisterConcrete(&MsgWithdrawPayment{}, "claims/WithdrawPayment", nil)
+ cdc.RegisterConcrete(&MsgUpdateCollectionState{}, "claims/UpdateCollectionState", nil)
+ cdc.RegisterConcrete(&MsgUpdateCollectionDates{}, "claims/UpdateCollectionDates", nil)
+ cdc.RegisterConcrete(&MsgUpdateCollectionPayments{}, "claims/UpdateCollectionPayments", nil)
}
func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
@@ -24,6 +27,9 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
&MsgEvaluateClaim{},
&MsgDisputeClaim{},
&MsgWithdrawPayment{},
+ &MsgUpdateCollectionState{},
+ &MsgUpdateCollectionDates{},
+ &MsgUpdateCollectionPayments{},
)
registry.RegisterImplementations(
diff --git a/x/claims/types/distribution.go b/x/claims/types/distribution.go
index 3d68c63e..d78bf015 100644
--- a/x/claims/types/distribution.go
+++ b/x/claims/types/distribution.go
@@ -2,6 +2,7 @@ package types
import (
sdk "github.com/cosmos/cosmos-sdk/types"
+ sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
type DistributionShare struct {
@@ -17,30 +18,7 @@ func NewDistribution(shares ...DistributionShare) Distribution {
return Distribution(shares)
}
-// func (d Distribution) Validate() error {
-// // Shares must add up to 100% (no shares means 0%)
-// if len(d) == 0 {
-// return ErrDistributionPercentagesNot100
-// }
-
-// // Validate shares and calculate total
-// total := sdk.ZeroDec()
-// for _, share := range d {
-// total = total.Add(share.Percentage)
-// if err := share.Validate(); err != nil {
-// return err
-// }
-// }
-
-// // Shares must add up to 100%
-// if !total.Equal(sdk.NewDec(100)) {
-// return ErrDistributionPercentagesNot100
-// }
-
-// return nil
-// }
-
-func (d Distribution) GetDistributionsFor(amount sdk.Coins) []sdk.DecCoins {
+func (d Distribution) GetDistributionsFor(amount sdk.Coins) ([]sdk.DecCoins, error) {
decAmount := sdk.NewDecCoinsFromCoins(amount...)
distributions := make([]sdk.DecCoins, len(d))
@@ -53,10 +31,10 @@ func (d Distribution) GetDistributionsFor(amount sdk.Coins) []sdk.DecCoins {
// Distributed amount should equal original amount
if !distributed.IsEqual(decAmount) {
- panic("distributing more or less than original amount")
+ return nil, sdkerrors.Wrap(ErrDistributionFailed, "distributing more or less than original amount")
}
- return distributions
+ return distributions, nil
}
func NewDistributionShare(address sdk.AccAddress, percentage sdk.Dec) DistributionShare {
@@ -66,23 +44,6 @@ func NewDistributionShare(address sdk.AccAddress, percentage sdk.Dec) Distributi
}
}
-func NewFullDistributionShare(address sdk.AccAddress) DistributionShare {
- return DistributionShare{
- address: address.String(),
- percentage: sdk.NewDec(100),
- }
-}
-
-// func (d DistributionShare) Validate() error {
-// if !d.Percentage.IsPositive() {
-// return sdkerrors.Wrap(ErrNegativeSharePercentage, "")
-// } else if strings.TrimSpace(d.Address) == "" {
-// return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "empty distribution share address")
-// }
-
-// return nil
-// }
-
func (d DistributionShare) GetShareOf(amount sdk.DecCoins) sdk.DecCoins {
return amount.MulDec(d.percentage.Quo(OneHundred))
}
diff --git a/x/claims/types/errors.go b/x/claims/types/errors.go
index 37d76fe9..57b531b8 100644
--- a/x/claims/types/errors.go
+++ b/x/claims/types/errors.go
@@ -27,4 +27,5 @@ var (
ErrPaymentPresetPercentagesOverflow = sdkerrors.Register(ModuleName, 1400, "preset fee percentages for node and network overflows 100%")
ErrPaymentWithdrawFailed = sdkerrors.Register(ModuleName, 1401, "payment withdrawal failed")
+ ErrDistributionFailed = sdkerrors.Register(ModuleName, 1402, "distribution calculations failed")
)
diff --git a/x/claims/types/msg_validation.go b/x/claims/types/msg_validation.go
index 4ffa6179..b15097ad 100644
--- a/x/claims/types/msg_validation.go
+++ b/x/claims/types/msg_validation.go
@@ -24,21 +24,12 @@ func (msg MsgCreateCollection) ValidateBasic() error {
return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.Protocol)
}
- if msg.Payments.Evaluation.Contract_1155Payment != nil {
- return ErrCollectionEvalError
- }
-
- if err = msg.Payments.Submission.Validate(); err != nil {
+ if err = msg.Payments.Validate(); err != nil {
return err
}
- if err = msg.Payments.Evaluation.Validate(); err != nil {
- return err
- }
- if err = msg.Payments.Approval.Validate(); err != nil {
- return err
- }
- if err = msg.Payments.Rejection.Validate(); err != nil {
- return err
+
+ if !ixo.IsEnumValueValid(CollectionState_name, int32(msg.State)) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid enum for state")
}
return nil
@@ -52,6 +43,10 @@ func (msg MsgSubmitClaim) ValidateBasic() error {
if err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address (%s)", err)
}
+ _, err = sdk.AccAddressFromBech32(msg.AgentAddress)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address (%s)", err)
+ }
if !iidtypes.IsValidDID(msg.AgentDid.Did()) {
return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.AgentDid.String())
@@ -60,6 +55,9 @@ func (msg MsgSubmitClaim) ValidateBasic() error {
if ixo.IsEmpty(msg.ClaimId) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "claim_id cannot be empty")
}
+ if ixo.IsEmpty(msg.CollectionId) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "collection_id cannot be empty")
+ }
return nil
}
@@ -72,19 +70,24 @@ func (msg MsgEvaluateClaim) ValidateBasic() error {
if err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address (%s)", err)
}
+ _, err = sdk.AccAddressFromBech32(msg.AgentAddress)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid agent address (%s)", err)
+ }
if !iidtypes.IsValidDID(msg.AgentDid.Did()) {
return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.AgentDid.String())
}
-
if !iidtypes.IsValidDID(msg.Oracle) {
- return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.AgentDid.String())
+ return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.Oracle)
}
if iidtypes.IsEmpty(msg.ClaimId) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "claim_id cannot be empty")
}
-
+ if iidtypes.IsEmpty(msg.CollectionId) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "collection_id cannot be empty")
+ }
if iidtypes.IsEmpty(msg.VerificationProof) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "verification_proof cannot be empty")
}
@@ -93,6 +96,14 @@ func (msg MsgEvaluateClaim) ValidateBasic() error {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "evaluation status can't be pending")
}
+ if !ixo.IsEnumValueValid(EvaluationStatus_name, int32(msg.Status)) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid enum for status")
+ }
+
+ if msg.Amount.IsAnyNegative() {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "amount must be positive")
+ }
+
return nil
}
@@ -108,13 +119,18 @@ func (msg MsgDisputeClaim) ValidateBasic() error {
if !iidtypes.IsValidDID(msg.AgentDid.Did()) {
return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.AgentDid.String())
}
-
+ if iidtypes.IsEmpty(msg.SubjectId) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "subject id cannot be empty")
+ }
if iidtypes.IsEmpty(msg.Data.Proof) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "dispute data proof cannot be empty")
}
if iidtypes.IsEmpty(msg.Data.Uri) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "dispute data uri cannot be empty")
}
+ if iidtypes.IsEmpty(msg.Data.Type) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "dispute data type cannot be empty")
+ }
return nil
}
@@ -135,24 +151,70 @@ func (msg MsgWithdrawPayment) ValidateBasic() error {
if err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid to address (%s)", err)
}
- if msg.Contract_1155Payment != nil {
- _, err = sdk.AccAddressFromBech32(msg.Contract_1155Payment.Address)
- if err != nil {
- return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid contract address (%s)", err)
- }
- if iidtypes.IsEmpty(msg.Contract_1155Payment.TokenId) {
- return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "token id cannot be empty")
- }
- // if msg.Contract_1155Payment.Amount == 0 {
- // return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "token amount cannot be 0")
- // }
- }
- if iidtypes.IsEmpty(msg.PaymentType.String()) {
- return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "payment type cannot be empty")
+
+ if err = msg.Contract_1155Payment.Validate(); err != nil {
+ return err
+ }
+
+ if !ixo.IsEnumValueValid(PaymentType_name, int32(msg.PaymentType)) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid enum for payment type")
}
+
if iidtypes.IsEmpty(msg.ClaimId) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "claim id cannot be empty")
}
return nil
}
+
+// --------------------------
+// UPDATE COLLECTION STATE
+// --------------------------
+func (msg MsgUpdateCollectionState) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.AdminAddress)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address (%s)", err)
+ }
+ if iidtypes.IsEmpty(msg.CollectionId) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "collection_id cannot be empty")
+ }
+ if !ixo.IsEnumValueValid(CollectionState_name, int32(msg.State)) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid enum for state")
+ }
+
+ return nil
+}
+
+// --------------------------
+// UPDATE COLLECTION DATES
+// --------------------------
+func (msg MsgUpdateCollectionDates) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.AdminAddress)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address (%s)", err)
+ }
+ if iidtypes.IsEmpty(msg.CollectionId) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "collection_id cannot be empty")
+ }
+
+ return nil
+}
+
+// --------------------------
+// UPDATE COLLECTION PAYMENTS
+// --------------------------
+func (msg MsgUpdateCollectionPayments) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.AdminAddress)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address (%s)", err)
+ }
+ if iidtypes.IsEmpty(msg.CollectionId) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "collection_id cannot be empty")
+ }
+
+ if err = msg.Payments.Validate(); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/x/claims/types/tx.go b/x/claims/types/tx.go
index 31461794..7ff072f7 100644
--- a/x/claims/types/tx.go
+++ b/x/claims/types/tx.go
@@ -132,3 +132,72 @@ func (msg MsgWithdrawPayment) GetSignBytes() []byte {
func (msg MsgWithdrawPayment) Type() string { return TypeMsgWithdrawPayment }
func (msg MsgWithdrawPayment) Route() string { return RouterKey }
+
+// --------------------------
+// UPDATE COLLECTION STATE
+// --------------------------
+const TypeMsgUpdateCollectionState = "update_collection_state"
+
+var _ sdk.Msg = &MsgUpdateCollectionState{}
+
+func (msg MsgUpdateCollectionState) GetSigners() []sdk.AccAddress {
+ address, err := sdk.AccAddressFromBech32(msg.AdminAddress)
+ if err != nil {
+ return []sdk.AccAddress{}
+ }
+ return []sdk.AccAddress{address}
+}
+
+func (msg MsgUpdateCollectionState) GetSignBytes() []byte {
+ return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg))
+}
+
+func (msg MsgUpdateCollectionState) Type() string { return TypeMsgUpdateCollectionState }
+
+func (msg MsgUpdateCollectionState) Route() string { return RouterKey }
+
+// --------------------------
+// UPDATE COLLECTION DATES
+// --------------------------
+const TypeMsgUpdateCollectionDates = "update_collection_dates"
+
+var _ sdk.Msg = &MsgUpdateCollectionDates{}
+
+func (msg MsgUpdateCollectionDates) GetSigners() []sdk.AccAddress {
+ address, err := sdk.AccAddressFromBech32(msg.AdminAddress)
+ if err != nil {
+ return []sdk.AccAddress{}
+ }
+ return []sdk.AccAddress{address}
+}
+
+func (msg MsgUpdateCollectionDates) GetSignBytes() []byte {
+ return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg))
+}
+
+func (msg MsgUpdateCollectionDates) Type() string { return TypeMsgUpdateCollectionDates }
+
+func (msg MsgUpdateCollectionDates) Route() string { return RouterKey }
+
+// --------------------------
+// UPDATE COLLECTION STATE
+// --------------------------
+const TypeMsgUpdateCollectionPayments = "update_collection_payments"
+
+var _ sdk.Msg = &MsgUpdateCollectionPayments{}
+
+func (msg MsgUpdateCollectionPayments) GetSigners() []sdk.AccAddress {
+ address, err := sdk.AccAddressFromBech32(msg.AdminAddress)
+ if err != nil {
+ return []sdk.AccAddress{}
+ }
+ return []sdk.AccAddress{address}
+}
+
+func (msg MsgUpdateCollectionPayments) GetSignBytes() []byte {
+ return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg))
+}
+
+func (msg MsgUpdateCollectionPayments) Type() string { return TypeMsgUpdateCollectionPayments }
+
+func (msg MsgUpdateCollectionPayments) Route() string { return RouterKey }
diff --git a/x/claims/types/tx.pb.go b/x/claims/types/tx.pb.go
index c4b464b3..cd2ccea7 100644
--- a/x/claims/types/tx.pb.go
+++ b/x/claims/types/tx.pb.go
@@ -301,7 +301,7 @@ var xxx_messageInfo_MsgSubmitClaimResponse proto.InternalMessageInfo
type MsgEvaluateClaim struct {
// claimID is the unique identifier of the claim to make evaluation against
ClaimId string `protobuf:"bytes,1,opt,name=claim_id,json=claimId,proto3" json:"claim_id,omitempty"`
- // claimID is the unique identifier of the claim to make evaluation against
+ // collection_id indicates to which Collection this claim belongs
CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
// oracle is the DID of the Oracle entity that evaluates the claim
Oracle string `protobuf:"bytes,3,opt,name=oracle,proto3" json:"oracle,omitempty"`
@@ -736,6 +736,315 @@ func (m *MsgWithdrawPaymentResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgWithdrawPaymentResponse proto.InternalMessageInfo
+type MsgUpdateCollectionState struct {
+ // collection_id indicates which Collection to update
+ CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
+ // state is the state of this Collection (open, paused, closed) you want to
+ // update to
+ State CollectionState `protobuf:"varint,2,opt,name=state,proto3,enum=ixo.claims.v1beta1.CollectionState" json:"state,omitempty"`
+ // admin address used to sign this message, validated against Collection Admin
+ AdminAddress string `protobuf:"bytes,3,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty"`
+}
+
+func (m *MsgUpdateCollectionState) Reset() { *m = MsgUpdateCollectionState{} }
+func (m *MsgUpdateCollectionState) String() string { return proto.CompactTextString(m) }
+func (*MsgUpdateCollectionState) ProtoMessage() {}
+func (*MsgUpdateCollectionState) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{10}
+}
+func (m *MsgUpdateCollectionState) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgUpdateCollectionState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgUpdateCollectionState.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 *MsgUpdateCollectionState) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgUpdateCollectionState.Merge(m, src)
+}
+func (m *MsgUpdateCollectionState) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgUpdateCollectionState) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgUpdateCollectionState.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgUpdateCollectionState proto.InternalMessageInfo
+
+func (m *MsgUpdateCollectionState) GetCollectionId() string {
+ if m != nil {
+ return m.CollectionId
+ }
+ return ""
+}
+
+func (m *MsgUpdateCollectionState) GetState() CollectionState {
+ if m != nil {
+ return m.State
+ }
+ return CollectionState_open
+}
+
+func (m *MsgUpdateCollectionState) GetAdminAddress() string {
+ if m != nil {
+ return m.AdminAddress
+ }
+ return ""
+}
+
+type MsgUpdateCollectionStateResponse struct {
+}
+
+func (m *MsgUpdateCollectionStateResponse) Reset() { *m = MsgUpdateCollectionStateResponse{} }
+func (m *MsgUpdateCollectionStateResponse) String() string { return proto.CompactTextString(m) }
+func (*MsgUpdateCollectionStateResponse) ProtoMessage() {}
+func (*MsgUpdateCollectionStateResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{11}
+}
+func (m *MsgUpdateCollectionStateResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgUpdateCollectionStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgUpdateCollectionStateResponse.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 *MsgUpdateCollectionStateResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgUpdateCollectionStateResponse.Merge(m, src)
+}
+func (m *MsgUpdateCollectionStateResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgUpdateCollectionStateResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgUpdateCollectionStateResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgUpdateCollectionStateResponse proto.InternalMessageInfo
+
+type MsgUpdateCollectionDates struct {
+ // collection_id indicates which Collection to update
+ CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
+ // startDate is the date after which claims may be submitted
+ StartDate *time.Time `protobuf:"bytes,2,opt,name=start_date,json=startDate,proto3,stdtime" json:"start_date,omitempty"`
+ // endDate is the date after which no more claims may be submitted (no endDate
+ // is allowed)
+ EndDate *time.Time `protobuf:"bytes,3,opt,name=end_date,json=endDate,proto3,stdtime" json:"end_date,omitempty"`
+ // admin address used to sign this message, validated against Collection Admin
+ AdminAddress string `protobuf:"bytes,4,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty"`
+}
+
+func (m *MsgUpdateCollectionDates) Reset() { *m = MsgUpdateCollectionDates{} }
+func (m *MsgUpdateCollectionDates) String() string { return proto.CompactTextString(m) }
+func (*MsgUpdateCollectionDates) ProtoMessage() {}
+func (*MsgUpdateCollectionDates) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{12}
+}
+func (m *MsgUpdateCollectionDates) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgUpdateCollectionDates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgUpdateCollectionDates.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 *MsgUpdateCollectionDates) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgUpdateCollectionDates.Merge(m, src)
+}
+func (m *MsgUpdateCollectionDates) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgUpdateCollectionDates) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgUpdateCollectionDates.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgUpdateCollectionDates proto.InternalMessageInfo
+
+func (m *MsgUpdateCollectionDates) GetCollectionId() string {
+ if m != nil {
+ return m.CollectionId
+ }
+ return ""
+}
+
+func (m *MsgUpdateCollectionDates) GetStartDate() *time.Time {
+ if m != nil {
+ return m.StartDate
+ }
+ return nil
+}
+
+func (m *MsgUpdateCollectionDates) GetEndDate() *time.Time {
+ if m != nil {
+ return m.EndDate
+ }
+ return nil
+}
+
+func (m *MsgUpdateCollectionDates) GetAdminAddress() string {
+ if m != nil {
+ return m.AdminAddress
+ }
+ return ""
+}
+
+type MsgUpdateCollectionDatesResponse struct {
+}
+
+func (m *MsgUpdateCollectionDatesResponse) Reset() { *m = MsgUpdateCollectionDatesResponse{} }
+func (m *MsgUpdateCollectionDatesResponse) String() string { return proto.CompactTextString(m) }
+func (*MsgUpdateCollectionDatesResponse) ProtoMessage() {}
+func (*MsgUpdateCollectionDatesResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{13}
+}
+func (m *MsgUpdateCollectionDatesResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgUpdateCollectionDatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgUpdateCollectionDatesResponse.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 *MsgUpdateCollectionDatesResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgUpdateCollectionDatesResponse.Merge(m, src)
+}
+func (m *MsgUpdateCollectionDatesResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgUpdateCollectionDatesResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgUpdateCollectionDatesResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgUpdateCollectionDatesResponse proto.InternalMessageInfo
+
+type MsgUpdateCollectionPayments struct {
+ // collection_id indicates which Collection to update
+ CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
+ // payments is the amount paid for claim submission, evaluation, approval, or
+ // rejection
+ Payments *Payments `protobuf:"bytes,2,opt,name=payments,proto3" json:"payments,omitempty"`
+ // admin address used to sign this message, validated against Collection Admin
+ AdminAddress string `protobuf:"bytes,3,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty"`
+}
+
+func (m *MsgUpdateCollectionPayments) Reset() { *m = MsgUpdateCollectionPayments{} }
+func (m *MsgUpdateCollectionPayments) String() string { return proto.CompactTextString(m) }
+func (*MsgUpdateCollectionPayments) ProtoMessage() {}
+func (*MsgUpdateCollectionPayments) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{14}
+}
+func (m *MsgUpdateCollectionPayments) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgUpdateCollectionPayments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgUpdateCollectionPayments.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 *MsgUpdateCollectionPayments) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgUpdateCollectionPayments.Merge(m, src)
+}
+func (m *MsgUpdateCollectionPayments) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgUpdateCollectionPayments) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgUpdateCollectionPayments.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgUpdateCollectionPayments proto.InternalMessageInfo
+
+func (m *MsgUpdateCollectionPayments) GetCollectionId() string {
+ if m != nil {
+ return m.CollectionId
+ }
+ return ""
+}
+
+func (m *MsgUpdateCollectionPayments) GetPayments() *Payments {
+ if m != nil {
+ return m.Payments
+ }
+ return nil
+}
+
+func (m *MsgUpdateCollectionPayments) GetAdminAddress() string {
+ if m != nil {
+ return m.AdminAddress
+ }
+ return ""
+}
+
+type MsgUpdateCollectionPaymentsResponse struct {
+}
+
+func (m *MsgUpdateCollectionPaymentsResponse) Reset() { *m = MsgUpdateCollectionPaymentsResponse{} }
+func (m *MsgUpdateCollectionPaymentsResponse) String() string { return proto.CompactTextString(m) }
+func (*MsgUpdateCollectionPaymentsResponse) ProtoMessage() {}
+func (*MsgUpdateCollectionPaymentsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{15}
+}
+func (m *MsgUpdateCollectionPaymentsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgUpdateCollectionPaymentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgUpdateCollectionPaymentsResponse.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 *MsgUpdateCollectionPaymentsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgUpdateCollectionPaymentsResponse.Merge(m, src)
+}
+func (m *MsgUpdateCollectionPaymentsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgUpdateCollectionPaymentsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgUpdateCollectionPaymentsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgUpdateCollectionPaymentsResponse proto.InternalMessageInfo
+
func init() {
proto.RegisterType((*MsgCreateCollection)(nil), "ixo.claims.v1beta1.MsgCreateCollection")
proto.RegisterType((*MsgCreateCollectionResponse)(nil), "ixo.claims.v1beta1.MsgCreateCollectionResponse")
@@ -747,80 +1056,95 @@ func init() {
proto.RegisterType((*MsgDisputeClaimResponse)(nil), "ixo.claims.v1beta1.MsgDisputeClaimResponse")
proto.RegisterType((*MsgWithdrawPayment)(nil), "ixo.claims.v1beta1.MsgWithdrawPayment")
proto.RegisterType((*MsgWithdrawPaymentResponse)(nil), "ixo.claims.v1beta1.MsgWithdrawPaymentResponse")
+ proto.RegisterType((*MsgUpdateCollectionState)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionState")
+ proto.RegisterType((*MsgUpdateCollectionStateResponse)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionStateResponse")
+ proto.RegisterType((*MsgUpdateCollectionDates)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionDates")
+ proto.RegisterType((*MsgUpdateCollectionDatesResponse)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse")
+ proto.RegisterType((*MsgUpdateCollectionPayments)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionPayments")
+ proto.RegisterType((*MsgUpdateCollectionPaymentsResponse)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse")
}
func init() { proto.RegisterFile("ixo/claims/v1beta1/tx.proto", fileDescriptor_e0095508349b828a) }
var fileDescriptor_e0095508349b828a = []byte{
- // 1075 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
- 0x14, 0xcf, 0x3a, 0xb6, 0x63, 0x3f, 0xbb, 0x69, 0x99, 0x96, 0xb0, 0xd9, 0xa6, 0xb6, 0x71, 0x2a,
- 0xb0, 0x80, 0xec, 0x36, 0xa9, 0x2a, 0x5a, 0x81, 0x84, 0xea, 0x98, 0x4a, 0x39, 0x58, 0x54, 0x9b,
- 0x4a, 0x48, 0x20, 0x64, 0xc6, 0xbb, 0x93, 0xcd, 0xb4, 0xf6, 0x8e, 0xd9, 0x99, 0x0d, 0xce, 0x19,
- 0x3e, 0x40, 0xc5, 0xc7, 0xe0, 0x93, 0xf4, 0xd8, 0x13, 0xe2, 0x94, 0xa2, 0xe4, 0xc6, 0x47, 0xe8,
- 0x05, 0x34, 0xb3, 0xe3, 0xff, 0x9b, 0x60, 0x2e, 0x3d, 0x25, 0xef, 0xbd, 0xdf, 0xef, 0xbd, 0x9d,
- 0xdf, 0x7b, 0xf3, 0xc6, 0x70, 0x9b, 0x0e, 0x99, 0xe3, 0xf5, 0x30, 0xed, 0x73, 0xe7, 0x64, 0xb7,
- 0x4b, 0x04, 0xde, 0x75, 0xc4, 0xd0, 0x1e, 0x44, 0x4c, 0x30, 0x84, 0xe8, 0x90, 0xd9, 0x49, 0xd0,
- 0xd6, 0x41, 0xeb, 0x56, 0xc0, 0x02, 0xa6, 0xc2, 0x8e, 0xfc, 0x2f, 0x41, 0x5a, 0xd5, 0x80, 0xb1,
- 0xa0, 0x47, 0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 0xfe, 0xd7, 0xf6, 0xd5, 0xbf, 0x6d, 0xd5, 0xa5,
- 0xee, 0xe6, 0xd5, 0x14, 0xdf, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x15, 0x6d, 0x60, 0x9f,
- 0x0b, 0x00, 0x00,
+ // 1223 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0xdb, 0x46,
+ 0x13, 0x36, 0x25, 0x59, 0x96, 0x46, 0xce, 0xc7, 0xbb, 0xf9, 0x78, 0x19, 0x26, 0x91, 0x54, 0x39,
+ 0x6d, 0x8d, 0xb6, 0x21, 0x63, 0xa7, 0x41, 0x12, 0xb4, 0x40, 0x11, 0xd9, 0x0d, 0xe0, 0x83, 0xd0,
+ 0x80, 0x49, 0x51, 0xa0, 0x45, 0xa1, 0xae, 0xc8, 0x35, 0xb3, 0x89, 0xc4, 0x55, 0xb9, 0x4b, 0x57,
+ 0x46, 0x8f, 0x6d, 0xef, 0x41, 0xff, 0x40, 0xd1, 0x6b, 0x7f, 0x49, 0x8e, 0x39, 0x15, 0x3d, 0x25,
+ 0x85, 0x7d, 0xeb, 0x4f, 0xc8, 0xa5, 0x05, 0x97, 0x4b, 0xea, 0x8b, 0x72, 0x29, 0x14, 0xc8, 0xc9,
+ 0xde, 0xd9, 0x67, 0x66, 0x76, 0x9e, 0x19, 0xce, 0x8c, 0xe0, 0x32, 0x1d, 0x31, 0xcb, 0xe9, 0x63,
+ 0x3a, 0xe0, 0xd6, 0xc1, 0x56, 0x8f, 0x08, 0xbc, 0x65, 0x89, 0x91, 0x39, 0x0c, 0x98, 0x60, 0x08,
+ 0xd1, 0x11, 0x33, 0xe3, 0x4b, 0x53, 0x5d, 0x1a, 0xe7, 0x3d, 0xe6, 0x31, 0x79, 0x6d, 0x45, 0xff,
+ 0xc5, 0x48, 0xa3, 0xe1, 0x31, 0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0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -840,6 +1164,9 @@ type MsgClient interface {
EvaluateClaim(ctx context.Context, in *MsgEvaluateClaim, opts ...grpc.CallOption) (*MsgEvaluateClaimResponse, error)
DisputeClaim(ctx context.Context, in *MsgDisputeClaim, opts ...grpc.CallOption) (*MsgDisputeClaimResponse, error)
WithdrawPayment(ctx context.Context, in *MsgWithdrawPayment, opts ...grpc.CallOption) (*MsgWithdrawPaymentResponse, error)
+ UpdateCollectionState(ctx context.Context, in *MsgUpdateCollectionState, opts ...grpc.CallOption) (*MsgUpdateCollectionStateResponse, error)
+ UpdateCollectionDates(ctx context.Context, in *MsgUpdateCollectionDates, opts ...grpc.CallOption) (*MsgUpdateCollectionDatesResponse, error)
+ UpdateCollectionPayments(ctx context.Context, in *MsgUpdateCollectionPayments, opts ...grpc.CallOption) (*MsgUpdateCollectionPaymentsResponse, error)
}
type msgClient struct {
@@ -895,6 +1222,33 @@ func (c *msgClient) WithdrawPayment(ctx context.Context, in *MsgWithdrawPayment,
return out, nil
}
+func (c *msgClient) UpdateCollectionState(ctx context.Context, in *MsgUpdateCollectionState, opts ...grpc.CallOption) (*MsgUpdateCollectionStateResponse, error) {
+ out := new(MsgUpdateCollectionStateResponse)
+ err := c.cc.Invoke(ctx, "/ixo.claims.v1beta1.Msg/UpdateCollectionState", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *msgClient) UpdateCollectionDates(ctx context.Context, in *MsgUpdateCollectionDates, opts ...grpc.CallOption) (*MsgUpdateCollectionDatesResponse, error) {
+ out := new(MsgUpdateCollectionDatesResponse)
+ err := c.cc.Invoke(ctx, "/ixo.claims.v1beta1.Msg/UpdateCollectionDates", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *msgClient) UpdateCollectionPayments(ctx context.Context, in *MsgUpdateCollectionPayments, opts ...grpc.CallOption) (*MsgUpdateCollectionPaymentsResponse, error) {
+ out := new(MsgUpdateCollectionPaymentsResponse)
+ err := c.cc.Invoke(ctx, "/ixo.claims.v1beta1.Msg/UpdateCollectionPayments", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// MsgServer is the server API for Msg service.
type MsgServer interface {
CreateCollection(context.Context, *MsgCreateCollection) (*MsgCreateCollectionResponse, error)
@@ -902,6 +1256,9 @@ type MsgServer interface {
EvaluateClaim(context.Context, *MsgEvaluateClaim) (*MsgEvaluateClaimResponse, error)
DisputeClaim(context.Context, *MsgDisputeClaim) (*MsgDisputeClaimResponse, error)
WithdrawPayment(context.Context, *MsgWithdrawPayment) (*MsgWithdrawPaymentResponse, error)
+ UpdateCollectionState(context.Context, *MsgUpdateCollectionState) (*MsgUpdateCollectionStateResponse, error)
+ UpdateCollectionDates(context.Context, *MsgUpdateCollectionDates) (*MsgUpdateCollectionDatesResponse, error)
+ UpdateCollectionPayments(context.Context, *MsgUpdateCollectionPayments) (*MsgUpdateCollectionPaymentsResponse, error)
}
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
@@ -923,6 +1280,15 @@ func (*UnimplementedMsgServer) DisputeClaim(ctx context.Context, req *MsgDispute
func (*UnimplementedMsgServer) WithdrawPayment(ctx context.Context, req *MsgWithdrawPayment) (*MsgWithdrawPaymentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method WithdrawPayment not implemented")
}
+func (*UnimplementedMsgServer) UpdateCollectionState(ctx context.Context, req *MsgUpdateCollectionState) (*MsgUpdateCollectionStateResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateCollectionState not implemented")
+}
+func (*UnimplementedMsgServer) UpdateCollectionDates(ctx context.Context, req *MsgUpdateCollectionDates) (*MsgUpdateCollectionDatesResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateCollectionDates not implemented")
+}
+func (*UnimplementedMsgServer) UpdateCollectionPayments(ctx context.Context, req *MsgUpdateCollectionPayments) (*MsgUpdateCollectionPaymentsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateCollectionPayments not implemented")
+}
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv)
@@ -1018,43 +1384,109 @@ func _Msg_WithdrawPayment_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
-var _Msg_serviceDesc = grpc.ServiceDesc{
- ServiceName: "ixo.claims.v1beta1.Msg",
- HandlerType: (*MsgServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "CreateCollection",
- Handler: _Msg_CreateCollection_Handler,
- },
- {
- MethodName: "SubmitClaim",
- Handler: _Msg_SubmitClaim_Handler,
- },
- {
- MethodName: "EvaluateClaim",
- Handler: _Msg_EvaluateClaim_Handler,
- },
- {
- MethodName: "DisputeClaim",
- Handler: _Msg_DisputeClaim_Handler,
- },
- {
- MethodName: "WithdrawPayment",
- Handler: _Msg_WithdrawPayment_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "ixo/claims/v1beta1/tx.proto",
-}
-
-func (m *MsgCreateCollection) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
+func _Msg_UpdateCollectionState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MsgUpdateCollectionState)
+ if err := dec(in); err != nil {
return nil, err
}
- return dAtA[:n], nil
+ if interceptor == nil {
+ return srv.(MsgServer).UpdateCollectionState(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ixo.claims.v1beta1.Msg/UpdateCollectionState",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MsgServer).UpdateCollectionState(ctx, req.(*MsgUpdateCollectionState))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Msg_UpdateCollectionDates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MsgUpdateCollectionDates)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MsgServer).UpdateCollectionDates(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ixo.claims.v1beta1.Msg/UpdateCollectionDates",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MsgServer).UpdateCollectionDates(ctx, req.(*MsgUpdateCollectionDates))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Msg_UpdateCollectionPayments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MsgUpdateCollectionPayments)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MsgServer).UpdateCollectionPayments(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ixo.claims.v1beta1.Msg/UpdateCollectionPayments",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MsgServer).UpdateCollectionPayments(ctx, req.(*MsgUpdateCollectionPayments))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+var _Msg_serviceDesc = grpc.ServiceDesc{
+ ServiceName: "ixo.claims.v1beta1.Msg",
+ HandlerType: (*MsgServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "CreateCollection",
+ Handler: _Msg_CreateCollection_Handler,
+ },
+ {
+ MethodName: "SubmitClaim",
+ Handler: _Msg_SubmitClaim_Handler,
+ },
+ {
+ MethodName: "EvaluateClaim",
+ Handler: _Msg_EvaluateClaim_Handler,
+ },
+ {
+ MethodName: "DisputeClaim",
+ Handler: _Msg_DisputeClaim_Handler,
+ },
+ {
+ MethodName: "WithdrawPayment",
+ Handler: _Msg_WithdrawPayment_Handler,
+ },
+ {
+ MethodName: "UpdateCollectionState",
+ Handler: _Msg_UpdateCollectionState_Handler,
+ },
+ {
+ MethodName: "UpdateCollectionDates",
+ Handler: _Msg_UpdateCollectionDates_Handler,
+ },
+ {
+ MethodName: "UpdateCollectionPayments",
+ Handler: _Msg_UpdateCollectionPayments_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "ixo/claims/v1beta1/tx.proto",
+}
+
+func (m *MsgCreateCollection) 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 *MsgCreateCollection) MarshalTo(dAtA []byte) (int, error) {
@@ -1569,115 +2001,332 @@ func (m *MsgWithdrawPaymentResponse) MarshalToSizedBuffer(dAtA []byte) (int, err
return len(dAtA) - i, nil
}
-func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
- offset -= sovTx(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
+func (m *MsgUpdateCollectionState) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- dAtA[offset] = uint8(v)
- return base
+ return dAtA[:n], nil
}
-func (m *MsgCreateCollection) Size() (n int) {
- if m == nil {
- return 0
- }
+
+func (m *MsgUpdateCollectionState) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgUpdateCollectionState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- l = len(m.Entity)
- if l > 0 {
- n += 1 + l + sovTx(uint64(l))
- }
- l = len(m.Signer)
- if l > 0 {
- n += 1 + l + sovTx(uint64(l))
- }
- l = len(m.Protocol)
- if l > 0 {
- n += 1 + l + sovTx(uint64(l))
- }
- if m.StartDate != nil {
- l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate)
- n += 1 + l + sovTx(uint64(l))
- }
- if m.EndDate != nil {
- l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate)
- n += 1 + l + sovTx(uint64(l))
- }
- if m.Quota != 0 {
- n += 1 + sovTx(uint64(m.Quota))
+ if len(m.AdminAddress) > 0 {
+ i -= len(m.AdminAddress)
+ copy(dAtA[i:], m.AdminAddress)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.AdminAddress)))
+ i--
+ dAtA[i] = 0x1a
}
if m.State != 0 {
- n += 1 + sovTx(uint64(m.State))
+ i = encodeVarintTx(dAtA, i, uint64(m.State))
+ i--
+ dAtA[i] = 0x10
}
- if m.Payments != nil {
- l = m.Payments.Size()
- n += 1 + l + sovTx(uint64(l))
+ if len(m.CollectionId) > 0 {
+ i -= len(m.CollectionId)
+ copy(dAtA[i:], m.CollectionId)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.CollectionId)))
+ i--
+ dAtA[i] = 0xa
}
- return n
+ return len(dAtA) - i, nil
}
-func (m *MsgCreateCollectionResponse) Size() (n int) {
- if m == nil {
- return 0
+func (m *MsgUpdateCollectionStateResponse) 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 *MsgUpdateCollectionStateResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgUpdateCollectionStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- return n
+ return len(dAtA) - i, nil
}
-func (m *MsgSubmitClaim) Size() (n int) {
- if m == nil {
- return 0
+func (m *MsgUpdateCollectionDates) 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 *MsgUpdateCollectionDates) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgUpdateCollectionDates) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- l = len(m.CollectionId)
- if l > 0 {
- n += 1 + l + sovTx(uint64(l))
- }
- l = len(m.ClaimId)
- if l > 0 {
- n += 1 + l + sovTx(uint64(l))
+ if len(m.AdminAddress) > 0 {
+ i -= len(m.AdminAddress)
+ copy(dAtA[i:], m.AdminAddress)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.AdminAddress)))
+ i--
+ dAtA[i] = 0x22
}
- l = len(m.AgentDid)
- if l > 0 {
- n += 1 + l + sovTx(uint64(l))
+ if m.EndDate != nil {
+ n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.EndDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate):])
+ if err7 != nil {
+ return 0, err7
+ }
+ i -= n7
+ i = encodeVarintTx(dAtA, i, uint64(n7))
+ i--
+ dAtA[i] = 0x1a
}
- l = len(m.AgentAddress)
- if l > 0 {
- n += 1 + l + sovTx(uint64(l))
+ if m.StartDate != nil {
+ n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.StartDate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate):])
+ if err8 != nil {
+ return 0, err8
+ }
+ i -= n8
+ i = encodeVarintTx(dAtA, i, uint64(n8))
+ i--
+ dAtA[i] = 0x12
}
- l = len(m.AdminAddress)
- if l > 0 {
- n += 1 + l + sovTx(uint64(l))
+ if len(m.CollectionId) > 0 {
+ i -= len(m.CollectionId)
+ copy(dAtA[i:], m.CollectionId)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.CollectionId)))
+ i--
+ dAtA[i] = 0xa
}
- return n
+ return len(dAtA) - i, nil
}
-func (m *MsgSubmitClaimResponse) Size() (n int) {
- if m == nil {
- return 0
+func (m *MsgUpdateCollectionDatesResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- var l int
- _ = l
- return n
+ return dAtA[:n], nil
}
-func (m *MsgEvaluateClaim) Size() (n int) {
- if m == nil {
- return 0
- }
+func (m *MsgUpdateCollectionDatesResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgUpdateCollectionDatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- l = len(m.ClaimId)
- if l > 0 {
- n += 1 + l + sovTx(uint64(l))
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgUpdateCollectionPayments) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- l = len(m.CollectionId)
- if l > 0 {
+ return dAtA[:n], nil
+}
+
+func (m *MsgUpdateCollectionPayments) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgUpdateCollectionPayments) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.AdminAddress) > 0 {
+ i -= len(m.AdminAddress)
+ copy(dAtA[i:], m.AdminAddress)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.AdminAddress)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Payments != nil {
+ {
+ size, err := m.Payments.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintTx(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.CollectionId) > 0 {
+ i -= len(m.CollectionId)
+ copy(dAtA[i:], m.CollectionId)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.CollectionId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgUpdateCollectionPaymentsResponse) 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 *MsgUpdateCollectionPaymentsResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgUpdateCollectionPaymentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
+ offset -= sovTx(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *MsgCreateCollection) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Entity)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.Signer)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.Protocol)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.StartDate != nil {
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate)
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.EndDate != nil {
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate)
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.Quota != 0 {
+ n += 1 + sovTx(uint64(m.Quota))
+ }
+ if m.State != 0 {
+ n += 1 + sovTx(uint64(m.State))
+ }
+ if m.Payments != nil {
+ l = m.Payments.Size()
+ n += 1 + l + sovTx(uint64(l))
+ }
+ return n
+}
+
+func (m *MsgCreateCollectionResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
+func (m *MsgSubmitClaim) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.ClaimId)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.AgentDid)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.AgentAddress)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.AdminAddress)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ return n
+}
+
+func (m *MsgSubmitClaimResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
+func (m *MsgEvaluateClaim) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.ClaimId)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.CollectionId)
+ if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.Oracle)
@@ -1818,6 +2467,99 @@ func (m *MsgWithdrawPaymentResponse) Size() (n int) {
return n
}
+func (m *MsgUpdateCollectionState) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.State != 0 {
+ n += 1 + sovTx(uint64(m.State))
+ }
+ l = len(m.AdminAddress)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ return n
+}
+
+func (m *MsgUpdateCollectionStateResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
+func (m *MsgUpdateCollectionDates) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.StartDate != nil {
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.StartDate)
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.EndDate != nil {
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.EndDate)
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.AdminAddress)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ return n
+}
+
+func (m *MsgUpdateCollectionDatesResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
+func (m *MsgUpdateCollectionPayments) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.Payments != nil {
+ l = m.Payments.Size()
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.AdminAddress)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ return n
+}
+
+func (m *MsgUpdateCollectionPaymentsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
func sovTx(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -3460,6 +4202,625 @@ func (m *MsgWithdrawPaymentResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *MsgUpdateCollectionState) 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 ErrIntOverflowTx
+ }
+ 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: MsgUpdateCollectionState: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgUpdateCollectionState: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CollectionId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
+ }
+ m.State = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.State |= CollectionState(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AdminAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AdminAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgUpdateCollectionStateResponse) 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 ErrIntOverflowTx
+ }
+ 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: MsgUpdateCollectionStateResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgUpdateCollectionStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgUpdateCollectionDates) 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 ErrIntOverflowTx
+ }
+ 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: MsgUpdateCollectionDates: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgUpdateCollectionDates: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CollectionId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field StartDate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.StartDate == nil {
+ m.StartDate = new(time.Time)
+ }
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.StartDate, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EndDate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.EndDate == nil {
+ m.EndDate = new(time.Time)
+ }
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.EndDate, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AdminAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AdminAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgUpdateCollectionDatesResponse) 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 ErrIntOverflowTx
+ }
+ 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: MsgUpdateCollectionDatesResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgUpdateCollectionDatesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgUpdateCollectionPayments) 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 ErrIntOverflowTx
+ }
+ 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: MsgUpdateCollectionPayments: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgUpdateCollectionPayments: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CollectionId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Payments", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Payments == nil {
+ m.Payments = &Payments{}
+ }
+ if err := m.Payments.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AdminAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AdminAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgUpdateCollectionPaymentsResponse) 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 ErrIntOverflowTx
+ }
+ 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: MsgUpdateCollectionPaymentsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgUpdateCollectionPaymentsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipTx(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
diff --git a/x/entity/keeper/msg_server.go b/x/entity/keeper/msg_server.go
index 34653620..9ce1e7fa 100644
--- a/x/entity/keeper/msg_server.go
+++ b/x/entity/keeper/msg_server.go
@@ -461,3 +461,69 @@ func (s msgServer) GrantEntityAccountAuthz(goCtx context.Context, msg *types.Msg
return &types.MsgGrantEntityAccountAuthzResponse{}, nil
}
+
+// --------------------------
+// REVOKE ENTITY ACCOUNT AUTHZ
+// --------------------------
+func (s msgServer) RevokeEntityAccountAuthz(goCtx context.Context, msg *types.MsgRevokeEntityAccountAuthz) (*types.MsgRevokeEntityAccountAuthzResponse, error) {
+ ctx := sdk.UnwrapSDKContext(goCtx)
+
+ // get entity doc
+ _, entity, err := s.ResolveEntity(ctx, msg.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ // check that owner is entity owner
+ err = s.Keeper.CheckIfOwner(ctx, msg.Id, msg.OwnerAddress)
+ if err != nil {
+ return nil, sdkerrors.Wrapf(err, "unauthorized")
+ }
+
+ // get entity account with same name
+ var account *types.EntityAccount
+ for _, acc := range entity.Accounts {
+ if account != nil {
+ break
+ }
+ if acc.Name == msg.Name {
+ account = acc
+ }
+ }
+
+ // if no account with name throw
+ if account == nil {
+ return nil, sdkerrors.Wrapf(types.ErrAccountNotFound, "name %s", msg.Name)
+ }
+
+ // get addresses
+ grantee, err := sdk.AccAddressFromBech32(msg.GranteeAddress)
+ if err != nil {
+ return nil, err
+ }
+ granter, err := sdk.AccAddressFromBech32(account.Address)
+ if err != nil {
+ return nil, err
+ }
+
+ // remove grant
+ if err := s.Keeper.AuthzKeeper.DeleteGrant(ctx, grantee, granter, msg.MsgTypeUrl); err != nil {
+ return nil, err
+ }
+
+ // emit the events
+ if err := ctx.EventManager().EmitTypedEvents(
+ &types.EntityAccountAuthzRevokedEvent{
+ Id: entity.Id,
+ Signer: msg.OwnerAddress,
+ AccountName: msg.Name,
+ Granter: granter.String(),
+ Grantee: grantee.String(),
+ MsgTypeUrl: msg.MsgTypeUrl,
+ },
+ ); err != nil {
+ return nil, err
+ }
+
+ return &types.MsgRevokeEntityAccountAuthzResponse{}, nil
+}
diff --git a/x/entity/message_handler.go b/x/entity/message_handler.go
index 63d4ac31..4cf69af5 100644
--- a/x/entity/message_handler.go
+++ b/x/entity/message_handler.go
@@ -32,6 +32,9 @@ func NewHandler(k keeper.Keeper) sdk.Handler {
case *types.MsgGrantEntityAccountAuthz:
res, err := msgServer.GrantEntityAccountAuthz(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
+ case *types.MsgRevokeEntityAccountAuthz:
+ res, err := msgServer.RevokeEntityAccountAuthz(sdk.WrapSDKContext(ctx), msg)
+ return sdk.WrapServiceResult(ctx, res, err)
default:
// err := sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized bonds Msg type: %v", msg.Type())
err := sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "unrecognized entity Msg type")
diff --git a/x/entity/spec/03_messages.md b/x/entity/spec/03_messages.md
index 6187ba4f..064f6b05 100644
--- a/x/entity/spec/03_messages.md
+++ b/x/entity/spec/03_messages.md
@@ -113,7 +113,7 @@ The field's descriptions is as follows:
- `id` - a string containing the unique identifier of the entity.
- `recipientDid` - a string containing the recipient IidDocument Id (Did).
-- `ownerAddress` - a string containing the cosmos address of the private key signing the transaction
+- `ownerAddress` - a string containing the cosmos address of the private key signing the transaction.
- `ownerDid` - a string containing the signers IidDocument Id. Must be in the IidDocument's controllers list to allow update and the `ownerAddress` must be authorized to sign on behalf of the `ownerDid`
## MsgCreateEntityAccount
@@ -132,7 +132,7 @@ The field's descriptions is as follows:
- `id` - a string containing the unique identifier of the entity.
- `name` - a string containing the name for the new entity account.
-- `ownerAddress` - a string containing the cosmos address of the private key signing the transaction
+- `ownerAddress` - a string containing the cosmos address of the private key signing the transaction.
## MsgGrantEntityAccountAuthz
@@ -154,4 +154,26 @@ The field's descriptions is as follows:
- `name` - a string containing the name for the entity account to use as granter for the authz grant.
- `granteeAddress` - a string containing the grantee address for the authz grant.
- `grant` - a [Grant](https://docs.cosmos.network/main/build/modules/authz#grant) that will be created.
-- `ownerAddress` - a string containing the cosmos address of the private key signing the transaction
+- `ownerAddress` - a string containing the cosmos address of the private key signing the transaction.
+
+## MsgRevokeEntityAccountAuthz
+
+The `MsgRevokeEntityAccountAuthz` is used to revoke an [Authz](https://docs.cosmos.network/main/build/modules/authz) grant from entity account (as granter) to the msg `GranteeAddress` for the specific `MsgTypeUrl`
+
+```go
+type MsgRevokeEntityAccountAuthz struct {
+ Id string
+ Name string
+ GranteeAddress string
+ MsgTypeUrl string
+ OwnerAddress string
+}
+```
+
+The field's descriptions is as follows:
+
+- `id` - a string containing the unique identifier of the entity.
+- `name` - a string containing the name for the entity account to use as granter for the authz grant.
+- `granteeAddress` - a string containing the grantee address for the authz grant.
+- `msgTypeUrl` - a string containing the message type url for the specific authz to revoke.
+- `ownerAddress` - a string containing the cosmos address of the private key signing the transaction.
diff --git a/x/entity/spec/04_events.md b/x/entity/spec/04_events.md
index 3c37cb7f..fe0b822b 100644
--- a/x/entity/spec/04_events.md
+++ b/x/entity/spec/04_events.md
@@ -113,3 +113,27 @@ The field's descriptions is as follows:
- `granter` - a string containing the address of the entity account the authz was granted.
- `grantee` - a string containing the address of the grantee towards who the authz was granted.
- `grant` - the [Grant](https://docs.cosmos.network/main/build/modules/authz#grant) that was granted.
+
+### EntityAccountAuthzRevokedEvent
+
+Emitted after a successfull `MsgRevokeEntityAccountAuthz`
+
+```go
+type EntityAccountAuthzRevokedEvent struct {
+ Id string
+ Signer string
+ AccountName string
+ Granter string
+ Grantee string
+ MsgTypeUrl string
+}
+```
+
+The field's descriptions is as follows:
+
+- `id` - a string containing the unique identifier of the entity.
+- `signer` - a string containing the address of the signer.
+- `accountName` - a string containing the name of the entity account the authz was granted before.
+- `granter` - a string containing the address of the entity account the authz was granted before.
+- `grantee` - a string containing the address of the grantee towards who the authz was granted before.
+- `msgTypeUrl` - a string containing the message type url for the specific authz that was revoked.
diff --git a/x/entity/types/codec.go b/x/entity/types/codec.go
index c9af508b..2f8e345d 100644
--- a/x/entity/types/codec.go
+++ b/x/entity/types/codec.go
@@ -16,6 +16,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgTransferEntity{}, "entity/TransferEntity", nil)
cdc.RegisterConcrete(&MsgCreateEntityAccount{}, "entity/CreateEntityAccount", nil)
cdc.RegisterConcrete(&MsgGrantEntityAccountAuthz{}, "entity/GrantEntityAccountAuthz", nil)
+ cdc.RegisterConcrete(&MsgRevokeEntityAccountAuthz{}, "entity/RevokeEntityAccountAuthz", nil)
}
func RegisterInterfaces(registry types.InterfaceRegistry) {
@@ -26,6 +27,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
&MsgTransferEntity{},
&MsgCreateEntityAccount{},
&MsgGrantEntityAccountAuthz{},
+ &MsgRevokeEntityAccountAuthz{},
)
registry.RegisterImplementations(
diff --git a/x/entity/types/entity.pb.go b/x/entity/types/entity.pb.go
index 47682e4f..59853589 100644
--- a/x/entity/types/entity.pb.go
+++ b/x/entity/types/entity.pb.go
@@ -102,7 +102,7 @@ type Entity struct {
// Status of the Entity as defined by the implementer and interpreted by
// Client applications
Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"`
- // Address of the operator through which the Entity was created
+ // Did of the operator through which the Entity was created
RelayerNode string `protobuf:"bytes,6,opt,name=relayer_node,json=relayerNode,proto3" json:"relayer_node,omitempty"`
// Credentials of the enitity to be verified
Credentials []string `protobuf:"bytes,7,rep,name=credentials,proto3" json:"credentials,omitempty"`
diff --git a/x/entity/types/event.pb.go b/x/entity/types/event.pb.go
index c33792d3..14bd3635 100644
--- a/x/entity/types/event.pb.go
+++ b/x/entity/types/event.pb.go
@@ -321,7 +321,8 @@ func (m *EntityAccountCreatedEvent) GetAccountAddress() string {
return ""
}
-// EntityAccountCreatedEvent is an event triggered on a entity account creation
+// EntityAccountCreatedEvent is an event triggered on a entity account authz
+// creation
type EntityAccountAuthzCreatedEvent struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"`
@@ -406,6 +407,92 @@ func (m *EntityAccountAuthzCreatedEvent) GetGrant() *Grant {
return nil
}
+// EntityAccountAuthzRevokedEvent is an event triggered on a entity account
+// authz revocation
+type EntityAccountAuthzRevokedEvent struct {
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"`
+ AccountName string `protobuf:"bytes,3,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
+ Granter string `protobuf:"bytes,4,opt,name=granter,proto3" json:"granter,omitempty"`
+ Grantee string `protobuf:"bytes,5,opt,name=grantee,proto3" json:"grantee,omitempty"`
+ MsgTypeUrl string `protobuf:"bytes,6,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
+}
+
+func (m *EntityAccountAuthzRevokedEvent) Reset() { *m = EntityAccountAuthzRevokedEvent{} }
+func (m *EntityAccountAuthzRevokedEvent) String() string { return proto.CompactTextString(m) }
+func (*EntityAccountAuthzRevokedEvent) ProtoMessage() {}
+func (*EntityAccountAuthzRevokedEvent) Descriptor() ([]byte, []int) {
+ return fileDescriptor_3a73923d9783a1ef, []int{6}
+}
+func (m *EntityAccountAuthzRevokedEvent) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *EntityAccountAuthzRevokedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_EntityAccountAuthzRevokedEvent.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 *EntityAccountAuthzRevokedEvent) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EntityAccountAuthzRevokedEvent.Merge(m, src)
+}
+func (m *EntityAccountAuthzRevokedEvent) XXX_Size() int {
+ return m.Size()
+}
+func (m *EntityAccountAuthzRevokedEvent) XXX_DiscardUnknown() {
+ xxx_messageInfo_EntityAccountAuthzRevokedEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EntityAccountAuthzRevokedEvent proto.InternalMessageInfo
+
+func (m *EntityAccountAuthzRevokedEvent) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *EntityAccountAuthzRevokedEvent) GetSigner() string {
+ if m != nil {
+ return m.Signer
+ }
+ return ""
+}
+
+func (m *EntityAccountAuthzRevokedEvent) GetAccountName() string {
+ if m != nil {
+ return m.AccountName
+ }
+ return ""
+}
+
+func (m *EntityAccountAuthzRevokedEvent) GetGranter() string {
+ if m != nil {
+ return m.Granter
+ }
+ return ""
+}
+
+func (m *EntityAccountAuthzRevokedEvent) GetGrantee() string {
+ if m != nil {
+ return m.Grantee
+ }
+ return ""
+}
+
+func (m *EntityAccountAuthzRevokedEvent) GetMsgTypeUrl() string {
+ if m != nil {
+ return m.MsgTypeUrl
+ }
+ return ""
+}
+
func init() {
proto.RegisterType((*EntityCreatedEvent)(nil), "ixo.entity.v1beta1.EntityCreatedEvent")
proto.RegisterType((*EntityUpdatedEvent)(nil), "ixo.entity.v1beta1.EntityUpdatedEvent")
@@ -413,39 +500,43 @@ func init() {
proto.RegisterType((*EntityTransferredEvent)(nil), "ixo.entity.v1beta1.EntityTransferredEvent")
proto.RegisterType((*EntityAccountCreatedEvent)(nil), "ixo.entity.v1beta1.EntityAccountCreatedEvent")
proto.RegisterType((*EntityAccountAuthzCreatedEvent)(nil), "ixo.entity.v1beta1.EntityAccountAuthzCreatedEvent")
+ proto.RegisterType((*EntityAccountAuthzRevokedEvent)(nil), "ixo.entity.v1beta1.EntityAccountAuthzRevokedEvent")
}
func init() { proto.RegisterFile("ixo/entity/v1beta1/event.proto", fileDescriptor_3a73923d9783a1ef) }
var fileDescriptor_3a73923d9783a1ef = []byte{
- // 432 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x3d, 0x8f, 0x13, 0x31,
- 0x10, 0x8d, 0xc3, 0x5d, 0x20, 0x3e, 0x14, 0x24, 0x0b, 0x9d, 0xf6, 0x52, 0x98, 0x90, 0x86, 0x34,
- 0xac, 0x75, 0xa1, 0xa2, 0x0c, 0xe8, 0x44, 0x83, 0x28,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, 0x3e, 0xcc, 0x25, 0x13, 0x1a, 0xa4, 0x8b, 0xb3, 0x6d, 0xef, 0x11, 0xf0, 0x4f, 0xff, 0x44,
+ 0xc0, 0x8b, 0xe9, 0xa9, 0x29, 0xfd, 0x96, 0xf9, 0x77, 0x2e, 0xf7, 0xfd, 0x3b, 0x6f, 0x6b, 0x42,
+ 0x62, 0x79, 0xe1, 0xf7, 0xbd, 0x27, 0x25, 0x50, 0xe1, 0xdd, 0x7f, 0x72, 0x52, 0x8f, 0x9e, 0x17,
+ 0x2a, 0x1f, 0xe9, 0xe5, 0x1c, 0x46, 0xa5, 0x9c, 0x99, 0xcb, 0xda, 0x09, 0x2d, 0x54, 0x7e, 0xb3,
+ 0x9c, 0xc3, 0xad, 0x9c, 0xbd, 0xfe, 0xf0, 0x63, 0x1d, 0x90, 0xd5, 0x3a, 0x20, 0xbf, 0xd6, 0x01,
+ 0xf9, 0xb6, 0x09, 0x1a, 0xab, 0x4d, 0xd0, 0xf8, 0xb9, 0x09, 0x1a, 0x9f, 0x5e, 0xe5, 0x5c, 0x4f,
+ 0xcb, 0x71, 0x94, 0x62, 0x11, 0xf3, 0x05, 0x4e, 0xb0, 0x14, 0x19, 0xd3, 0x1c, 0x45, 0xdd, 0xbd,
+ 0x18, 0xcf, 0x30, 0xbd, 0x4b, 0xa7, 0x8c, 0x8b, 0xb8, 0x1a, 0xc4, 0x8b, 0xed, 0x6b, 0x50, 0x3b,
+ 0xa9, 0x71, 0xcb, 0xbc, 0x02, 0x2f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x44, 0x0b, 0xaa, 0x7b,
+ 0x93, 0x04, 0x00, 0x00,
}
func (m *EntityCreatedEvent) Marshal() (dAtA []byte, err error) {
@@ -744,6 +835,71 @@ func (m *EntityAccountAuthzCreatedEvent) MarshalToSizedBuffer(dAtA []byte) (int,
return len(dAtA) - i, nil
}
+func (m *EntityAccountAuthzRevokedEvent) 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 *EntityAccountAuthzRevokedEvent) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *EntityAccountAuthzRevokedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.MsgTypeUrl) > 0 {
+ i -= len(m.MsgTypeUrl)
+ copy(dAtA[i:], m.MsgTypeUrl)
+ i = encodeVarintEvent(dAtA, i, uint64(len(m.MsgTypeUrl)))
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.Grantee) > 0 {
+ i -= len(m.Grantee)
+ copy(dAtA[i:], m.Grantee)
+ i = encodeVarintEvent(dAtA, i, uint64(len(m.Grantee)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.Granter) > 0 {
+ i -= len(m.Granter)
+ copy(dAtA[i:], m.Granter)
+ i = encodeVarintEvent(dAtA, i, uint64(len(m.Granter)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.AccountName) > 0 {
+ i -= len(m.AccountName)
+ copy(dAtA[i:], m.AccountName)
+ i = encodeVarintEvent(dAtA, i, uint64(len(m.AccountName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Signer) > 0 {
+ i -= len(m.Signer)
+ copy(dAtA[i:], m.Signer)
+ i = encodeVarintEvent(dAtA, i, uint64(len(m.Signer)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Id) > 0 {
+ i -= len(m.Id)
+ copy(dAtA[i:], m.Id)
+ i = encodeVarintEvent(dAtA, i, uint64(len(m.Id)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
func encodeVarintEvent(dAtA []byte, offset int, v uint64) int {
offset -= sovEvent(v)
base := offset
@@ -888,6 +1044,39 @@ func (m *EntityAccountAuthzCreatedEvent) Size() (n int) {
return n
}
+func (m *EntityAccountAuthzRevokedEvent) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovEvent(uint64(l))
+ }
+ l = len(m.Signer)
+ if l > 0 {
+ n += 1 + l + sovEvent(uint64(l))
+ }
+ l = len(m.AccountName)
+ if l > 0 {
+ n += 1 + l + sovEvent(uint64(l))
+ }
+ l = len(m.Granter)
+ if l > 0 {
+ n += 1 + l + sovEvent(uint64(l))
+ }
+ l = len(m.Grantee)
+ if l > 0 {
+ n += 1 + l + sovEvent(uint64(l))
+ }
+ l = len(m.MsgTypeUrl)
+ if l > 0 {
+ n += 1 + l + sovEvent(uint64(l))
+ }
+ return n
+}
+
func sovEvent(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -1834,6 +2023,248 @@ func (m *EntityAccountAuthzCreatedEvent) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *EntityAccountAuthzRevokedEvent) 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 ErrIntOverflowEvent
+ }
+ 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: EntityAccountAuthzRevokedEvent: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EntityAccountAuthzRevokedEvent: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthEvent
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthEvent
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Signer = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AccountName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthEvent
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AccountName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthEvent
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Granter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthEvent
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Grantee = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthEvent
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MsgTypeUrl = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipEvent(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipEvent(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
diff --git a/x/entity/types/msg_validation.go b/x/entity/types/msg_validation.go
index ba1900de..dac39f8a 100644
--- a/x/entity/types/msg_validation.go
+++ b/x/entity/types/msg_validation.go
@@ -20,6 +20,10 @@ func (msg MsgCreateEntity) ValidateBasic() error {
return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.RelayerNode)
}
+ if !iidtypes.IsValidDID(msg.OwnerDid.Did()) {
+ return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.OwnerDid.String())
+ }
+
if msg.Verification == nil || len(msg.Verification) == 0 {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "verifications are required")
}
@@ -60,6 +64,9 @@ func (msg MsgUpdateEntity) ValidateBasic() error {
if !iidtypes.IsValidDID(msg.Id) {
return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.Id)
}
+ if !iidtypes.IsValidDID(msg.ControllerDid.Did()) {
+ return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.ControllerDid.String())
+ }
return nil
}
@@ -74,7 +81,7 @@ func (msg MsgUpdateEntityVerified) ValidateBasic() error {
if !iidtypes.IsValidDID(msg.Id) {
return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.Id)
}
- if !iidtypes.IsValidDID(string(msg.RelayerNodeDid)) {
+ if !iidtypes.IsValidDID(msg.RelayerNodeDid.Did()) {
return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.RelayerNodeDid.String())
}
return nil
@@ -92,10 +99,10 @@ func (msg MsgTransferEntity) ValidateBasic() error {
return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.Id)
}
if !iidtypes.IsValidDID(msg.OwnerDid.Did()) {
- return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.OwnerDid.Did())
+ return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.OwnerDid.String())
}
if !iidtypes.IsValidDID(msg.RecipientDid.Did()) {
- return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.RecipientDid.Did())
+ return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.RecipientDid.String())
}
return nil
}
@@ -139,3 +146,27 @@ func (msg MsgGrantEntityAccountAuthz) ValidateBasic() error {
// return msg.Grant.ValidateBasic()
return nil
}
+
+// --------------------------
+// REVOKE ENTITY ACCOUNT AUTHZ
+// --------------------------
+func (msg MsgRevokeEntityAccountAuthz) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.OwnerAddress)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid owner address (%s)", err)
+ }
+ _, err = sdk.AccAddressFromBech32(msg.GranteeAddress)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid grantee address (%s)", err)
+ }
+ if !iidtypes.IsValidDID(msg.Id) {
+ return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.Id)
+ }
+ if ixo.IsEmpty(msg.Name) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "name cannot be empty")
+ }
+ if ixo.IsEmpty(msg.MsgTypeUrl) {
+ return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "msgTypeUrl cannot be empty")
+ }
+ return nil
+}
diff --git a/x/entity/types/tx.go b/x/entity/types/tx.go
index 52177fd2..28633365 100644
--- a/x/entity/types/tx.go
+++ b/x/entity/types/tx.go
@@ -292,3 +292,40 @@ func (msg MsgGrantEntityAccountAuthz) GetSignBytes() []byte {
}
func (msg MsgGrantEntityAccountAuthz) Route() string { return RouterKey }
+
+// --------------------------
+// REVOKE ENTITY ACCOUNT AUTHZ
+// --------------------------
+const TypeMsgRevokeEntityAccountAuthz = "revoke_entity_account_authz"
+
+var _ sdk.Msg = &MsgRevokeEntityAccountAuthz{}
+
+func NewMsgRevokeEntityAccountAuthz(
+ id, name, ownerAddress, granteeAddress, msgTypeUrl string,
+) *MsgRevokeEntityAccountAuthz {
+ return &MsgRevokeEntityAccountAuthz{
+ Id: id,
+ Name: name,
+ OwnerAddress: ownerAddress,
+ GranteeAddress: granteeAddress,
+ MsgTypeUrl: msgTypeUrl,
+ }
+}
+
+func (msg MsgRevokeEntityAccountAuthz) Type() string {
+ return TypeMsgRevokeEntityAccountAuthz
+}
+
+func (msg MsgRevokeEntityAccountAuthz) GetSigners() []sdk.AccAddress {
+ address, err := sdk.AccAddressFromBech32(msg.OwnerAddress)
+ if err != nil {
+ return []sdk.AccAddress{}
+ }
+ return []sdk.AccAddress{address}
+}
+
+func (msg MsgRevokeEntityAccountAuthz) GetSignBytes() []byte {
+ return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg))
+}
+
+func (msg MsgRevokeEntityAccountAuthz) Route() string { return RouterKey }
diff --git a/x/entity/types/tx.pb.go b/x/entity/types/tx.pb.go
index b52a43a8..3f49a26c 100644
--- a/x/entity/types/tx.pb.go
+++ b/x/entity/types/tx.pb.go
@@ -56,7 +56,7 @@ type MsgCreateEntity struct {
// End Date of the Entity as defined by the implementer and interpreted by
// Client applications
EndDate *time.Time `protobuf:"bytes,11,opt,name=end_date,json=endDate,proto3,stdtime" json:"end_date,omitempty"`
- // Address of the operator through which the Entity was created
+ // Did of the operator through which the Entity was created
RelayerNode string `protobuf:"bytes,12,opt,name=relayer_node,json=relayerNode,proto3" json:"relayer_node,omitempty"`
// Content ID or Hash of public Verifiable Credentials associated with the
// subject
@@ -639,8 +639,7 @@ func (m *MsgTransferEntityResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgTransferEntityResponse proto.InternalMessageInfo
-// create a module account for an entity, account details will be added as a
-// linkedEntity on entity iid doc where linkedEntity id is didfragment: did#name
+// create a module account for an entity
type MsgCreateEntityAccount struct {
// entity id (did) to create account for
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
@@ -752,7 +751,7 @@ func (m *MsgCreateEntityAccountResponse) GetAccount() string {
// Create a authz grant from entity account (as grantor) to recipient in msg as
// grantee for the specific authorization
type MsgGrantEntityAccountAuthz struct {
- // entity id (did) to create account for
+ // entity id (did) which has the account
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// name of account
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
@@ -868,6 +867,124 @@ func (m *MsgGrantEntityAccountAuthzResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgGrantEntityAccountAuthzResponse proto.InternalMessageInfo
+// Revoke an existing authz grant from entity account (as grantor) to recipient
+type MsgRevokeEntityAccountAuthz struct {
+ // entity id (did) which has the account
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // name of account
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // the grantee address for which the authz grant will be revoked
+ GranteeAddress string `protobuf:"bytes,3,opt,name=grantee_address,json=granteeAddress,proto3" json:"grantee_address,omitempty"`
+ // the msg type url of the grant to be revoked for the specific grantee
+ MsgTypeUrl string `protobuf:"bytes,4,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
+ // the owner_address used to sign this transaction.
+ OwnerAddress string `protobuf:"bytes,5,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
+}
+
+func (m *MsgRevokeEntityAccountAuthz) Reset() { *m = MsgRevokeEntityAccountAuthz{} }
+func (m *MsgRevokeEntityAccountAuthz) String() string { return proto.CompactTextString(m) }
+func (*MsgRevokeEntityAccountAuthz) ProtoMessage() {}
+func (*MsgRevokeEntityAccountAuthz) Descriptor() ([]byte, []int) {
+ return fileDescriptor_60859df4ac9fa053, []int{12}
+}
+func (m *MsgRevokeEntityAccountAuthz) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgRevokeEntityAccountAuthz) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgRevokeEntityAccountAuthz.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 *MsgRevokeEntityAccountAuthz) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgRevokeEntityAccountAuthz.Merge(m, src)
+}
+func (m *MsgRevokeEntityAccountAuthz) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgRevokeEntityAccountAuthz) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgRevokeEntityAccountAuthz.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgRevokeEntityAccountAuthz proto.InternalMessageInfo
+
+func (m *MsgRevokeEntityAccountAuthz) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *MsgRevokeEntityAccountAuthz) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *MsgRevokeEntityAccountAuthz) GetGranteeAddress() string {
+ if m != nil {
+ return m.GranteeAddress
+ }
+ return ""
+}
+
+func (m *MsgRevokeEntityAccountAuthz) GetMsgTypeUrl() string {
+ if m != nil {
+ return m.MsgTypeUrl
+ }
+ return ""
+}
+
+func (m *MsgRevokeEntityAccountAuthz) GetOwnerAddress() string {
+ if m != nil {
+ return m.OwnerAddress
+ }
+ return ""
+}
+
+type MsgRevokeEntityAccountAuthzResponse struct {
+}
+
+func (m *MsgRevokeEntityAccountAuthzResponse) Reset() { *m = MsgRevokeEntityAccountAuthzResponse{} }
+func (m *MsgRevokeEntityAccountAuthzResponse) String() string { return proto.CompactTextString(m) }
+func (*MsgRevokeEntityAccountAuthzResponse) ProtoMessage() {}
+func (*MsgRevokeEntityAccountAuthzResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_60859df4ac9fa053, []int{13}
+}
+func (m *MsgRevokeEntityAccountAuthzResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgRevokeEntityAccountAuthzResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgRevokeEntityAccountAuthzResponse.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 *MsgRevokeEntityAccountAuthzResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgRevokeEntityAccountAuthzResponse.Merge(m, src)
+}
+func (m *MsgRevokeEntityAccountAuthzResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgRevokeEntityAccountAuthzResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgRevokeEntityAccountAuthzResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgRevokeEntityAccountAuthzResponse proto.InternalMessageInfo
+
func init() {
proto.RegisterType((*MsgCreateEntity)(nil), "ixo.entity.v1beta1.MsgCreateEntity")
proto.RegisterType((*MsgCreateEntityResponse)(nil), "ixo.entity.v1beta1.MsgCreateEntityResponse")
@@ -881,86 +998,92 @@ func init() {
proto.RegisterType((*MsgCreateEntityAccountResponse)(nil), "ixo.entity.v1beta1.MsgCreateEntityAccountResponse")
proto.RegisterType((*MsgGrantEntityAccountAuthz)(nil), "ixo.entity.v1beta1.MsgGrantEntityAccountAuthz")
proto.RegisterType((*MsgGrantEntityAccountAuthzResponse)(nil), "ixo.entity.v1beta1.MsgGrantEntityAccountAuthzResponse")
+ proto.RegisterType((*MsgRevokeEntityAccountAuthz)(nil), "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthz")
+ proto.RegisterType((*MsgRevokeEntityAccountAuthzResponse)(nil), "ixo.entity.v1beta1.MsgRevokeEntityAccountAuthzResponse")
}
func init() { proto.RegisterFile("ixo/entity/v1beta1/tx.proto", fileDescriptor_60859df4ac9fa053) }
var fileDescriptor_60859df4ac9fa053 = []byte{
- // 1171 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45,
- 0x14, 0xcf, 0xfa, 0x4f, 0x9d, 0x3c, 0xff, 0x49, 0xbb, 0x54, 0x74, 0xe3, 0x14, 0xdb, 0x75, 0x41,
- 0x8d, 0x8a, 0xb2, 0xdb, 0xba, 0x12, 0x12, 0x70, 0xa8, 0xe2, 0xa6, 0x85, 0x0a, 0xc2, 0x61, 0x13,
- 0x38, 0x70, 0x71, 0x27, 0x3b, 0x93, 0xcd, 0x90, 0xf5, 0x8e, 0xb5, 0x33, 0x4e, 0x1c, 0xc4, 0x05,
- 0x89, 0x0f, 0xd0, 0x33, 0x1f, 0x80, 0xcf, 0xd2, 0x63, 0x8f, 0x70, 0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6, 0x79, 0x24, 0x30, 0xf2, 0xad, 0x7c, 0x48, 0x32, 0x91, 0xe8, 0x1d, 0x28, 0x85, 0x27, 0x32,
- 0x12, 0x46, 0xa1, 0x95, 0xdf, 0x28, 0x77, 0x0c, 0x33, 0x4c, 0x75, 0x98, 0xb4, 0xe8, 0x2a, 0xe6,
- 0x33, 0xa5, 0xb7, 0x63, 0xa0, 0xbe, 0x05, 0x95, 0x63, 0x12, 0xd0, 0x03, 0xea, 0x20, 0x41, 0x99,
- 0x6f, 0x14, 0xa5, 0xe1, 0x07, 0x29, 0xc3, 0xef, 0x12, 0x20, 0x7b, 0xca, 0x24, 0x74, 0xcb, 0x49,
- 0x70, 0x4c, 0x1d, 0x62, 0xdc, 0xc8, 0x70, 0xbb, 0xab, 0xf4, 0x76, 0x0c, 0xd4, 0x9f, 0x43, 0x0d,
- 0x39, 0x0e, 0x0b, 0x30, 0xc1, 0xbd, 0x80, 0xba, 0x87, 0xc2, 0x28, 0x49, 0xd3, 0x46, 0xca, 0x74,
- 0x2b, 0x82, 0xd9, 0x21, 0xca, 0xae, 0xa2, 0xe4, 0x51, 0xff, 0x12, 0x56, 0x3d, 0xea, 0x1f, 0x85,
- 0x24, 0x84, 0xb3, 0x61, 0xe0, 0x10, 0x63, 0x59, 0xf2, 0x34, 0x53, 0x3c, 0x5f, 0x4b, 0x9c, 0x1d,
- 0xc1, 0xec, 0x9a, 0x37, 0x75, 0xd6, 0xbb, 0x50, 0x8d, 0x98, 0x54, 0xca, 0x8d, 0x95, 0x8c, 0x44,
- 0x28, 0x1e, 0x55, 0x57, 0xbb, 0xe2, 0x25, 0x4e, 0xfa, 0x53, 0x00, 0x2e, 0x50, 0x20, 0x7a, 0x18,
- 0x09, 0x62, 0x40, 0x4b, 0xdb, 0x28, 0x77, 0xea, 0xa6, 0xea, 0x17, 0x33, 0xee, 0x17, 0x73, 0x2f,
- 0xee, 0x97, 0x6e, 0xe1, 0xf5, 0x9f, 0x4d, 0xcd, 0x5e, 0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94, 0x71, 0x0f, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -985,8 +1108,10 @@ type MsgClient interface {
TransferEntity(ctx context.Context, in *MsgTransferEntity, opts ...grpc.CallOption) (*MsgTransferEntityResponse, error)
// Create a module account for an entity,
CreateEntityAccount(ctx context.Context, in *MsgCreateEntityAccount, opts ...grpc.CallOption) (*MsgCreateEntityAccountResponse, error)
- // Create a authz grant from entity account
+ // Create an authz grant from entity account
GrantEntityAccountAuthz(ctx context.Context, in *MsgGrantEntityAccountAuthz, opts ...grpc.CallOption) (*MsgGrantEntityAccountAuthzResponse, error)
+ // Revoke an authz grant from entity account
+ RevokeEntityAccountAuthz(ctx context.Context, in *MsgRevokeEntityAccountAuthz, opts ...grpc.CallOption) (*MsgRevokeEntityAccountAuthzResponse, error)
}
type msgClient struct {
@@ -1051,6 +1176,15 @@ func (c *msgClient) GrantEntityAccountAuthz(ctx context.Context, in *MsgGrantEnt
return out, nil
}
+func (c *msgClient) RevokeEntityAccountAuthz(ctx context.Context, in *MsgRevokeEntityAccountAuthz, opts ...grpc.CallOption) (*MsgRevokeEntityAccountAuthzResponse, error) {
+ out := new(MsgRevokeEntityAccountAuthzResponse)
+ err := c.cc.Invoke(ctx, "/ixo.entity.v1beta1.Msg/RevokeEntityAccountAuthz", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// MsgServer is the server API for Msg service.
type MsgServer interface {
// CreateEntity defines a method for creating a entity.
@@ -1063,8 +1197,10 @@ type MsgServer interface {
TransferEntity(context.Context, *MsgTransferEntity) (*MsgTransferEntityResponse, error)
// Create a module account for an entity,
CreateEntityAccount(context.Context, *MsgCreateEntityAccount) (*MsgCreateEntityAccountResponse, error)
- // Create a authz grant from entity account
+ // Create an authz grant from entity account
GrantEntityAccountAuthz(context.Context, *MsgGrantEntityAccountAuthz) (*MsgGrantEntityAccountAuthzResponse, error)
+ // Revoke an authz grant from entity account
+ RevokeEntityAccountAuthz(context.Context, *MsgRevokeEntityAccountAuthz) (*MsgRevokeEntityAccountAuthzResponse, error)
}
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
@@ -1089,6 +1225,9 @@ func (*UnimplementedMsgServer) CreateEntityAccount(ctx context.Context, req *Msg
func (*UnimplementedMsgServer) GrantEntityAccountAuthz(ctx context.Context, req *MsgGrantEntityAccountAuthz) (*MsgGrantEntityAccountAuthzResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GrantEntityAccountAuthz not implemented")
}
+func (*UnimplementedMsgServer) RevokeEntityAccountAuthz(ctx context.Context, req *MsgRevokeEntityAccountAuthz) (*MsgRevokeEntityAccountAuthzResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method RevokeEntityAccountAuthz not implemented")
+}
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv)
@@ -1202,6 +1341,24 @@ func _Msg_GrantEntityAccountAuthz_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
+func _Msg_RevokeEntityAccountAuthz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MsgRevokeEntityAccountAuthz)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MsgServer).RevokeEntityAccountAuthz(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ixo.entity.v1beta1.Msg/RevokeEntityAccountAuthz",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MsgServer).RevokeEntityAccountAuthz(ctx, req.(*MsgRevokeEntityAccountAuthz))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "ixo.entity.v1beta1.Msg",
HandlerType: (*MsgServer)(nil),
@@ -1230,6 +1387,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
MethodName: "GrantEntityAccountAuthz",
Handler: _Msg_GrantEntityAccountAuthz_Handler,
},
+ {
+ MethodName: "RevokeEntityAccountAuthz",
+ Handler: _Msg_RevokeEntityAccountAuthz_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "ixo/entity/v1beta1/tx.proto",
@@ -1899,6 +2060,87 @@ func (m *MsgGrantEntityAccountAuthzResponse) MarshalToSizedBuffer(dAtA []byte) (
return len(dAtA) - i, nil
}
+func (m *MsgRevokeEntityAccountAuthz) 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 *MsgRevokeEntityAccountAuthz) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgRevokeEntityAccountAuthz) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.OwnerAddress) > 0 {
+ i -= len(m.OwnerAddress)
+ copy(dAtA[i:], m.OwnerAddress)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.MsgTypeUrl) > 0 {
+ i -= len(m.MsgTypeUrl)
+ copy(dAtA[i:], m.MsgTypeUrl)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.MsgTypeUrl)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.GranteeAddress) > 0 {
+ i -= len(m.GranteeAddress)
+ copy(dAtA[i:], m.GranteeAddress)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.GranteeAddress)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Id) > 0 {
+ i -= len(m.Id)
+ copy(dAtA[i:], m.Id)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.Id)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgRevokeEntityAccountAuthzResponse) 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 *MsgRevokeEntityAccountAuthzResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgRevokeEntityAccountAuthzResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ return len(dAtA) - i, nil
+}
+
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
offset -= sovTx(v)
base := offset
@@ -2212,6 +2454,44 @@ func (m *MsgGrantEntityAccountAuthzResponse) Size() (n int) {
return n
}
+func (m *MsgRevokeEntityAccountAuthz) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.GranteeAddress)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.MsgTypeUrl)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.OwnerAddress)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ return n
+}
+
+func (m *MsgRevokeEntityAccountAuthzResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
func sovTx(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -4240,6 +4520,266 @@ func (m *MsgGrantEntityAccountAuthzResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *MsgRevokeEntityAccountAuthz) 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 ErrIntOverflowTx
+ }
+ 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: MsgRevokeEntityAccountAuthz: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgRevokeEntityAccountAuthz: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field GranteeAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.GranteeAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MsgTypeUrl = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OwnerAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgRevokeEntityAccountAuthzResponse) 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 ErrIntOverflowTx
+ }
+ 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: MsgRevokeEntityAccountAuthzResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgRevokeEntityAccountAuthzResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipTx(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
diff --git a/x/iid/keeper/msg_server.go b/x/iid/keeper/msg_server.go
index a301cf9e..bc563528 100644
--- a/x/iid/keeper/msg_server.go
+++ b/x/iid/keeper/msg_server.go
@@ -358,7 +358,8 @@ func (k msgServer) DeleteController(goCtx context.Context, msg *types.MsgDeleteC
if err := ExecuteOnDidWithRelationships(
sdk.UnwrapSDKContext(goCtx), &k.Keeper,
newConstraints(types.Authentication),
- msg.Id, msg.Signer, func(didDoc *types.IidDocument) error {
+ msg.Id, msg.Signer,
+ func(didDoc *types.IidDocument) error {
return didDoc.DeleteControllers(msg.ControllerDid)
}); err != nil {
return nil, err
diff --git a/x/iid/types/iid.go b/x/iid/types/iid.go
index 3bd02c89..7d4fed50 100644
--- a/x/iid/types/iid.go
+++ b/x/iid/types/iid.go
@@ -1312,28 +1312,32 @@ func intersection(a, b []string) []string {
// distinct remove duplicates and sorts from a list of strings
func distinct(a []string) []string {
- m := make(map[string]struct{})
+ m := make(map[string]bool) // Use bool for readability; struct{} is traditionally used to signal intent of set.
+ var d []string
+
+ // Remove duplicates and collect unique items.
for _, item := range a {
- m[item] = struct{}{}
- }
- d := make([]string, 0, len(m))
- for k := range m {
- d = append(d, k)
+ if _, exists := m[item]; !exists {
+ d = append(d, item)
+ m[item] = true
+ }
}
+
+ // Sort the unique items.
sort.Strings(d)
return d
}
// subtraction remove set b from a
func subtraction(a, b []string) []string {
- m := make(map[string]struct{})
- for _, item := range a {
- m[item] = struct{}{}
+ m := make(map[string]bool)
+ for _, item := range b {
+ m[item] = true // Create a map to identify items in b for quick lookup.
}
var s []string
- for _, item := range distinct(b) {
- if _, ok := m[item]; !ok {
- s = append(s, item)
+ for _, item := range a {
+ if !m[item] {
+ s = append(s, item) // Append items not found in b to the slice s.
}
}
sort.Strings(s)
diff --git a/x/iid/types/msg_validation.go b/x/iid/types/msg_validation.go
index 815db524..53a18c21 100644
--- a/x/iid/types/msg_validation.go
+++ b/x/iid/types/msg_validation.go
@@ -1,6 +1,7 @@
package types
import (
+ sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
@@ -9,6 +10,11 @@ import (
// --------------------------
// ValidateBasic performs a basic check of the MsgCreateDidDocument fields.
func (msg MsgCreateIidDocument) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -46,6 +52,11 @@ func (msg MsgCreateIidDocument) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgUpdateDidDocument fields.
func (msg MsgUpdateIidDocument) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -83,6 +94,11 @@ func (msg MsgUpdateIidDocument) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgAddVerification fields.
func (msg MsgAddVerification) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -95,6 +111,11 @@ func (msg MsgAddVerification) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgRevokeVerification fields.
func (msg MsgRevokeVerification) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -110,6 +131,11 @@ func (msg MsgRevokeVerification) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgSetVerificationRelationships fields.
func (msg MsgSetVerificationRelationships) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -131,17 +157,15 @@ func (msg MsgSetVerificationRelationships) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgAddService fields.
func (msg MsgAddService) ValidateBasic() error {
- if !IsValidDID(msg.Id) {
- return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
}
- return ValidateService(msg.ServiceData)
-}
-func (msg MsgAddAccordedRight) ValidateBasic() error {
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
- return nil
+ return ValidateService(msg.ServiceData)
}
// --------------------------
@@ -149,6 +173,11 @@ func (msg MsgAddAccordedRight) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgDeleteService fields.
func (msg MsgDeleteService) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -168,6 +197,11 @@ func (msg MsgDeleteService) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgAddService fields.
func (msg MsgAddController) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -184,6 +218,11 @@ func (msg MsgAddController) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgDeleteService fields.
func (msg MsgDeleteController) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -200,6 +239,15 @@ func (msg MsgDeleteController) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgAddService fields.
func (msg MsgAddLinkedResource) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
+ if msg.LinkedResource == nil {
+ return sdkerrors.Wrap(ErrInvalidInput, "linked resource cannot be nil")
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -211,6 +259,11 @@ func (msg MsgAddLinkedResource) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgDeleteService fields.
func (msg MsgDeleteLinkedResource) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -226,6 +279,15 @@ func (msg MsgDeleteLinkedResource) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgAddService fields.
func (msg MsgAddLinkedClaim) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
+ if msg.LinkedClaim == nil {
+ return sdkerrors.Wrap(ErrInvalidInput, "linked claim cannot be nil")
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -237,6 +299,11 @@ func (msg MsgAddLinkedClaim) ValidateBasic() error {
// --------------------------
// ValidateBasic performs a basic check of the MsgDeleteService fields.
func (msg MsgDeleteLinkedClaim) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -251,6 +318,15 @@ func (msg MsgDeleteLinkedClaim) ValidateBasic() error {
// ADD LINKED ENTITY
// --------------------------
func (msg MsgAddLinkedEntity) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
+ if msg.LinkedEntity == nil {
+ return sdkerrors.Wrap(ErrInvalidInput, "linked entity cannot be nil")
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -261,6 +337,11 @@ func (msg MsgAddLinkedEntity) ValidateBasic() error {
// DELETE LINKED ENTITY
// --------------------------
func (msg MsgDeleteLinkedEntity) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -271,10 +352,34 @@ func (msg MsgDeleteLinkedEntity) ValidateBasic() error {
return nil
}
+// --------------------------
+// ADD RIGHT
+// --------------------------
+func (msg MsgAddAccordedRight) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
+ if msg.AccordedRight == nil {
+ return sdkerrors.Wrap(ErrInvalidInput, "accordede right cannot be nil")
+ }
+
+ if !IsValidDID(msg.Id) {
+ return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
+ }
+ return nil
+}
+
// --------------------------
// DELETE RIGHT
// --------------------------
func (msg MsgDeleteAccordedRight) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -289,6 +394,15 @@ func (msg MsgDeleteAccordedRight) ValidateBasic() error {
// ADD CONTEXT
// --------------------------
func (msg MsgAddIidContext) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
+ if msg.Context == nil {
+ return sdkerrors.Wrap(ErrInvalidInput, "context cannot be nil")
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -299,6 +413,11 @@ func (msg MsgAddIidContext) ValidateBasic() error {
// DELETE CONTEXT
// --------------------------
func (msg MsgDeleteIidContext) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
@@ -313,6 +432,11 @@ func (msg MsgDeleteIidContext) ValidateBasic() error {
// DEACTIVATE IID
// --------------------------
func (msg MsgDeactivateIID) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.Signer)
+ if err != nil {
+ return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err)
+ }
+
if !IsValidDID(msg.Id) {
return sdkerrors.Wrap(ErrInvalidDIDFormat, msg.Id)
}
diff --git a/x/iid/types/tx.go b/x/iid/types/tx.go
index 3be0bae2..50ca5390 100644
--- a/x/iid/types/tx.go
+++ b/x/iid/types/tx.go
@@ -66,7 +66,6 @@ func (MsgCreateIidDocument) Type() string {
}
func (msg MsgCreateIidDocument) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -74,7 +73,7 @@ func (msg MsgCreateIidDocument) GetSignBytes() []byte {
func (msg MsgCreateIidDocument) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -95,7 +94,6 @@ func (MsgUpdateIidDocument) Type() string {
}
func (msg MsgUpdateIidDocument) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -103,7 +101,7 @@ func (msg MsgUpdateIidDocument) GetSignBytes() []byte {
func (msg MsgUpdateIidDocument) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -137,7 +135,6 @@ func (MsgAddVerification) Type() string {
}
func (msg MsgAddVerification) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -145,7 +142,7 @@ func (msg MsgAddVerification) GetSignBytes() []byte {
func (msg MsgAddVerification) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -179,7 +176,6 @@ func (MsgRevokeVerification) Type() string {
}
func (msg MsgRevokeVerification) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -187,7 +183,7 @@ func (msg MsgRevokeVerification) GetSignBytes() []byte {
func (msg MsgRevokeVerification) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -222,7 +218,6 @@ func (MsgSetVerificationRelationships) Type() string {
}
func (msg MsgSetVerificationRelationships) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -230,7 +225,7 @@ func (msg MsgSetVerificationRelationships) GetSignBytes() []byte {
func (msg MsgSetVerificationRelationships) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -264,7 +259,6 @@ func (MsgAddService) Type() string {
}
func (msg MsgAddService) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -272,7 +266,7 @@ func (msg MsgAddService) GetSignBytes() []byte {
func (msg MsgAddService) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -305,7 +299,6 @@ func (MsgAddLinkedResource) Type() string {
}
func (msg MsgAddLinkedResource) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -313,7 +306,7 @@ func (msg MsgAddLinkedResource) GetSignBytes() []byte {
func (msg MsgAddLinkedResource) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -346,7 +339,6 @@ func (MsgAddLinkedClaim) Type() string {
}
func (msg MsgAddLinkedClaim) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -354,7 +346,7 @@ func (msg MsgAddLinkedClaim) GetSignBytes() []byte {
func (msg MsgAddLinkedClaim) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -387,14 +379,13 @@ func (MsgAddLinkedEntity) Type() string {
}
func (msg MsgAddLinkedEntity) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
func (msg MsgAddLinkedEntity) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -427,7 +418,6 @@ func (MsgDeleteService) Type() string {
}
func (msg MsgDeleteService) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -435,7 +425,7 @@ func (msg MsgDeleteService) GetSignBytes() []byte {
func (msg MsgDeleteService) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -467,7 +457,6 @@ func (MsgDeleteLinkedResource) Type() string {
}
func (msg MsgDeleteLinkedResource) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -475,7 +464,7 @@ func (msg MsgDeleteLinkedResource) GetSignBytes() []byte {
func (msg MsgDeleteLinkedResource) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -507,7 +496,6 @@ func (MsgDeleteLinkedClaim) Type() string {
}
func (msg MsgDeleteLinkedClaim) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -515,7 +503,7 @@ func (msg MsgDeleteLinkedClaim) GetSignBytes() []byte {
func (msg MsgDeleteLinkedClaim) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -547,14 +535,13 @@ func (MsgDeleteLinkedEntity) Type() string {
}
func (msg MsgDeleteLinkedEntity) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
func (msg MsgDeleteLinkedEntity) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -588,7 +575,6 @@ func (MsgAddAccordedRight) Type() string {
}
func (msg MsgAddAccordedRight) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -596,7 +582,7 @@ func (msg MsgAddAccordedRight) GetSignBytes() []byte {
func (msg MsgAddAccordedRight) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -629,7 +615,6 @@ func (MsgDeleteAccordedRight) Type() string {
}
func (msg MsgDeleteAccordedRight) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -637,7 +622,7 @@ func (msg MsgDeleteAccordedRight) GetSignBytes() []byte {
func (msg MsgDeleteAccordedRight) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -670,7 +655,6 @@ func (MsgAddController) Type() string {
}
func (msg MsgAddController) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -678,7 +662,7 @@ func (msg MsgAddController) GetSignBytes() []byte {
func (msg MsgAddController) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -711,7 +695,6 @@ func (MsgDeleteController) Type() string {
}
func (msg MsgDeleteController) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -719,7 +702,7 @@ func (msg MsgDeleteController) GetSignBytes() []byte {
func (msg MsgDeleteController) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -753,7 +736,6 @@ func (MsgAddIidContext) Type() string {
}
func (msg MsgAddIidContext) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -761,7 +743,7 @@ func (msg MsgAddIidContext) GetSignBytes() []byte {
func (msg MsgAddIidContext) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -794,7 +776,6 @@ func (MsgDeleteIidContext) Type() string {
}
func (msg MsgDeleteIidContext) GetSignBytes() []byte {
- // panic("IBC messages do not support amino")
return sdk.MustSortJSON(ModuleAminoCdc.MustMarshalJSON(&msg))
}
@@ -802,7 +783,7 @@ func (msg MsgDeleteIidContext) GetSignBytes() []byte {
func (msg MsgDeleteIidContext) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
@@ -841,7 +822,7 @@ func (msg MsgDeactivateIID) GetSignBytes() []byte {
func (msg MsgDeactivateIID) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil {
- panic(err)
+ return []sdk.AccAddress{}
}
return []sdk.AccAddress{accAddr}
}
diff --git a/x/token/types/msg_validation.go b/x/token/types/msg_validation.go
index 36999ef2..10637523 100644
--- a/x/token/types/msg_validation.go
+++ b/x/token/types/msg_validation.go
@@ -17,7 +17,7 @@ func (msg MsgCreateToken) ValidateBasic() error {
}
if !iidtypes.IsValidDID(msg.Class.Did()) {
- return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.Class.Did())
+ return sdkerrors.Wrap(iidtypes.ErrInvalidDIDFormat, msg.Class.String())
}
if !iidtypes.IsValidRFC3986Uri(msg.Image) {
@@ -51,7 +51,9 @@ func (msg MsgMintToken) ValidateBasic() error {
if iidtypes.IsEmpty(batch.Name) {
return sdkerrors.Wrap(ErrTokenNameIncorrect, "token name is empty for a batch")
}
-
+ if iidtypes.IsEmpty(batch.Index) {
+ return sdkerrors.Wrap(ErrTokenNameIncorrect, "token index is empty for a batch")
+ }
if batch.Amount.IsZero() {
return sdkerrors.Wrap(ErrTokenAmountIncorrect, "token amount must be bigger than 0, cannot mint 0")
}
@@ -79,7 +81,6 @@ func (msg MsgTransferToken) ValidateBasic() error {
if iidtypes.IsEmpty(batch.Id) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "token id is empty for a batch")
}
-
if batch.Amount.IsZero() {
return sdkerrors.Wrap(ErrTokenAmountIncorrect, "token amount must be bigger than 0, cannot transfer 0")
}
@@ -106,7 +107,6 @@ func (msg MsgRetireToken) ValidateBasic() error {
if iidtypes.IsEmpty(batch.Id) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "token id is empty for a batch")
}
-
if batch.Amount.IsZero() {
return sdkerrors.Wrap(ErrTokenAmountIncorrect, "token amount must be bigger than 0")
}
@@ -129,7 +129,6 @@ func (msg MsgCancelToken) ValidateBasic() error {
if iidtypes.IsEmpty(batch.Id) {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "token id is empty for a batch")
}
-
if batch.Amount.IsZero() {
return sdkerrors.Wrap(ErrTokenAmountIncorrect, "token amount must be bigger than 0")
}
diff --git a/x/token/types/token.pb.go b/x/token/types/token.pb.go
index 7f8b905c..f96f890a 100644
--- a/x/token/types/token.pb.go
+++ b/x/token/types/token.pb.go
@@ -71,7 +71,7 @@ func (m *Params) GetIxo1155ContractCode() uint64 {
type Token struct {
// address of minter
Minter string `protobuf:"bytes,1,opt,name=minter,proto3" json:"minter,omitempty"`
- // generated on token intiation through MsgSetupMinter
+ // generated on token initiation
ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
// class is the token protocol entity DID (validated)
Class string `protobuf:"bytes,3,opt,name=class,proto3" json:"class,omitempty"`