-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
315 additions
and
789 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: safe-modules-4337-local-bundler | ||
on: | ||
push: | ||
paths: | ||
- 'packages/4337-local-bundler/**' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: npm | ||
cache-dependency-path: package-lock.json | ||
- run: | | ||
npm ci | ||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,3 @@ | ||
import EntryPoint from '@account-abstraction/contracts/artifacts/EntryPoint.json' | ||
import { DeployFunction } from 'hardhat-deploy/types' | ||
import { deployEntryPoint } from '@safe-global/safe-4337-local-bundler' | ||
|
||
const ENTRY_POINT = process.env.DEPLOYMENT_ENTRY_POINT_ADDRESS | ||
|
||
const deploy: DeployFunction = async ({ deployments, getNamedAccounts, network }) => { | ||
const { deployer } = await getNamedAccounts() | ||
const { deploy } = deployments | ||
|
||
if (network.tags.dev || network.tags.test) { | ||
await deploy('EntryPoint', { | ||
from: deployer, | ||
contract: EntryPoint, | ||
args: [], | ||
log: true, | ||
deterministicDeployment: '0x90d8084deab30c2a37c45e8d47f49f2f7965183cb6990a98943ef94940681de3', | ||
}) | ||
} else if (!ENTRY_POINT) { | ||
throw new Error('DEPLOYMENT_ENTRY_POINT_ADDRESS must be set') | ||
} | ||
} | ||
|
||
deploy.tags = ['entrypoint'] | ||
|
||
export default deploy | ||
export default deployEntryPoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,3 @@ | ||
import MultiSend from '@safe-global/safe-contracts/build/artifacts/contracts/libraries/MultiSend.sol/MultiSend.json' | ||
import SafeProxyFactory from '@safe-global/safe-contracts/build/artifacts/contracts/proxies/SafeProxyFactory.sol/SafeProxyFactory.json' | ||
import SafeL2 from '@safe-global/safe-contracts/build/artifacts/contracts/SafeL2.sol/SafeL2.json' | ||
import { DeployFunction } from 'hardhat-deploy/types' | ||
import { deploySafe } from '@safe-global/safe-4337-local-bundler' | ||
|
||
const deploy: DeployFunction = async ({ deployments, getNamedAccounts, network }) => { | ||
if (!network.tags.safe && !network.tags.test) { | ||
return | ||
} | ||
|
||
const { deployer } = await getNamedAccounts() | ||
const { deploy } = deployments | ||
|
||
await deploy('MultiSend', { | ||
from: deployer, | ||
contract: MultiSend, | ||
args: [], | ||
log: true, | ||
deterministicDeployment: true, | ||
}) | ||
await deploy('SafeL2', { | ||
from: deployer, | ||
contract: SafeL2, | ||
args: [], | ||
log: true, | ||
deterministicDeployment: true, | ||
}) | ||
await deploy('SafeProxyFactory', { | ||
from: deployer, | ||
contract: SafeProxyFactory, | ||
args: [], | ||
log: true, | ||
deterministicDeployment: true, | ||
}) | ||
} | ||
|
||
deploy.tags = ['safe'] | ||
|
||
export default deploy | ||
export default deploySafe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.