JSON ABI files¶
These files are minimal integration interfaces, not complete deployment build artifacts. They encode/decode only the entries actually present in each JSON file. A function mentioned elsewhere in the documentation is not necessarily included, and a function-only file cannot decode events. Contract addresses live in contracts.json; a Mainnet interface must not be assumed to match Nile or a later implementation.
These interfaces originated from the MCP server's
src/core/abis.ts, with docs-local corrections described below. They are not guaranteed to remain byte-for-byte identical to the MCP package. Neither a prose page nor this subset overrides the ABI of the actual deployed implementation.
Scope and provenance¶
The machine-readable scope manifest records each selected interface's target, verification method, download hash and coverage, checked on 2026-10-14. The address verification methods identify the read-only getters used to resolve Mainnet pointers. Re-read these pointers after upgrades; a dated observation does not certify a later or historical implementation.
- GovernorBravo: Mainnet proxy
TEqiF5JbhDPD77yjEfnEMncGRZNDt2uogDreturned implementationTUeNh9BsYK44XePmFAuKZWg2rJuU7bSt5u. Input types and selected events were taken from that implementation's node ABI.getReceiptreturns one tuple; itsbool / uint8 / uint96components were expanded from the pinned official Receipt definition because the node omits tuple components. This is not a bytecode-reproduced compiler artifact. The filenamegovernor-alpha.jsonis retained for URL compatibility; its documented target is Bravo, not every Alpha/Bravo deployment. - Oracle:
price-oracle.jsonis the read interface for Mainnet'sTGnYnSn4G9PgWFj7QQemh4YMZKp3fkympJentrypoint.assetPrices,anchors,poster,getPrice, andsetPricebelong to itsv1PriceOracle()backend,TMiNCmvD3zdsv6mk7niBU6NPBzVNjYMQTV; those verified methods are provided separately inprice-oracle-impl.json. Do not send a backend-only call to the proxy.setPriceis a restricted state-changing operation, not a public read. - sTRX:
strx.jsonincludes selected functions (with corrected return types) and all 27 event declarations from the current MainnetSTRXG2implementation,TUAV6ZSCXtF8KVvDKSeVmAbJEovTBf4HtG. This includesDeposit,Withdraw, andClaim, withuserindexed. The functions now includewithdrawExactandclaim. This is still a subset of functions and excludes the separate administrative proxy ABI; it is not a guarantee for historical implementations or Nile. - Energy Rental:
energy-market.jsoncontains 19 selected functions andRentResource,ReturnResource,Liquidate, andRentClaimedfrom MainnetMarketG1,TNoHbPuBQrVanVf9qxUsSvHdB2eDkeDAKD. Its compiler ABI defines the three positionalgetRentInforeturns, therentalstuple, boolrentPaused, and both refund-return values. RestrictedclaimRental()returns the amount transferred to sTRX in that call, in sun;rentClaimed()is the cumulative read. See Protocol income collection. - jTRX / WJST: the native-TRX repayment and WJST vote-unlocking interfaces were checked against their Mainnet node ABIs. Other files remain subsets; entries absent from them are unsupported by that download.
The Mainnet node returns no ABI entries for the current STRXG2 and MarketG1 implementations. These two interfaces instead use compiler output. The sTRX and rental additions were compiled with TRON Solidity 0.8.18, optimizer enabled with 200 runs. Their creation bytecode matches the current node responses after removing only trailing Solidity CBOR metadata and its length; full metadata is not identical, and a complete reproducible source bundle is not included here. The manifest records compiler and bytecode hashes. Deposit, Withdraw, Claim, and RentClaimed were additionally decoded from successful Mainnet transaction receipts and checked against confirmed TronGrid events; raw-log regression fixtures are stored in scripts/fixtures/docs-verification/settlement-events.json in the docs repository. No transaction was submitted for verification.
Supplied compiler ABI cross-check¶
On 2026-10-14, the supplied MarketG1.abi.json and STRXG2.abi.json were compared with the compiler ABIs described above. Their full parsed JSON contents match, including input/output names and types, nested tuples, mutability, event indexed/anonymous fields, and fallback/receive entries. No duplicate canonical signatures were found. The manifest records each supplied file's SHA-256 and comparison counts.
| Supplied artifact | Full ABI entries | Matching entries in the published subset |
|---|---|---|
MarketG1.abi.json |
74: 58 functions, 16 events | All 23 in energy-market.json: 19 functions, 4 events |
STRXG2.abi.json |
107: 78 functions, 27 events, 1 fallback, 1 receive | All 39 in strx.json: 12 functions, 27 events |
This cross-check does not replace the downloads with full deployment artifacts or expand their coverage. It confirms agreement with the dated compiler ABI, not an independent proof of deployment. The bytecode-metadata, proxy, historical-version and network limits above still apply.
Catalog¶
| ABI | Contract | Use for |
|---|---|---|
jtoken.json |
jTRC20 (Supply & Borrow Market) | Selected token/lending functions only; no events. Use the native-TRX variants below where applicable. |
jtrx-mint.json |
jTRX mint (TRX-specific) |
Payable mint entry point for the native-TRX market (TRX is sent as callValue, no approve). |
jtrx-repay.json |
Mainnet jTRX repayment | Payable repayBorrow(uint256) and repayBorrowBehalf(address); payment uses callValue. |
comptroller.json |
Comptroller | checkMembership, enterMarkets, collateralFactorMantissa, closeFactorMantissa, claimReward, guardian pause flags. |
interest-rate-model.json |
Interest Rate Model | getBorrowRate, getSupplyRate, baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock. |
price-oracle.json |
Price Oracle | getUnderlyingPrice(jToken) for collateral and borrow valuation. |
price-oracle-impl.json |
Mainnet Oracle backend | assetPrices, anchors, poster, getPrice, restricted setPrice, and PricePosted. Not the proxy interface. |
governor-alpha.json |
Mainnet GovernorBravo (legacy filename) | Selected proposal lifecycle and voting methods, castVoteBySig, tuple getReceipt, and selected proposal/vote events. |
poly.json |
JST voting | castVote, getVoteInfo, totalVote, surplusVotes, jstBalance (JST-weighted voting helper). |
strx.json |
sTRX (Staked TRX) | Selected staking/balance functions plus all 27 current STRXG2 event declarations, including Deposit, Withdraw, and Claim. |
wjst.json |
Mainnet WJST | Wrapping, available/locked votes, withdrawVotes, and selected wrap/vote-lock events. |
trc20.json |
TRC20 (generic) | approve, allowance, balanceOf, decimals, transfer for any underlying TRC20 asset. |
energy-market.json |
Energy Rental market | Compiler-aligned rental/order reads, tuple rentals, three-value getRentInfo, bool rentPaused, refund returns, settlement reads/writes, and RentResource / ReturnResource / Liquidate / RentClaimed. |
energy-rate-model.json |
Energy Rental rate model | getRentalRate, totalDelegated, totalFrozen. |
Decoding events¶
First confirm that the ABI contains the desired type: "event" entry and matches the deployed address, implementation, network, and historical block being decoded. If it does not, obtain the corresponding verified build artifact rather than inventing a signature. Only then derive topic0 from the exact name and input types; indexed flags are also necessary to decode topics and data correctly. See APIs §8 — Event-stream and indexing options.
For AI agents¶
- Use these ABIs together with addresses from
contracts.json; never hard-code addresses from prose. - Respect precision rules: jTokens always use 8 decimals; each underlying TRC20 uses its own
decimals; mantissa-scaled fields (exchangeRate,borrowIndex, rates) are scaled by1e18. See APIs §1.3–1.4. - For wallet-aware contract writes, prefer the MCP server tools over raw ABI calls so that side-effect annotations and HITL confirmation apply.