Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- Config, docs, scripts, and backup manifests - Submodule refs unchanged (m = modified content in submodules) Made-with: Cursor
2.1 KiB
2.1 KiB
Truth Network scripts
Scripts for deploying and registering Truth Network (TRUU) with Chain 138’s ChainRegistry and for fetching chain constants/ABIs.
Environment
Set in smom-dbis-138/.env or repo .env:
RPC_URL_138– Chain 138 RPC URLPRIVATE_KEY– deployer key (no0xprefix)CHAIN_REGISTRY_ADDRESS_138– ChainRegistry proxy on Chain 138 (set by one-shot deploy)TRUTH_ADAPTER_ADDRESS_138– TruthNetworkAdapter on Chain 138 (set after deploying adapter)
One-shot deploy and register
From repo root:
./scripts/truth-network/deploy-chain-registry-and-truth.sh
This will:
- Deploy
ChainRegistryon Chain 138 ifCHAIN_REGISTRY_ADDRESS_138is not set, and append it tosmom-dbis-138/.env. - Deploy
TruthNetworkAdapterand register Truth Network in ChainRegistry.
If the TruthNetworkAdapter step fails with “Could not parse deployed address”, Forge is running in dry-run (e.g. in CI/sandbox). Run the broadcast from your own terminal:
cd smom-dbis-138 && forge create contracts/registry/TruthNetworkAdapter.sol:TruthNetworkAdapter \
--rpc-url "$RPC_URL_138" --private-key "$PRIVATE_KEY" \
--constructor-args 0x50c02710b06d6AdDb864D6b038010eF6fA1BCd92 \
--with-gas-price 1000000000 --legacy --broadcast
Then set TRUTH_ADAPTER_ADDRESS_138 in smom-dbis-138/.env to the “Deployed to: 0x…” address and run only the register step:
./scripts/truth-network/deploy-and-register-truth-on-chain138.sh --register-only
Other scripts
deploy-and-register-truth-on-chain138.sh– Deploy TruthNetworkAdapter (if needed) and register Truth in ChainRegistry. Use--register-onlyto skip deploy.register-truth-in-chain-registry.sh– Register Truth in ChainRegistry only (requiresTRUTH_ADAPTER_ADDRESS_138).fetch-truth-chain-constants.sh– Fetch Truth Network chain constants (WSS) intoconfig/truth-chain-constants.json.fetch-etherscan-abi.sh– Fetch verified ABIs for Truth Bridge and TRUU token from Etherscan.
References
docs/07-ccip/TRUTH_NETWORK_BRIDGE_SPEC.md– Bridge and integration spec.