Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

feat: use soldeer #12

Merged
merged 4 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
with:
version: nightly

- name: Install Dependencies
run: |
forge soldeer install
id: install

- name: Run Forge build
run: |
forge --version
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
out/
lib/
cache/
dependencies/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

5 changes: 5 additions & 0 deletions .soldeerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git/
.github/
.forge_snapshots/
out/
dependencies/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Forge has native gas reporting with `forge snapshot` and `forge test --gas-repor

# Installation
```solidity
forge install marktoda/forge-gas-snapshot
forge soldeer install forge-gas-snapshot~v0.0.4
```

- NOTE: foundry.toml must be updated to allow forge to write the snapshots
Expand Down
13 changes: 13 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,16 @@ out = 'out'
libs = ['lib']
ffi = true
fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}]

[soldeer]
# whether soldeer manages remappings
remappings_generated = true

# whether soldeer re-generates all remappings when installing, updating or uninstalling deps
remappings_regenerate = true

# whether to suffix the remapping with the version: `name-a.b.c`
remappings_version = false

[dependencies]
forge-std = "1.9.2"
1 change: 0 additions & 1 deletion lib/forge-std
Submodule forge-std deleted from 2d8b7b
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
forge-std/=dependencies/forge-std-1.9.2/
6 changes: 6 additions & 0 deletions soldeer.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[dependencies]]
name = "forge-std"
version = "1.9.2"
source = "https://soldeer-revisions.s3.amazonaws.com/forge-std/1_9_2_06-08-2024_17:31:25_forge-std-1.9.2.zip"
checksum = "20fd008c7c69b6c737cc0284469d1c76497107bc3e004d8381f6d8781cb27980"
integrity = "ae8b0d2637a0bdd85b6134117c0a7549dbe0ee8af66db454c66060547b654a89"
4 changes: 2 additions & 2 deletions src/GasSnapshot.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import "forge-std/console2.sol";
import {Script} from "forge-std/Script.sol";
import "forge-std/src/console2.sol";
import {Script} from "forge-std/src/Script.sol";
import {UintString} from "./utils/UintString.sol";

contract GasSnapshot is Script {
Expand Down
4 changes: 2 additions & 2 deletions test/GasSnapshot.t.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "forge-std/console2.sol";
import {Test} from "forge-std/Test.sol";
import "forge-std/src/console2.sol";
import {Test} from "forge-std/src/Test.sol";
import {GasSnapshot} from "../src/GasSnapshot.sol";
import {SimpleOperations} from "../src/test/SimpleOperations.sol";

Expand Down
Loading