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

feat: token bridge cpi event #695

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

md0x
Copy link
Contributor

@md0x md0x commented Oct 25, 2024

Changes proposed in this PR:

  • Emit event from bridge_tokens_to_hub_pool function

Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Copy link

linear bot commented Oct 25, 2024

@md0x md0x changed the title Pablo/acx 2936 instructionstoken bridgers emit event on bridged tokens feat: token bridge cpi event Oct 25, 2024
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
amount: u64,
) -> Result<()> {
ctx.accounts.bridge_tokens_to_hub_pool(amount, &ctx.bumps)?;
let context = Context {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Workaround to be able to pass the context required by emit_cpi!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be more consistent with other instructions to use free functions and pass ctx as parameter.

Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
@md0x md0x marked this pull request as ready for review October 25, 2024 17:00
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