- Config, docs, scripts, and backup manifests - Submodule refs unchanged (m = modified content in submodules) Made-with: Cursor
2.5 KiB
TransactionMirror Chain 138 — CreateCollision and skip-mirror steps
Purpose: If deploy-transaction-mirror-and-pmm-pool-after-txpool-clear.sh fails with CreateCollision (contract already at expected address), use this to fix and proceed to pool creation only.
Address from CreateCollision trace
When the deploy fails, the trace shows the address that already has code:
| Address | Role |
|---|---|
| 0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141 | Expected TransactionMirror address (deployer + nonce 13410). If CreateCollision occurs, a contract is already deployed here. |
Lookup on Chain 138:
cast code 0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141 --rpc-url $RPC_URL_138
- If code length > 2 (i.e. not
0x): contract exists; use it as the mirror and skip deploy. - If code length = 2: no contract at that address on current RPC state; deploy may have failed for another reason, or state differs (e.g. different node).
Exact env + script steps
Option A — Use existing mirror and run pool-only
-
Set the mirror address in .env (if the collision address has code on your RPC):
# In smom-dbis-138/.env TRANSACTION_MIRROR_ADDRESS=0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141 -
Run the script with --skip-mirror (only creates the cUSDT/cUSDC PMM pool):
./scripts/deployment/deploy-transaction-mirror-and-pmm-pool-after-txpool-clear.sh --skip-mirror -
Or run without --skip-mirror:
IfTRANSACTION_MIRROR_ADDRESSis set and that address has code on chain, the script skips the TransactionMirror deploy and proceeds to pool creation.
Option B — Deploy a new TransactionMirror (different address)
If you need a new mirror (e.g. that address is wrong or empty):
- Clear any stuck nonce:
./scripts/clear-all-transaction-pools.shthen wait ~60s. - Do not set
TRANSACTION_MIRROR_ADDRESS(or unset it). - Run the full script again (no
--skip-mirror). The next deploy will use the current nonce and a new address.
Script options (reference)
| Option | Effect |
|---|---|
| (none) | Deploy TransactionMirror (if not skipped), then create PMM pool. |
--skip-mirror |
Skip mirror deploy; only create PMM pool. Requires TRANSACTION_MIRROR_ADDRESS in .env. |
--dry-run |
Print commands only; no deploy. |
--force |
Skip RPC reachability check. |
Skip logic (no flag): if TRANSACTION_MIRROR_ADDRESS is set in .env and that address has code on Chain 138, the script skips the mirror deploy and continues to pool creation.