Code Monkey home page Code Monkey logo

Comments (17)

arshan-ritual avatar arshan-ritual commented on June 12, 2024

relative path to artifact works, but inputs of format SolidityFile.sol:ContractName don't work.

from foundry.

DaniPopes avatar DaniPopes commented on June 12, 2024

cc @klkvr

from foundry.

klkvr avatar klkvr commented on June 12, 2024

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.

arshan-ritual avatar arshan-ritual commented on June 12, 2024

Yes, will do.

from foundry.

klkvr avatar klkvr commented on June 12, 2024

@arshan-ritual does it work for you on latest nightly?

from foundry.

DaniPopes avatar DaniPopes commented on June 12, 2024

Assuming this works now. Please feel free to re-open if that's not the case.

from foundry.

0xMySt1c avatar 0xMySt1c commented on June 12, 2024

still having issues with this using the latest nightly as of 5/10

from foundry.

klkvr avatar klkvr commented on June 12, 2024

@0xMySt1c are you using getCode for contracts under src/?

from foundry.

0xMySt1c avatar 0xMySt1c commented on June 12, 2024

@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.

klkvr avatar klkvr commented on June 12, 2024

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.

klkvr avatar klkvr commented on June 12, 2024

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.

0xMySt1c avatar 0xMySt1c commented on June 12, 2024

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.

0xMySt1c avatar 0xMySt1c commented on June 12, 2024

using a custom dir set in foundry.toml

you mean something like src = "contracts" in foundry.toml and vm.getCode("contracts/...") is failing?

no using the format "Contract.sol:Contract"

from foundry.

0xMySt1c avatar 0xMySt1c commented on June 12, 2024

confirming that a path works. my current workaround will be to determine the path using the profile

from foundry.

klkvr avatar klkvr commented on June 12, 2024

sorry what do you mean by "path" here? are two profiles operating on different src dirs?

from foundry.

0xMySt1c avatar 0xMySt1c commented on June 12, 2024

getCode("out/artifacts/Contract.sol/Contract.json") works
getCode("Contract.sol:Contract") fails

from foundry.

klkvr avatar klkvr commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.