mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-15 11:43:08 +00:00
18 lines
499 B
Solidity
18 lines
499 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity 0.8.28;
|
|
|
|
import "./Timestamps.sol";
|
|
|
|
type TokensPerSecond is int256;
|
|
|
|
using {_negate as -} for TokensPerSecond global;
|
|
using {_equals as ==} for TokensPerSecond global;
|
|
|
|
function _negate(TokensPerSecond rate) pure returns (TokensPerSecond) {
|
|
return TokensPerSecond.wrap(-TokensPerSecond.unwrap(rate));
|
|
}
|
|
|
|
function _equals(TokensPerSecond a, TokensPerSecond b) pure returns (bool) {
|
|
return TokensPerSecond.unwrap(a) == TokensPerSecond.unwrap(b);
|
|
}
|