Skip to content

Commit

Permalink
feat: Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 committed Apr 17, 2024
1 parent ce89547 commit 171d5f7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/bsc-cross-sdk/src/Executor.ts

This file was deleted.

24 changes: 24 additions & 0 deletions packages/bsc-cross-sdk/src/executor/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { createPublicClient, http, parseAbi } from 'viem';
import { bscTestnet } from 'viem/chains';
import { CrossChainABI } from '../../abi/CrossChain.abi';

export default class ExecutorClient {
constructor(
public publicClient = createPublicClient({
chain: bscTestnet,
transport: http(),
}),
) {}

async getRelayFee(address: `0x${string}`) {
const data = await this.publicClient.readContract({
address,
abi: parseAbi(CrossChainABI),
functionName: 'getRelayFees',
});

return data[0];
}

// async execute() {}
}
2 changes: 1 addition & 1 deletion packages/bsc-cross-sdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './Executor';
export * from './executor';

0 comments on commit 171d5f7

Please sign in to comment.