-
Notifications
You must be signed in to change notification settings - Fork 359
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(denommetadata): register IBC denom on transfer #956
Conversation
UT fails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, instead of reintroducing all the old stuff, just move the ibc module and ics4 wrapper from transferinject and put your changes in there
If you look at main, currently, all the middlewares are very consistent in their pattern and use the authenticate packet utils
func (k Keeper) GetValidTransfer( |
It's all been dried out
Also please for errors, now prefer to use our gerr cosmos package and wrap them instead of defining new errors a lot. (You can still define new errors, but it's rare to need to do so)
https://pkg.go.dev/github.com/dymensionxyz/[email protected]/gerrc#pkg-variables
what do you mean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good man
Please see my comments on the rdk pr and then read this, because they are similar.
Basically, please name the structs IBCModule or ICS4Wrapper, not middleware, because they aren't actually middleware
but basically gj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job
x/denommetadata/ibc_middleware.go
Outdated
im.transferKeeper.SetDenomTrace(ctx, denomTrace) | ||
} | ||
|
||
if !Contains(rollapp.RegisteredDenoms, dm.Base) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't the rollapp.RegisteredDenoms
used for hub->RA denoms registration?
the tokens from RA->Hub supposed to be for RA native tokens.
not sure why u need maintain a list of denoms, as u already set it in the bank module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we have a situation where the rollapp first registers a denom on the hub, (RA -> HUB), later if the hub wants to send a transfer with the same denom to the rollapp (HUB -> RA), in order to prevent the same denom metadata to be included in the transfer to the rollapp, we add it to rollapp.RegisteredDenoms
on the hub when handling OnRecvPacket
.
wdym by
the tokens from RA->Hub supposed to be for RA native tokens.
why can't the rollapp register a non-native denom to the hub? The native RA denom is already registered during the "genesis event", or whatever we call it these days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in order to prevent the same denom metadata to be included in the transfer to the rollapp
the hub shouldn't try and register denoms orignating from the rollapp anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why can't the rollapp register a non-native denom to the hub?
the rollapp can't register ibc/
denoms. i.e only native denoms
…ng-denom-metadata
02218a2
to
bb348e2
Compare
Description
Closes #955
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.
PR review checkboxes:
I have...
Unreleased
section inCHANGELOG.md
godoc
commentsSDK Checklist
map
time.Now()
sendCoin
and notSendCoins
Full security checklist here
----;
For Reviewer:
---;
After reviewer approval: