1 tx
2 calls
constructor
constructor(address _admin)
functions
claimDates
viewfunction claimDates(bytes32 stakeId, uint256 poolId, uint256 strategyId) view returns (uint16 claimDay)
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
getLastClaimDay
viewfunction getLastClaimDay(bytes32 _stakeId, uint256 _poolId, uint256 _strategyId) view returns (uint16)
getLayerClaimState
viewfunction getLayerClaimState(address _user, uint256 _poolId, uint256 _layerId) view returns (uint8)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
layerClaimState
viewfunction layerClaimState(address userAddress, uint256 poolId, uint256 layerId) view returns (uint8)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
recordClaim
nonpayablefunction recordClaim(address _user, uint256 _poolId, uint256 _layerId, uint256 _strategyId, bytes32 _stakeId, uint8 _claimType, uint16 _claimDay)
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
events
ClaimRecorded
event ClaimRecorded(bytes32 indexed stakeId, uint256 indexed strategyId, uint256 claimDay)
LayerStateUpdated
event LayerStateUpdated(address indexed user, uint256 indexed poolId, uint256 indexed layerId, uint8 newStateType)
RoleAdminChanged
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
RoleGranted
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
RoleRevoked
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
AmountMustBeGreaterThanZero
error AmountMustBeGreaterThanZero()
CallerIsNotManager
error CallerIsNotManager()
ControllerAlreadySet
error ControllerAlreadySet()
DeclaredAmountLessThanDeposited
error DeclaredAmountLessThanDeposited(uint256 declared, uint256 deposited)
DeclaredRewardZero
error DeclaredRewardZero()
DepositAmountZero
error DepositAmountZero()
DepositExceedsDeclared
error DepositExceedsDeclared(uint256 total, uint256 declared)
InsufficientDepositedFunds
error InsufficientDepositedFunds(uint256 requested, uint256 available)
InsufficientStrategyBalance
error InsufficientStrategyBalance()
InvalidAddress
error InvalidAddress()
InvalidInputArrays
error InvalidInputArrays()
InvalidPoolDates
error InvalidPoolDates()
LayerAlreadyHasClaim
error LayerAlreadyHasClaim(uint256 layer, uint16 day)
LayerAlreadyHasExclusiveClaim
error LayerAlreadyHasExclusiveClaim(uint256 layer, uint16 day)
LayerAlreadyHasSemiExclusiveClaim
error LayerAlreadyHasSemiExclusiveClaim(uint256 layer, uint16 day)
LayerIsLocked
error LayerIsLocked(uint256 layer, uint16 day)
NoRewardToClaim
error NoRewardToClaim()
NoRewardToRestake
error NoRewardToRestake()
NotStakeOwner
error NotStakeOwner(address sender, address owner)
PoolAlreadyActiveOrFinalized
error PoolAlreadyActiveOrFinalized(uint256 poolId)
PoolAlreadyCalculated
error PoolAlreadyCalculated(uint256 poolId)
PoolDoesNotExist
error PoolDoesNotExist(uint256 poolId)
PoolHasAlreadyBeenAnnounced
error PoolHasAlreadyBeenAnnounced()
PoolNotDeclared
error PoolNotDeclared(uint256 poolId)
PoolNotEnded
error PoolNotEnded(uint256 poolId)
PoolNotFullyFunded
error PoolNotFullyFunded(uint256 poolId)
PoolNotInitializedOrCalculated
error PoolNotInitializedOrCalculated(uint256 poolId)
PoolNotSetUp
error PoolNotSetUp(uint256 poolId)
PoolNotStarted
error PoolNotStarted(uint256 poolId)
RewardAlreadyGranted
error RewardAlreadyGranted()
StrategyCannotBeChanged
error StrategyCannotBeChanged()
StrategyExist
error StrategyExist(uint256 strategyId)
StrategyNotExist
error StrategyNotExist(uint256 strategyId)
StrategyNotPreFunded
error StrategyNotPreFunded(uint256 strategyId)
TotalEligibleWeightIsZero
error TotalEligibleWeightIsZero()
UserNotEligibleForPool
error UserNotEligibleForPool()
creation bytecode
0x608060405234801561000f575f5ffd5b50604051610aae380380610aae83398101604081905261002e916100e8565b6100385f8261003f565b5050610115565b5f828152602081815260408083206001600160a01b038516845290915281205460ff166100df575f838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556100973390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016100e2565b505f5b92915050565b5f602082840312156100f8575f5ffd5b81516001600160a01b038116811461010e575f5ffd5b9392505050565b61098c806101225f395ff3fe608060405234801561000f575f5ffd5b50600436106100b1575f3560e01c8063791438231161006e57806379143823146101cc57806391d14854146101ff57806394c072e114610212578063961646b514610225578063a217fddf1461025a578063d547741f14610261575f5ffd5b806301ffc9a7146100b5578063248a9ca3146100dd5780632f2ff15d1461010d57806336568abe14610122578063372638571461013557806371e11f6c1461017c575b5f5ffd5b6100c86100c33660046107c5565b610274565b60405190151581526020015b60405180910390f35b6100ff6100eb3660046107f3565b5f9081526020819052604090206001015490565b6040519081526020016100d4565b61012061011b366004610825565b6102aa565b005b610120610130366004610825565b6102d4565b61016961014336600461084f565b600260209081525f938452604080852082529284528284209052825290205461ffff1681565b60405161ffff90911681526020016100d4565b6101bf61018a366004610878565b6001600160a01b0383165f908152600160209081526040808320858452825280832084845290915290205460ff169392505050565b6040516100d491906108bc565b6101bf6101da366004610878565b600160209081525f938452604080852082529284528284209052825290205460ff1681565b6100c861020d366004610825565b61030c565b6101206102203660046108e2565b610334565b61016961023336600461084f565b5f9283526002602090815260408085209385529281528284209184525290205461ffff1690565b6100ff5f81565b61012061026f366004610825565b61065f565b5f6001600160e01b03198216637965db0b60e01b14806102a457506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f828152602081905260409020600101546102c481610683565b6102ce8383610690565b50505050565b6001600160a01b03811633146102fd5760405163334bd91960e11b815260040160405180910390fd5b610307828261071f565b505050565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b7f0f51adb3f49e4a9bbb17b3783f025995eaf8c24be2c8eefff214bdfda05ef94d61035e81610683565b6001600160a01b0388165f9081526001602081815260408084208b855282528084208a85529091529091205460ff16908460028111156103a0576103a06108a8565b036103f3575f8160028111156103b8576103b86108a8565b14878490916103ec576040516314d8bc7f60e21b8152600481019290925261ffff1660248201526044015b60405180910390fd5b505061049a565b6001816002811115610407576104076108a8565b1415878490916104375760405163e619e40f60e01b8152600481019290925261ffff1660248201526044016103e3565b506002905084600281111561044e5761044e6108a8565b0361049a576002816002811115610467576104676108a8565b14158784909161049757604051633818f85b60e11b8152600481019290925261ffff1660248201526044016103e3565b50505b5f8160028111156104ad576104ad6108a8565b03610543576001600160a01b0389165f9081526001602081815260408084208c855282528084208b85529091529091208054869260ff19909116908360028111156104fa576104fa6108a8565b021790555086888a6001600160a01b03167f0d1165ebb809775bc70efc13f19482a9e1b7798fc0a294723c9e44f769bcc1348760405161053a91906108bc565b60405180910390a45b6001846002811115610557576105576108a8565b036105ed576001600160a01b0389165f9081526001602081815260408084208c855282528084208b85529091529091208054869260ff19909116908360028111156105a4576105a46108a8565b021790555086888a6001600160a01b03167f0d1165ebb809775bc70efc13f19482a9e1b7798fc0a294723c9e44f769bcc134876040516105e491906108bc565b60405180910390a45b5f8581526002602090815260408083208b84528252808320898452825291829020805461ffff191661ffff87169081179091559151918252879187917f18ea5f38e755e5d602e3abde6f6ebbf9a7708fcbb25add16ea05d5ffd1778e43910160405180910390a3505050505050505050565b5f8281526020819052604090206001015461067981610683565b6102ce838361071f565b61068d8133610788565b50565b5f61069b838361030c565b610718575f838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556106d03390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016102a4565b505f6102a4565b5f61072a838361030c565b15610718575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016102a4565b610792828261030c565b6107c15760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016103e3565b5050565b5f602082840312156107d5575f5ffd5b81356001600160e01b0319811681146107ec575f5ffd5b9392505050565b5f60208284031215610803575f5ffd5b5035919050565b80356001600160a01b0381168114610820575f5ffd5b919050565b5f5f60408385031215610836575f5ffd5b823591506108466020840161080a565b90509250929050565b5f5f5f60608486031215610861575f5ffd5b505081359360208301359350604090920135919050565b5f5f5f6060848603121561088a575f5ffd5b6108938461080a565b95602085013595506040909401359392505050565b634e487b7160e01b5f52602160045260245ffd5b60208101600383106108dc57634e487b7160e01b5f52602160045260245ffd5b91905290565b5f5f5f5f5f5f5f60e0888a0312156108f8575f5ffd5b6109018861080a565b96506020880135955060408801359450606088013593506080880135925060a088013560038110610930575f5ffd5b915060c088013561ffff81168114610946575f5ffd5b809150509295989194975092955056fea26469706673582212207439a39b83966fbc48005f0b32136c0d67e8a0268647021fe76788232339501e64736f6c634300081e00330000000000000000000000006972480b73fd3a5278c039cf072b499c4ca22e33