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

Check channel agent Id #1347

Merged
merged 3 commits into from
Jan 10, 2025
Merged

Check channel agent Id #1347

merged 3 commits into from
Jan 10, 2025

Conversation

alistair-singh
Copy link
Contributor

No description provided.

@alistair-singh alistair-singh force-pushed the alistair/check-agent-id branch from c236149 to 8b4ad44 Compare December 6, 2024 23:09
@alistair-singh alistair-singh marked this pull request as ready for review December 7, 2024 02:26
Copy link
Contributor

@yrong yrong left a comment

Choose a reason for hiding this comment

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

+1

@@ -280,7 +280,11 @@ library Assets {
}

// @dev Mint foreign token from Polkadot
function mintForeignToken(bytes32 foreignTokenID, address recipient, uint256 amount) external {
function mintForeignToken(address agent, bytes32 foreignTokenID, address recipient, uint256 amount) external {
Copy link
Collaborator

Choose a reason for hiding this comment

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

As discussed before, I prefer if we check the channel id instead of the agent id. Ultimately what we are doing is adding a restriction that the mint message can only be passed via the Channel owned by AssetHub.

Example:

function mintForeignToken(ChannelID channelID, ...) {
   if (channelID == $.assetHubParaID.into()) { ... }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in bbf6532

@alistair-singh alistair-singh merged commit 53baf6a into main Jan 10, 2025
2 checks passed
@alistair-singh alistair-singh deleted the alistair/check-agent-id branch January 10, 2025 08:53
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.

3 participants