Move the Checkpoints library to utils/structs (#4275)

This commit is contained in:
Hadrien Croubois
2023-05-26 21:19:27 +02:00
committed by GitHub
parent 25edd3cd62
commit 4448c13c3c
10 changed files with 20 additions and 15 deletions

View File

@ -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/');
}

View File

@ -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

View File

@ -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 */