vault: move Timestamp and TokensPerSecond libraries one level up

This commit is contained in:
Mark Spanbroek 2025-02-26 10:36:04 +01:00
parent 8df557801c
commit 284b54e575
4 changed files with 5 additions and 5 deletions

View File

@ -43,7 +43,7 @@ function _tokensPerSecondAtMost(
return TokensPerSecond.unwrap(a) <= TokensPerSecond.unwrap(b);
}
library TokenFlows {
library Tokens {
/// Calculates how many tokens are accumulated when a token flow is maintained
/// for a duration of time.
function accumulate(

View File

@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
import "./TokenFlows.sol";
import "./Timestamps.sol";
import "../Tokens.sol";
import "../Timestamps.sol";
/// Used to identify an account. The first 20 bytes consist of the address of
/// the account holder, and the last 12 bytes consist of a discriminator value.
@ -38,7 +38,7 @@ struct Flow {
library Accounts {
using Accounts for Account;
using TokenFlows for TokensPerSecond;
using Tokens for TokensPerSecond;
using Timestamps for Timestamp;
/// Creates an account id from the account holder address and a discriminator.

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
import "./Timestamps.sol";
import "../Timestamps.sol";
struct Fund {
/// The time-lock unlocks at this time