@godzillaba/mutest 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/Dockerfile +117 -0
- package/.devcontainer/devcontainer.json +62 -0
- package/.devcontainer/init-firewall.sh +118 -0
- package/.github/workflows/test.yml +38 -0
- package/.gitmodules +3 -0
- package/CLAUDE.md +39 -0
- package/README.md +33 -0
- package/foundry.lock +8 -0
- package/foundry.toml +6 -0
- package/index.ts +97 -0
- package/lib/forge-std/.gitattributes +1 -0
- package/lib/forge-std/.github/CODEOWNERS +1 -0
- package/lib/forge-std/.github/dependabot.yml +6 -0
- package/lib/forge-std/.github/workflows/ci.yml +125 -0
- package/lib/forge-std/.github/workflows/sync.yml +36 -0
- package/lib/forge-std/CONTRIBUTING.md +193 -0
- package/lib/forge-std/LICENSE-APACHE +203 -0
- package/lib/forge-std/LICENSE-MIT +25 -0
- package/lib/forge-std/README.md +314 -0
- package/lib/forge-std/RELEASE_CHECKLIST.md +12 -0
- package/lib/forge-std/foundry.toml +18 -0
- package/lib/forge-std/package.json +16 -0
- package/lib/forge-std/scripts/vm.py +636 -0
- package/lib/forge-std/src/Base.sol +48 -0
- package/lib/forge-std/src/Config.sol +60 -0
- package/lib/forge-std/src/LibVariable.sol +477 -0
- package/lib/forge-std/src/Script.sol +28 -0
- package/lib/forge-std/src/StdAssertions.sol +779 -0
- package/lib/forge-std/src/StdChains.sol +303 -0
- package/lib/forge-std/src/StdCheats.sol +825 -0
- package/lib/forge-std/src/StdConfig.sol +632 -0
- package/lib/forge-std/src/StdConstants.sol +30 -0
- package/lib/forge-std/src/StdError.sol +15 -0
- package/lib/forge-std/src/StdInvariant.sol +140 -0
- package/lib/forge-std/src/StdJson.sol +275 -0
- package/lib/forge-std/src/StdMath.sol +47 -0
- package/lib/forge-std/src/StdStorage.sol +475 -0
- package/lib/forge-std/src/StdStyle.sol +333 -0
- package/lib/forge-std/src/StdToml.sol +275 -0
- package/lib/forge-std/src/StdUtils.sol +200 -0
- package/lib/forge-std/src/Test.sol +32 -0
- package/lib/forge-std/src/Vm.sol +2533 -0
- package/lib/forge-std/src/console.sol +1551 -0
- package/lib/forge-std/src/console2.sol +4 -0
- package/lib/forge-std/src/interfaces/IERC1155.sol +105 -0
- package/lib/forge-std/src/interfaces/IERC165.sol +12 -0
- package/lib/forge-std/src/interfaces/IERC20.sol +43 -0
- package/lib/forge-std/src/interfaces/IERC4626.sol +190 -0
- package/lib/forge-std/src/interfaces/IERC6909.sol +72 -0
- package/lib/forge-std/src/interfaces/IERC721.sol +164 -0
- package/lib/forge-std/src/interfaces/IERC7540.sol +144 -0
- package/lib/forge-std/src/interfaces/IERC7575.sol +241 -0
- package/lib/forge-std/src/interfaces/IMulticall3.sol +68 -0
- package/lib/forge-std/src/safeconsole.sol +13248 -0
- package/lib/forge-std/test/CommonBase.t.sol +44 -0
- package/lib/forge-std/test/Config.t.sol +381 -0
- package/lib/forge-std/test/LibVariable.t.sol +452 -0
- package/lib/forge-std/test/StdAssertions.t.sol +141 -0
- package/lib/forge-std/test/StdChains.t.sol +227 -0
- package/lib/forge-std/test/StdCheats.t.sol +638 -0
- package/lib/forge-std/test/StdConstants.t.sol +38 -0
- package/lib/forge-std/test/StdError.t.sol +119 -0
- package/lib/forge-std/test/StdJson.t.sol +49 -0
- package/lib/forge-std/test/StdMath.t.sol +202 -0
- package/lib/forge-std/test/StdStorage.t.sol +485 -0
- package/lib/forge-std/test/StdStyle.t.sol +110 -0
- package/lib/forge-std/test/StdToml.t.sol +49 -0
- package/lib/forge-std/test/StdUtils.t.sol +342 -0
- package/lib/forge-std/test/Vm.t.sol +18 -0
- package/lib/forge-std/test/compilation/CompilationScript.sol +8 -0
- package/lib/forge-std/test/compilation/CompilationScriptBase.sol +8 -0
- package/lib/forge-std/test/compilation/CompilationTest.sol +8 -0
- package/lib/forge-std/test/compilation/CompilationTestBase.sol +8 -0
- package/lib/forge-std/test/fixtures/broadcast.log.json +187 -0
- package/lib/forge-std/test/fixtures/config.toml +81 -0
- package/lib/forge-std/test/fixtures/test.json +8 -0
- package/lib/forge-std/test/fixtures/test.toml +6 -0
- package/package.json +10 -0
- package/script/Counter.s.sol +19 -0
- package/src/Counter.sol +14 -0
- package/test/Counter.t.sol +24 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# ------------------------------------------------
|
|
2
|
+
# EXAMPLE DEPLOYMENT CONFIG
|
|
3
|
+
# ------------------------------------------------
|
|
4
|
+
|
|
5
|
+
# -- MAINNET -------------------------------------
|
|
6
|
+
|
|
7
|
+
[mainnet]
|
|
8
|
+
endpoint_url = "${MAINNET_RPC}"
|
|
9
|
+
|
|
10
|
+
[mainnet.bool]
|
|
11
|
+
is_live = true
|
|
12
|
+
bool_array = [true, false]
|
|
13
|
+
|
|
14
|
+
[mainnet.address]
|
|
15
|
+
weth = "${WETH_MAINNET}"
|
|
16
|
+
deps = [
|
|
17
|
+
"0x0000000000000000000000000000000000000000",
|
|
18
|
+
"0x1111111111111111111111111111111111111111",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[mainnet.uint]
|
|
22
|
+
number = 1234
|
|
23
|
+
number_array = [5678, 9999]
|
|
24
|
+
|
|
25
|
+
[mainnet.int]
|
|
26
|
+
signed_number = -1234
|
|
27
|
+
signed_number_array = [-5678, 9999]
|
|
28
|
+
|
|
29
|
+
[mainnet.bytes32]
|
|
30
|
+
word = "0x00000000000000000000000000000000000000000000000000000000000004d2" # 1234
|
|
31
|
+
word_array = [
|
|
32
|
+
"0x000000000000000000000000000000000000000000000000000000000000162e", # 5678
|
|
33
|
+
"0x000000000000000000000000000000000000000000000000000000000000270f", # 9999
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[mainnet.bytes]
|
|
37
|
+
b = "0xabcd"
|
|
38
|
+
b_array = ["0xdead", "0xbeef"]
|
|
39
|
+
|
|
40
|
+
[mainnet.string]
|
|
41
|
+
str = "foo"
|
|
42
|
+
str_array = ["bar", "baz"]
|
|
43
|
+
|
|
44
|
+
# -- OPTIMISM ------------------------------------
|
|
45
|
+
|
|
46
|
+
[optimism]
|
|
47
|
+
endpoint_url = "${OPTIMISM_RPC}"
|
|
48
|
+
|
|
49
|
+
[optimism.bool]
|
|
50
|
+
is_live = false
|
|
51
|
+
bool_array = [false, true]
|
|
52
|
+
|
|
53
|
+
[optimism.address]
|
|
54
|
+
weth = "${WETH_OPTIMISM}"
|
|
55
|
+
deps = [
|
|
56
|
+
"0x2222222222222222222222222222222222222222",
|
|
57
|
+
"0x3333333333333333333333333333333333333333",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
[optimism.uint]
|
|
61
|
+
number = 9999
|
|
62
|
+
number_array = [1234, 5678]
|
|
63
|
+
|
|
64
|
+
[optimism.int]
|
|
65
|
+
signed_number = 9999
|
|
66
|
+
signed_number_array = [-1234, -5678]
|
|
67
|
+
|
|
68
|
+
[optimism.bytes32]
|
|
69
|
+
word = "0x000000000000000000000000000000000000000000000000000000000000270f" # 9999
|
|
70
|
+
word_array = [
|
|
71
|
+
"0x00000000000000000000000000000000000000000000000000000000000004d2", # 1234
|
|
72
|
+
"0x000000000000000000000000000000000000000000000000000000000000162e", # 5678
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
[optimism.bytes]
|
|
76
|
+
b = "0xdcba"
|
|
77
|
+
b_array = ["0xc0ffee", "0xbabe"]
|
|
78
|
+
|
|
79
|
+
[optimism.string]
|
|
80
|
+
str = "alice"
|
|
81
|
+
str_array = ["bob", "charlie"]
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// SPDX-License-Identifier: UNLICENSED
|
|
2
|
+
pragma solidity ^0.8.13;
|
|
3
|
+
|
|
4
|
+
import {Script} from "forge-std/Script.sol";
|
|
5
|
+
import {Counter} from "../src/Counter.sol";
|
|
6
|
+
|
|
7
|
+
contract CounterScript is Script {
|
|
8
|
+
Counter public counter;
|
|
9
|
+
|
|
10
|
+
function setUp() public {}
|
|
11
|
+
|
|
12
|
+
function run() public {
|
|
13
|
+
vm.startBroadcast();
|
|
14
|
+
|
|
15
|
+
counter = new Counter();
|
|
16
|
+
|
|
17
|
+
vm.stopBroadcast();
|
|
18
|
+
}
|
|
19
|
+
}
|
package/src/Counter.sol
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// SPDX-License-Identifier: UNLICENSED
|
|
2
|
+
pragma solidity ^0.8.13;
|
|
3
|
+
|
|
4
|
+
import {Test} from "forge-std/Test.sol";
|
|
5
|
+
import {Counter} from "../src/Counter.sol";
|
|
6
|
+
|
|
7
|
+
contract CounterTest is Test {
|
|
8
|
+
Counter public counter;
|
|
9
|
+
|
|
10
|
+
function setUp() public {
|
|
11
|
+
counter = new Counter();
|
|
12
|
+
counter.setNumber(0);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function test_Increment() public {
|
|
16
|
+
counter.increment();
|
|
17
|
+
assertEq(counter.number(), 1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function testFuzz_SetNumber(uint256 x) public {
|
|
21
|
+
counter.setNumber(x);
|
|
22
|
+
assertEq(counter.number(), x);
|
|
23
|
+
}
|
|
24
|
+
}
|