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 cosmwasm to umeed #809

Closed
wants to merge 125 commits into from
Closed

feat: add cosmwasm to umeed #809

wants to merge 125 commits into from

Conversation

RafilxTenfen
Copy link
Contributor

@RafilxTenfen RafilxTenfen commented Apr 13, 2022

Description

  • Add CosmWasm module to umeed

closes: #802

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 appropriate labels to the PR
  • 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
  • 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)

@codecov-commenter
Copy link

codecov-commenter commented Apr 13, 2022

Codecov Report

Merging #809 (de29ae2) into main (43c0441) will decrease coverage by 6.15%.
The diff coverage is 12.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #809      +/-   ##
==========================================
- Coverage   51.20%   45.05%   -6.16%     
==========================================
  Files          67       74       +7     
  Lines        6659     7657     +998     
==========================================
+ Hits         3410     3450      +40     
- Misses       3009     3965     +956     
- Partials      240      242       +2     
Impacted Files Coverage Δ
app/genesis.go 0.00% <0.00%> (ø)
app/app.go 4.79% <10.44%> (ø)
ante/ante.go 58.33% <100.00%> (+2.45%) ⬆️
app/modules.go 0.00% <0.00%> (ø)
app/prefix.go 100.00% <0.00%> (ø)
app/export.go 0.00% <0.00%> (ø)
app/test_helpers.go 0.00% <0.00%> (ø)
app/encoding.go 0.00% <0.00%> (ø)

@RafilxTenfen
Copy link
Contributor Author

RafilxTenfen commented Apr 13, 2022

Due to this issue
I will try to use it as a static built library

@RafilxTenfen
Copy link
Contributor Author

I will try to run some contracts cw-plus to test this integration

@RafilxTenfen
Copy link
Contributor Author

Talking with @brandoncomer, we probably are going to use the wasmd as permissioned as Osmosis did

After testing around some contracts lime cw20-basic I will change to be permissioned

@RafilxTenfen
Copy link
Contributor Author

deploy a new cw20 umeed tx wasm store ./artifacts/cw20_base.wasm --gas 100000000 -y

Where artifacts/cw20_base.wasm was generated cw-plus repo

docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  cosmwasm/workspace-optimizer:0.12.6

@RafilxTenfen
Copy link
Contributor Author

I was writing a script to test cw20 but got stuck running sh tests/e2e/scripts/cosmwasm_contracts.sh - invalid address length; got: 32, max: 20
image
@adamewozniak @toteki I am thinking that it has a way to convert the contract address... Any idea here?

Accepting suggestions on this

My idea here was to create a new cw20, deploy (initiate), do some transfers, check the balances, approve this new token (CW20) as available for collateral, supply some amount and borrow umee against it

@toteki
Copy link
Member

toteki commented Apr 19, 2022

My idea here was to create a new cw20, deploy (initiate), do some transfers, check the balances, approve this new token (CW20) as available for collateral, supply some amount and borrow umee against it

Note that for use as collateral, the oracle module (or mock oracle during testing) must have prices for both the borrowed and assets.

@RafilxTenfen
Copy link
Contributor Author

This error was because we have our own function to verify address and it had check for size of 20, and the cosmwasm contract addr was 32 bytes

@adamewozniak
Copy link
Collaborator

@RafilxTenfen can we close this? afaik cosmwasm won't be ready to integrate until 0.47

@RafilxTenfen
Copy link
Contributor Author

@RafilxTenfen can we close this? afaik cosmwasm won't be ready to integrate until 0.47

We can discuss that, one way to integrate (and still keep as a draft, but updated) would be to use one branch with 0.46 CosmWasm/wasmd#938
But don't know about this...

@stale
Copy link

stale bot commented Nov 3, 2022

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the S:Stale label Nov 3, 2022
@RafilxTenfen
Copy link
Contributor Author

@gsk967 Probably you are doing this in a new branch, take a look at app/wasm/custom_plugins.go

I think we could close this PR but not delete the branch until the new umeed + cosmwasm works with https://github.com/umee-network/umee-cosmwasm

@robert-zaremba robert-zaremba deleted the rafilx/umeed-cosmwasmd branch April 30, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add CosmWasm
5 participants