File tree 15 files changed +366
-0
lines changed
mainnet/2024-04-12-deployERC20Factory
records/RunERC20FactoryDeploy.s.sol/8453
sepolia/2024-04-10-deploy-ERC20Factory
records/RunERC20FactoryDeploy.s.sol/84532
15 files changed +366
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ To add new incident response scripts:
72
72
73
73
This template is used for deploying the L1 contracts in the OP stack to set up a new network.
74
74
75
+ 1 . Ensure you have followed the instructions above in ` setup `
75
76
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
76
77
1 . Run ` make deps `
77
78
1 . Fill in the ` inputs/deploy-config.json ` and ` inputs/misc-config.json ` files with the input variables for the deployment.
Original file line number Diff line number Diff line change
1
+ OP_COMMIT = e6ef3a900c42c8722e72c2e2314027f85d12ced5
2
+ BASE_CONTRACTS_COMMIT = c8e14388e478471411abb10f3a99ab3bd9206a95
Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
1
+ {}
Original file line number Diff line number Diff line change
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
+
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
1
+ OP_COMMIT = e6ef3a900c42c8722e72c2e2314027f85d12ced5
2
+ BASE_CONTRACTS_COMMIT = c8e14388e478471411abb10f3a99ab3bd9206a95
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
+ ]
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments