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

Added rest interface #30

Merged
merged 8 commits into from
Jan 20, 2020
Merged

Added rest interface #30

merged 8 commits into from
Jan 20, 2020

Conversation

sahith-narahari
Copy link
Contributor

@sahith-narahari sahith-narahari commented Jan 19, 2020

Implements a part of proposal as discussed here #7.

  • Targeted PR against correct branch (see CONTRIBUTING.md)

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.

  • Wrote tests

  • Updated relevant documentation (docs/)

  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md

  • Reviewed Files changed in the github PR explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge PR #XYZ: [title]" (coding standards)

@codecov-io
Copy link

Codecov Report

Merging #30 into master will decrease coverage by 0.59%.
The diff coverage is 44.77%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #30     +/-   ##
=========================================
- Coverage   61.25%   60.66%   -0.6%     
=========================================
  Files          13       14      +1     
  Lines        1053     1060      +7     
=========================================
- Hits          645      643      -2     
- Misses        349      358      +9     
  Partials       59       59
Impacted Files Coverage Δ
x/wasm/internal/keeper/querier.go 23.71% <16.66%> (-4.87%) ⬇️
x/wasm/handler.go 83.58% <33.33%> (ø) ⬆️
x/wasm/internal/keeper/keeper.go 65% <61.76%> (+0.1%) ⬆️
x/wasm/internal/keeper/api.go 66.66% <66.66%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6aa15e7...329ee04. Read the comment docs.

Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Some minor cleanup, but I know you have a new PR coming, so I'll merge this to master now, so we can get less conflicts moving forward

"github.com/gorilla/mux"
)

func registerQueryRoutes(cliCtx context.CLIContext, r *mux.Router) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file looks good

}
}

func queryContractStateSmartHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two should be marked TODO, but as long as you know and will follow up shortly, this is fine

"github.com/cosmwasm/wasmd/x/wasm/internal/types"
)

func registerTxRoutes(cliCtx context.CLIContext, r *mux.Router) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

const maxSize = 400 * 1024

type storeCodeReq struct {
BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking this should be "squash", but see that it is not in the cosmos-sdk either.
I guess I should look more into this generic format used everywhere.
Do you know where the docs are?


type storeCodeReq struct {
BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
WasmBytes []byte `json:"wasm_bytes"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing yaml

return
}

// gzip the wasm file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to auto-gzip it here as well 👍

@ethanfrey ethanfrey merged commit 8983d9b into master Jan 20, 2020
@ethanfrey ethanfrey deleted the vw/add-rest-server branch January 20, 2020 10:01
loloicci added a commit to loloicci/wasmd that referenced this pull request Apr 21, 2023
)

* build: replace line repositories with finschia repositories

* Update x/wasmplus/README.md

Co-authored-by: zemyblue <zemyblue@gmail.com>

* Update x/wasm/ibc_reflect_test.go

Co-authored-by: zemyblue <zemyblue@gmail.com>

* Update .github/dependabot.yml

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* docs: replace a comment contains line with finschia one

* build: replace line in Dockerfile with finschia

* docs: replace line in README.md with Finschia

* docs: update CHANGELOG

---------

Co-authored-by: zemyblue <zemyblue@gmail.com>
Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>
loloicci added a commit to loloicci/wasmd that referenced this pull request Aug 19, 2024
…CosmWasm#53)

* build: replace line repositories with finschia repositories (CosmWasm#30)

* build: replace line repositories with finschia repositories

* Update x/wasmplus/README.md

Co-authored-by: zemyblue <zemyblue@gmail.com>

* Update x/wasm/ibc_reflect_test.go

Co-authored-by: zemyblue <zemyblue@gmail.com>

* Update .github/dependabot.yml

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* docs: replace a comment contains line with finschia one

* build: replace line in Dockerfile with finschia

* docs: replace line in README.md with Finschia

* docs: update CHANGELOG

---------

Co-authored-by: zemyblue <zemyblue@gmail.com>
Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* chore: update changelog for release v0.1.3 (CosmWasm#31)

* fix: stop wrap twice the response of handling non-plus wasm message in plus handler (CosmWasm#35)

* fix: stop wrap twice non-plus wasm hander's response

fix Finschia#33

* test: add tests handling non-plus wasm messages

* docs: add this PR to CHANGELOG.md

* fix: reflect golangci-lint

* fix: simplify how to handle the message in wasmplus

* chore: update notice (CosmWasm#44)

* chore: update notice

* chore: update changelog

* fix: delete unnecessary test (CosmWasm#43)

* fix: delete unnecessary test

* docs: add CHANGELOG

* feat: add admin-related events (CosmWasm#46)

* add admin-related events in docs
* fix ClearAdmin event
* cherry-pick upstream admin-related events update

* chore: update changelog for release v0.1.4 (CosmWasm#49)

* build: update depending wasmvm to v1.1.1-0.11.2-dynamiclink2 and update tests

---------

Co-authored-by: zemyblue <zemyblue@gmail.com>
Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>
Co-authored-by: Daisuke Iuchi <42408108+da1suk8@users.noreply.github.com>
Co-authored-by: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants