forked from mantlenetworkio/mantle-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
155 lines (115 loc) · 4.99 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
SHELL := /bin/bash
pkg := bindings
all: version mkdir bindings more
bindings: l1block-bindings \
l1-blocknumber-bindings \
system-config-bindings \
l1-cross-domain-messenger-bindings \
l1-standard-bridge-bindings \
l2-to-l1-message-passer-bindings \
optimism-portal-bindings \
l2-output-oracle-bindings \
gas-price-oracle-bindings \
legacy-message-passer-bindings \
address-manager-bindings \
l2-cross-domain-messenger-bindings \
l2-standard-bridge-bindings \
sequencer-fee-vault-bindings \
optimism-mintable-erc20-factory-bindings \
optimism-mintable-erc20-bindings \
proxy-bindings \
proxy-admin-bindings \
erc20-bindings \
weth9-bindings \
deployer-whitelist-bindings \
l2-erc721-bridge-bindings \
l1-erc721-bridge-bindings \
optimism-mintable-erc721-factory-bindings \
l1-fee-vault-bindings \
basefee-vault-bindings \
legacy-erc20-mnt-bindings \
l1mnt-bindings \
l2eth-bindings \
l1-test-token \
l2-test-token
version:
forge --version
abigen --version
compile:
cd ../packages/contracts-bedrock/ && \
yarn clean && \
npx hardhat compile
system-config-bindings: compile
./gen_bindings.sh contracts/L1/SystemConfig.sol:SystemConfig $(pkg)
l1-cross-domain-messenger-bindings: compile
./gen_bindings.sh contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger $(pkg)
l1-standard-bridge-bindings: compile
./gen_bindings.sh contracts/L1/L1StandardBridge.sol:L1StandardBridge $(pkg)
optimism-portal-bindings: compile
./gen_bindings.sh contracts/L1/OptimismPortal.sol:OptimismPortal $(pkg)
l2-output-oracle-bindings: compile
./gen_bindings.sh contracts/L1/L2OutputOracle.sol:L2OutputOracle $(pkg)
address-manager-bindings: compile
./gen_bindings.sh contracts/legacy/AddressManager.sol:AddressManager $(pkg)
l1block-bindings: compile
./gen_bindings.sh contracts/L2/L1Block.sol:L1Block $(pkg)
l2-to-l1-message-passer-bindings: compile
./gen_bindings.sh contracts/L2/L2ToL1MessagePasser.sol:L2ToL1MessagePasser $(pkg)
gas-price-oracle-bindings: compile
./gen_bindings.sh contracts/L2/GasPriceOracle.sol:GasPriceOracle $(pkg)
l2-cross-domain-messenger-bindings: compile
./gen_bindings.sh contracts/L2/L2CrossDomainMessenger.sol:L2CrossDomainMessenger $(pkg)
l2-standard-bridge-bindings: compile
./gen_bindings.sh contracts/L2/L2StandardBridge.sol:L2StandardBridge $(pkg)
l2-erc721-bridge-bindings:
./gen_bindings.sh contracts/L2/L2ERC721Bridge.sol:L2ERC721Bridge $(pkg)
l1-erc721-bridge-bindings:
./gen_bindings.sh contracts/L1/L1ERC721Bridge.sol:L1ERC721Bridge $(pkg)
optimism-mintable-erc721-factory-bindings:
./gen_bindings.sh contracts/universal/OptimismMintableERC721Factory.sol:OptimismMintableERC721Factory $(pkg)
sequencer-fee-vault-bindings: compile
./gen_bindings.sh contracts/L2/SequencerFeeVault.sol:SequencerFeeVault $(pkg)
basefee-vault-bindings: compile
./gen_bindings.sh contracts/L2/BaseFeeVault.sol:BaseFeeVault $(pkg)
l1-fee-vault-bindings: compile
./gen_bindings.sh contracts/L2/L1FeeVault.sol:L1FeeVault $(pkg)
optimism-mintable-erc20-factory-bindings: compile
./gen_bindings.sh contracts/universal/OptimismMintableERC20Factory.sol:OptimismMintableERC20Factory $(pkg)
optimism-mintable-erc20-bindings: compile
./gen_bindings.sh contracts/universal/OptimismMintableERC20.sol:OptimismMintableERC20 $(pkg)
legacy-erc20-mnt-bindings: compile
./gen_bindings.sh contracts/legacy/LegacyERC20MNT.sol:LegacyERC20MNT $(pkg)
proxy-bindings: compile
./gen_bindings.sh contracts/universal/Proxy.sol:Proxy $(pkg)
proxy-admin-bindings: compile
./gen_bindings.sh contracts/universal/ProxyAdmin.sol:ProxyAdmin $(pkg)
legacy-message-passer-bindings: compile
./gen_bindings.sh contracts/legacy/LegacyMessagePasser.sol:LegacyMessagePasser $(pkg)
erc20-bindings: compile
./gen_bindings.sh node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20 $(pkg)
weth9-bindings: compile
./gen_bindings.sh contracts/vendor/WETH9.sol:WETH9 $(pkg)
deployer-whitelist-bindings: compile
./gen_bindings.sh contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist $(pkg)
l1-blocknumber-bindings: compile
./gen_bindings.sh contracts/legacy/L1BlockNumber.sol:L1BlockNumber $(pkg)
l1mnt-bindings:compile
./gen_bindings.sh contracts/local/TestMantleToken.sol:L1MantleToken $(pkg)
l2eth-bindings:compile
./gen_bindings.sh contracts/L2/BVM_ETH.sol:BVM_ETH $(pkg)
l1-test-token:compile
./gen_bindings.sh contracts/local/L1TestToken.sol:L1TestToken $(pkg)
l2-test-token:compile
./gen_bindings.sh contracts/local/L2TestToken.sol:L2TestToken $(pkg)
more:
go run ./gen/main.go \
-artifacts ../packages/contracts-bedrock/artifacts \
-out ./bindings \
-contracts SystemConfig,OptimismMintableERC20Factory,L2StandardBridge,L1BlockNumber,LegacyMessagePasser,DeployerWhitelist,Proxy,OptimismPortal,L2ToL1MessagePasser,L2CrossDomainMessenger,SequencerFeeVault,L1Block,GasPriceOracle,LegacyERC20MNT,WETH9,GovernanceToken,L1CrossDomainMessenger,L2ERC721Bridge,OptimismMintableERC721Factory,ProxyAdmin,L1MantleToken,BVM_ETH \
-package bindings
mkdir:
mkdir -p bin $(pkg)
clean:
rm -rf bin $(pkg)
test:
go test ./...