Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFan1992 committed Feb 4, 2025
1 parent 3bf6b44 commit b4b6b44
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 24 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ jobs:
with:
deno-version: '1.36.2'

# - name: start-anvil
# run: anvil --chain-id 1337 &

# 'integration' are the Jest tests that cover code in unit-testing way, so both are included
- name: Run unit tests
run: npm run test:ci
Expand Down
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Overrides, Contract, providers } from 'ethers'
import { Anvil } from '@viem/anvil'
// import type { Server } from 'ganache'

export enum Location {
Inline = 0,
Expand Down
2 changes: 1 addition & 1 deletion test/unit/simulateScript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ describe('simulateScript', () => {

const expected = {
capturedTerminalOutput: '',
errorString: 'Requires read access to "test.txt", run again with the --allow-read flag',
errorString: 'attempted access to blocked resource detected',
}

expect(result).toEqual(expected)
Expand Down
20 changes: 1 addition & 19 deletions test/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Wallet, providers, ContractFactory, utils } from 'ethers'
import type { GetFunds } from '../../src'

import type { Contract } from 'ethers'
// import type { Server } from 'ganache'

export const setupLocalTestnetFixture = async (
port: number,
Expand All @@ -28,13 +27,6 @@ export const setupLocalTestnetFixture = async (
}> => {
const localFunctionsTestnet = await startLocalFunctionsTestnet(
path.join(__dirname, 'testSimulationConfig.ts'),
// {
// logging: {
// debug: false,
// verbose: false,
// quiet: true,
// },
// },
port,
)

Expand All @@ -53,10 +45,7 @@ export const setupLocalTestnetFixture = async (
)

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [_admin, user_A, user_B_NoLINK, subFunder, _] = createTestWallets(
// localFunctionsTestnet.server,
port,
)
const [_admin, user_A, user_B_NoLINK, subFunder, _] = createTestWallets(port)

const juelsAmount = BigInt(utils.parseUnits('100', 'ether').toString())
await localFunctionsTestnet.getFunds(user_A.address, {
Expand All @@ -83,16 +72,9 @@ export const setupLocalTestnetFixture = async (
}

const createTestWallets = (port = 8545): Wallet[] => {
// const accounts = server.provider.getInitialAccounts()

const wallets: Wallet[] = []
const provider = new providers.JsonRpcProvider(`http://127.0.0.1:${port}`)

// for (let i = 0; i < 4; i++) {
// const randomWallet = Wallet.createRandom().connect(provider)
// wallets.push(Wallet.createRandom().connect(provider))
// }

// these are random private keys provided by anvil
wallets.push(
new Wallet('59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d').connect(
Expand Down

0 comments on commit b4b6b44

Please sign in to comment.