Foundry

A working Foundry configuration for chain 2800.

Docs / Build / Foundry

A working Foundry setup for chain 2800.

Configuration

# foundry.toml
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
evm_version = "cancun"
optimizer = true
optimizer_runs = 200

[rpc_endpoints]
aere = "https://rpc.aere.network"

evm_version can be cancun, prague, osaka or earlier.

Deploy

export PRIVATE_KEY=0x…

forge create src/Counter.sol:Counter \
  --rpc-url aere \
  --chain 2800 \
  --private-key $PRIVATE_KEY

Call and send

cast block-number --rpc-url aere

cast call 0xCONTRACT "value()(uint256)" --rpc-url aere

cast send 0xCONTRACT "bump()" \
  --rpc-url aere --chain 2800 --private-key $PRIVATE_KEY

Calling a post-quantum precompile from a test

The verifiers are plain addresses, so cast call reaches them directly. This asks 0x0AE5 for 32 bytes of SHAKE256 over the bytes abc:

cast call 0x0000000000000000000000000000000000000ae5 \
  0x0000000000000000000000000000000000000000000000000000000000000020616263 \
  --rpc-url aere

For the signature verifiers, read Falcon input framing first. They return a zero word for a wrong layout and for an invalid signature alike, so put a known-good vector in the same test as a positive control.

Notes

Forking. --fork-url against the public endpoint works for recent blocks only: state is kept for 512 blocks. Forking deeper needs your own archive node.

Finality. One confirmation is final; cast send returning a receipt is the end of the story.

Fee floor. The base fee cannot go below 1 Gwei. Let cast read fee data rather than pinning a gas price by hand.