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

Problem: gravity bridge hooks and native token wrapping not connected #59

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Sep 8, 2021

Closes #58

  • Call token wrapping in gravity bridge hooks, use auto-deploy for easier e2e testing
  • Direction erc20 -> crc20 works well
  • Send back from crc20 -> erc20 works too
  • Added two query commands: denom-by-contract and contract-by-denom.

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

@yihuang yihuang requested a review from a team as a code owner September 8, 2021 10:47
@yihuang yihuang requested review from JayT106 and thomas-nguy and removed request for a team September 8, 2021 10:47
@yihuang yihuang marked this pull request as draft September 8, 2021 10:49
@yihuang yihuang force-pushed the gravity-wrap branch 2 times, most recently from 59e1af8 to 0f97aec Compare September 9, 2021 03:09
@codecov
Copy link

codecov bot commented Sep 9, 2021

Codecov Report

Merging #59 (8e3a5cf) into main (3ea70c5) will increase coverage by 2.25%.
The diff coverage is 32.66%.

❗ Current head 8e3a5cf differs from pull request most recent head b6acdb5. Consider uploading reports for the commit b6acdb5 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   21.51%   23.77%   +2.25%     
==========================================
  Files          27       32       +5     
  Lines        1729     2095     +366     
==========================================
+ Hits          372      498     +126     
- Misses       1324     1563     +239     
- Partials       33       34       +1     
Impacted Files Coverage Δ
app/app.go 3.90% <0.00%> (-0.05%) ⬇️
x/cronos/keeper/grpc_query.go 0.00% <0.00%> (ø)
x/cronos/keeper/hooks.go 0.00% <0.00%> (ø)
x/cronos/keeper/msg_server.go 6.45% <0.00%> (ø)
x/cronos/types/query.pb.gw.go 0.00% <0.00%> (ø)
x/cronos/types/tracer.go 0.00% <0.00%> (ø)
x/cronos/keeper/evm.go 56.89% <50.00%> (+5.17%) ⬆️
x/cronos/keeper/evmhooks.go 80.00% <80.00%> (ø)
x/cronos/keeper/evm_log_handlers.go 88.29% <88.29%> (ø)
x/cronos/keeper/ibc.go 83.06% <100.00%> (+4.88%) ⬆️
... and 8 more

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 da4bd2b...b6acdb5. Read the comment docs.

@yihuang yihuang marked this pull request as ready for review September 9, 2021 04:26
Copy link
Collaborator

@thomas-nguy thomas-nguy left a comment

Choose a reason for hiding this comment

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

Minor comments, LGTM overall

@yihuang
Copy link
Collaborator Author

yihuang commented Sep 10, 2021

fixed merge conflicts and squash rebased.

integration_tests/utils.py Outdated Show resolved Hide resolved
Closes crypto-org-chain#58

add denom-by-contract query cmd

test send back to ethereum

fix bidirectional e2e test

fix proto-lint

changelog

make proto-gen

Update x/cronos/client/cli/query.go

Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com>

Update x/cronos/client/cli/query.go

Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com>

Update x/cronos/keeper/grpc_query.go

Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com>

fix contract not found error

Update integration_tests/utils.py

fix integration test

update contract
@yihuang yihuang merged commit 66d9e40 into crypto-org-chain:main Sep 13, 2021
@yihuang yihuang deleted the gravity-wrap branch September 13, 2021 01:07
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.

Problem: gravity bridge hooks and native token wrapping not connected
2 participants