Skip to content

Commit

Permalink
Add Sourcify Step to 4337 Module Deployment (#441)
Browse files Browse the repository at this point in the history
This PR changes the `deploy-contracts` script to also verifiy the
contracts on Sourcify and not just on Etherscan. This was already done
for the `passkey` package.

I also renamed the task `ts` files to match our `camelCase` standard
that we use for other files in the project.
  • Loading branch information
nlordell authored Jun 17, 2024
1 parent 14a2a1e commit 5b70bcb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
13 changes: 7 additions & 6 deletions modules/4337/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,17 @@ Preparation:
- Set `INFURA_KEY` in `.env`

```bash
pnpm run deploy-all <network>
pnpm run deploy-all $NETWORK
```

This will perform the following steps

```bash
pnpm run build
npx hardhat --network <network> deploy
npx hardhat --network <network> etherscan-verify
npx hardhat --network <network> local-verify
npx hardhat --network $NETWORK deploy
npx hardhat --network $NETWORK local-verify
npx hardhat --network $NETWORK etherscan-verify
npx hardhat --network $NETWORK sourcify
```

### Run script
Expand Down Expand Up @@ -227,13 +228,13 @@ Note: The address will vary if the contract code changes or a different Solidity
This command will use the deployment artifacts to compile the contracts and compare them to the onchain code.

```bash
npx hardhat --network <network> local-verify
npx hardhat --network $NETWORK local-verify
```

This command will upload the contract source to Etherscan.

```bash
npx hardhat --network <network> etherscan-verify
npx hardhat --network $NETWORK etherscan-verify
```

## Documentation
Expand Down
6 changes: 3 additions & 3 deletions modules/4337/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ if (['mainnet', 'sepolia', 'polygon', 'amoy'].includes(argv.network) && INFURA_K
throw new Error(`Could not find Infura key in env, unable to connect to network ${argv.network}`)
}

import './src/tasks/local_verify'
import './src/tasks/deploy_contracts'
import './src/tasks/show_codesize'
import './src/tasks/localVerify'
import './src/tasks/deployContracts'
import './src/tasks/codesize'

const solidityVersion = SOLIDITY_VERSION || '0.8.23'
const soliditySettings = SOLIDITY_SETTINGS
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ task('deploy-contracts', 'Deploys and verifies Safe contracts').setAction(async
await hre.run('deploy')
await hre.run('local-verify')
await hre.run('etherscan-verify', { forceLicense: true, license: 'LGPL-3.0' })
await hre.run('sourcify')
})

export {}
File renamed without changes.

0 comments on commit 5b70bcb

Please sign in to comment.