Skip to content

Commit

Permalink
fix: remove eslint disable lines
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiendan committed Dec 28, 2023
1 parent 1c332c4 commit 7357ece
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
31 changes: 13 additions & 18 deletions test/topos-core/ToposMessaging.test.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
import { EventLog, keccak256, Provider, Signer, Wallet } from 'ethers'
import { deployContractConstant } from '../../scripts/const-addr-deployer'
import { ethers, network } from 'hardhat'
import { expect } from 'chai'
import { getReceiptMptProof } from './shared/utils/mpt_proof'
import {
loadFixture,
takeSnapshot,
} from '@nomicfoundation/hardhat-network-helpers'

import * as cc from './shared/constants/certificates'
import * as tc from './shared/constants/tokens'
import * as txc from './shared/constants/transactions'
import * as testUtils from './shared/utils/common'
import { expect } from 'chai'
import { EventLog, keccak256, Provider, Signer, Wallet } from 'ethers'
import { ethers, network } from 'hardhat'

import * as tokenDeployerJSON from '../../artifacts/contracts/topos-core/TokenDeployer.sol/TokenDeployer.json'
import { deployContractConstant } from '../../scripts/const-addr-deployer'
import {
ConstAddressDeployer__factory,
ERC20__factory,
Expand All @@ -22,6 +16,11 @@ import {
ERC20Messaging__factory,
ERC20Messaging,
} from '../../typechain-types'
import * as cc from './shared/constants/certificates'
import * as testUtils from './shared/utils/common'
import { getReceiptMptProof } from './shared/utils/mpt_proof'
import * as tc from './shared/constants/tokens'
import * as txc from './shared/constants/transactions'

describe('ToposMessaging', () => {
async function deployERC20MessagingFixture() {
Expand Down Expand Up @@ -229,8 +228,7 @@ describe('ToposMessaging', () => {

const { proofBlob, receiptsRoot } = await getReceiptMptProof(
sendToken,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ethers.provider as any
ethers.provider
)

const certificate = testUtils.encodeCertParam(
Expand Down Expand Up @@ -514,8 +512,7 @@ describe('ToposMessaging', () => {

const { proofBlob, receiptsRoot } = await getReceiptMptProof(
sendToken,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ethers.provider as any
ethers.provider
)
const certificate = testUtils.encodeCertParam(
cc.PREV_CERT_ID_0,
Expand Down Expand Up @@ -564,8 +561,7 @@ describe('ToposMessaging', () => {

const { proofBlob, receiptsRoot } = await getReceiptMptProof(
sendToken,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ethers.provider as any
ethers.provider
)

const certificate = testUtils.encodeCertParam(
Expand Down Expand Up @@ -739,8 +735,7 @@ describe('ToposMessaging', () => {

const { proofBlob, receiptsRoot } = await getReceiptMptProof(
sendToken,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ethers.provider as any
ethers.provider
)
return { erc20, proofBlob, receiptsRoot }
}
Expand Down
5 changes: 3 additions & 2 deletions test/topos-core/shared/utils/mpt_proof.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Block, hexlify, JsonRpcProvider, TransactionResponse } from 'ethers'
import { RLP } from '@ethereumjs/rlp'
import { Trie } from '@ethereumjs/trie'
import { HardhatEthersProvider } from '@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider'
import { Block, hexlify, TransactionResponse } from 'ethers'

export async function getReceiptMptProof(
tx: TransactionResponse,
provider: JsonRpcProvider
provider: HardhatEthersProvider
) {
const prefetchTxs = true
const block = await provider.getBlock(tx.blockHash!, prefetchTxs)
Expand Down

0 comments on commit 7357ece

Please sign in to comment.