Skip to content

Commit 613e3bc

Browse files
committed
refactored
1 parent 75382fb commit 613e3bc

File tree

7 files changed

+5
-1974
lines changed

7 files changed

+5
-1974
lines changed

starter-templates/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ They are more comprehensive than **building-blocks**, and can be adapted into yo
6060

6161
8. **Prediction Market**[`./prediction-market`](./prediction-market)
6262
Full prediction market lifecycle example with 3 workflows: market creation, resolution using Chainlink BTC/USD Data Feed, and dispute management via LogTrigger.
63+
64+
9. **Cross Chain Token Aggregator**[`./cross-chain-token-aggregator`](./cross-chain-token-aggregator)
65+
Let users aggregate their tokens received on scattered chains to a single chain by monitoring the Transfer event of ERC-20 compatible token, powered by event-driven CRE workflows, Across and Chainlink CCIP Bridge.
6366

6467
> Each subdirectory includes its own README with template-specific steps and example logs.
6568

starter-templates/cross-chain-token-aggregator/cross-chain-token-aggregator-ts/my-workflow/ethereumOnReceiveToken.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { parseAbi, decodeEventLog } from "viem";
44
import { sendTelegramMessage } from "./telegramMessageService";
55
import { BridgeFactory } from "./bridge/factory"
66
import { getEvmClient } from "./utils/getEvmClient";
7-
import { Uniflow } from "./evm/generated/Uniflow";
87
import { getERC20Decimals, getERC20Allowance } from "./utils/erc20Utils";
98

109
const TRANSFER_EVENT_ABI = parseAbi(["event Transfer(address indexed from, address indexed to, uint256 amount)"]);
@@ -36,10 +35,6 @@ export const ethereumOnReceiveToken = (runtime: Runtime<IConfig>, evmLog: EVMLog
3635
if (allowances < decodedLog.args.amount) {
3736
return { message: "error", error: "Insufficient allowance for config contract" };
3837
}
39-
40-
const uniflowContract = new Uniflow(evmClient, networksConfig['eth'].configContract as `0x${string}`);
41-
const owner = uniflowContract.owner(runtime);
42-
runtime.log(owner);
4338

4439
const tokenAddress = bytesToHex(evmLog.address).toString() as `0x${string}`;
4540
const unichainTokenConfig = runtime.config.networks['eth'].tokenMap[tokenAddress];

0 commit comments

Comments
 (0)