-
Notifications
You must be signed in to change notification settings - Fork 30
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
Refs #547 -- Add content about using Pyth oracle to obtain random numbers #627
base: main
Are you sure you want to change the base?
Refs #547 -- Add content about using Pyth oracle to obtain random numbers #627
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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