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: CosmWasm 1.0.0-beta implementation #720

Merged
merged 33 commits into from
Jan 18, 2022
Merged

Conversation

leobragaz
Copy link
Contributor

@leobragaz leobragaz commented Jan 11, 2022

Description

Closes: #115.

This PR integrate the CosmWasm module into Desmos.
At the current stage, no rules are applied to the smart contracts store/instantiate flow and any kind of contract can
be deployed on the network if we will update the testnet as it is.
I think that for testing purposes this is the best choice, however, I will work on an ADR for permissioned contracts and contracts limitations soon. Since Desmos is a social network related project, contracts deployment should be limited to contracts that are social-related.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

…on testnet when wasm got updated to cosmos v0.44
…wasm-1.0.0-beta

� Conflicts:
�	go.mod
�	go.sum
- added a missing wasmvm dependency
wasm keeper and perform some checks against end blocker events
Cleaned the wasm-1.0.0-beta from the experimental implementations of contracts logic and moved that logic in another branch
…wasm-1.0.0-beta

� Conflicts:
�	app/app.go
�	go.sum
�	x/staging/fees/ante/common_test.go
…n it

- updated ibc to fix wasm implementation errors
- removed wasm parameters from app constructor
- updated wasmd with the cosmos v0.44.5 official branch
…wasm-1.0.0-beta

� Conflicts:
�	app/ante.go
�	app/app.go
�	go.mod
�	go.sum
finished integrating cosmwasm module in the desmos
app
@github-actions github-actions bot added the x/profiles Module that allows to create and manage decentralized social profiles label Jan 11, 2022
@leobragaz leobragaz mentioned this pull request Jan 11, 2022
7 tasks
@leobragaz leobragaz changed the title CosmWasm 1.0.0-beta implementation feat: CosmWasm 1.0.0-beta implementation Jan 11, 2022
fixed tests errors
added missing go.sum file
@codecov
Copy link

codecov bot commented Jan 11, 2022

Codecov Report

Merging #720 (2b3c635) into master (23cb923) will decrease coverage by 0.04%.
The diff coverage is 78.94%.

❗ Current head 2b3c635 differs from pull request most recent head 1cbf7f9. Consider uploading reports for the commit 1cbf7f9 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #720      +/-   ##
==========================================
- Coverage   78.81%   78.77%   -0.05%     
==========================================
  Files          53       53              
  Lines        4320     4387      +67     
==========================================
+ Hits         3405     3456      +51     
- Misses        737      749      +12     
- Partials      178      182       +4     
Impacted Files Coverage Δ
app/app.go 80.61% <78.37%> (-0.88%) ⬇️
app/ante.go 65.71% <100.00%> (+2.07%) ⬆️

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 23cb923...1cbf7f9. Read the comment docs.

@github-actions github-actions bot added the kind/build Related to the build of the project label Jan 12, 2022
@github-actions github-actions bot removed the x/profiles Module that allows to create and manage decentralized social profiles label Jan 12, 2022
@leobragaz
Copy link
Contributor Author

Build errors on ARM and ARM-64 fails due to an incompatibility of one of the wasmVM depedencies, wasmer.
Further info here:
CosmWasm/wasmvm#53

@leobragaz leobragaz marked this pull request as ready for review January 12, 2022 14:11
CHANGELOG.md Outdated Show resolved Hide resolved
Makefile Outdated
Comment on lines 46 to 48
build_tags += $(BUILD_TAGS)
build_tags := $(strip $(build_tags))

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To make the muslc library for static linking of libraries (which is needed for the wasmvm one) available during the build. Without it, the build will fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

@bragaz Can we then add a comment to the Makefile just to remember why those are there in the future please?

app/app.go Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@github-actions github-actions bot added the x/profiles Module that allows to create and manage decentralized social profiles label Jan 17, 2022
removed arm, arm64 builds from github test action
@github-actions github-actions bot added the kind/ci Improve the CI/CD label Jan 17, 2022
it can lead to 0 and break the tests
Makefile Outdated Show resolved Hide resolved
@RiccardoM RiccardoM added the automerge Automatically merge PR once all prerequisites pass label Jan 17, 2022
@RiccardoM
Copy link
Contributor

Great job! 💯 As soon as @dadamu accepts it as well it should be auto merged

Copy link
Contributor

@dadamu dadamu left a comment

Choose a reason for hiding this comment

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

Ready to go

@mergify mergify bot merged commit 76c0eaf into master Jan 18, 2022
@mergify mergify bot deleted the leonardo/wasm-1.0.0-beta branch January 18, 2022 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PR once all prerequisites pass kind/build Related to the build of the project kind/ci Improve the CI/CD x/profiles Module that allows to create and manage decentralized social profiles
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate CosmWasm
3 participants