TriportRPC

getcontractinfo

POSThttps://triport.io/rpc/tron/wallet/getcontractinfo

Returns native metadata for a Tron contract address.

Tron mainnettron:rpcfree+; tron_read_rpc: 15 / 20 / 100 / 250 RPS (free / basic / pro / business; default, unmeasured)

getcontractinfo returns the native wallet metadata object for a contract. The contract address is carried in value, not address or contract_address.

The default address representation is hex-41. Base58 is valid only together with visible: true. Use eth_getCode when the only required value is EVM bytecode encoded as data.

Parameters

The JSON body contains the contract address and an optional encoding switch.

valuestringrequired
Contract address in hex-41 form by default.
visiblebooleanoptional
Defaults to false; set true only for a Base58 address.

Response

The concrete response example is unknown. The OpenAPI response allows an extensible object but supplies no example or property list. {} is therefore a schema-valid placeholder, not a captured contract metadata response.

responseobject
Native contract metadata; properties are not enumerated by the schema.

Errors

Wallet failures use HTTP status plus JSON. See Tron errors.

HTTPMeaningWhen it happens
400Bad requestvalue is missing or its address representation is invalid.
401UnauthorizedThe API key is missing or invalid.
403ForbiddenThe scope or tier does not permit the request.
429Rate limitedThe tron_read_rpc budget is exceeded.

An address/visible mismatch can result in an empty object instead of a transport error.

Examples

const body = { value: "41a614f803b6fd780986a42c78ec9c7f77e6ded13c" };
const response = await fetch("https://triport.io/rpc/tron/wallet/getcontractinfo", {
  method: "POST",
  headers: { "x-token": process.env.TRIPORT_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify(body),
});
const contract = await response.json();

Notes

  • The request field is named value in the published contract.
  • This is current native metadata; the schema has no historical block selector.
  • Related: eth_getCode.