Comments (17)
relative path to artifact works, but inputs of format SolidityFile.sol:ContractName
don't work.
from foundry.
cc @klkvr
from foundry.
Likely resolved by #7738, @arshan-ritual could you please try running foundryup tomorrow and check if issue persists? or foundryup -b master
now
from foundry.
Yes, will do.
from foundry.
@arshan-ritual does it work for you on latest nightly?
from foundry.
Assuming this works now. Please feel free to re-open if that's not the case.
from foundry.
still having issues with this using the latest nightly as of 5/10
from foundry.
@0xMySt1c are you using getCode for contracts under src/?
from foundry.
@klkvr using a custom dir set in foundry.toml
double checked and the artifacts are definitely there
the weird thing is that when the same setup function is called from a different profile it appears to work with no problem.
there are different profiles and test suite for gas and unit/integration test.
from foundry.
what are the differences between profiles?
No matching artifact
means that it is not found in the artifacts which were recompiled. when running script, foundry only compiles everything under src/ and the script itself, so if your contract is not in this set, you might get this error
from foundry.
using a custom dir set in foundry.toml
you mean something like src = "contracts"
in foundry.toml and vm.getCode("contracts/...")
is failing?
from foundry.
the only difference is that one of the profiles is gas optimized. i haven't tried a path because this setup code is called in both profiles.
from foundry.
using a custom dir set in foundry.toml
you mean something like
src = "contracts"
in foundry.toml andvm.getCode("contracts/...")
is failing?
no using the format "Contract.sol:Contract"
from foundry.
confirming that a path works. my current workaround will be to determine the path using the profile
from foundry.
sorry what do you mean by "path" here? are two profiles operating on different src
dirs?
from foundry.
getCode("out/artifacts/Contract.sol/Contract.json") works
getCode("Contract.sol:Contract") fails
from foundry.
can you confirm that getCode("Contract.sol:Contract")
works on one profile, but fails on another? If so, could you please share what are the differenceses between profiles?
from foundry.
Related Issues (20)
- Contract already deployed at expected address when testing multichain deploy script
- Add a Command to Calculate ERC7201 Slots in Cast HOT 1
- Switch to Alloy's `alloy-rpc-types-anvil` types
- Failing to properly parse JSON HOT 5
- Transaction is not seen as reverted with Anvil as opposed to hardhat EVM HOT 11
- Support Google Cloud KMS Signer
- `cast interface` fails for some contracts
- `forge verify-bytecode` panicks with end index out of range
- vm.warp() does not work as intended when `via_ir = true` HOT 1
- Inconsistent bytecode output between foundry and `solc` HOT 3
- `expectRevert` does not work with duplicate `CREATE2` HOT 2
- meta: Vyper support
- feat(invariant): extend the export of failed case to include traces as well HOT 1
- feat(fuzz): do not populate dictionary with bytecode metadata
- feat(invariant): use storage layout to fuzz values from state by type
- feat(fuzz): generate solidity regression tests from failures
- Graceful fail when executing transactions using cheatcode `vm.transact("txn_hash")` HOT 2
- cast send returns `server returned an error response: error code -32602: too many arguments, want at most 1` HOT 5
- Coverage report's total wrong
- forge coverage has problems to compile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundry.