Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
0xsuryansh committed Jul 2, 2023
1 parent 916131b commit eb85ae7
Show file tree
Hide file tree
Showing 2 changed files with 230 additions and 5 deletions.
225 changes: 225 additions & 0 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34923,6 +34923,173 @@ paths:
format: int64
tags:
- Query
/EVMStoreChain/evmstorechain/blockstoragestate:
get:
operationId: EvmstorechainEvmstorechainBlockstoragestateAll
responses:
'200':
description: A successful response.
schema:
type: object
properties:
blockstoragestate:
type: array
items:
type: object
properties:
blocknumber:
type: string
state:
type: string
format: uint64
pagination:
type: object
properties:
next_key:
type: string
format: byte
description: |-
next_key is the key to be passed to PageRequest.key to
query the next page most efficiently. It will be empty if
there are no more results.
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;
}
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
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
- 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
tags:
- Query
/EVMStoreChain/evmstorechain/blockstoragestate/{blocknumber}:
get:
summary: Queries a list of Blockstoragestate items.
operationId: EvmstorechainEvmstorechainBlockstoragestate
responses:
'200':
description: A successful response.
schema:
type: object
properties:
blockstoragestate:
type: object
properties:
blocknumber:
type: string
state:
type: string
format: uint64
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
parameters:
- name: blocknumber
in: path
required: true
type: string
tags:
- Query
/EVMStoreChain/evmstorechain/params:
get:
summary: Parameters queries the parameters of the module.
Expand Down Expand Up @@ -70747,11 +70914,58 @@ definitions:
NOTE: The amount field is an Int which implements the custom method
signatures required by gogoproto.
description: Period defines a length of time and amount of coins that will vest.
evmstorechain.evmstorechain.Blockstoragestate:
type: object
properties:
blocknumber:
type: string
state:
type: string
format: uint64
evmstorechain.evmstorechain.MsgSubmitEthereumStateResponse:
type: object
evmstorechain.evmstorechain.Params:
type: object
description: Params defines the parameters for the module.
evmstorechain.evmstorechain.QueryAllBlockstoragestateResponse:
type: object
properties:
blockstoragestate:
type: array
items:
type: object
properties:
blocknumber:
type: string
state:
type: string
format: uint64
pagination:
type: object
properties:
next_key:
type: string
format: byte
description: |-
next_key is the key to be passed to PageRequest.key to
query the next page most efficiently. It will be empty if
there are no more results.
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;
}
evmstorechain.evmstorechain.QueryAllVoteResponse:
type: object
properties:
Expand Down Expand Up @@ -70797,6 +71011,17 @@ definitions:
repeated Bar results = 1;
PageResponse page = 2;
}
evmstorechain.evmstorechain.QueryGetBlockstoragestateResponse:
type: object
properties:
blockstoragestate:
type: object
properties:
blocknumber:
type: string
state:
type: string
format: uint64
evmstorechain.evmstorechain.QueryGetVoteResponse:
type: object
properties:
Expand Down
10 changes: 5 additions & 5 deletions x/evmstorechain/keeper/msg_server_submit_ethereum_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ func (k msgServer) SubmitEthereumState(goCtx context.Context, msg *types.MsgSubm

// TODO: Handling the message
vote := types.Vote{
Validator: msg.Creator,
Blocknumber: msg.Blocknumber,
State: msg.State,
}
k.AppendVote(ctx, vote)
Validator: msg.Creator,
Blocknumber: msg.Blocknumber,
State: msg.State,
}
k.AppendVote(ctx, vote)

_ = ctx

Expand Down

0 comments on commit eb85ae7

Please sign in to comment.