5

The Anchor book describes how to perform a CPI from Anchor, but it requires importing both programs and passing in the Context from one to another. If I want to invoke (say a Serum DEX program) from a program built on rust, how would I do so?

2

1 Answer 1

2

Yes, you can do it please follow the steps [https://github.com/project-serum/serum-dex/tree/master/dex]

1
  • It seems like that repository is not written in anchor? I'm more curious about something like serum swap , where the derived Swap account includes the MarketAccounts struct, and I'm not sure how to handle this in Rust. Sep 10, 2022 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.