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

Rama/ibc #107

Merged
merged 11 commits into from
Nov 23, 2021
Merged

Rama/ibc #107

merged 11 commits into from
Nov 23, 2021

Conversation

ramacarlucho
Copy link
Contributor

Closes: #XXX

Description

Add validate ibc-denom to support ibc


For contributor use:

  • 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.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Nov 22, 2021

Codecov Report

Merging #107 (fa8db24) into main (440120d) will decrease coverage by 0.20%.
The diff coverage is 70.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   74.47%   74.27%   -0.21%     
==========================================
  Files          22       23       +1     
  Lines        1610     1648      +38     
==========================================
+ Hits         1199     1224      +25     
- Misses        354      365      +11     
- Partials       57       59       +2     
Impacted Files Coverage Δ
x/intrarelayer/keeper/utils.go 18.18% <18.18%> (ø)
x/intrarelayer/types/proposal.go 92.38% <80.76%> (-2.62%) ⬇️
x/intrarelayer/keeper/proposals.go 85.09% <100.00%> (+0.18%) ⬆️
x/intrarelayer/types/msg.go 100.00% <100.00%> (ø)

go.mod Outdated
@@ -5,6 +5,7 @@ go 1.17
require (
contrib.go.opencensus.io/exporter/prometheus v0.4.0
github.com/cosmos/cosmos-sdk v0.44.3
github.com/cosmos/ibc-go v1.2.3
Copy link
Contributor

Choose a reason for hiding this comment

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

we can remove this since we are using v2

x/intrarelayer/keeper/msg_server_test.go Outdated Show resolved Hide resolved
x/intrarelayer/keeper/msg_server_test.go Outdated Show resolved Hide resolved
x/intrarelayer/keeper/msg_server_test.go Outdated Show resolved Hide resolved
x/intrarelayer/keeper/msg_server_test.go Outdated Show resolved Hide resolved
x/intrarelayer/keeper/msg_server_test.go Outdated Show resolved Hide resolved
x/intrarelayer/keeper/msg_server_test.go Outdated Show resolved Hide resolved
@@ -69,6 +70,10 @@ func (rtbp *RegisterCoinProposal) ValidateBasic() error {
return err
}

if err := ibctransfertypes.ValidateIBCDenom(rtbp.Metadata.Base); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, we should also check that the metadata has the correct format

Copy link
Contributor

Choose a reason for hiding this comment

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

following up on this, we should check that the format for IBC vouchers is the same as the one you wrote on the tests

x/intrarelayer/keeper/proposals.go Outdated Show resolved Hide resolved
x/intrarelayer/keeper/proposals.go Outdated Show resolved Hide resolved
x/intrarelayer/keeper/utils.go Outdated Show resolved Hide resolved
x/intrarelayer/types/proposal.go Outdated Show resolved Hide resolved
go.sum Outdated
Comment on lines 238 to 239
github.com/cosmos/ibc-go v1.2.3 h1:+Xdhshvls9c6NQNAj7jz5YUtpqCd7AwadEImpaeVReo=
github.com/cosmos/ibc-go v1.2.3/go.mod h1:TNJMo+fPU4GmpAGxqedjuA1l6izRLGPvuIRLpWAbXuE=
Copy link
Contributor

Choose a reason for hiding this comment

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

run go mod tidy

x/intrarelayer/keeper/utils.go Outdated Show resolved Hide resolved
x/intrarelayer/keeper/utils.go Outdated Show resolved Hide resolved
@@ -69,6 +70,10 @@ func (rtbp *RegisterCoinProposal) ValidateBasic() error {
return err
}

if err := ibctransfertypes.ValidateIBCDenom(rtbp.Metadata.Base); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

following up on this, we should check that the format for IBC vouchers is the same as the one you wrote on the tests

Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK! can you fix the linter and add a Changelog entry on Improvement?

@fedekunze fedekunze merged commit 5560fe8 into main Nov 23, 2021
@fedekunze fedekunze deleted the rama/ibc branch November 23, 2021 21:40
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.

2 participants