Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Deploys a facet/periphery contract to Tron (mainnet or Shasta testnet) from the `contracts-tron` fork — the two-repo, TronWeb-based round trip that Foundry's `deployContractToNetworks.sh` cannot run. Use whenever the target network is `tron`/`tronshasta`, whenever `deploy-contract` detects a Tron target and routes here, or when the user says "deploy <Contract> to tron", "redeploy on tron shasta", or "push the Tron USDT bypass fix". Locates or clones the `contracts-tron` checkout, checks the fork
.claude/skills/lifinance-deploy-contract-tron/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 101% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -5% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 73% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 189% | 0% |
Tron has no Foundry support, so it does not go through deployContractToNetworks.sh or CREATE3 — it uses the TypeScript/TronWeb scripts in script/deploy/tron/, run from a separate fork repo, lifinance/contracts-tron. This skill is the Tron analog of /deploy-contract; use it whenever a target network is tron or tronshasta.
main in lifinance/contracts carries zero Tron branching by design — Tron USDT is a broken ERC-20, so the fix (a bypass in LibAsset.transferERC20 + a WithdrawablePeriphery re-route) lives only in the fork as a small, deliberate delta. Code flows one-way contracts → contracts-tron; deploy logs flow back the other way via a PR against upstream — never a direct commit to the fork. Full rationale, the exact fork delta, and the sync mechanism: docs/TronFork.md (read it if anything below is unclear on why, not just what).
contracts-tron checkoutA normal session is rooted in contracts, but every step in this skill except Phase 5 must run from a contracts-tron working copy — a different clone, not a worktree of this repo (worktrees share one .git; forks don't).
$CONTRACTS_TRON_PATH if set, then a sibling directory next to the current repo root (../contracts-tron). Use the first that exists and has origin pointing at lifinance/contracts-tron.bash gh repo clone lifinance/contracts-tron ../contracts-tron ln -s "$(git rev-parse --show-toplevel)/.env" ../contracts-tron/.env # symlink, never copy — reuses this checkout's secrets
cd into it for the rest of Phase 0 through Phase 4. All commands below assume the working directory is the contracts-tron checkout.contracts-tron, not contracts, and on main.bash git remote get-url origin | grep -q 'contracts-tron' || { echo "not in contracts-tron — abort"; exit 1; } git rev-parse --abbrev-ref HEAD # must be main for a production deploy
contracts:main has changes to <Contract> (or to LibAsset/WithdrawablePeriphery) not yet in the fork, stop and merge the pending sync/upstream-YYYY-MM-DD PR first (or open one) — do not deploy stale code.-tron delta survived the last sync. After any sync, confirm the bypass branch is still present:bash grep -q "TRON_USDT" src/Libraries/LibAsset.sol || { echo "Tron USDT bypass missing from LibAsset — sync broke the delta"; exit 1; }
If missing, the sync merge dropped the fork's delta — resolve before deploying; do not deploy without the bypass on a chain where USDT is effectively all volume.
Audits are keyed by ContractName + @custom:version; one version must map to exactly one bytecode.
main baseline → same version (e.g. 2.1.3).<main-version>-tron (e.g. 2.1.3-tron).main baseline with further Tron-only changes → append a revision (2.1.3-tron-r2, -r3, ...).2.2.0-tron unless main is actually at 2.2.0 and the fork has synced to that baseline.Check the repo version before proceeding: grep -m1 "@custom:version" src/Facets/<Contract>.sol (or src/Periphery/...).
Present: contract + version, target network(s) (tron and/or tronshasta), and which deploy scripts will run. Wait for explicit go-ahead — Tron deploys cost real TRX (Energy + Bandwidth), and production deploys go straight onto mainnet with no Safe-proposal buffer for the deploy step itself.
bashexport NETWORK=tron # or tron-shasta for testnet export PRIVATE_KEY=<64-char hex, no 0x> # deployerWallet — see config/global.json tronWallets bun script/deploy/tron/deploy-core-facets.ts bun script/deploy/tron/register-facets-to-diamond.ts # only the ones relevant to <Contract>'s type: bun script/deploy/tron/deploy-and-register-periphery.ts bun script/deploy/tron/deploy-and-register-symbiosis-facet.ts bun script/deploy/tron/deploy-and-register-allbridge-facet.ts bun script/deploy/tron/deploy-and-register-near-intents-facet.ts bun script/deploy/tron/deploy-and-register-eco-facet.ts
Each script reads the network config, deploys via TronContractDeployer (CREATE-equivalent, not CREATE3 — Tron has no CREATE3 factory support here), estimates Energy/Bandwidth with a safety margin, and updates deployments/tron.json / deployments/tron.diamond.json in the working tree.
Deployer wallet, not devWallet. Deploys run from deployerWallet (config/global.json → tronWallets); deployment Energy is rented from a rental service, not funded by delegation — see Prerequisites. Never hard-code the address; always read it from global.json.
Foundry's forge verify does not support Tron. Verify manually:
forge flatten src/<Facets|Periphery>/<Contract>.sol > /tmp/<Contract>-flat.solhttps://tronscan.org, testnet https://shasta.tronscan.org), open the deployed address → Contract tab → Verify and Publish.foundry.toml, paste the flattened source, and supply ABI-encoded constructor args.Tronscan API (for scripted checks): mainnet https://apilist.tronscan.org/api, testnet https://api.shasta.tronscan.org/api.
This is the step most likely to be gotten backwards. The fork never pushes back to main — deploy logs are the one exception, and even they don't go to the fork's own PR flow. contracts-tron and contracts are separate repos with unrelated-enough histories that cherry-picking commits between them is the wrong tool — copy the two generated JSON files as plain data, from the contracts-tron checkout into a fresh branch of contracts.
bash# capture the fork commit before leaving it — goes in the PR body for re-verification TRON_COMMIT=$(git -C ../contracts-tron rev-parse HEAD) # back in the contracts checkout (this repo) git checkout -b deploy-tron-<contract>-<date> origin/main cp ../contracts-tron/deployments/tron.json deployments/tron.json cp ../contracts-tron/deployments/tron.diamond.json deployments/tron.diamond.json
Then delegate the commit / template / Linear ticket / push / create mechanic to /create-pr, passing:
deployments/tron.json, deployments/tron.diamond.json (nothing else).chore(<Contract>): deploy vX.Y.Z-tron to tron.contracts-tron, fork commit $TRON_COMMIT.Store the contracts-tron commit hash in the PR body (and it flows into MongoDB via the normal deploy-log ingestion) — this is what lets someone re-verify bytecode later by checking out that exact fork commit, without upstream main needing to still match. Don't reimplement branching/commit/PR plumbing here; /create-pr owns it (including the EXSC Linear-ticket requirement).
Once merged upstream, these logs reach contracts-tron again on the next upstream→fork sync PR — do not also commit them directly to the fork's main.
Report: contract + version, network(s), deployed address(es), Tronscan verification status, and the upstream PR URL (or explicit note that Phase 5 is still pending and who owns it).
contracts instead of contracts-tron) → abort immediately; nothing in this skill's Phase 0b–4 runs against upstream. Only Phase 5 runs from contracts.contracts-tron checkout found and no gh access to clone one → stop and ask; do not attempt the TronWeb steps from the contracts checkout, the fork's -tron delta doesn't exist there.main for the target contract → stop and route to the pending/needed sync/upstream-* PR first; do not deploy stale bytecode.-tron delta missing after a sync (grep in Phase 0 step 3 fails) → the sync merge dropped Tron-specific code; fix before deploying, especially for any contract that moves USDT.-tron/-tron-rN scheme, or implies a main version that doesn't exist yet → fix before deploying; audit tooling assumes one version = one bytecode.contracts-tron instead of lifinance/contracts → close it and re-open against upstream; the fork must never receive a direct commit for deploy logs.deployer-wallet-address-vs-global-json guidance: derive the deployer address from the private key, not global.json, and check its TRX balance before running Phase 3.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 10,606 | 8,046 | -24% | 1 | 1 | 0% | 1,865 | 3,741 | +101% | 0 | 0 | — |
case-02 | pass→fail | 25,044 | 5,233 | -79% | 1 | 1 | 0% | 2,116 | 2,725 | +29% | 0 | 0 | — |
case-03 | pass→fail | 10,072 | 6,581 | -35% | 1 | 1 | 0% | 1,735 | 2,862 | +65% | 0 | 0 | — |
case-04 | fail→fail | 12,524 | 3,889 | -69% | 1 | 1 | 0% | 2,077 | 2,629 | +27% | 0 | 0 | — |
case-05 | fail→fail | 9,161 | 5,873 | -36% | 1 | 1 | 0% | 1,523 | 2,789 | +83% | 0 | 0 | — |
case-06 | fail→fail | 8,766 | 6,141 | -30% | 1 | 1 | 0% | 1,443 | 2,737 | +90% | 0 | 0 | — |
case-07 | fail→pass | 12,821 | 4,032 | -69% | 1 | 1 | 0% | 2,001 | 3,148 | +57% | 0 | 0 | — |
case-08 | fail→pass | 18,579 | 2,709 | -85% | 1 | 1 | 0% | 3,031 | 2,868 | -5% | 0 | 0 | — |
case-09 | pass→pass | 10,120 | 2,972 | -71% | 1 | 1 | 0% | 1,689 | 2,972 | +76% | 0 | 0 | — |
case-10 | fail→pass | 10,364 | 3,176 | -69% | 1 | 1 | 0% | 1,696 | 2,931 | +73% | 0 | 0 | — |
case-11 | pass→pass | 12,625 | 4,614 | -63% | 1 | 1 | 0% | 2,060 | 3,187 | +55% | 0 | 0 | — |
case-12 | fail→pass | 5,905 | 1,515 | -74% | 1 | 1 | 0% | 902 | 2,610 | +189% | 0 | 0 | — |
case-13 | fail→pass | 4,123 | 1,497 | -64% | 1 | 1 | 0% | 685 | 2,598 | +279% | 0 | 0 | — |
case-14 | pass→pass | 9,641 | 2,610 | -73% | 1 | 1 | 0% | 1,716 | 2,804 | +63% | 0 | 0 | — |
case-15 | fail→pass | 7,394 | 3,062 | -59% | 1 | 1 | 0% | 1,099 | 2,913 | +165% | 0 | 0 | — |
case-16 | fail→pass | 9,643 | 2,804 | -71% | 1 | 1 | 0% | 1,430 | 2,848 | +99% | 0 | 0 | — |
case-17 | pass→pass | 8,616 | 2,313 | -73% | 1 | 1 | 0% | 1,456 | 2,730 | +88% | 0 | 0 | — |
case-18 | pass→pass | 10,522 | 6,251 | -41% | 1 | 1 | 0% | 1,603 | 3,343 | +109% | 0 | 0 | — |
case-19 | fail→pass | 5,351 | 2,950 | -45% | 1 | 1 | 0% | 774 | 2,825 | +265% | 0 | 0 | — |
case-20 | fail→pass | 11,777 | 1,807 | -85% | 1 | 1 | 0% | 2,139 | 2,706 | +27% | 0 | 0 | — |
case-21 | pass→pass | 14,001 | 3,288 | -77% | 1 | 1 | 0% | 2,317 | 2,917 | +26% | 0 | 0 | — |
case-22 | fail→pass | 11,679 | 2,367 | -80% | 1 | 1 | 0% | 1,928 | 2,761 | +43% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +41 percentage points is the difference between those two pass rates over the 17 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.