-
Notifications
You must be signed in to change notification settings - Fork 2
/
PrintData.s.sol
28 lines (23 loc) · 999 Bytes
/
PrintData.s.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;
import {Script} from "forge-std/Script.sol";
import {console} from "forge-std/Test.sol";
import {FiveFiveFiveData} from "src/utils/FiveFiveFiveData.sol";
/// @notice A testing script to use during development to print out the mileage
/// and location data for each run from {FiveFiveFiveData}.
contract PrintDataScript is Script {
// -------------------------------------------------------------------------
// Script `run()`
// -------------------------------------------------------------------------
/// @notice Calls {FiveFiveFiveArt} and retrieves data for a range of days.
function run() public view {
for (uint256 i = 325; i < 336; ) {
uint256 mileage = FiveFiveFiveData.getDayMileage(i);
(string memory location, ) = FiveFiveFiveData.getDayLocation(i);
console.log(i, mileage, location);
unchecked {
++i;
}
}
}
}