### MongoDB Configuration File Example Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Example configuration for MongoDB, specifying data and log paths, port, and authentication. ```text dbpath=/home/java-tron/mongodb/data logpath=/home/java-tron/mongodb/log/mongodb.log port=27017 logappend=true fork=true bind_ip=0.0.0.0 auth=true wiredTigerCacheSizeGB=2 ``` -------------------------------- ### Install TronWeb SDK Source: https://developers.tron.network/docs/create-offline-transactions-with-trident-and-tronweb Install the official TRON JavaScript SDK via npm. ```bash npm install tronweb ``` -------------------------------- ### Install Node.js v10+ Source: https://developers.tron.network/docs/build-a-web3-app Verify Node.js installation. Ensure version 10 or higher is installed. ```shell # node -v v10.24.1 ``` -------------------------------- ### Download and Install MongoDB Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Installs MongoDB version 4.0.4 and sets up environment variables for its use. ```shell #1、Download and install MongoDB cd /home/java-tron curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.4.tgz tar zxvf mongodb-linux-x86_64-4.0.4.tgz mv mongodb-linux-x86_64-4.0.4 mongodb #2、Set environmentvariable export MONGOPATH=/home/java-tron/mongodb/ export PATH=$PATH:$MONGOPATH/bin #3、Create mongodb configuration file mkdir -p /home/java-tron/mongodb/{log,data} cd /home/java-tron/mongodb/log/ && touch mongodb.log && cd vim mgdb.conf ``` -------------------------------- ### Start Kafka Services Source: https://developers.tron.network/docs/event-plugin-deployment-kafka Commands to start the ZooKeeper and Kafka broker services. ```Java cd /usr/local/kafka_2.13-2.8.0 // start the ZooKeeper service $ bin/zookeeper-server-start.sh config/zookeeper.properties & // start the Kafka broker service $ bin/kafka-server-start.sh config/server.properties & ``` -------------------------------- ### Start FullNode and Verify Event Plugin Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Starts the java-tron full node with the '--es' flag to enable event subscription and verifies the event plugin loading by tailing the log. ```shell #1, Start Fullnode Java -jar FullNode.jar -c config.conf --es #Note: Start mongodb before starting the whole node. #Fullnode installation reference: https://github.com/tronprotocol/java-tron/blob/develop/build.md #2, Verify Plugin Loading Tail -f logs/tron.log |grep -i eventplugin # appears below the word is successful #o.t.c.l.EventPluginLoader 'your plugin path/plugin-kafka-1.0.0.zip' loaded ``` -------------------------------- ### Install Kafka Source: https://developers.tron.network/docs/event-plugin-deployment-kafka Download and extract the Kafka distribution on Linux. ```Java cd /usr/local wget https://downloads.apache.org/kafka/2.8.0/kafka_2.13-2.8.0.tgz $ tar -xzf kafka_2.13-2.8.0.tgz ``` -------------------------------- ### Start Block-Producing FullNode Source: https://developers.tron.network/docs/deploy-the-fullnode-or-supernode Command to start a TRON FullNode configured for block production. Includes the '--witness' parameter and specifies the configuration file. ```shell java -Xmx24g -XX:+UseConcMarkSweepGC -jar FullNode.jar --witness -c config.conf ``` -------------------------------- ### Start FullNode with Event Service Source: https://developers.tron.network/docs/event-subscription Start the FullNode with the necessary configuration to enable the event service. The '--es' flag is used to activate the event service. ```bash java -jar FullNode.jar -c config.conf --es ``` -------------------------------- ### Configure Event Topics Source: https://developers.tron.network/docs/event-plugin-deployment-kafka Example configuration for subscribing to block events. ```Shell topics = [ { triggerName = "block" // block trigger, the value can't be modified enable = true topic = "block" // plugin topic, the value could be modified } ] ``` -------------------------------- ### Start Mainnet FullNode Source: https://developers.tron.network/docs/deploy-the-fullnode-or-supernode Command to start a TRON Mainnet FullNode using the default configuration file. Specifies JVM heap size and garbage collection settings. ```shell java -Xmx24g -XX:+UseConcMarkSweepGC -jar FullNode.jar -c config.conf ``` -------------------------------- ### Solidity View Function Example Source: https://developers.tron.network/docs/smart-contract-language Use view functions to query contract state without modifying it. This example shows how to read an account's balance. ```solidity function balanceOf(address _owner) public view returns (uint256 _balance) { return ownerPizzaCount[_owner]; } ``` -------------------------------- ### Example Event Subscription Message Source: https://developers.tron.network/docs/event-plugin-deployment-kafka This is an example of a JSON message received when an event subscription is successful. ```json { "timeStamp": 1539973125000, "triggerName": "blockTrigger", "blockNumber": 3341315, "blockHash": "000000000032fc03440362c3d42eb05e79e8a1aef77fe31c7879d23a750f2a31", "transactionSize": 16, "latestSolidifiedBlockNumber": 3341297, "transactionList": ["8757f846e541b51b5692a2370327f4b8031125f4557f8ad4b1037d4452616d39", "f6adab7814b34e5e756170f93a31a0c3393c5d99eff11e30271916375adc7467", ..., "89bcbcd063a48ef4a5678a033acf5edbb6b17419a3c91eb0479a3c8598774b43"] } ``` -------------------------------- ### Solidity Constructor Function Example Source: https://developers.tron.network/docs/smart-contract-language Constructor functions are executed once during contract deployment to initialize state variables. This example sets the contract owner. ```solidity // Initializes the contract's data, setting the `owner` // to the address of the contract creator. constructor() public { // All smart contracts rely on external transactions to trigger its functions. // `msg` is a global variable that includes relevant data on the given transaction, // such as the address of the sender and the trx value included in the transaction. owner = msg.sender; } ``` -------------------------------- ### Start Full Node with Witness Parameter Source: https://developers.tron.network/docs/advanced-configuration-for-super-representative Launch the node with the --witness flag to enable block production capabilities. ```bash $ java -Xmx24g -XX:+UseConcMarkSweepGC -jar FullNode.jar --witness -c config.conf ``` -------------------------------- ### TRON Event Query Service Configuration Example Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Example configuration for the TRON Event Query Service, detailing MongoDB connection parameters. Ensure strong passwords in production. ```text mongo.host=IP mongo.port=27017 mongo.dbname=eventlog mongo.username=tron mongo.password=${MONGO_PASSWORD} mongo.connectionsPerHost=8 mongo.threadsAllowedToBlockForConnectionMultiplier=4 ``` -------------------------------- ### Download and Install Maven for TRON Event Query Service Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Clones the TRON event query service repository and installs Apache Maven 3.5.4, setting up necessary environment variables. ```shell #1、Download git clone https://github.com/tronprotocol/tron-eventquery.git cd troneventquery #2、Install wget https://mirrors.cnnic.cn/apache/maven/maven-3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz --no-check-certificate tar zxvf apache-maven-3.5.4-bin.tar.gz export M2_HOME=$HOME/maven/apache-maven-3.5.4 export PATH=$PATH:$M2_HOME/bin mvn --version mvn package ``` -------------------------------- ### Block Parameter Example Source: https://developers.tron.network/docs/create-offline-transactions-with-trident-and-tronweb Example structure for block parameters required for offline transactions. Includes reference block details and expiration/timestamp. ```json { "ref_block_bytes": 48732987, "ref_block_hash": "a1b2c3d4e5f6", "expiration": 1743594712000 // Unit: millisecond "timestamp": 1743591112000 } ``` -------------------------------- ### Launch MongoDB and Create Admin Account Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Starts the MongoDB service and creates a root administrator account for authentication. ```shell #4、Launch MongoDB mongod --config ./mgdb.conf & #5、Create admin account: mongo use admin db.createUser({user:"root",pwd:"admin",roles:[{role:"root",db:"admin"}]}) ``` -------------------------------- ### Requesting Testnet Tokens Source: https://developers.tron.network/docs/getting-testnet-tokens-on-tron Examples of how to format token request commands for the TronFAQBot. ```text # Request 5000 TRX on Nile Testnet for address TA5w..yfps !nile TA5w..yfps # Request 5000 USDT on Shasta Testnet for address TA5w..yfps !shasta_usdt TA5w..yfps ``` -------------------------------- ### Sign a Transaction with TronWeb Source: https://developers.tron.network/docs/api-signature-and-broadcast-flow Example of using the TronWeb SDK to sign an unsigned transaction object with a private key. ```shell const signedTxn = await tronWeb.trx.sign(unsignedTxn, privateKey); >{ "signature":[ "8e6582cead9ef92d7731e356b0131dca2dfe18d701bdaecb5591781af5493391127d10b4864cf45a0f56b10ed97af102864cff8205e14c8bf29b0e50d85f681801" ], "txID":"ddcbaf061eaa2454975ae8faefbeb0b410329ef9e5bb43b64d4065a7d66720c7", "raw_data":{ "contract":[ { "parameter":{ "value":{ "resource":"ENERGY", "frozen_duration":3, "frozen_balance":1000000, "owner_address":"41928c9af0651632157ef27a2cf17ca72c575a4d21" }, "type_url":"type.googleapis.com/protocol.FreezeBalanceContract" }, "type":"FreezeBalanceContract" } ], "ref_block_bytes":"ee08", "ref_block_hash":"7b2480cc92edd8a2", "expiration":1540253364000, "timestamp":1540253304828 } } ``` -------------------------------- ### NewBook Event Source: https://developers.tron.network/docs/build-a-web3-app Emitted when a new book is successfully added to the library. Note that book IDs start from 0. ```solidity /** * @dev Emitted when a new book is added to the library. * Note bookId starts from 0. */ event NewBook(uint256 bookId); ``` -------------------------------- ### Install tcmalloc Dependencies Source: https://developers.tron.network/docs/deploy-the-fullnode-or-supernode Commands to install the required tcmalloc library on various Linux distributions. ```bash sudo apt install libgoogle-perftools4 ``` ```bash sudo yum install gperftools-libs ``` -------------------------------- ### Complete Example Dapp Contract Source: https://developers.tron.network/docs/smart-contract-language A complete Solidity contract demonstrating state variables, constructor, view, and update functions. It initializes a dapp name and allows reading and updating it. ```solidity pragma solidity >=0.4.0 <=0.6.0; contract ExampleDapp { string dapp_name; // state variable // Called when the contract is deployed and initializes the value constructor() public { dapp_name = "My Example dapp"; } // Get Function function read_name() public view returns(string) { return dapp_name; } // Set Function function update_name(string value) public { dapp_name = value; } } ``` -------------------------------- ### Initialize Trident ApiWrapper Source: https://developers.tron.network/docs/create-offline-transactions-with-trident-and-tronweb Set up the ApiWrapper with a private key for the desired network. ```java String privateKey = "xxx"; ApiWrapper client = ApiWrapper.ofNile(privateKey); // Choose according to needs: Mainnet (ofMainnet), Shasta testnet (ofShasta) or Nile testnet(ofNile) //Initialize with customized grpc endpoint ApiWrapper client = new ApiWrapper("grpc endpoint", "solidity grpc endpoint", "private_key"); ``` -------------------------------- ### Initialize TronWeb Instance Source: https://developers.tron.network/docs/create-offline-transactions-with-trident-and-tronweb Instantiate the TronWeb object with your full node host and private key. Ensure the fullHost parameter is provided. ```javascript const TronWeb = require('tronweb'); const tronWeb = new TronWeb({ fullHost: fullnode or fullhost parameter, choose either // This field cannot be empty, otherwise initialization will fail privateKey: 'Your private key' }); ``` -------------------------------- ### Configure Historical Event Synchronization Start Block Source: https://developers.tron.network/docs/event-subscription Optionally configure the starting block number for historical event synchronization in the V2.0 framework. Set to 0 or less to disable. ```properties event.subscribe.startSyncBlockNum = ``` -------------------------------- ### Start Node in Query Mode Source: https://developers.tron.network/docs/faq Start the node in query mode by disabling P2P networking. This mode allows API services for querying system state without network participation. ```bash java -jar FullNode.jar -c config.conf --p2p-disable true ``` -------------------------------- ### Optimize Java-tron Startup Parameters Source: https://developers.tron.network/docs/faq Increase memory allocation and configure garbage collection for the java-tron node process. ```bash java -Xmx24g -XX:+UseConcMarkSweepGC -jar FullNode.jar -c ..... ``` -------------------------------- ### Start TRON Event Query Service Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Deploys and starts the TRON Event Query Service using provided shell scripts. The default port is 8080, which can be changed in the deploy.sh script. ```shell #3、Start Tron Event Query Service sh troneventquery/deploy.sh sh troneventquery/insertIndex.sh ``` -------------------------------- ### Create Eventlog Database and User Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Authenticates with the admin account and creates the 'eventlog' database with a dedicated owner account. ```shell #6、Create eventlog and its owner account db.auth("root", "admin") use eventlog db.createUser({user:"tron",pwd:"123456",roles:[{role:"dbOwner",db:"eventlog"}]}) ``` -------------------------------- ### Complete Workflow Demo Source: https://developers.tron.network/docs/create-offline-transactions-with-trident-and-tronweb Demonstrates the end-to-end process of building and signing an offline transaction using the previously defined functions and parameters. ```javascript const params = { fromAddress: 'Base58CheckSender', toAddress: 'Base58CheckReceiver', amount: 888, refBlockParams: { ref_block_bytes: 48732987, ref_block_hash: 'a1b2c3d4e5f6', expiration: 1743594712000, timestamp: 1743591112000 }, privateKey: 'private_key' }; const rawTx = buildOfflineTransaction( params.fromAddress, params.toAddress, params.amount, params.refBlockParams ); const signedTx = signOfflineTransaction(rawTx, params.privateKey); ``` -------------------------------- ### Run the DApp Development Server Source: https://developers.tron.network/docs/build-a-web3-app Execute this command in your terminal to start the DApp development server. Ensure TronLink is logged in before running. ```shell npm run dev ``` -------------------------------- ### GET /blocks/latestSolidifiedBlockNumber Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves the latest solidified block number. ```APIDOC ## GET /blocks/latestSolidifiedBlockNumber ### Description Retrieves the latest solidified block number. ### Method GET ### Endpoint /blocks/latestSolidifiedBlockNumber ### Parameters none ### Request Example ``` http://127.0.0.1:8080/blocks/latestSolidifiedBlockNumber ``` ``` -------------------------------- ### GET /blocks/{hash} Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves a specific block by its hash. ```APIDOC ## GET /blocks/{hash} ### Description Retrieves a specific block by its hash. ### Method GET ### Endpoint /blocks/{hash} ### Parameters #### Path Parameters - **hash** (string) - Required - Block hash ### Request Example ``` http://127.0.0.1:8080/blocks/000000000049c11f15d4e91e988bc950fa9f194d2cb2e04cda76675dbb349009 ``` ``` -------------------------------- ### Create Kafka Subscription Topic Source: https://developers.tron.network/docs/event-plugin-deployment-kafka Use this command to create a Kafka topic for event subscriptions. Ensure the topic name matches your configuration. ```bash bin/kafka-topics.sh --create --topic block --bootstrap-server localhost:9092 ``` -------------------------------- ### Apply to become an SR candidate Source: https://developers.tron.network/docs/becoming-a-super-representative Use the CreateWitness command in wallet-cli to initiate the registration process with a website URL. ```text wallet> CreateWitness www.your-website.com { "raw_data":{ "contract":[ { "parameter":{ "value":{ "owner_address":"TBRmnXKMEVfQ8XeQA2NroC9cGi77TvPbNb", "url":"www.your-website.com" }, "type_url":"type.googleapis.com/protocol.WitnessCreateContract" }, "type":"WitnessCreateContract" } ], "ref_block_bytes":"d140", "ref_block_hash":"fe6d51f5debe3a0d", "expiration":1713428409000, "timestamp":1713428351865 }, "raw_data_hex":"0a02d1402208fe6d51f5debe3a0d40a8d5aa82ef315a67080512630a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5769746e657373437265617465436f6e7472616374122d0a15410ffe4eb0f39afcc431fdb22d77d2263161ea210612147777772e796f75722d7765622d7369742e636f6d70f996a782ef31" } before sign transaction hex string is 0a85010a02d1402208fe6d51f5debe3a0d40a8d5aa82ef315a67080512630a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5769746e657373437265617465436f6e7472616374122d0a15410ffe4eb0f39afcc431fdb22d77d2263161ea210612147777772e796f75722d7765622d7369742e636f6d70f996a782ef31 Please confirm and input your permission id, if input y or Y means default 0, other non-numeric characters will cancel transaction. ``` -------------------------------- ### GET /transfers/{hash} Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves a specific transfer by its hash. ```APIDOC ## GET /transfers/{hash} ### Description Retrieves a specific transfer by its hash. ### Method GET ### Endpoint /transfers/{hash} ### Parameters #### Path Parameters - **hash** (string) - Required - Transfer hash ### Request Example ``` http://127.0.0.1:8080/transfers/70d655a17e04d6b6b7ee5d53e7f37655974f4e71b0edd6bcb311915a151a4700 ``` ``` -------------------------------- ### GET /transactions/{hash} Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves a specific transaction by its hash. ```APIDOC ## GET /transactions/{hash} ### Description Retrieves a specific transaction by its hash. ### Method GET ### Endpoint /transactions/{hash} ### Parameters #### Path Parameters - **hash** (string) - Required - Transaction ID ### Request Example ``` http://127.0.0.1:8080/transactions/9a4f096700672d7420889cd76570ea47bfe9ef815bb2137b0d4c71b3d23309e9 ``` ``` -------------------------------- ### GET /transactions Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves a list of transactions. Supports pagination and sorting. ```APIDOC ## GET /transactions ### Description Retrieves a list of transactions. Supports pagination and sorting. ### Method GET ### Endpoint /transactions ### Parameters #### Query Parameters - **limit** (integer) - Optional - Each page size, default is 25 - **sort** (string) - Optional - Sort Field, default is sort by timeStamp descending order - **start** (integer) - Optional - Start page, default is 1 - **block** (integer) - Optional - Start block number, default is 0 ### Request Example ``` http://127.0.0.1:8080/transactions?limit=1&sort=-timeStamp&start=2&block=0 ``` ``` -------------------------------- ### Delegate Energy via wallet-cli Source: https://developers.tron.network/docs/resource-model Command to initiate a DelegateResourceContract transaction to delegate Energy to another address. ```text wallet> delegateResource 1000000 1 TQ4gjjpAjLNnE67UFbmK5wVt5fzLfyEVs3 ``` -------------------------------- ### GET /gettransactionreceiptbyid Source: https://developers.tron.network/docs/resource-model Queries transaction receipt information, including penalty Energy. ```APIDOC ## GET /gettransactionreceiptbyid ### Description Queries information such as transaction execution results and fees by transaction ID. This includes the total penalty Energy. ### Method GET ### Endpoint /gettransactionreceiptbyid ### Parameters #### Query Parameters - **transactionId** (string) - Required - The ID of the transaction receipt to query. ### Response #### Success Response (200) - **receipt.energy_penalty_total** (number) - The total penalty Energy for the transaction. #### Response Example ```json { "receipt": { "energy_penalty_total": 20000 } } ``` ``` -------------------------------- ### Build the TRON Event Plugin Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Commands to clone the repository and compile the plugin using Gradle. ```shell #Deployment git clone https://github.com/tronprotocol/event-plugin.git cd eventplugin ./gradlew build ``` -------------------------------- ### GET /contractlogs Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves a list of contract logs with pagination and sorting options. ```APIDOC ## GET /contractlogs ### Description Retrieves a list of contract logs. Supports pagination and sorting. ### Method GET ### Endpoint /contractlogs ### Query Parameters - **limit** (integer) - Optional - The number of items per page, defaults to 25. - **sort** (string) - Optional - The field to sort by, defaults to timestamp descending. - **start** (integer) - Optional - The starting page number, defaults to 1. - **block** (integer) - Optional - Filters logs with block numbers greater than or equal to this value. ``` -------------------------------- ### Check CPU Configuration Source: https://developers.tron.network/docs/faq Verify that the machine meets the minimum hardware requirements for node operation by checking CPU cores and siblings. ```bash $cat /proc/cpuinfo | grep -e "cpu cores" -e "siblings" | sort | uniq cpu cores : 8 siblings : 16 ``` -------------------------------- ### GET /events/transaction/{transactionId} Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves events associated with a specific transaction ID. ```APIDOC ## GET /events/transaction/{transactionId} ### Description Retrieves events associated with a specific transaction ID. ### Method GET ### Endpoint /events/transaction/{transactionId} ### Parameters #### Path Parameters - **transactionId** (string) - Required - The ID of the transaction ### Request Example ``` http://127.0.0.1:8080/events/transaction/cd402e64cad7e69c086649401f6427f5852239f41f51a100abfc7beaa8aa0f9c ``` ``` -------------------------------- ### Create TRON Account with wallet-cli Source: https://developers.tron.network/docs/becoming-a-super-representative Use the 'RegisterWallet' command in wallet-cli to create a new TRON account. You will be prompted to set and confirm a password. The private key is saved as a Keystore file. ```bash wallet> RegisterWallet Please input password. password: Please input password again. password: Register a wallet successful, keystore file name is UTC--2024-04-18T07-24-17.307000000Z--TBRmnXKMEVfQ8XeQA2NroC9cGi77TvPbNb.json wallet> ``` -------------------------------- ### GET /gettransactioninfobyid Source: https://developers.tron.network/docs/resource-model Queries transaction information, specifically the penalty Energy associated with a transaction. ```APIDOC ## GET /gettransactioninfobyid ### Description Queries transaction information by its ID. This endpoint returns details including the penalty Energy associated with the transaction. ### Method GET ### Endpoint /gettransactioninfobyid ### Parameters #### Query Parameters - **transactionId** (string) - Required - The ID of the transaction to query. ### Response #### Success Response (200) - **receipt.energy_penalty_total** (number) - The total penalty Energy for the transaction. #### Response Example ```json { "receipt": { "energy_penalty_total": 20000 } } ``` ``` -------------------------------- ### GET /contractlogs/uniqueId/{uniqueId} Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves contract logs associated with a specific unique ID. ```APIDOC ## GET /contractlogs/uniqueId/{uniqueId} ### Description Retrieves a list of contract logs based on a specific unique ID. ### Method GET ### Endpoint /contractlogs/uniqueId/{uniqueId} ### Parameters #### Path Parameters - **uniqueId** (string) - Required - The unique ID. ``` -------------------------------- ### Configure Local Witness Private Key Source: https://developers.tron.network/docs/deploy-the-fullnode-or-supernode Example configuration for the 'localwitness' list in config.conf, specifying the private key for a Super Representative (SR) address. ```properties localwitness = [ 650950B1...295BD812 // Private Key, hex, 64 characters total ] ``` -------------------------------- ### Create TRON Network Proposal Source: https://developers.tron.network/docs/becoming-a-super-representative Use the 'CreateProposal' command in wallet-cli to initiate a proposal for modifying network parameters. Specify the dynamic parameter number and its new value. ```bash wallet> CreateProposal 70 15 ``` ```json { "raw_data":{ "contract":[ { "parameter":{ "value":{ "owner_address":"TBRmnXKMEVfQ8XeQA2NroC9cGi77TvPbNb", "parameters":[ { "value":15, "key":70 } ] }, "type_url":"type.googleapis.com/protocol.ProposalCreateContract" }, "type":"ProposalCreateContract" } ], "ref_block_bytes":"2d3e", "ref_block_hash":"a672a46dfaa0c5dc", "expiration":1713502020000, "timestamp":1713501961789 }, "raw_data_hex":"0a022d3e2208a672a46dfaa0c5dc40a0c3b7a5ef315a58081012540a33747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e50726f706f73616c437265617465436f6e7472616374121d0a15410ffe4eb0f39afcc431fdb22d77d2263161ea210612040846100f70bdfcb3a5ef31" } before sign transaction hex string is 0a022d3e2208a672a46dfaa0c5dc40a0c3b7a5ef315a58081012540a33747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e50726f706f73616c437265617465436f6e7472616374121d0a15410ffe4eb0f39afcc431fdb22d77d2263161ea210612040846100f70bdfcb3a5ef31 ``` -------------------------------- ### GET /contractlogs/contract/{contractAddress} Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves contract logs associated with a specific contract address. ```APIDOC ## GET /contractlogs/contract/{contractAddress} ### Description Retrieves a list of contract logs based on a specific contract address. ### Method GET ### Endpoint /contractlogs/contract/{contractAddress} ### Parameters #### Path Parameters - **contractAddress** (string) - Required - The address of the contract. ``` -------------------------------- ### GET /contractlogs/transaction/{transactionId} Source: https://developers.tron.network/docs/event-plugin-deployment-mongodb Retrieves contract logs associated with a specific transaction ID. ```APIDOC ## GET /contractlogs/transaction/{transactionId} ### Description Retrieves a list of contract logs based on a specific transaction ID. ### Method GET ### Endpoint /contractlogs/transaction/{transactionId} ### Parameters #### Path Parameters - **transactionId** (string) - Required - The ID of the transaction. ```