1

I need to call an Ethereum solidity smart contract inside a Solana program. Is this possible? If not, is there any alternative to perform this?

1
  • You may want to checkout Neon (neon-labs.org). I don't believe it's a general-purpose messaging bridge like the one you're looking for (either Wormhole or LayerZero may be able to help you there), but it does allow you to deploy Solidity contracts to Solana. Commented Jan 12, 2023 at 16:02

2 Answers 2

3

No, it's not possible to call Ethereum solidity smart contract directly inside a Solana program. Solana programs can only access data that lives in the Solana blockchain exclusively.

This is why we use oracles to access off-chain data.

Resources for building/launching a Solana Oracle

Solana programs have no idea about Ethereum smart contracts.

Some solutions involve implementing and deploying the Ethereum smart contract in Solana (e.g. anchor). You can then do a Cross Program Invocation (CPI) into that program from your original Solana program.

CPI from Program A to B via a Rust crate?

Hope this helps!

3
  • 1
    Thank you! And do you know if there is any solution like the one used in bridges?
    – cris.sol
    Commented Jan 11, 2023 at 21:15
  • Please create a new post for that question. Thank you. In the meantime, if your question is answered please mark it as answered. solana.stackexchange.com/help/someone-answers
    – vicyyn
    Commented Jan 11, 2023 at 21:33
  • 1
    I will keep the question open for a few days in case someone provides a solution. If no one provides any solution, I will mark this as answered.
    – cris.sol
    Commented Jan 11, 2023 at 23:14
3

Depending on the outcome that you want to achieve, using Wormhole's generic messaging layer might be a solution. If you want to chat & explore possibilities, head over to our Discord, get the "builders" role and ask your question in "dev-support".

Disclaimer: I work as a CM at Wormhole :-)

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.