<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Akinlolu-ojo ayobami on Medium]]></title>
        <description><![CDATA[Stories by Akinlolu-ojo ayobami on Medium]]></description>
        <link>https://medium.com/@akinloluojo1?source=rss-2471ed26c2e9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eZJZCp4O1rUj8cXpXqtq3Q.png</url>
            <title>Stories by Akinlolu-ojo ayobami on Medium</title>
            <link>https://medium.com/@akinloluojo1?source=rss-2471ed26c2e9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 22:06:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akinloluojo1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Outsmarting Crypto Scammers Series 1]]></title>
            <link>https://medium.com/@akinloluojo1/outsmarting-crypto-scammers-series-1-329c08438983?source=rss-2471ed26c2e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/329c08438983</guid>
            <dc:creator><![CDATA[Akinlolu-ojo ayobami]]></dc:creator>
            <pubDate>Thu, 12 Oct 2023 18:50:17 GMT</pubDate>
            <atom:updated>2023-10-13T00:59:20.831Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/0*iQ-Ii-x57hhhyCYh" /></figure><p>Have you ever been scammed?</p><p>Crypto scams are on the rise, affecting investors of all levels. In this series I will be sharing how i outsmarted a Scammer and how anyone can do this even without programming Knowledge !</p><p>Please note that Crypto scams come in various forms, such as phishing attempts, rug pulls, pump-and-dump schemes, and fake tokens. Scammers often target those who are new to the crypto space or even experienced traders who might let their guard down. Understanding the tactics and motivations of these scammers is the first step to outsmarting them.</p><h4><em>The Crypto Scam Encounter:</em></h4><p><em>A brother of mine, who has no prior knowledge of crypto, was almost scammed by a crypto scammer. The scammer told him to invest a certain amount of USDT in a crypto scam investment.</em></p><p><em>The scammer started by sending my him a fake website that looked so real. He told him to register and do the needful. After a while, he was almost convinced with all the tricks. The scammer sent him screenshots of fake results, including a wallet of TRC20 USDT generated for him with a fake amount of money. He was also sent screenshots of fake transaction amounts of money from Binance. However, the scammer covered and blurred out the transaction IDs from the screenshots, perhaps so that he will not be able to check if the transactions were truly complete that was so dump though Lolz.</em></p><p><em>The scammer’s next move was to tell him that he needed to send a certain amount of money for him to be able to get his payout.</em></p><p><em>I’m glad he told me before he went ahead with the transaction. I used the Python TronGrid API to check the scammer’s balance and send him the Scammer account balance. When the Scammer saw the Screenshot which include his TRX and USDT balance He was alarmed and shocked.</em></p><p><em>After some back and forth, he admitted to being a scammer and begged to teach him how to work and be our ally. But Unfortunately we’re not scammers; we’re just safeguarding our territory.</em></p><h3>Step you can take in you get involved:</h3><p><strong>The No— code and easiest Approach:</strong></p><ol><li>Go to the TronScan website: <a href="https://tronscan.org/">https://tronscan.org/</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*p7AKlMxKAB3L81zG_kx8CQ.png" /></figure><p>2. Enter the TRON address you want to check in the search bar at the top of the page. example let us use this address as an example copy it and paste in the Search by token widget and Click the Search button.</p><pre>TMDCtzCUVBHtLQQmZEis1osCQgbVsCELDF</pre><p>Voila !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDf6ydSDItFEBvbuOWCc4A.png" /><figcaption>Result from the <a href="https://tronscan.org/#/address/TMDCtzCUVBHtLQQmZEis1osCQgbVsCELDF">https://tronscan.org/#/address/TMDCtzCUVBHtLQQmZEis1osCQgbVsCELDF</a> as of today of this Article</figcaption></figure><p><strong>Checking TRC20 Token Balance with Python</strong></p><p>we will be using simple TronGrid API (Application Programming interface)</p><p><strong>Step 1: Install Required Libraries</strong></p><p>Begin by installing the required libraries using pip.</p><pre>pip install tronapi requests</pre><p><strong>Step 2: Import Libraries</strong></p><p>Next, import the necessary libraries.</p><pre><br>import requests<br>import base58</pre><p><strong>Step 3: Define TRC20 Contract Details</strong></p><pre>CONTRACT = &quot;TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t&quot;  # TRC20 Contract Address<br>API_URL_BASE = &#39;https://api.trongrid.io/&#39;</pre><p><strong>Step 4: Define Functions</strong></p><p>Now, create functions to check the balance of a TRC20 address. We’ll create separate functions for USDT and TRX balances.</p><pre>def get_usdt_balance(address):<br>    url = API_URL_BASE + &#39;wallet/triggerconstantcontract&#39;<br>    payload = {<br>        &#39;owner_address&#39;: base58.b58decode_check(address).hex(),<br>        &#39;contract_address&#39;: base58.b58decode_check(CONTRACT).hex(),<br>        &#39;function_selector&#39;: &#39;balanceOf(address)&#39;,<br>        &#39;parameter&#39;: &#39;000000000000000000000000&#39; + base58.b58decode_check(address)[1:].hex(),<br>    }<br>    resp = requests.post(url, json=payload)<br>    data = resp.json()<br><br>    if data[&#39;result&#39;].get(&#39;result&#39;, None):<br>        hex_balance = data[&#39;constant_result&#39;][0]<br>        int_balance = int(hex_balance, 16)<br>        decimals = 6<br>        float_balance = int_balance / (10 ** decimals)<br><br>        return float_balance<br>    else:<br>        return None<br><br></pre><p>Usage</p><pre>ADDRESS = &#39;TMDCtzCUVBHtLQQmZEis1osCQgbVsCELDF&#39; #This is the Address you want to the account balance<br>balance = get_usdt_balance(address = ADDRESS)<br>print(&quot;Usdt Balance is: &quot;, balance)</pre><p>Result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*4hckOrHymsASWejh8hqzKw.png" /><figcaption>The result when you run balance = get_usdt_balance(address = ADDRESS)<br>print(“Usdt Balance is: “, balance)</figcaption></figure><p>Checking TRX Balance:</p><pre>def get_trx_balance(address):<br>    url = API_URL_BASE + &#39;wallet/getaccount&#39;<br>    payload = {<br>        &#39;address&#39;: base58.b58decode_check(address).hex(),<br>    }<br>    resp = requests.post(url, json=payload)<br>    data = resp.json()<br><br>    if data.get(&#39;balance&#39;, None):<br>        trx_balance = int(data[&#39;balance&#39;]) / (10 ** 6)<br>        return trx_balance<br>    else:<br>        return None</pre><p>Usage</p><pre>ADDRESS = &#39;TMDCtzCUVBHtLQQmZEis1osCQgbVsCELDF&#39; #This is the Address you want to the account balance<br>trx_balance = get_trx_balance(ADDRESS)<br>print(f&#39;TRX balance of {ADDRESS}: {trx_balance} TRX&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*FyXYQLWGQwOSwvnNjWHIlg.png" /><figcaption>Result</figcaption></figure><p>The Full code</p><pre>import requests<br>import base58<br><br>CONTRACT = &quot;TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t&quot;  # TRC20 Contract Address<br>API_URL_BASE = &#39;https://api.trongrid.io/&#39;<br><br>def get_usdt_balance(address):<br>    url = API_URL_BASE + &#39;wallet/triggerconstantcontract&#39;<br>    payload = {<br>        &#39;owner_address&#39;: base58.b58decode_check(address).hex(),<br>        &#39;contract_address&#39;: base58.b58decode_check(CONTRACT).hex(),<br>        &#39;function_selector&#39;: &#39;balanceOf(address)&#39;,<br>        &#39;parameter&#39;: &#39;000000000000000000000000&#39; + base58.b58decode_check(address)[1:].hex(),<br>    }<br>    resp = requests.post(url, json=payload)<br>    data = resp.json()<br><br>    if data[&#39;result&#39;].get(&#39;result&#39;, None):<br>        hex_balance = data[&#39;constant_result&#39;][0]<br>        int_balance = int(hex_balance, 16)<br>        decimals = 6<br>        float_balance = int_balance / (10 ** decimals)<br><br>        return float_balance<br>    else:<br>        return None<br><br><br>def get_trx_balance(address):<br>    url = API_URL_BASE + &#39;wallet/getaccount&#39;<br>    payload = {<br>        &#39;address&#39;: base58.b58decode_check(address).hex(),<br>    }<br>    resp = requests.post(url, json=payload)<br>    data = resp.json()<br><br>    if data.get(&#39;balance&#39;, None):<br>        trx_balance = int(data[&#39;balance&#39;]) / (10 ** 6)<br>        return trx_balance<br>    else:<br>        return None<br><br><br><br>ADDRESS = &#39;TMDCtzCUVBHtLQQmZEis1osCQgbVsCELDF&#39;  # Replace with the TRC20 address you want to check<br>usdt_balance = get_usdt_balance(ADDRESS)<br>print(f&#39;USDT balance of {ADDRESS}: {usdt_balance} USDT&#39;, current_date)<br><br>trx_balance = get_trx_balance(ADDRESS)<br>print(f&#39;TRX balance of {ADDRESS}: {trx_balance} TRX&#39;, current_date)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*5KEjl24J6Qgk4Up6dEnMXw.png" /><figcaption>Result</figcaption></figure><p>We can add Date and Time as a stamp</p><pre>#We can add the date as additional stamp<br>from datetime import datetime<br>current_date = datetime.now().strftime(&quot;%Y-%m-%d %H:%M:%S&quot;)<br><br>ADDRESS = &#39;TMDCtzCUVBHtLQQmZEis1osCQgbVsCELDF&#39;  # Replace with the TRC20 address you want to check<br>usdt_balance = get_usdt_balance(ADDRESS)<br>print(f&#39;USDT balance of {ADDRESS}: {usdt_balance} USDT&#39;, current_date)<br><br>trx_balance = get_trx_balance(ADDRESS)<br>print(f&#39;TRX balance of {ADDRESS}: {trx_balance} TRX&#39;, current_date)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*O9HFG8WStNI4LhaZPs_Lkg.png" /></figure><p><strong>Conclusion</strong></p><p>The “Outsmarting Crypto Scammers Series” is your go-to resource for staying one step ahead of scammers in the crypto world. By arming yourself with knowledge, you’ll be better equipped to protect your investments on the BSC, BASE, TRC-20 tokens, ETHER, ARBITRUM. Stay tuned for upcoming articles in the series as we dive deeper into these essential topics. Get the full access to the code on <a href="https://github.com/ayobami1/TRX-and-BSC-Balance-Checker/tree/main">Github here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=329c08438983" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>