Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shunjizhan committed Oct 10, 2024
1 parent b095bf4 commit 395a106
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions packages/eth-rpc-adapter/src/__tests__/subscription.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import { afterAll, beforeAll, beforeEach, describe, it } from 'vitest';
import { expect } from 'chai';
import { parseUnits } from 'ethers/lib/utils';

import { ETH_RPC_URL, ETH_RPC_URL_WS, SubsManager, evmAccounts, getAddrSelector } from './utils';
import { ETH_RPC_URL, ETH_RPC_URL_WS, SubsManager, TRANSFER_EVENT_TOPIC, evmAccounts, getAddrSelector } from './utils';
import { IERC20, IERC20__factory } from './types';

const oneAcaErc20 = parseUnits('1', 12);
const TRANSFER_SELECTOR = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef';

describe('eth subscription', () => {
let deployer: Wallet;
Expand Down Expand Up @@ -41,7 +40,7 @@ describe('eth subscription', () => {
const sub1 = sm.subscribeLogs({});
const sub2 = sm.subscribeLogs({
topics: [
TRANSFER_SELECTOR,
TRANSFER_EVENT_TOPIC,
null,
[userAddrSelector],
],
Expand Down
1 change: 0 additions & 1 deletion packages/eth-rpc-adapter/src/__tests__/utils/consts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const NODE_URL = process.env.ENDPOINT_URL || 'ws://127.0.0.1:9944';
export const KARURA_ETH_RPC_URL = process.env.KARURA_ETH_RPC_URL || 'http://127.0.0.1:8546';
export const ETH_RPC_URL = process.env.ETH_RPC_URL || 'http://127.0.0.1:8545';
export const ETH_RPC_URL_WS = process.env.ETH_RPC_URL_WS || ETH_RPC_URL.replace('http', 'ws');
export const SUBQL_URL = process.env.SUBQL_URL || 'http://127.0.0.1:3001';
Expand Down
2 changes: 0 additions & 2 deletions packages/eth-rpc-adapter/src/__tests__/utils/eth-rpc-apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import axios from 'axios';

import {
ETH_RPC_URL,
KARURA_ETH_RPC_URL,
LogHexified,
} from './consts';
import { JsonRpcError } from '../../server';
Expand All @@ -19,7 +18,6 @@ export const rpcGet =
},
});

/* ---------- local rpc methods ---------- */
export const eth_call = rpcGet('eth_call');
export const eth_blockNumber = rpcGet('eth_blockNumber');
export const eth_getBlockByNumber = rpcGet('eth_getBlockByNumber');
Expand Down

0 comments on commit 395a106

Please sign in to comment.