Skip to content

Commit

Permalink
add verifying paymaster deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ququzone committed Oct 10, 2023
1 parent 7f06894 commit 4a1bc08
Show file tree
Hide file tree
Showing 2 changed files with 653 additions and 0 deletions.
30 changes: 30 additions & 0 deletions deploy/paymaster.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { ethers } from 'hardhat'
import { DeployFunction } from 'hardhat-deploy/types'
import { HardhatRuntimeEnvironment } from 'hardhat/types'
import { addresses } from '../src/config'

const deploy: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts, network } = hre
const { deployer } = await getNamedAccounts()
const { deploy } = deployments

let entryPointAddr = ''
if (network.name == 'dev') {
const entryPoint = await ethers.getContract('EntryPoint')
entryPointAddr = entryPoint.address
} else {
// @ts-ignore
entryPointAddr = addresses[network.name].entrypoint
}

await deploy('VerifyingPaymaster', {
from: deployer,
args: [entryPointAddr, deployer],
log: true,
deterministicDeployment: false,
})
}

deploy.tags = ['paymaster']
deploy.dependencies = ['core']
export default deploy
Loading

0 comments on commit 4a1bc08

Please sign in to comment.