Wormhole contract to transfer random numbers #468
-
My team is building a lottery game on Solana and random number generation is a crucial part of the game. We want to use Chainlink's random number generation service but the service is not available for Solana smart contract. My team came up with an idea that we can write a smart contract in Ethereum network to request for the random number generation service from Chainlink (smart contract on Ethereum can consume randomness from Chainlink), then we transfer the consumed random number from Ethereum network to a smart contract in Solana network and use the transferred number for the lottery game. I've been researching about Wormhole and found out that Wormhole smart contract just supports token minting/ burning, so we want to extend the existing smart contract to support random number transferring. We don't know if the idea is feasible and how can we get started with the extension. We hope to receive advice from the community and the Wormhole team. Any responses would be helpful for us. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This used to be the case for v1. Wormhole v2 was extended to be a generic message passing protocol. It takes finalized (i.e. persisted on-chain) messages from one chain and attests them. Token bridging is functionality built on top of Wormhole. Read more here: https://github.com/certusone/wormhole/blob/dev.v2/design/0001_generic_message_passing.md You can build an Eth contract which takes a Chainlink random number, posts a message to the Wormhole contract and then relay to and consume this message on Solana. Alternatively, you might want to talk to pyth.network about their planned RNG support on Solana. |
Beta Was this translation helpful? Give feedback.
This used to be the case for v1. Wormhole v2 was extended to be a generic message passing protocol. It takes finalized (i.e. persisted on-chain) messages from one chain and attests them. Token bridging is functionality built on top of Wormhole. Read more here: https://github.com/certusone/wormhol…