# How to use the Read and Write Contract tabs on TronScan If you ever need to get data from the contract but our beautiful UI is down or maybe you just want to double check something, the TronScan "read contract" and "write contract" tabs will be your best friend. **This also works as a makeshift backup if the site temporarily goes down.** :exclamation: :point_right: Start by visiting https://tronscan.org/#/contract/TWjkoz18Y48SgWoxEeGG11ezCCzee8wo1A/code and then check out the guide below. :::info Make sure to **divide all large numbers** by `1000000` to get the actual value. ::: ## The Read Contract tab :exclamation: :point_right: Start by visiting https://tronscan.org/#/contract/TWjkoz18Y48SgWoxEeGG11ezCCzee8wo1A/code, selecting "Read Contract" and then check out the guide below. ### Current round information ![currentRoundData](https://i.imgur.com/lBhT8Ka.png) Just press `call` to update the data: 1. Timestamp at which the timer runs out [How to convert a timestamp into a date](#How-to-convert-a-timestamp-into-a-date) 2. Prize money 3. Leader bonus 4. Amount of boxes purchased 5. Amount of boxes opened 6. Total amount of unique users 7. Has the round ended yet? 8. Backing 9. Glitch prize 10. Glitch count 11. The round number 12. Total amount of trons invested You need to divide all the amounts by 1000000 to get the actual amount (Except `endsAt`, `totalParticipants`, `roundNumber`) ### Current unwithdrawn earnings of given user ![](https://i.imgur.com/FR6SdTS.png) Input the current round number and address of the user then press `call` You need to divide this number by 1000000 ### Get player data ![PlayerData](https://i.imgur.com/KMnnPMs.png) Input the address of the desired user and press `call`: 1. Last round the user participated in 2. Referral earnings of the user 3. Dividends Earning 4. Winner earnings 5. Total loyalty points 6. Loyalty points carried over to next round 7. Loyalty points to spend 8. Is auto reinvest active for this user 9. Timestamp of the last interaction with the game [How to convert a timestamp into a date](#How-to-convert-a-timestamp-into-a-date) ## How to use the Write Contract Tab with TronLink :exclamation: :point_right: Start by visiting https://tronscan.org/#/contract/TWjkoz18Y48SgWoxEeGG11ezCCzee8wo1A/code, selecting "Write Contract", and then check out the guide below. ### Buy Boxes 1. Look for `buyTickets` 2. Input the referral name of your choice 3. Input the amount of tron you want to spend (One box = 25 tron) 4. Hit Send ![](https://i.imgur.com/10Ujw0d.png) 5. Confirm the transaction on TronLink ![](https://i.imgur.com/8moMjmB.png) ### Withdraw Earnings 1. Look for `withdrawEarnings` 2. Input the address you want the tron withdrawn to 3. Hit send (*You don't actually send tron but you might have to pay for the transaction fee if you don't have energy left*) ![](https://i.imgur.com/e5i2rsX.png) 4. Confirm the transaction on TronLink ![](https://i.imgur.com/XAEEySy.png) ## How to convert a timestamp into a date ![](https://i.imgur.com/eymvmSn.png) 1. Visit https://www.epochconverter.com/ 2. Input the timestamp 3. Press the button