Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Commit f9fbd61

Browse files
committed
initial tests
1 parent 4c209dd commit f9fbd61

File tree

8 files changed

+194
-63
lines changed

8 files changed

+194
-63
lines changed

eth-contracts/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact=true

eth-contracts/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@
88
"format": "forge fmt"
99
},
1010
"author": "Abdulla Faraz <[email protected]>",
11-
"license": "MIT"
11+
"license": "MIT",
12+
"dependencies": {
13+
"@uniswap/sdk-core": "7.5.0",
14+
"@uniswap/v3-core": "1.0.1",
15+
"@uniswap/v3-periphery": "1.4.4"
16+
}
1217
}

eth-contracts/remappings.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/
2+
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
3+
@uniswap/v3-periphery/=node_modules/@uniswap/v3-periphery/
4+
@uniswap/v3-core/=node_modules/@uniswap/v3-core/
5+
@uniswap/v3-sdk/=node_modules/@uniswap/v3-sdk/

eth-contracts/script/Counter.s.sol

Lines changed: 0 additions & 19 deletions
This file was deleted.

eth-contracts/src/Counter.sol

Lines changed: 0 additions & 14 deletions
This file was deleted.

eth-contracts/test/Counter.t.sol

Lines changed: 0 additions & 24 deletions
This file was deleted.

eth-contracts/test/lib/AddressSet.t.sol

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,27 @@
22
pragma solidity ^0.8.13;
33

44
import {Test, console} from "forge-std/Test.sol";
5-
import {AddressSet} from "../src/lib/AddressSet.sol";
5+
import {AddressSet} from "../../src/lib/AddressSet.sol";
66

7-
contract AddressSet is Test {
7+
contract AddressSetTest is Test {
88
using AddressSet for AddressSet.Set;
99

10-
AddressSet.Set public set;
10+
AddressSet.Set tokenSet;
1111

1212
function setUp() public {
13-
set = AddressSet.Set();
13+
}
14+
15+
function test_insert(address randomAddress) public {
16+
tokenSet.insert(randomAddress);
17+
assert(tokenSet.contains(randomAddress));
18+
}
19+
20+
function test_remove(address randomAddress1, address randomAddress2) public {
21+
tokenSet.insert(randomAddress1);
22+
tokenSet.insert(randomAddress2);
23+
tokenSet.remove(randomAddress1);
24+
assert(!tokenSet.contains(randomAddress1));
25+
assert(tokenSet.contains(randomAddress2));
1426
}
1527

1628
// function test_Increment() public {

pnpm-lock.yaml

Lines changed: 166 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)