Refs #547 -- Add content about using Pyth oracle to obtain random numbers - #627
Refs #547 -- Add content about using Pyth oracle to obtain random numbers#627jackleeio wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
darwintree
left a comment
There was a problem hiding this comment.
I've followed your tutorial and modified the entropyCallback function to see if the code works(https://evmtestnet.confluxscan.io/address/0x378b8745424aa807edea5c25fe18c7af51c1205d?tab=contract-viewer)
function entropyCallback(
uint64 sequenceNumber,
// If your app uses multiple providers, you can use this argument to
// distinguish which one is calling the app back.
address provider,
bytes32 randomNumber
) internal override {
// Implement your callback logic here.
latestRandomness = uint256(randomNumber);
// Use the random number
}As there is no project using the pyth entropy, currently pyth entropy is not enabled for eSpace mainnet.
I would know if entropyCallback is triggered from your end? If it works, I think it can be merged into the main barnch as reference for future projects, elsewise it might not be a good idea to merge this pull request at present.
But don't worry, no matter this PR will be merged or not, we would grant you corresponding rewards
|
In my test contract, |
|
It seems to be a problem with Pyth. I made the tutorial based on their documentation. https://docs.pyth.network/entropy/generate-random-numbers/evm |
Thanks. Then I'll check with pyth. |
Pre-flight checklist
This change is