-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add tests for RandomBeaconHistory
contract
#389
Conversation
@@ -3,5 +3,5 @@ import "RandomBeaconHistory" | |||
/// Retrieves the source of randomness for the requested block height from the RandomBeaconHistory contract. | |||
/// | |||
access(all) fun main(page: UInt64, perPage: UInt64): RandomBeaconHistory.RandomSourceHistoryPage { | |||
return RandomBeaconHistory.getRandomSourceHistoryPage(page: page, perPage: perPage) | |||
return RandomBeaconHistory.getRandomSourceHistoryPage(page, perPage: perPage) |
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.
cc @janezpodhostnik There was an error while testing this script, not how much important it is though.
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.
Its not that important, as it is mostly as an example, but we should fix this. I'll open up a PR.
Thank you for finding this.
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.
It is fixed in this PR, so not sure there's a need to open up another PR.
"StakingProxy": { | ||
"source": "./contracts/StakingProxy.cdc", | ||
"aliases": { | ||
"testing": "0x0000000000000007" |
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.
Why do they all have the same testing alias?
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.
The testing
alias is basically the account where the current contract will be deployed for usage in the Cadence testing framework. For the sake of completion & consistency, I had added it to all contracts in the flow.json
config file. It does not need to be the same though. There are 10 predefined accounts that can be used as the testing alias.
The CI does not automatically run for pull requests coming from forks. |
Work towards onflow/developer-grants#216
Description
Uses the Cadence testing framework to test the functionality of
RandomBeaconHistory
contract.