graph LR
Start(["`Start`"])
1["`<strong>set</strong><br>config`"]
5["`<strong>chainKit</strong><br>decode transfer event amount`"]
2["`<strong>chainKit</strong><br>get from token balance`"]
3["`<strong>liquidityHub</strong><br>swap on pancake`"]
7["`<strong>liquidityHub</strong><br>swap token back on pancake`"]
8["`<strong>chainKit</strong><br>sign swap transaction on back`"]
4["`<strong>chainKit</strong><br>sign swap transaction`"]
6["`<strong>set</strong><br>get to token balance`"]
Start ---> 1
1 ---> 2
5 ---> 6
2 ---> 3
3 ---> 4
7 ---> 8
4 ---> 5
6 ---> 7
Automated bidirectional token swapping workflow that swaps from any token to another and back on PancakeSwap V3, with transaction signing and automatic amount extraction from transfer events
This workflow is designed for DeFi users who want to automate bidirectional token swaps on PancakeSwap V3. It's ideal for users who need to swap tokens programmatically and want to execute a round-trip swap (swap from Token A to Token B, then swap back from Token B to Token A) with transaction verification.
Manual bidirectional token swapping requires multiple steps: checking balances, initiating swaps in both directions, signing transactions, and verifying results. This workflow automates:
ChainKit - Get Token Balance: Reads ERC20 token balance for ownerAddress on chainType
LiquidityHub - Swap tokens: Swaps fromToken to toToken on PancakeSwap V3 over chainType using accountAddress and amountIn (optional slippageBps, fee, recipient, deadline)
ChainKit - Sign Transaction: Signs transactions using chainType, from, to, value, data, gas, gasPrice, and nonce extracted from swap transactions
ChainKit - Decode Transfer Event: Decodes ERC20 Transfer events from a transaction hash on chainType to extract actual swap amounts
Set - Get To Token Balance: Extracts the toToken amount from decoded transfer events using dynamic token address from config
Tip: This executable workflow was automatically generated by SeamFlux Bot. To use it, create an execution and test it with your data to ensure it meets your needs.
Ready to get started?
to run this template or create a scheduled task, and ask AI about detailed node execution steps.
Run Locally — download this workflow as a ZIP or run it via Seamflux CLI in your terminal; use the "Run Locally" button above to choose.
Build a workflow from scratch using AI chat. No complex parameter configuration or flowchart dragging needed.