-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added state machine contract * state machine same states for all machines * SlashingController initial commit * Configurable slash reasons, in review states and proposal editing. * deploying SlashingController * fix state machine creation * - Added stake freezing side effects to SlashingController - Proposing slash checks for subject existence, unified interface isRegistered in AgentRegistry - Fixed typos in docs (XXXRegistry reference to ERC1155 should be ERC721) * WIP: slashing calculations * test slashing amounts * evidence handling * added tests and comments * fix onlyInState and natspec StateMachines * SlashController: change frozen stake when reviewing proposal, fix events, tests * SlashController: modify proposal tests, no need to check for proposal existance there * SlashController: fix wrong next states size, removed unnecesary checks, reused error message MissingRole, tests * FortaStaking: comments * FortaStakingParameters: comments * SlashingController: implements ISlashingController * linting * FortaStaking: make stake to shares converters public * SlashController: removed MAX_STAKE penalty mode, since it will always be the max possible stake * fix tests * Update contracts/components/staking/SlashingController.sol Co-authored-by: Hadrien Croubois <[email protected]> * Update contracts/components/staking/SlashingController.sol reentrancy fix returning deposit Co-authored-by: Hadrien Croubois <[email protected]> * Update contracts/components/staking/SlashingController.sol reentrancy protection on slash deposit Co-authored-by: Hadrien Croubois <[email protected]> * SlashingController: msg.sender -> _msgSender(), fix role check for revert proposal * SlashingController: immutable depositToken * SlashingController: max string length for evidence * StateMachines & SlashingController: refactor to more efficient state machines * StateMachines attribution * SlashingController and FortaStaking: reverted to accessControl SLASHER_ROLE for slash and freeze * SlashingController: move _transition up in markAsInReviewSlashProposal Co-authored-by: Hadrien Croubois <[email protected]>
- Loading branch information
Showing
28 changed files
with
1,579 additions
and
182 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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.