getcontractinfo
https://triport.io/rpc/tron/wallet/getcontractinfoReturns native metadata for a Tron contract address.
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.
valuestringrequiredvisiblebooleanoptionalfalse; 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.
responseobjectErrors
Wallet failures use HTTP status plus JSON. See Tron errors.
| HTTP | Meaning | When it happens |
|---|---|---|
400 | Bad request | value is missing or its address representation is invalid. |
401 | Unauthorized | The API key is missing or invalid. |
403 | Forbidden | The scope or tier does not permit the request. |
429 | Rate limited | The 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
valuein the published contract. - This is current native metadata; the schema has no historical block selector.
- Related:
eth_getCode.