This project demonstrates how to send a mock rollback transaction from TON to EVM using the @tonappchain/sdk. It performs a test transfer of Jettons from a TON wallet to a special EVM proxy contract and tracks the transaction on-chain.
index.ts— Main script to send and track a rollback transaction..env— Contains wallet configuration (mnemonic, Jetton address, etc.).package.json— Project dependencies.tsconfig.json— TypeScript compiler settings.
- Node.js v16 or newer
- NPM
- A Jetton token deployed on TON Testnet
- TON testnet wallet mnemonic (optional if using default provided)
-
Clone or download this repository:
git clone https://github.com/EvgenKor/tac-blockscout-rollback.git cd tac-blockscout-rollback -
Install project dependencies:
npm install
This project uses a .env file to configure wallet and token settings.
Example .env file (already included for testing):
TON_WALLET_VERSION="V3R2"
TON_WALLET_MNEMONICS="art tank game enhance acquire ivory rude moral verify cluster typical ill monster bread patient again cute volcano hill seminar mass exile crater floor"
TON_JETTON_ADDRESS="EQDqeTtBiQfpPFSE-XcB1DhUlWRLPPvs6caCuUAXPHQ9Li-W"✅ This mnemonic and jetton is created specifically for public testing and is safe to use for testnet-only experiments.
❗ If you want to use your own TON wallet or jetton, ensure that:
- The wallet has testnet TON for gas.
- It holds Jettons of the specified
TON_JETTON_ADDRESS.- You specify the correct wallet version — one of:
V2R1,V2R2,V3R1,V3R2,V4,V5R1,HIGHLOAD_V3TON_JETTON_ADDRESSpresented in EQ-format
To mint and use your own Jetton on the TON Testnet, use the official TON Jetton Minter:
- Open the link: https://minter.ton.org/?testnet=true
- Connect your testnet wallet.
- Mint a Jetton with any name/symbol.
- Copy the resulting Jetton address.
- Paste it into your
.envunderTON_JETTON_ADDRESS(EQ-prefixed).
npx ts-node index.ts-
Compile TypeScript:
npm run build
-
Run the compiled output:
npm run start
Make sure
.envis correctly set up before running either version.
- Initializes
TacSdkwith TON Testnet. - Retrieves the EVM-side address of the selected TON Jetton.
- Sends a mock cross-chain transaction to an EVM proxy address (
mockWithDefaultError). - Starts tracking the transaction on-chain and prints results.