Skip to content

Commit

Permalink
use build artifacts from safe-contracts directly
Browse files Browse the repository at this point in the history
  • Loading branch information
mmv08 committed Mar 6, 2024
1 parent 3f4f4b0 commit c7c79a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/passkey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@noble/curves": "^1.3.0",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"@account-abstraction/contracts": "^0.7.0",
"@safe-global/safe-erc4337": "^0.3.0",
"cbor": "^9.0.2",
"dotenv": "^16.4.5",
"hardhat": "^2.21.0",
Expand All @@ -55,7 +56,6 @@
}
},
"dependencies": {
"@safe-global/safe-erc4337": "^0.3.0",
"@safe-global/safe-contracts": "^1.4.1-build.0"
}
}
11 changes: 6 additions & 5 deletions modules/passkey/test/4337-e2e/WebAuthnSigner.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect } from 'chai'
import SafeL2 from '@safe-global/safe-contracts/build/artifacts/contracts/SafeL2.sol/SafeL2.json'
import { deployments, ethers, network } from 'hardhat'
import { packGasParameters, unpackUserOperation } from '@safe-global/safe-erc4337/dist/src/utils/userOp'
import { bundlerRpc, prepareAccounts, waitForUserOp } from '../utils/e2e'
Expand Down Expand Up @@ -26,11 +27,11 @@ describe('E2E - WebAuthn Signers', () => {
const bundler = bundlerRpc()

const entryPoint = await ethers.getContractAt('IEntryPoint', EntryPoint.address)
const module = await ethers.getContractAt('Safe4337Module', Safe4337Module.address)
const proxyFactory = await ethers.getContractAt('SafeProxyFactory', SafeProxyFactory.address)
const safeModuleSetup = await ethers.getContractAt('SafeModuleSetup', SafeModuleSetup.address)
const module = await ethers.getContractAt(Safe4337Module.abi, Safe4337Module.address)
const proxyFactory = await ethers.getContractAt(SafeProxyFactory.abi, SafeProxyFactory.address)
const safeModuleSetup = await ethers.getContractAt(SafeModuleSetup.abi, SafeModuleSetup.address)
const signerLaunchpad = await ethers.getContractAt('Safe256BitECSignerLaunchpad', Safe256BitECSignerLaunchpad.address)
const singleton = await ethers.getContractAt('SafeL2', SafeL2.address)
const singleton = await ethers.getContractAt(SafeL2.abi, SafeL2.address)
const webAuthnVerifier = await ethers.getContractAt('WebAuthnVerifier', WebAuthnVerifier.address)

const WebAuthnSignerFactory = await ethers.getContractFactory('WebAuthnSignerFactory')
Expand Down Expand Up @@ -231,7 +232,7 @@ describe('E2E - WebAuthn Signers', () => {
const [implementation] = ethers.AbiCoder.defaultAbiCoder().decode(['address'], await ethers.provider.getStorage(safe, 0))
expect(implementation).to.equal(singleton.target)

const safeInstance = await ethers.getContractAt('SafeL2', safe)
const safeInstance = await ethers.getContractAt(SafeL2.abi, safe)
expect(await safeInstance.getOwners()).to.deep.equal([signerAddress])
})
})
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7c79a6

Please sign in to comment.