From ae04cdf46cb76b6e48c23ecc12d605cdf324f39a Mon Sep 17 00:00:00 2001 From: refcell Date: Thu, 4 Dec 2025 16:10:21 -0500 Subject: [PATCH] chore(contracts): remove contracts --- .gitmodules | 6 ---- contracts/.gitignore | 14 -------- contracts/README.md | 66 ---------------------------------- contracts/foundry.lock | 8 ----- contracts/foundry.toml | 6 ---- contracts/lib/forge-std | 1 - contracts/lib/solmate | 1 - contracts/script/Counter.s.sol | 19 ---------- contracts/src/Counter.sol | 14 -------- contracts/test/Counter.t.sol | 24 ------------- 10 files changed, 159 deletions(-) delete mode 100644 .gitmodules delete mode 100644 contracts/.gitignore delete mode 100644 contracts/README.md delete mode 100644 contracts/foundry.lock delete mode 100644 contracts/foundry.toml delete mode 160000 contracts/lib/forge-std delete mode 160000 contracts/lib/solmate delete mode 100644 contracts/script/Counter.s.sol delete mode 100644 contracts/src/Counter.sol delete mode 100644 contracts/test/Counter.t.sol diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 29187eb2..00000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "contracts/lib/forge-std"] - path = contracts/lib/forge-std - url = https://github.com/foundry-rs/forge-std -[submodule "contracts/lib/solmate"] - path = contracts/lib/solmate - url = https://github.com/transmissions11/solmate diff --git a/contracts/.gitignore b/contracts/.gitignore deleted file mode 100644 index 85198aaa..00000000 --- a/contracts/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# Compiler files -cache/ -out/ - -# Ignores development broadcast logs -!/broadcast -/broadcast/*/31337/ -/broadcast/**/dry-run/ - -# Docs -docs/ - -# Dotenv file -.env diff --git a/contracts/README.md b/contracts/README.md deleted file mode 100644 index 8817d6ab..00000000 --- a/contracts/README.md +++ /dev/null @@ -1,66 +0,0 @@ -## Foundry - -**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** - -Foundry consists of: - -- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). -- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. -- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. -- **Chisel**: Fast, utilitarian, and verbose solidity REPL. - -## Documentation - -https://book.getfoundry.sh/ - -## Usage - -### Build - -```shell -$ forge build -``` - -### Test - -```shell -$ forge test -``` - -### Format - -```shell -$ forge fmt -``` - -### Gas Snapshots - -```shell -$ forge snapshot -``` - -### Anvil - -```shell -$ anvil -``` - -### Deploy - -```shell -$ forge script script/Counter.s.sol:CounterScript --rpc-url --private-key -``` - -### Cast - -```shell -$ cast -``` - -### Help - -```shell -$ forge --help -$ anvil --help -$ cast --help -``` diff --git a/contracts/foundry.lock b/contracts/foundry.lock deleted file mode 100644 index fee8a957..00000000 --- a/contracts/foundry.lock +++ /dev/null @@ -1,8 +0,0 @@ -{ - "lib/forge-std": { - "tag": { - "name": "v1.11.0", - "rev": "8e40513d678f392f398620b3ef2b418648b33e89" - } - } -} \ No newline at end of file diff --git a/contracts/foundry.toml b/contracts/foundry.toml deleted file mode 100644 index 25b918f9..00000000 --- a/contracts/foundry.toml +++ /dev/null @@ -1,6 +0,0 @@ -[profile.default] -src = "src" -out = "out" -libs = ["lib"] - -# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options diff --git a/contracts/lib/forge-std b/contracts/lib/forge-std deleted file mode 160000 index 8e40513d..00000000 --- a/contracts/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8e40513d678f392f398620b3ef2b418648b33e89 diff --git a/contracts/lib/solmate b/contracts/lib/solmate deleted file mode 160000 index 89365b88..00000000 --- a/contracts/lib/solmate +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 89365b880c4f3c786bdd453d4b8e8fe410344a69 diff --git a/contracts/script/Counter.s.sol b/contracts/script/Counter.s.sol deleted file mode 100644 index f01d69c3..00000000 --- a/contracts/script/Counter.s.sol +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Script} from "forge-std/Script.sol"; -import {Counter} from "../src/Counter.sol"; - -contract CounterScript is Script { - Counter public counter; - - function setUp() public {} - - function run() public { - vm.startBroadcast(); - - counter = new Counter(); - - vm.stopBroadcast(); - } -} diff --git a/contracts/src/Counter.sol b/contracts/src/Counter.sol deleted file mode 100644 index aded7997..00000000 --- a/contracts/src/Counter.sol +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -contract Counter { - uint256 public number; - - function setNumber(uint256 newNumber) public { - number = newNumber; - } - - function increment() public { - number++; - } -} diff --git a/contracts/test/Counter.t.sol b/contracts/test/Counter.t.sol deleted file mode 100644 index 48319108..00000000 --- a/contracts/test/Counter.t.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; - -import {Test} from "forge-std/Test.sol"; -import {Counter} from "../src/Counter.sol"; - -contract CounterTest is Test { - Counter public counter; - - function setUp() public { - counter = new Counter(); - counter.setNumber(0); - } - - function test_Increment() public { - counter.increment(); - assertEq(counter.number(), 1); - } - - function testFuzz_SetNumber(uint256 x) public { - counter.setNumber(x); - assertEq(counter.number(), x); - } -}