Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename x/collection events #639

Merged
merged 4 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/collection) [\#608](https://github.com/line/lbm-sdk/pull/608) remove new APIs on x/collection
* (x/token) [\#609](https://github.com/line/lbm-sdk/pull/609) remove new APIs on x/token
* (x/collection) [\#621](https://github.com/line/lbm-sdk/pull/621) add additional information into EventXXXChanged
* (x/collection) [\#639](https://github.com/line/lbm-sdk/pull/639) rename x/collection events

### Bug Fixes
* (x/wasm) [\#453](https://github.com/line/lbm-sdk/pull/453) modify wasm grpc query api path
Expand Down
48 changes: 24 additions & 24 deletions docs/core/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -920,21 +920,21 @@
- [Permission](#lbm.collection.v1.Permission)

- [lbm/collection/v1/event.proto](#lbm/collection/v1/event.proto)
- [EventAbandon](#lbm.collection.v1.EventAbandon)
- [EventAttached](#lbm.collection.v1.EventAttached)
- [EventAuthorizedOperator](#lbm.collection.v1.EventAuthorizedOperator)
- [EventBurned](#lbm.collection.v1.EventBurned)
- [EventCreatedContract](#lbm.collection.v1.EventCreatedContract)
- [EventCreatedFTClass](#lbm.collection.v1.EventCreatedFTClass)
- [EventCreatedNFTClass](#lbm.collection.v1.EventCreatedNFTClass)
- [EventDetached](#lbm.collection.v1.EventDetached)
- [EventGrant](#lbm.collection.v1.EventGrant)
- [EventGranted](#lbm.collection.v1.EventGranted)
- [EventMintedFT](#lbm.collection.v1.EventMintedFT)
- [EventMintedNFT](#lbm.collection.v1.EventMintedNFT)
- [EventModifiedContract](#lbm.collection.v1.EventModifiedContract)
- [EventModifiedNFT](#lbm.collection.v1.EventModifiedNFT)
- [EventModifiedTokenClass](#lbm.collection.v1.EventModifiedTokenClass)
- [EventOwnerChanged](#lbm.collection.v1.EventOwnerChanged)
- [EventRenounced](#lbm.collection.v1.EventRenounced)
- [EventRevokedOperator](#lbm.collection.v1.EventRevokedOperator)
- [EventRootChanged](#lbm.collection.v1.EventRootChanged)
- [EventSent](#lbm.collection.v1.EventSent)
Expand Down Expand Up @@ -13829,25 +13829,6 @@ Permission enumerates the valid permissions on a contract.



<a name="lbm.collection.v1.EventAbandon"></a>

### EventAbandon
EventAbandon is emitted when a grantee abandons its permission.

Since: 0.46.0 (finschia)


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `contract_id` | [string](#string) | | contract id associated with the contract. |
| `grantee` | [string](#string) | | address of the grantee which abandons its grant. |
| `permission` | [Permission](#lbm.collection.v1.Permission) | | permission on the contract. |






<a name="lbm.collection.v1.EventAttached"></a>

### EventAttached
Expand Down Expand Up @@ -13990,10 +13971,10 @@ Since: 0.46.0 (finschia)



<a name="lbm.collection.v1.EventGrant"></a>
<a name="lbm.collection.v1.EventGranted"></a>

### EventGrant
EventGrant is emitted when a granter grants its permission to a grantee.
### EventGranted
EventGranted is emitted when a granter grants its permission to a grantee.

Info: `granter` would be empty if the permission is granted by an issuance.

Expand Down Expand Up @@ -14131,6 +14112,25 @@ Since: 0.46.0 (finschia)



<a name="lbm.collection.v1.EventRenounced"></a>

### EventRenounced
EventRenounced is emitted when a grantee renounced its permission.

Since: 0.46.0 (finschia)


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `contract_id` | [string](#string) | | contract id associated with the contract. |
| `grantee` | [string](#string) | | address of the grantee which abandons its grant. |
| `permission` | [Permission](#lbm.collection.v1.Permission) | | permission on the contract. |






<a name="lbm.collection.v1.EventRevokedOperator"></a>

### EventRevokedOperator
Expand Down
8 changes: 4 additions & 4 deletions proto/lbm/collection/v1/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ message EventCreatedNFTClass {
string meta = 4;
}

// EventGrant is emitted when a granter grants its permission to a grantee.
// EventGranted is emitted when a granter grants its permission to a grantee.
//
// Info: `granter` would be empty if the permission is granted by an issuance.
//
// Since: 0.46.0 (finschia)
message EventGrant {
message EventGranted {
// contract id associated with the contract.
string contract_id = 1;
// address of the granter which grants the permission.
Expand All @@ -176,10 +176,10 @@ message EventGrant {
Permission permission = 4;
}

// EventAbandon is emitted when a grantee abandons its permission.
// EventRenounced is emitted when a grantee renounced its permission.
//
// Since: 0.46.0 (finschia)
message EventAbandon {
message EventRenounced {
// contract id associated with the contract.
string contract_id = 1;
// address of the grantee which abandons its grant.
Expand Down
8 changes: 4 additions & 4 deletions x/collection/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ func NewEventTransferNFTFrom(event EventSent) sdk.Events {
}

// Deprecated: use EventGrant.
0Tech marked this conversation as resolved.
Show resolved Hide resolved
func NewEventGrantPermToken(event EventGrant) sdk.Event {
func NewEventGrantPermToken(event EventGranted) sdk.Event {
eventType := EventTypeGrantPermToken.String()
attributes := map[AttributeKey]string{
AttributeKeyContractID: event.ContractId,
Expand All @@ -519,7 +519,7 @@ func NewEventGrantPermToken(event EventGrant) sdk.Event {
}

// Deprecated: use EventGrant.
0Tech marked this conversation as resolved.
Show resolved Hide resolved
func NewEventGrantPermTokenHead(event EventGrant) sdk.Event {
func NewEventGrantPermTokenHead(event EventGranted) sdk.Event {
eventType := EventTypeGrantPermToken.String()
attributes := map[AttributeKey]string{
AttributeKeyContractID: event.ContractId,
Expand All @@ -538,7 +538,7 @@ func NewEventGrantPermTokenHead(event EventGrant) sdk.Event {
}

// Deprecated: use EventGrant.
0Tech marked this conversation as resolved.
Show resolved Hide resolved
func NewEventGrantPermTokenBody(event EventGrant) sdk.Event {
func NewEventGrantPermTokenBody(event EventGranted) sdk.Event {
eventType := EventTypeGrantPermToken.String()
attributes := map[AttributeKey]string{
AttributeKeyPerm: LegacyPermission(event.Permission).String(),
Expand All @@ -553,7 +553,7 @@ func NewEventGrantPermTokenBody(event EventGrant) sdk.Event {
}

// Deprecated: use EventAbandon.
0Tech marked this conversation as resolved.
Show resolved Hide resolved
func NewEventRevokePermToken(event EventAbandon) sdk.Event {
func NewEventRevokePermToken(event EventRenounced) sdk.Event {
eventType := EventTypeRevokePermToken.String()
attributes := map[AttributeKey]string{
AttributeKeyContractID: event.ContractId,
Expand Down
Loading