feat(coin): allow IBC denoms
Required for #4655
This PR updates the regexp used to validate a coin denom to accept IBC denoms.
IBC denoms format is:
"ibc/" + hash(trace + "/" + baseDenom)
(example : ibc/542B346608DE032752AF0B21D165190090CD3194F6D177CF35025E39596ABC16)
Where trace represents the path used by the initial token. Each trace can be composed of one to many hops, and a hop format is portID/clientID (example : transfer/07-tendermint-2).
🛠 PR Checks Summary
🔴 Maintainers must be able to edit this pull request (more info)
Manual Checks (for Reviewers):
- [ ] IGNORE the bot requirements for this PR (force green CI check)
Read More
🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.
✅ Automated Checks (for Contributors):
🔴 Maintainers must be able to edit this pull request (more info) 🟢 Pending initial approval by a review team member, or review from tech-staff
☑️ Contributor Actions:
- Fix any issues flagged by automated checks.
- Follow the Contributor Checklist to ensure your PR is ready for review.
- Add new tests, or document why they are unnecessary.
- Provide clear examples/screenshots, if necessary.
- Update documentation, if required.
- Ensure no breaking changes, or include
BREAKING CHANGEnotes. - Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
- Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)
If
🟢 Condition met └── 🟢 And ├── 🟢 The base branch matches this pattern: ^master$ └── 🟢 The pull request was created from a fork (head branch repo: allinbits/gno)Then
🔴 Requirement not satisfied └── 🔴 Maintainer can modify this pull requestPending initial approval by a review team member, or review from tech-staff
If
🟢 Condition met └── 🟢 And ├── 🟢 The base branch matches this pattern: ^master$ └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)Then
🟢 Requirement satisfied └── 🟢 If ├── 🟢 Condition │ └── 🟢 Or │ ├── 🟢 User jefft0 already reviewed PR 4883 with state APPROVED │ ├── 🟢 At least 1 user(s) of the team tech-staff reviewed pull request │ └── 🔴 This pull request is a draft └── 🟢 Then └── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)
If
🟢 Condition met └── 🟢 On every pull requestCan be checked by
- Any user with comment edit permission
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:loudspeaker: Thoughts on this report? Let us know!
Blocking, because I need more time to review this one. We planned to use
realm/xxxfor realms rather thanibc/xxx. If IBC is managed solely through contracts without any additional privileges then the token couldn’t have anibc/prefix.
Yes I noticed that problem and I need to clarify how important this ibc/ prefix is.
~~In order to mint/burn IBC tokens, denom format like /gno.land/r/aib/ibc/apps/transfer:ibc/CAEF9CA8CE6C302D73A831A49E34E59149D3A9AD96CCEBDFBF62F6D5710D92D8 must be allowed.~~
~~This commit 1b295f3 removes the denom format check in Banker.Issue/RemoveCoins~~
EDIT: Reverted here e4dc952 due to the fact that std.Coin doesnt validate denom prefixed with realm path. In return we quick fix the banker so the gno.land/r/aib/ibc/apps/transfer is allowed to issue/remove coins with the ibc/ prefix (no realm prefix).