Skip to content

Commit

Permalink
fix: small issues on the ci
Browse files Browse the repository at this point in the history
  • Loading branch information
roderik committed Oct 9, 2024
1 parent fc864ab commit 928bc7d
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ jobs:
- name: Report code coverage
if: github.event_name == 'pull_request'
uses: zgosalvez/github-actions-report-lcov@v4.1.17
continue-on-error: true
with:
coverage-files: lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
13 changes: 12 additions & 1 deletion lib/forge-std/scripts/vm.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/usr/bin/env python3

import argparse
import copy
import json
import re
import subprocess
from enum import Enum as PyEnum
from pathlib import Path
from typing import Callable
from urllib import request

Expand All @@ -26,7 +28,16 @@


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

ccs = contract.cheatcodes
Expand Down
61 changes: 53 additions & 8 deletions lib/forge-std/src/Vm.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/forge-std/test/Vm.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {Vm, VmSafe} from "../src/Vm.sol";
// added to or removed from Vm or VmSafe.
contract VmTest is Test {
function test_VmInterfaceId() public pure {
assertEq(type(Vm).interfaceId, bytes4(0xa561dbe8), "Vm");
assertEq(type(Vm).interfaceId, bytes4(0x35457718), "Vm");
}

function test_VmSafeInterfaceId() public pure {
Expand Down

0 comments on commit 928bc7d

Please sign in to comment.