When using the TFT bridge to Binance Chain (BSC), it’s not simple to verify that tokens arrived at the destination wallet. The core reason is that it’s not a regular token transfer, and so it doesn’t show up that way in blockchain explorers.
Instead, the result of using the bridge is a contract call that actually mints wrapped TFT on Binance Chain. The corresponding tokens are vaulted on Stellar, and when the bridge is used in the opposite direction, TFT on Binance Chain are burnt then released on Stellar. So the total number of TFT in circulation is constant throughout these operations.
What we can do instead of looking at token transfers, is to look for the mint events themselves. By parsing together data from a few different sources, we can verify that tokens sent to the bridge address on Stellar indeed arrived at their destination on Binance Chain.
For this tutorial, we’ll use an example transaction found by looking at the transaction history from the bridge wallet. This wallet is used both directions of bridging, so we want to look for an inbound transaction. Here’s an example:
The first thing to do is decode the destination wallet address on Binance Chain, which is contained in the memo we see here on Stellar. It’s encoded in base 64 and we can convert back to the original hex using a tool like this one:
The output is the destination address on Binance chain. Since we usually write hex values with a leading
0x, the full address in the normal format is
The other thing to note is the date and time of the original Stellar transaction. There are sometimes delays on the bridge, but we know that the outbound transaction on Binance chain will always happen after the inbound transaction on Stellar. In this case, we are looking at the most recent transaction on the Stellar side of the bridge, so we can just look for the most recent transaction on the Binance side too.
To do that, we’ll go to the Bitquery explorer for BSC. We’re looking for the token contract for TFT on Binance Chain, which you can find in our documentation:
0x8f0fb159380176d324542b3a7933f0c2fd0c2bbf. On the contract page, click Events:
Then select Mint events (click on the icon under the Event Count column):
And finally arrive at this page:
You can use the date range selector here to look for events in the past. In this case, we’ll just look for the latest one, since that’s what we’re using for our example. Click the transaction link and the copy the transaction hash from the next page:
To get a look into the contract call, we’ll switch over to BscScan at this point for a better view. Search for the transaction hash and then select the event log. We’ll then see the output address and the amount of TFT minted in the data below:
We can see that the address matches the one we decoded from the Stellar memo. As for the tokens amount, we need to account fo the fact that TFT uses 7 decimal places, and move the decimal place by dividing by 1e7 (1x10⁷):
The original transaction on Stellar was for 2600 TFT, and the output after subtracting the 100 TFT bridge fee is 2500 TFT.
Alright, wasn’t that fun? In the world of public blockchains, all data is recorded and accessible, but sometimes it takes a little investigation to find what we’re looking for