You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Foundry version if you have a contract A in the same sol-file as the contract B that inherits it, running yarn deploy will throw Error: ENOENT: no such file or directory, open '/[path]/packages/foundry/out/A.sol/A.json'.
Even though json-file is generated, but it's in /[path]/packages/foundry/out/B.sol/A.json.
Expected Behavior
yarn deploy should look for contract's ABI file in every folder of /foundry/out and not only in folders with the same name
Steps To Reproduce
In foundry/contracts create B.sol file with this code:
//SPDX-License-Identifier: MITpragma solidity>=0.8.0<0.9.0;
contractA {
uint256 x;
constructor() payable {
x =1;
}
function update(uint256y) externalvirtual {
x = y;
}
}
contractBisA {
function update(uint256y) externaloverride {
x = y *2;
}
}
Then in foundry/script/Deploy.s.sol in the run function add
B b =newB();
console.logString(
string.concat(
"B deployed at: ", vm.toString(address(b))
)
);
Run yarn deploy
Anything else?
Some projects have multiple contracts (especially abstract contracts) in the same sol-file. They won't work with SE-2 (Foundry). Developers either will need to create every contract in their own sol-file or move json-files to their own folders in the foundry/out folder.
This problem only exists in the Foundry version. The Hardhat version works properly.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Which method was used to setup Scaffold-ETH 2 ?
npx create-eth@latest
Current Behavior
In the Foundry version if you have a contract A in the same sol-file as the contract B that inherits it, running
yarn deploy
will throwError: ENOENT: no such file or directory, open '/[path]/packages/foundry/out/A.sol/A.json'
.Even though json-file is generated, but it's in
/[path]/packages/foundry/out/B.sol/A.json
.Expected Behavior
yarn deploy
should look for contract's ABI file in every folder of/foundry/out
and not only in folders with the same nameSteps To Reproduce
In
foundry/contracts
createB.sol
file with this code:Then in
foundry/script/Deploy.s.sol
in therun
function addRun
yarn deploy
Anything else?
Some projects have multiple contracts (especially abstract contracts) in the same sol-file. They won't work with SE-2 (Foundry). Developers either will need to create every contract in their own sol-file or move json-files to their own folders in the
foundry/out
folder.This problem only exists in the Foundry version. The Hardhat version works properly.
The text was updated successfully, but these errors were encountered: