Skip to content

Add Tron deployment overrides to production - #3

Open
nick8319 wants to merge 3 commits into
productionfrom
staging
Open

nick8319 wants to merge 3 commits into
productionfrom
staging

Conversation

@nick8319

Copy link
Copy Markdown

Brings the Tron deployment overrides from staging to production.

Required for the Tron rollout on the production shared UI: without it, the decoder seeds canonical EVM addresses as trusted on the Tron chain id, and the Tron MultiSendCallOnly / SignMessageLib never become trusted for delegate call. The result is "Delegate call is disabled" (422) on any Transaction Builder batch.

What it does

  • app/config.py: adds SAFE_DEPLOYMENTS_OVERRIDES, a per-chain map of contract name to addresses, populated with the eight Tron contracts for Mainnet (728126428) and Shasta (2494104990).
  • app/services/safe_contracts_service.py: update_safe_contracts_info now iterates over the union of chain ids in the database and chain ids in the overrides. For an override chain only the overridden addresses are seeded; _revoke_stale_canonical_trust clears trust from canonical addresses previously seeded on that chain.
  • Trust itself is unchanged: it is still derived from the contract name via CONTRACTS_TRUSTED_FOR_DELEGATE_CALL, so on Tron MultiSendCallOnly and SignMessageLib become trusted and MultiSend does not.

Verification on staging

Deployed as 8b1f431 on decoder.stage.safe.protofire.io. After the seeding cron ran:

  • Tron rows: MultiSendCallOnly and SignMessageLib trusted, MultiSend and SafeL2 not trusted.
  • Canonical addresses previously seeded on the Tron chain id are no longer trusted.
  • Chains 1, 100 and 42161 snapshots identical before and after.

Batch execution verified end to end on Tron Mainnet: tx 0xd4bd8a1bb67225fd1fe3ec16e69574146c4bf75e94134f21c3ffceb615b3aad8, block 86066156.

Notes

production is currently at 7565131, the direct parent of the merge on staging, so this is a fast-forward with no conflicts. 10 tests added, all passing.

Safe contracts on TRON are not deployed at the canonical addresses, so the
seeder never flagged the real MultiSendCallOnly/SignMessageLib as trusted
for delegate call and the CGW rejected TX Builder batches with
"Delegate call is disabled".

Add SAFE_DEPLOYMENTS_OVERRIDES with the current TRON Mainnet (728126428)
and Shasta (2494104990) 1.4.1 deployments. Override chains seed only their
own contracts (and are seeded even on an empty database); canonical rows
that already exist on an override chain lose their trusted flag, since no
code lives at those addresses there. ABI lookup is scoped per chain.
Non-override chains are unchanged. CONTRACTS_TRUSTED_FOR_DELEGATE_CALL is
untouched (MultiSend stays untrusted, as upstream).

Ported from tron-staging ac39dcf onto the staging seeder.
feat: seed per-chain Safe deployment overrides for TRON
Comment on lines +23 to +24
TRON_SHASTA_CHAIN_ID = 2494104990
TRON_MAINNET_CHAIN_ID = 728126428

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ElvisKrop ElvisKrop left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one non-blocking item above about reusing the chain ID constants from safe-eth-py instead of redefining them locally. Nothing else blocking - good to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants