Skip to content

Commit 6a00b84

Browse files
authored
deploy latest ERC20MintableFactory v1.9 on sepolia (#154)
* deploy ERC20MintableFactory v1.9 at 0x2E8D2586338c96cCDaF24492295Cb1D5c862E103 on sepolia * verification working * use create2 * mainnet deploy
1 parent bc7e97d commit 6a00b84

File tree

15 files changed

+366
-0
lines changed

15 files changed

+366
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ To add new incident response scripts:
7272

7373
This template is used for deploying the L1 contracts in the OP stack to set up a new network.
7474

75+
1. Ensure you have followed the instructions above in `setup`
7576
1. Specify the commit of [Optimism code](https://github.com/ethereum-optimism/optimism) and [Base contracts code](https://github.com/base-org/contracts) you intend to use in the `.env` file
7677
1. Run `make deps`
7778
1. Fill in the `inputs/deploy-config.json` and `inputs/misc-config.json` files with the input variables for the deployment.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
OP_COMMIT=e6ef3a900c42c8722e72c2e2314027f85d12ced5
2+
BASE_CONTRACTS_COMMIT=c8e14388e478471411abb10f3a99ab3bd9206a95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
include ../../Makefile
2+
include ../.env
3+
include .env
4+
5+
##
6+
# Deploy command
7+
##
8+
.PHONY: deploy
9+
deploy:
10+
forge script RunERC20FactoryDeploy --rpc-url $(L2_RPC_URL) --broadcast
11+
12+
.PHONY: verify
13+
verify:
14+
forge verify-contract 0x6922ac4dbdfedea3a1e5535f12c3171f2b964c91 OptimismMintableERC20Factory \
15+
--watch --chain-id 8453 \
16+
--num-of-optimizations=99999 --retries=1 \
17+
--verifier-url https://api.basescan.org/api
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[profile.default]
2+
src = 'src'
3+
out = 'out'
4+
libs = ['lib']
5+
broadcast = 'records'
6+
fs_permissions = [ {access = "read-write", path = "./"} ]
7+
optimizer = true
8+
optimizer_runs = 999999
9+
solc_version = "0.8.15"
10+
11+
# note 'src/universal=lib/optimism/packages/contracts-bedrock/src/universal' is needed
12+
# for relative paths in optimism repo to work
13+
remappings = [
14+
'@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/',
15+
'@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts',
16+
'@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts',
17+
'@rari-capital/solmate/=lib/solmate/',
18+
'@base-contracts/=lib/base-contracts',
19+
'solady/=lib/solady/src/',
20+
'src/universal=lib/optimism/packages/contracts-bedrock/src/universal'
21+
]
22+

mainnet/2024-04-12-deployERC20Factory/records/RunERC20FactoryDeploy.s.sol/8453/run-1713280196.json

+66
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
// SPDX-License-Identifier: MIT
3+
pragma solidity 0.8.15;
4+
5+
import "forge-std/Script.sol";
6+
import {OptimismMintableERC20Factory} from "@eth-optimism-bedrock/src/universal/OptimismMintableERC20Factory.sol";
7+
8+
contract RunERC20FactoryDeploy is Script {
9+
function run() public {
10+
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
11+
vm.startBroadcast(deployerPrivateKey);
12+
new OptimismMintableERC20Factory{salt: '0xBA5ED'}();
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
OP_COMMIT=e6ef3a900c42c8722e72c2e2314027f85d12ced5
2+
BASE_CONTRACTS_COMMIT=c8e14388e478471411abb10f3a99ab3bd9206a95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
include ../../Makefile
2+
include ../.env
3+
include .env
4+
5+
##
6+
# Deploy command
7+
##
8+
.PHONY: deploy
9+
deploy:
10+
forge script RunERC20FactoryDeploy --rpc-url $(L2_RPC_URL) --broadcast
11+
12+
.PHONY: verify
13+
verify:
14+
forge verify-contract 0x6922ac4dbdfedea3a1e5535f12c3171f2b964c91 OptimismMintableERC20Factory \
15+
--watch --chain-id 84532 \
16+
--num-of-optimizations=99999 --retries=1 \
17+
--verifier-url https://sepolia-api.basescan.org/api

sepolia/2024-04-10-deploy-ERC20Factory/deployed/addresses.json

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[profile.default]
2+
src = 'src'
3+
out = 'out'
4+
libs = ['lib']
5+
broadcast = 'records'
6+
fs_permissions = [ {access = "read-write", path = "./"} ]
7+
optimizer = true
8+
optimizer_runs = 999999
9+
solc_version = "0.8.15"
10+
11+
# note 'src/universal=lib/optimism/packages/contracts-bedrock/src/universal' is needed
12+
# for relative paths in optimism repo to work
13+
remappings = [
14+
'@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/',
15+
'@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts',
16+
'@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts',
17+
'@rari-capital/solmate/=lib/solmate/',
18+
'@base-contracts/=lib/base-contracts',
19+
'solady/=lib/solady/src/',
20+
'src/universal=lib/optimism/packages/contracts-bedrock/src/universal'
21+
]

sepolia/2024-04-10-deploy-ERC20Factory/records/RunERC20FactoryDeploy.s.sol/84532/run-1712769228.json

+61
Large diffs are not rendered by default.

sepolia/2024-04-10-deploy-ERC20Factory/records/RunERC20FactoryDeploy.s.sol/84532/run-1712947267.json

+62
Large diffs are not rendered by default.

sepolia/2024-04-10-deploy-ERC20Factory/records/RunERC20FactoryDeploy.s.sol/84532/run-1713280540.json

+66
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
// SPDX-License-Identifier: MIT
3+
pragma solidity 0.8.15;
4+
5+
import "forge-std/Script.sol";
6+
import {OptimismMintableERC20Factory} from "@eth-optimism-bedrock/src/universal/OptimismMintableERC20Factory.sol";
7+
8+
contract RunERC20FactoryDeploy is Script {
9+
function run() public {
10+
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
11+
vm.startBroadcast(deployerPrivateKey);
12+
new OptimismMintableERC20Factory{salt: '0xBA5ED'}();
13+
}
14+
}

0 commit comments

Comments
 (0)