Move the Checkpoints library to utils/structs (#4275)
This commit is contained in:
@ -35,7 +35,7 @@ for (const [file, template] of Object.entries({
|
||||
'utils/math/SafeCast.sol': './templates/SafeCast.js',
|
||||
'utils/structs/EnumerableSet.sol': './templates/EnumerableSet.js',
|
||||
'utils/structs/EnumerableMap.sol': './templates/EnumerableMap.js',
|
||||
'utils/Checkpoints.sol': './templates/Checkpoints.js',
|
||||
'utils/structs/Checkpoints.sol': './templates/Checkpoints.js',
|
||||
'utils/StorageSlot.sol': './templates/StorageSlot.js',
|
||||
})) {
|
||||
generateFromTemplate(file, template, './contracts/');
|
||||
@ -43,7 +43,7 @@ for (const [file, template] of Object.entries({
|
||||
|
||||
// Tests
|
||||
for (const [file, template] of Object.entries({
|
||||
'utils/Checkpoints.t.sol': './templates/Checkpoints.t.js',
|
||||
'utils/structs/Checkpoints.t.sol': './templates/Checkpoints.t.js',
|
||||
})) {
|
||||
generateFromTemplate(file, template, './test/');
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@ const { OPTS } = require('./Checkpoints.opts.js');
|
||||
const header = `\
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "./math/Math.sol";
|
||||
import "./math/SafeCast.sol";
|
||||
import "../math/Math.sol";
|
||||
import "../math/SafeCast.sol";
|
||||
|
||||
/**
|
||||
* @dev This library defines the \`History\` struct, for checkpointing values as they change at different points in
|
||||
|
||||
@ -7,8 +7,8 @@ const header = `\
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "forge-std/Test.sol";
|
||||
import "../../contracts/utils/Checkpoints.sol";
|
||||
import "../../contracts/utils/math/SafeCast.sol";
|
||||
import "../../../contracts/utils/math/SafeCast.sol";
|
||||
import "../../../contracts/utils/structs/Checkpoints.sol";
|
||||
`;
|
||||
|
||||
/* eslint-disable max-len */
|
||||
|
||||
Reference in New Issue
Block a user