Skip to content
Available on private testnetTestnet: yesMainnet: Not availableSoftware: Core bad4a06ea · protocol pqwerai-v8-testnet/1Updated

Solidity library compatibility

Library type How it works On PQWERAI
internal functions (e.g. Fees.bps, OpenZeppelin Math) Inlined into the contract; no deployment ✅ Tested in TipJar
public/external library functions Deployed separately; the contract is linked to the library address ✅ Standard EVM DELEGATECALL; link with forge create --libraries src/L.sol:L:<addr>
OpenZeppelin Contracts 5.0.2 Source-level dependency ✅ ERC-20/721/1155, Ownable, Ownable2Step, AccessControl, Math tested
OpenZeppelin ≥ 5.1 Uses MCOPY/PUSH0 depending on target Compiles for cancun; not tested for this release

Compatibility rules:

  1. Compile with an EVM target the chain supports (cancun or lower) — see EVM compatibility.
  2. Avoid libraries that use blobhash, block.blobbasefee or EIP-7702 delegation — they cannot work here.
  3. Libraries that read block.prevrandao for randomness are unsafe on PoW chains.
  4. Pin library versions (git tag or lockfile); the Wallet Studio uses a bundled OpenZeppelin 5.0.2 so that compilation needs no network and is reproducible.

Found a problem? Report a documentation issue · Build testnet-rc1+72057fe3ec