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 * remove whitelist functionality, limit minting to Forta max supply * fix escrow test * flattened AgentRegistry_0_1_4.sol * flattened ScannerRegistry_0_1_2.sol * flattened AgentRegistry014, ScannerRegistry012, ScannerNodeVersion011, Dispatch015 * flatten FortaStaking FortaStakingParameters * flattened FortaStakingParameters011 FortaStakoing011 * flattened dispatch, scanner node version, fortastaking and fortastakingparams * test upgrade FortaStaking * remove stray only * deprecated Router, unified BaseComponentUpgradeables * removed Router from README, tests * expand deprecated comment and rename deprecated variable * Update contracts/components/BaseComponentUpgradeable.sol Co-authored-by: Francisco <[email protected]> * Update contracts/components/BaseComponentUpgradeable.sol Co-authored-by: Francisco <[email protected]> * Update contracts/components/utils/Routed.sol Co-authored-by: Francisco <[email protected]> * expanded on versioned contract generation for test updates * remove stray console.log in test * mock router for upgrades testing * Update README.md Co-authored-by: Francisco <[email protected]> * Update test/components/upgrades.test.js Co-authored-by: Francisco <[email protected]> * Update test/components/upgrades.test.js Co-authored-by: Francisco <[email protected]> * Update test/components/upgrades.test.js Co-authored-by: Francisco <[email protected]> * Update test/components/upgrades.test.js Co-authored-by: Francisco <[email protected]> * disableRouter is not access control restricted and fails if already 0 * remove unsafeSkipStorageCheck references * fix tests Co-authored-by: Hadrien Croubois <[email protected]> Co-authored-by: Francisco <[email protected]>
- Loading branch information