foundry: Dynamic linking not supported in `create` command

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (a84a281 2022-04-16T00:15:54.385011+00:00)

What command(s) is the bug in?

forge create

Operating System

macOS (M1)

Describe the bug

Still getting a Dynamic linking not supported in create command error after changing foundry.toml when deploying to a testnet.

First ran forge create Library which works fine.

Got the address from that then add the following line to foundry.toml

libraries= ['./src/lib/LibraryContract.sol:Library:0xaddress']

I’ve also tried adding the contract that imports the library:

libraries= ['./src/Contract.sol:Library:0xaddress']

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 27 (26 by maintainers)

Most upvoted comments

oh that’s outdated, can you try after updating, the fix should be in

works with relative paths now - thx mbd!!!

removed

Is Chainlink TWAP actually a library? I.e. is it defined with library as opposed to contract? I can’t seem to find it anywhere.

Also, I’m very interested in figuring out what the root cause of this is, since I cannot reproduce the behavior myself. If you’re available through a more real-time channel like Telegram (https://t.me/foundry_support, ping @onbjerg) please let me know.