Skip to content

Commit

Permalink
feat(account): Safest Abstraction
Browse files Browse the repository at this point in the history
  • Loading branch information
shotaronowhere committed Jun 20, 2022
1 parent 0c69a95 commit 20ad1f9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/interfaces/ICoreKleros.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pragma solidity ^0.8.0;
* @author ShotaroNowhere - <[email protected]>
* @dev Strategy Interface for drawing.
*/
interface ICore{
interface ICoreKleros{

struct Account {
uint96 stakedTokens; // The account's total amount of tokens staked in subpools.
Expand Down
24 changes: 24 additions & 0 deletions contracts/interfaces/ICoreKlerosPacked.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @authors: [@shotaronowhere]
* @reviewers: []
* @auditors: []
*/

pragma solidity ^0.8.0;

/**
* @title ISortitionStrategy
* @author ShotaroNowhere - <[email protected]>
* @dev Strategy Interface for drawing.
*/
interface ICoreKlerosPacked{

struct Account {
uint184 packedStakedLockedTokens; // ~ [uint92 staked][uint92 locked]
uint40 index; // indexing the account
uint32 time; // The time when the juror staked
}

function indexToStakeID(uint48) external view returns (bytes32);
function getStakeIDToAccounts(bytes32) external view returns (Account memory);
}

0 comments on commit 20ad1f9

Please sign in to comment.