Skip to content

Commit

Permalink
feat: add tron specs
Browse files Browse the repository at this point in the history
  • Loading branch information
a0ngo committed Mar 2, 2025
1 parent 91a8a09 commit 1225fb3
Showing 1 changed file with 387 additions and 0 deletions.
387 changes: 387 additions & 0 deletions specs/mainnet-1/specs/tron.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,387 @@
{
"proposal": {
"title": "Add Specs: tron",
"description": "Adding new specification support for relaying tron data on Lava",
"specs": [
{
"index": "TRX",
"name": "tron mainnet",
"enabled": true,
"reliability_threshold": 268435455,
"data_reliability_enabled": true,
"block_distance_for_finalized_data": 4,
"blocks_in_finalization_proof": 3,
"average_block_time": 3000,
"allowed_block_lag_for_qos_sync": 5,
"imports": [],
"shares": 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000"
},
"api_collections": [
{
"enabled": true,
"collection_data": {
"api_interface": "rest",
"internal_path": "",
"type": "GET",
"add_on": ""
},
"apis": [
{
"name": "/wallet/getnowblock",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "/wallet/getenergyprices",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "/wallet/getnodeinfo",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
}
],
"verifications": []
},
{
"enabled": true,
"collection_data": {
"api_interface": "rest",
"internal_path": "",
"type": "POST",
"add_on": ""
},
"apis": [
{
"name": "/wallet/getaccount",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "/wallet/triggerconstantcontract",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": false,
"local": false,
"subscription": false,
"stateful": 1
},
"extra_compute_units": 0
},
{
"name": "/wallet/gettransactioninfobyid",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "/wallet/getaccountresource",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "/wallet/broadcasthex",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": false,
"local": false,
"subscription": false,
"stateful": 1
},
"extra_compute_units": 0
},
{
"name": "/wallet/getnowblock",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "/wallet/gettransactioninfobyblocknum",
"block_parsing": {
"parser_arg": [
"0",
"num"
],
"parser_func": "PARSE_CANONICAL"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "/wallet/getblockbynum",
"block_parsing": {
"parser_arg": [
"0",
"num"
],
"parser_func": "PARSE_CANONICAL"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
}
],
"headers": [],
"inheritance_apis": [],
"parse_directives": [
{
"function_tag": "GET_BLOCK_BY_NUM",
"function_template": "{\"num\":%d}",
"result_parsing": {
"parser_arg": [
"0",
"blockID"
],
"parser_func": "PARSE_CANONICAL"
},
"api_name": "/wallet/getblockbynum"
},
{
"function_template": "/wallet/getnowblock",
"function_tag": "GET_BLOCKNUM",
"result_parsing": {
"parser_arg": [
"0",
"block_header",
"raw_data",
"number"
],
"parser_func": "PARSE_CANONICAL"
},
"api_name": "/wallet/getnowblock"
}
],
"verifications": [
{
"name": "chain-id",
"parse_directive": {
"function_template": "{\"num\":0}",
"function_tag": "VERIFICATION",
"result_parsing": {
"parser_arg": [
"0",
"blockID"
],
"parser_func": "PARSE_CANONICAL"
},
"api_name": "/wallet/getblockbynum"
},
"values": [
{
"expected_value": "00000000000000001ebf88508a03865c71d452e25f4d51194196a1d22b6653dc"
}
]
}

],
"extensions": []
}
]
},
{
"index": "TRXT",
"name": "tron shasta testnet",
"enabled": true,
"reliability_threshold": 268435455,
"data_reliability_enabled": true,
"block_distance_for_finalized_data": 4,
"blocks_in_finalization_proof": 3,
"average_block_time": 3000,
"allowed_block_lag_for_qos_sync": 5,
"imports": [
"TRX"
],
"shares": 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000"
},
"api_collections": [
{
"enabled": true,
"collection_data": {
"api_interface": "rest",
"internal_path": "",
"type": "GET",
"add_on": ""
},
"apis": []
},
{
"enabled": true,
"collection_data": {
"api_interface": "rest",
"internal_path": "",
"type": "POST",
"add_on": ""
},
"apis": [],
"headers": [],
"inheritance_apis": [],
"parse_directives": [
{
"function_tag": "GET_BLOCK_BY_NUM",
"function_template": "{\"num\":%d}",
"result_parsing": {
"parser_arg": [
"0",
"blockID"
],
"parser_func": "PARSE_CANONICAL"
},
"api_name": "/wallet/getblockbynum"
},
{
"function_template": "/wallet/getnowblock",
"function_tag": "GET_BLOCKNUM",
"result_parsing": {
"parser_arg": [
"0",
"block_header",
"raw_data",
"number"
],
"parser_func": "PARSE_CANONICAL"
},
"api_name": "/wallet/getnowblock"
}
],
"verifications": [
{
"name": "chain-id",
"values": [
{
"expected_value": "0000000000000000de1aa88295e1fcf982742f773e0419c5a9c134c994a9059e"
}
]
}
],
"extensions": []
}
]
}
]
},
"deposit": "10000000ulava"
}

0 comments on commit 1225fb3

Please sign in to comment.