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

spike foreign fungibles #475

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Daanvdplas
Copy link
Collaborator

@Daanvdplas Daanvdplas commented Feb 18, 2025

(Close annotations in the Files changed section by clicking the right corner 3 dots when reviewing because I only pushed the relevant bits)

Shows how we can implement the foreign fungibles functionality by having a separate instance of the fungibles pallet. This adds duplicate code to the pop api crate but reduces the added complexity in the fungibles pallet.

See latest commit to get a feel for the contract.

fungibles contract: 14.2K
foreign fungibles contract: 22.8K

Integrations tests for transfer and balance_of are working.

/// - `to` - The recipient account.
/// - `value` - The number of tokens to transfer.
#[inline]
pub fn transfer(token: TokenId, to: AccountId, value: Balance) -> Result<()> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only added transfer and balance_of to make the integrations tests work. This will be a duplication of the functions in the fungibles module.

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.

1 participant