Skip to content

Commit

Permalink
feat: Exectuor
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 committed Apr 20, 2024
1 parent 0e281d6 commit 9d44ad9
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions packages/bsc-cross-sdk/tests/executor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ import { UInt64Value } from '@bnb-chain/greenfield-cosmos-types/greenfield/commo
import { VisibilityType } from '@bnb-chain/greenfield-cosmos-types/greenfield/storage/common';
import { Long } from '@bnb-chain/greenfield-cosmos-types/helpers';
import { describe, expect, test } from '@jest/globals';
import { privateKeyToAccount } from 'viem/accounts';
import { Account, privateKeyToAccount } from 'viem/accounts';
import CrossChainClient from '../src/cross-chain';
import ExecutorClient from '../src/executor';
import ExecutorMsg from '../src/executor/messages';
import { ACCOUNT_PRIVATEKEY, CrossChainAddress, ExecutorAddress } from './env';

const account = privateKeyToAccount(ACCOUNT_PRIVATEKEY);

const crossChainClient = new CrossChainClient(CrossChainAddress);
import ExecutorMsg from '../src/executor/message';

describe('executor', () => {
const executorClient = new ExecutorClient(ACCOUNT_PRIVATEKEY, ExecutorAddress);
let account: Account;
let crossChainClient: CrossChainClient;
let executorClient: ExecutorClient;

beforeEach(() => {
account = privateKeyToAccount(ACCOUNT_PRIVATEKEY);
crossChainClient = new CrossChainClient(CrossChainAddress);
executorClient = new ExecutorClient(ACCOUNT_PRIVATEKEY, ExecutorAddress);
});

test('deposit', async () => {
const { relayFee } = await crossChainClient.getRelayFee();
Expand Down Expand Up @@ -50,7 +54,7 @@ describe('executor', () => {
const { relayFee } = await crossChainClient.getRelayFee();

const params = ExecutorMsg.getUpdateBucketInfoParams({
bucketName: 'test',
bucketName: 'stplfiijom',
operator: account.address,
paymentAddress: account.address,
visibility: VisibilityType.VISIBILITY_TYPE_PRIVATE,
Expand Down

0 comments on commit 9d44ad9

Please sign in to comment.