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

feat: add inactive contract management in wasm #655

Merged
merged 18 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,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/wasm) [\#625](https://github.com/line/lbm-sdk/pull/625) detaching `StoreCodeAndInstantiateContract` from wasm's tx.proto
* (x/wasm) [\#655](https://github.com/line/lbm-sdk/pull/655) add inactive contract management in wasm (This replaces the contract blacklist function of contractStatus)

### Bug Fixes
* (x/wasm) [\#453](https://github.com/line/lbm-sdk/pull/453) modify wasm grpc query api path
Expand Down
3 changes: 3 additions & 0 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@
"Params": "FeegrantParams"
}
}
},
{
"url": "./tmp-swagger-gen/lbm/wasm/v1/query.swagger.json"
}
]
}
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44038,6 +44038,183 @@ paths:
format: boolean
tags:
- Query
/lbm/wasm/v1/inactive_contracts:
get:
summary: InactiveContracts queries all inactive contracts
operationId: InactiveContracts
responses:
'200':
description: A successful response.
schema:
type: object
properties:
addresses:
type: array
items:
type: string
title: addresses is the inactive address list
pagination:
title: pagination defines the pagination in the response
type: object
properties:
next_key:
type: string
format: byte
title: |-
next_key is the key to be passed to PageRequest.key to
query the next page most efficiently
total:
type: string
format: uint64
title: >-
total is total number of results available if
PageRequest.count_total

was set, its value is undefined otherwise
description: >-
PageResponse is to be embedded in gRPC response messages where
the

corresponding request message has used PageRequest.

message SomeResponse {
repeated Bar results = 1;
PageResponse page = 2;
}
description: >-
QueryInactiveContractsResponse is the response type for the
Query/InactiveContract RPC method.
default:
description: An unexpected error response
schema:
type: object
properties:
error:
type: string
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
type_url:
type: string
value:
type: string
format: byte
parameters:
- name: pagination.key
description: |-
key is a value returned in PageResponse.next_key to begin
querying the next page most efficiently. Only one of offset or key
should be set.
in: query
required: false
type: string
format: byte
- name: pagination.offset
description: >-
offset is a numeric offset that can be used when key is unavailable.

It is less efficient than using key. Only one of offset or key
should

be set.
in: query
required: false
type: string
format: uint64
- name: pagination.limit
description: >-
limit is the total number of results to be returned in the result
page.

If left empty it will default to a value to be set by each app.
in: query
required: false
type: string
format: uint64
- name: pagination.count_total
description: >-
count_total is set to true to indicate that the result set should
include

a count of the total number of items available for pagination in
UIs.

count_total is only respected when offset is used. It is ignored
when key

is set.
in: query
required: false
type: boolean
format: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
format: boolean
tags:
- Query
'/lbm/wasm/v1/inactive_contracts/{address}':
get:
operationId: InactiveContract
responses:
'200':
description: A successful response.
schema:
type: object
properties:
inactivated:
type: boolean
format: boolean
title: >-
inactivated is the result if the contract is inactive contract
or not
description: >-
QueryInactiveContractsResponse is the response type for the
Query/IsInactiveContract RPC method.
default:
description: An unexpected error response
schema:
type: object
properties:
error:
type: string
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
type_url:
type: string
value:
type: string
format: byte
parameters:
- name: address
description: address is the address of the contract
in: path
required: true
type: string
tags:
- Query
securityDefinitions:
kms:
type: basic
Expand Down Expand Up @@ -70353,3 +70530,50 @@ definitions:
description: >-
QueryAllowancesResponse is the response type for the Query/Allowances RPC
method.
lbm.wasm.v1.QueryInactiveContractResponse:
type: object
properties:
inactivated:
type: boolean
format: boolean
title: inactivated is the result if the contract is inactive contract or not
description: >-
QueryInactiveContractsResponse is the response type for the
Query/IsInactiveContract RPC method.
lbm.wasm.v1.QueryInactiveContractsResponse:
type: object
properties:
addresses:
type: array
items:
type: string
title: addresses is the inactive address list
pagination:
title: pagination defines the pagination in the response
type: object
properties:
next_key:
type: string
format: byte
title: |-
next_key is the key to be passed to PageRequest.key to
query the next page most efficiently
total:
type: string
format: uint64
title: >-
total is total number of results available if
PageRequest.count_total

was set, its value is undefined otherwise
description: |-
PageResponse is to be embedded in gRPC response messages where the
corresponding request message has used PageRequest.

message SomeResponse {
repeated Bar results = 1;
PageResponse page = 2;
}
description: >-
QueryInactiveContractsResponse is the response type for the
Query/InactiveContract RPC method.
Loading