Thesettlementlayerforthemachineeconomy.

Developers

Foundry and Hardhat, already wired up

Foundry and Hardhat contract toolchain

Three Foundry roots, four Hardhat projects and worked CosmWasm and Solidity examples.

Start from a project that already builds. Two Foundry configs sit at the repository root, one for the LayerX settlement contracts and one for the Paxeer-native contracts, with a third under loadtest. Four Hardhat projects compile the Paxeer contracts and the RPC and dapp suites, and a Node gate checks each pinned solc build is present. The root Foundry profile runs 10,000 fuzz and 1,000 invariant runs and fails on revert. Compiler pins differ by root, so check yours.

What it does

Paxeer X builds its Solidity with Foundry and Hardhat side by side. Two Foundry configs sit at the repository root: foundry.toml covers the LayerX settlement contracts, and foundry.paxeer.toml, selected with FOUNDRY_CONFIG=, covers the Paxeer-native contracts under contracts/src; a third Foundry root lives under loadtest/contracts/evm. Four Hardhat projects compile the Paxeer contracts and the RPC and dapp integration suites, and a Node script checks that each project's pinned solc build is already present before any compile runs. Alongside them the repository ships worked examples: five CosmWasm contracts in Rust and seven Solidity examples with Go bindings.

Key capabilities

  • Two disjoint root Foundry configs, one for LayerX settlement contracts and one for Paxeer-native contracts.
  • Root Foundry profile runs 10,000 fuzz and 1,000 invariant runs, and fails on revert.
  • Four Hardhat projects compile the Paxeer contracts and the RPC and dapp integration suites.
  • A Node gate asserts each Hardhat project's pinned solc build is already downloaded.
  • Worked examples: five CosmWasm contracts in Rust, seven Solidity examples with Go bindings.
  • Hardhat names local, devnet and testnet RPC targets from environment variables.

Who it's for

Solidity and CosmWasm developers building on Paxeer X, and contributors working in the chain repository.

Why it matters

Both mainstream EVM toolchains are already wired to the chain's own contracts, so a developer can start from a project that builds rather than assembling one. The examples are real, compiled code, and the CosmWasm set is built, tested and linted by the repository's own targets.

Differentiators

The root Foundry profile is configured for reproducible, heavily fuzzed output: via_ir, bytecode_hash = "none", cbor_metadata = false, storage layouts emitted, 10,000 fuzz runs and 1,000 invariant runs at depth 128 with fail_on_revert = true. Formatting and a Solidity state-surface check run in CI before the build. @nomicfoundation/hardhat-foundry is a declared dependency of the Paxeer contracts project, so Hardhat and Foundry read the same tree.

Outcomes

  • Compile the chain's own contracts with either mainstream EVM toolchain.
  • Read five CosmWasm and seven Solidity examples as compiled code.
  • Point Hardhat at local, devnet or testnet RPC by environment variable.

Technical notes

  • Compiler pins differ by root: foundry.toml and foundry.paxeer.toml pin solc 0.8.27; loadtest/contracts/evm pins 0.8.20; the Hardhat projects pin 0.8.28, 0.8.28, 0.8.28 and 0.8.20.
  • contracts/src is compiled by both toolchains at different compiler versions: Foundry at 0.8.27, Hardhat at 0.8.28.
  • Neither Foundry config sets evm_version and neither declares [rpc_endpoints], an RPC URL or a chain id. The EVM version is passed on the command line (--evm-version=prague in CI) and network targeting is by flag or environment variable. Hardhat sets evmVersion: "prague" in its config and reads PAXEER_LOCAL_EVM_RPC_URL, PAXEER_DEVNET_EVM_RPC_URL and PAXEER_TESTNET_EVM_RPC_URL.
  • Every forge call in the Makefile passes --offline and several Go steps set GOPROXY=off, so a pre-populated dependency cache is assumed. loadtest/contracts/evm/setup.sh verifies its vendored openzeppelin-contracts and solmate trees against recorded SHA-256 digests and fails otherwise.
  • The Foundry binary version is pinned in only one place: the root Solidity CI job installs v1.7.1, while the Paxeer Foundry job installs stable. Locally forge is whatever is on the path, which sits badly with byte-exact output.
  • tools/workspace/check-hardhat-compilers.mjs covers three of the four Hardhat projects and reaches into Hardhat internal module paths (hardhat/internal/solidity/compiler/downloader), so it will break on a Hardhat upgrade. The workspace build preflight requires Node.js 24 or newer.
  • example/contracts commits .abi and .bin artifacts that can drift from their .sol sources, is wired to no build target, and its README is a macOS-only brew recipe. example/contracts/erc721 has no Go binding.
# LayerX settlement contracts (root foundry.toml)
forge build --sizes
forge test -vvv

# then the Paxeer-native contracts
FOUNDRY_CONFIG=foundry.paxeer.toml forge build --offline --root .
FOUNDRY_CONFIG=foundry.paxeer.toml forge test --offline --root .

# then Hardhat
node tools/workspace/check-hardhat-compilers.mjs
npm --prefix contracts exec -- hardhat compile
npm --prefix contracts exec -- hardhat test --network paxlocal

More in Developers

Build on Paxeer.

Give your agent a wallet, set its policy, and settle your first call on LayerX.