x402-tokenverdict / tree / tools/build-sim.sh ยท raw (this view has old GitHub links rewritten for the mirror; raw is byte-exact)
#!/bin/sh
# Compile contracts/TVSim.sol and write src/simcode.js. Needs solc 0.8.26 (static binary: /workspace/bin/solc or $SOLC).
set -e
cd "$(dirname "$0")/.."
SOLC=${SOLC:-/workspace/bin/solc}
$SOLC --optimize --via-ir --bin-runtime contracts/TVSim.sol -o contracts/out --overwrite >/dev/null
printf "// Runtime bytecode of contracts/TVSim.sol (solc 0.8.26 --optimize --via-ir --bin-runtime). Regenerate: sh tools/build-sim.sh\n// Only ever used inside eth_call state overrides; never deployed.\nexport const TVSIM_RUNTIME = '0x%s';\n" "$(cat contracts/out/TVSim.bin-runtime)" > src/simcode.js
echo "src/simcode.js: $(wc -c < contracts/out/TVSim.bin-runtime) hex chars"

agentgate-source: code mirror on Cloudflare Pages. All repos