Conversation
|
|
||
| MODULES[]=tron-main | ||
| MODULE_tron-main_CLASS=TronMainModule | ||
| MODULE_tron-main_NODES[]=http://login:password@127.0.0.1:1234/ |
There was a problem hiding this comment.
@Har01d please make sure that your nodes are behind proxy with the following rules:
/is proxied to node's/jsonrpcpath/wallet/is proxied to node's/wallet/path
There was a problem hiding this comment.
If it is necessary to use different paths to API, perhaps, it is better to use different environmental variables:
MODULE_tron-main_JSONRPC[] = http://login:password@127.0.0.1:1234/jsonrpc/
MODULE_tron-main_WALLET[] = http://login:password@127.0.0.1:1234/wallet/
And use in code:
$tron_jsonrpc = envm($this->module, 'JSONRPC');
$info = requester_single($tron_jsonrpc, params: ['jsonrpc' => '2.0', 'method' => 'eth_blockNumber', 'id' => 0], result_in: 'result', timeout: $this->timeout);There was a problem hiding this comment.
Sounds reasonable, but @Har01d what do you think if I create additional class atribute in order to not duplicate $tron_jsonrpc = envm($this->module, 'JSONRPC'); in every invocation of jsonrpc endpoint?
Har01d
left a comment
There was a problem hiding this comment.
TRON has been running in production for a while (https://3xpl.com/tron) and the database has been fully synced.
This PR adds full Tron support:
Pay attention that main module works correctly only with the following PR, as it fall backs to geth-like
JSON-RPCfor transaction types with undefined (in module code) processing rules, and as official node returns various currencies invaluefield ofJSON-RPC, that PR must be applied to the node, that is used for the module.I've also added some debug features: processing range of blocks, processing from the latest block down to genesis.