Skip to content

Commit

Permalink
added all util files to utils folder
Browse files Browse the repository at this point in the history
  • Loading branch information
freemanzMrojo committed Aug 25, 2024
1 parent bd17c76 commit a3f689d
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 35 deletions.
22 changes: 11 additions & 11 deletions src/AASigner.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { BigNumber, Bytes, ethers, Event, Signer } from 'ethers'
import { zeroAddress } from 'ethereumjs-util'
import { BaseProvider, Provider, TransactionRequest } from '@ethersproject/providers'
import { TransactionResponse } from '@ethersproject/abstract-provider'
import { TransactionReceipt } from '@ethersproject/abstract-provider/src.ts/index'
import { BytesLike, hexValue } from '@ethersproject/bytes'
import { Deferrable, resolveProperties } from '@ethersproject/properties'
import { BaseProvider, Provider, TransactionRequest } from '@ethersproject/providers'
import { zeroAddress } from 'ethereumjs-util'
import { BigNumber, Bytes, ethers, Event, Signer } from 'ethers'
import { getCreate2Address, hexConcat, Interface, keccak256 } from 'ethers/lib/utils'
import { clearInterval } from 'timers'
import { HashZero } from '../test/utils/testutils'
import { fillAndSign, getUserOpHash } from '../test/utils/UserOp'
import { UserOperation } from '../test/utils/UserOperation'
import {
EntryPoint,
EntryPoint__factory,
ERC1967Proxy__factory,
SimpleAccount,
SimpleAccount__factory
} from '../typechain'
import { BytesLike, hexValue } from '@ethersproject/bytes'
import { TransactionResponse } from '@ethersproject/abstract-provider'
import { fillAndSign, getUserOpHash } from '../test/UserOp'
import { UserOperation } from '../test/UserOperation'
import { TransactionReceipt } from '@ethersproject/abstract-provider/src.ts/index'
import { clearInterval } from 'timers'
import { Create2Factory } from './Create2Factory'
import { getCreate2Address, hexConcat, Interface, keccak256 } from 'ethers/lib/utils'
import { HashZero } from '../test/testutils'

export type SendUserOp = (userOp: UserOperation) => Promise<TransactionResponse | undefined>

Expand Down
12 changes: 6 additions & 6 deletions src/runop.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// run a single op
// "yarn run runop [--network ...]"

import { TransactionReceipt } from '@ethersproject/abstract-provider/src.ts/index'
import { providers } from 'ethers'
import { parseEther } from 'ethers/lib/utils'
import hre, { ethers } from 'hardhat'
import { objdump } from '../test/testutils'
import '../test/utils/aa.init'
import { objdump } from '../test/utils/testutils'
import { EntryPoint__factory, TestCounter__factory } from '../typechain'
import { AASigner, localUserOpSender, rpcUserOpSender } from './AASigner'
import { TestCounter__factory, EntryPoint__factory } from '../typechain'
import '../test/aa.init'
import { parseEther } from 'ethers/lib/utils'
import { providers } from 'ethers'
import { TransactionReceipt } from '@ethersproject/abstract-provider/src.ts/index';

// eslint-disable-next-line @typescript-eslint/no-floating-promises
(async () => {
Expand Down
4 changes: 2 additions & 2 deletions test/shard1/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { BigNumber } from 'ethers'
import { hexlify } from 'ethers/lib/utils'
import { ethers } from 'hardhat'
import { TestHelpers } from '../../typechain'
import '../aa.init'
import { AddressZero } from '../testutils'
import '../utils/aa.init'
import { AddressZero } from '../utils/testutils'

describe('Helpers', function () {
function pack (addr: string, validUntil: number, validAfter: number): BigNumber {
Expand Down
8 changes: 4 additions & 4 deletions test/shard1/paymaster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
TokenPaymaster,
TokenPaymaster__factory
} from '../../typechain'
import config from '../config'
import config from '../utils/config'
import {
AddressZero,
calcGasUsage,
Expand All @@ -26,9 +26,9 @@ import {
getTokenBalance,
ONE_ETH,
rethrow
} from '../testutils'
import { fillAndSign } from '../UserOp'
import { UserOperation } from '../UserOperation'
} from '../utils/testutils'
import { fillAndSign } from '../utils/UserOp'
import { UserOperation } from '../utils/UserOperation'

const TokenPaymasterT = artifacts.require('TokenPaymaster')
const TestCounterT = artifacts.require('TestCounter')
Expand Down
6 changes: 3 additions & 3 deletions test/shard1/simple-wallet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import {
getBalance,
getVeChainChainId,
isDeployed
} from '../testutils'
import { fillUserOpDefaults, getUserOpHash, packUserOp, signUserOp } from '../UserOp'
import { UserOperation } from '../UserOperation'
} from '../utils/testutils'
import { fillUserOpDefaults, getUserOpHash, packUserOp, signUserOp } from '../utils/UserOp'
import { UserOperation } from '../utils/UserOperation'

const SimpleAccountT = artifacts.require('SimpleAccount')

Expand Down
12 changes: 6 additions & 6 deletions test/shard2/entrypoint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import {
DefaultsForUserOp,
fillAndSign,
getUserOpHash
} from '../UserOp'
import { UserOperation } from '../UserOperation'
import { debugTracers } from '../_debugTx'
import '../aa.init'
import config from '../config'
} from '../utils/UserOp'
import { UserOperation } from '../utils/UserOperation'
import { debugTracers } from '../utils/_debugTx'
import '../utils/aa.init'
import config from '../utils/config'
import {
AddressZero,
HashZero,
Expand All @@ -57,7 +57,7 @@ import {
simulationResultCatch,
simulationResultWithAggregationCatch,
tostr
} from '../testutils'
} from '../utils/testutils'

const TestCounterT = artifacts.require('TestCounter')
const TestSignatureAggregatorT = artifacts.require('TestSignatureAggregator')
Expand Down
4 changes: 2 additions & 2 deletions test/UserOp.ts → test/utils/UserOp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
hexDataSlice,
keccak256
} from 'ethers/lib/utils'
import { Create2Factory } from '../src/Create2Factory'
import { Create2Factory } from '../../src/Create2Factory'
import {
EntryPoint
} from '../typechain'
} from '../../typechain'
import { AddressZero, callDataCost, getVeChainChainId, rethrow } from './testutils'
import { UserOperation } from './UserOperation'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/testutils.ts → test/utils/testutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SimpleAccount,
SimpleAccountFactory,
SimpleAccount__factory, TestAggregatedAccountFactory
} from '../typechain'
} from '../../typechain'
import config from './config'

import { BytesLike } from '@ethersproject/bytes'
Expand Down

0 comments on commit a3f689d

Please sign in to comment.