mirror of
https://github.com/status-im/codex-contracts-eth.git
synced 2025-02-24 22:28:25 +00:00
- changes balance from uint256 -> uint128 so that entire Balance can be read or written with a single operation - moves Lock to library - simplifies lock checks
16 lines
285 B
Solidity
16 lines
285 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity 0.8.28;
|
|
|
|
import "./Timestamps.sol";
|
|
|
|
struct Lock {
|
|
Timestamp expiry;
|
|
Timestamp maximum;
|
|
}
|
|
|
|
library Locks {
|
|
function isLocked(Lock memory lock) internal view returns (bool) {
|
|
return Timestamps.currentTime() < lock.expiry;
|
|
}
|
|
}
|