This repository was archived by the owner on Jun 30, 2025. It is now read-only.
Repository navigation
Print scheduledRewards instead of totalEarnings. Closes #255
#259
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e27d402
print `scheduledRewards` instead of `totalEarnings`. closes #255
juliangruber bc07ab4
rename field to `rewardsScheduledForAddress`
juliangruber f4c4795
rename remaining fields
juliangruber 9297e01
convert BigNumber to string
juliangruber aa85e0a
Merge branch 'main' into add/scheduled-rewards
juliangruber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [{"type":"constructor","inputs":[{"internalType":"address","name":"admin","type":"address"}]},{"type":"function","name":"DEFAULT_ADMIN_ROLE","inputs":[],"outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"EVALUATE_ROLE","inputs":[],"outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"MAX_SCORE","inputs":[],"outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view"},{"type":"function","name":"addMeasurements","inputs":[{"internalType":"string","name":"cid","type":"string"}],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable"},{"type":"function","name":"adminAdvanceRound","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"availableBalance","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"balanceHeld","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"balances","inputs":[{"internalType":"address","name":"","type":"address"}],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"currentRoundEndBlockNumber","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"currentRoundIndex","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"currentRoundRoundReward","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"getRoleAdmin","inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view"},{"type":"function","name":"grantRole","inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"hasRole","inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view"},{"type":"function","name":"maxTransfersPerTx","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"minBalanceForTransfer","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"nextRoundLength","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"participantCountReadyForTransfer","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"participantCountScheduledForTransfer","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"previousRoundIndex","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"previousRoundRemainingReward","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"previousRoundRoundReward","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"previousRoundTotalScores","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"readyForTransfer","inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view"},{"type":"function","name":"releaseRewards","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"renounceRole","inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"revokeRole","inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"rewardsScheduledFor","inputs":[{"internalType":"address","name":"participant","type":"address"}],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"roundReward","inputs":[],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"function","name":"scheduledForTransfer","inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view"},{"type":"function","name":"setMaxTransfersPerTx","inputs":[{"internalType":"uint256","name":"_maxTransfersPerTx","type":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setNextRoundLength","inputs":[{"internalType":"uint256","name":"_nextRoundLength","type":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setRoundReward","inputs":[{"internalType":"uint256","name":"_roundReward","type":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"setScores","inputs":[{"internalType":"uint256","name":"roundIndex","type":"uint256"},{"internalType":"address payable[]","name":"addresses","type":"address[]"},{"internalType":"uint64[]","name":"scores","type":"uint64[]"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"supportsInterface","inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view"},{"type":"function","name":"tick","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"type":"function","name":"validateScores","inputs":[{"internalType":"uint64[]","name":"scores","type":"uint64[]"}],"outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view"},{"type":"event","name":"MeasurementsAdded","inputs":[{"name":"cid","type":"string","indexed":false},{"name":"roundIndex","type":"uint256","indexed":false},{"name":"sender","type":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"name":"role","type":"bytes32","indexed":true},{"name":"previousAdminRole","type":"bytes32","indexed":true},{"name":"newAdminRole","type":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"name":"role","type":"bytes32","indexed":true},{"name":"account","type":"address","indexed":true},{"name":"sender","type":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"name":"role","type":"bytes32","indexed":true},{"name":"account","type":"address","indexed":true},{"name":"sender","type":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoundStart","inputs":[{"name":"roundIndex","type":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"to","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TransferFailed","inputs":[{"name":"to","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false}],"anonymous":false},{"type":"error","name":"AccessControlBadConfirmation","inputs":[]},{"type":"error","name":"AccessControlUnauthorizedAccount","inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}]},{"type":"receive"}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 find it weird that it's the Zinnia module that handles querying the smart contract for scheduled rewards.
In my mind, this functionality is not specific to Zinnia (or Bacalhau or any other module) and, therefore, it belongs to Station Core itself.
What are the arguments in favour of placing this new logic here?
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.
This is a good question! My initial reasoning was that bacalhau doesn't use this, so it doesn't belong in
core, above all modules. And who knows, maybe we will even add another trusted module in the future?Otoh, it doesn't belong into Zinnia either, because it's the module's decision whether to use Meridian.
ethersmight even run in Zinnia, since for this we don't need to sign messages - or we could just use the jsonrpc endpoint directly - then we only needfetch. I think for this we need a way for Zinnia modules to log metrics.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.
Fair enough. Please update our checklist for deploying the new Meridian version to remind us that we need to update this place in Station Core, too?
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.
already part of https://github.com/filecoin-station/spark-api/blob/main/docs/impact-evaluator.md :)