Fakturindocs

Test and deploy contracts

Foundry test suite, the one-command deploy with Arbiscan verification, and wiring the new addresses.

Test

cd apps/contracts-solidity
forge test            # 37 tests: every user story, rejection paths, ACE, pricing, renderer, keeper
forge test -vvv --match-test Default

foundry.toml enables via_ir (required by the ACE contracts) and remaps @openzeppelin/contracts, @openzeppelin/contracts-upgradeable, @chainlink/policy-management and @chainlink/cross-chain-identity.

Deploy and verify

cp .env.example .env
# PRIVATE_KEY        deployer with Arbitrum Sepolia ETH
# ARBISCAN_API_KEY   Etherscan V2 key
# Optional: MOCK_IDRX (reuse a token), CRE_FORWARDER, RELAYER, TREASURY
./scripts/deploy-and-verify.sh          # --resume if it was interrupted

script/DeployFaktur.s.sol deploys and wires everything in one broadcast:

MockIDRX (unless MOCK_IDRX is set), FakturNFT, FakturVaultFactory, FakturRegistry, FakturRenderer.

Chainlink ACE via AceDeployer: PolicyEngine, OnlyAuthorizedSenderPolicy (issuer = RELAYER), IdentityRegistry, CredentialRegistry, funder and seller validators, all behind ERC1967 proxies.

FakturVerifierReceiver and FakturKeeper bound to CRE_FORWARDER (default: the CRE simulation forwarder).

Roles: REGISTRY_ROLE on the NFT to the registry, VERIFIER_ROLE to the receiver and the relayer; setIdentity, setRenderer, factory setRegistry.

After a deploy

Copy the addresses from the log (or broadcast/DeployFaktur.s.sol/421614/run-latest.json) to:

FileKeys
apps/web/.envNEXT_PUBLIC_FAKTUR_*, NEXT_PUBLIC_MOCK_IDRX_ADDRESS, NEXT_PUBLIC_ACE_*, NEXT_PUBLIC_DEPLOY_BLOCK
apps/fakturin-cre/verify/config.jsonregistryAddress, receiverAddress
apps/fakturin-cre/keeper/config.jsonkeeperAddress
apps/docs/lib/deployment.tsthe table on Deployed addresses

NEXT_PUBLIC_DEPLOY_BLOCK must be the L2 block of the first deploy transaction.

If contract interfaces changed, regenerate the ABIs in packages/abis from out/.

On this page