foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.13k stars 1.68k forks source link

Chisel erroring out when importing an external sol file (interface in this case) #4516

Open simpledefi opened 1 year ago

simpledefi commented 1 year ago

Component

Chisel

Have you ensured that all of these are up to date?

What version of Foundry are you on?

forge 0.2.0 (ed9298d 2023-03-09T00:04:28.809303436Z)

What command(s) is the bug in?

No response

Operating System

Linux

Describe the bug

Start up chisel: import "iSimpleDefiStaking.txt" address a = 0x7f9Ef04582Fe662c19A0d016b9FF27E2ca2ADfc6;

Last line generates error: Failed to find REPL contract!

Welcome to Chisel! Type !help to show available commands. ➜ import "iSimpleDefiStaking.txt" ➜ address a = 0x7f9Ef04582Fe662c19A0d016b9FF27E2ca2ADfc6; Failed to find REPL contract! ➜ !so // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17;

import {Cheats} from "forge-std/Vm.sol"; import "iSimpleDefiStaking.txt";

contract REPL { Cheats internal constant vm = Cheats(address(uint160(uint256(keccak256("hevm cheat code")))));

/// @notice REPL contract entry point
function run() public {}

}

iSimpleDefiStaking.txt is really iSimpleDefiStaking.sol (github extension limitation)

iSimpleDefiStaking.txt

mattsse commented 1 year ago

@clabby mind taking a look at this?

perhaps this is the same error as https://github.com/foundry-rs/foundry/issues/4481

clabby commented 1 year ago

@clabby mind taking a look at this?

perhaps this is the same error as https://github.com/foundry-rs/foundry/issues/4481

Sure! Can do tonight or tomorrow.