Skip to content

Commit 5b2b256

Browse files
committed
fix: small issues on the ci
1 parent 9cebf9d commit 5b2b256

File tree

4 files changed

+67
-10
lines changed

4 files changed

+67
-10
lines changed

.github/workflows/solidity.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ jobs:
288288
- name: Report code coverage
289289
if: github.event_name == 'pull_request'
290290
uses: zgosalvez/github-actions-report-lcov@v4.1.17
291+
continue-on-error: true
291292
with:
292293
coverage-files: lcov.info
293294
github-token: ${{ secrets.GITHUB_TOKEN }}

lib/forge-std/scripts/vm.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/usr/bin/env python3
22

3+
import argparse
34
import copy
45
import json
56
import re
67
import subprocess
78
from enum import Enum as PyEnum
9+
from pathlib import Path
810
from typing import Callable
911
from urllib import request
1012

@@ -26,7 +28,16 @@
2628

2729

2830
def main():
29-
json_str = request.urlopen(CHEATCODES_JSON_URL).read().decode("utf-8")
31+
parser = argparse.ArgumentParser(
32+
description="Generate Vm.sol based on the cheatcodes json created by Foundry")
33+
parser.add_argument(
34+
"--from",
35+
metavar="PATH",
36+
dest="path",
37+
required=False,
38+
help="path to a json file containing the Vm interface, as generated by Foundry")
39+
args = parser.parse_args()
40+
json_str = request.urlopen(CHEATCODES_JSON_URL).read().decode("utf-8") if args.path is None else Path(args.path).read_text()
3041
contract = Cheatcodes.from_json(json_str)
3142

3243
ccs = contract.cheatcodes

lib/forge-std/src/Vm.sol

Lines changed: 53 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/forge-std/test/Vm.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {Vm, VmSafe} from "../src/Vm.sol";
99
// added to or removed from Vm or VmSafe.
1010
contract VmTest is Test {
1111
function test_VmInterfaceId() public pure {
12-
assertEq(type(Vm).interfaceId, bytes4(0xa561dbe8), "Vm");
12+
assertEq(type(Vm).interfaceId, bytes4(0x35457718), "Vm");
1313
}
1414

1515
function test_VmSafeInterfaceId() public pure {

0 commit comments

Comments
 (0)