-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(horizon): add staking contract and others (WIP) * chore: fix errors until it compiles * fix: add missing IL2StakingTypes * chore: wip on splitting for code size * chore: somehow it fits in 24kB now * chore: remove global operators and the verifier allowlist * fix: various fixes and a bit of cleanup * chore: slippage protection for delegation * chore: add setter for delegation cuts * chore: add getter for delegation cuts * fix: reintroduce early alloc closure * chore: add support for vesting contracts * fix: various missing things * chore: add OZ contracts * chore: add setOperatorLocked * chore: use delegation ratio in getTokensAvailable * fix: allow changing provision params * fix: remove verifier cut from tokens to slash
- Loading branch information
1 parent
2585495
commit a94a455
Showing
44 changed files
with
3,416 additions
and
244 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
22 changes: 22 additions & 0 deletions
22
packages/contracts/contracts/l2/staking/IL2StakingTypes.sol
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
pragma solidity >=0.6.12 <0.9.0; | ||
|
||
interface IL2StakingTypes { | ||
/// @dev Message codes for the L1 -> L2 bridge callhook | ||
enum L1MessageCodes { | ||
RECEIVE_INDEXER_STAKE_CODE, | ||
RECEIVE_DELEGATION_CODE | ||
} | ||
|
||
/// @dev Encoded message struct when receiving indexer stake through the bridge | ||
struct ReceiveIndexerStakeData { | ||
address indexer; | ||
} | ||
|
||
/// @dev Encoded message struct when receiving delegation through the bridge | ||
struct ReceiveDelegationData { | ||
address indexer; | ||
address delegator; | ||
} | ||
} |
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
149 changes: 0 additions & 149 deletions
149
packages/contracts/contracts/staking/IHorizonStaking.sol
This file was deleted.
Oops, something went wrong.
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.