Use abigen with new flag --contract

This commit is contained in:
maskpp
2023-05-22 14:02:16 +08:00
parent 0bab8f95c1
commit bd2303a4d2
11 changed files with 24 additions and 21 deletions

View File

@@ -1,31 +1,34 @@
.PHONY: all erc20 greeter scroll clean
# TODO: After `feat/upgrade_abigen` branch merged, change to use develop branch again.
abigen="go run github.com/scroll-tech/go-ethereum/cmd/abigen@14a21cc835017ee2c17aaab52c4454b0d49ec7ba"
all: erc20 greeter scroll
erc20:
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol erc20/ERC20Mock.sol --pkg erc20 --out erc20/ERC20Mock.go
abigen --sol erc20/ERC20Mock.sol --pkg erc20 --out erc20/ERC20Mock.go --contract ERC20Mock
greeter:
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./greeter/Greeter.sol --pkg greeter --out ./greeter/Greeter.go
abigen --sol ./greeter/Greeter.sol --pkg greeter --out ./greeter/Greeter.go --contract Greeter
scroll:
#L1/gateways
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol scroll/L1/ethgateway/L1ETHGateway.sol --pkg ethgateway --out scroll/L1/ethgateway/L1ETHGateway.go
abigen --sol scroll/L1/gateways/L1ETHGateway.sol --pkg gateways --out scroll/L1/gateways/L1ETHGateway.go --contract L1ETHGateway
#L1/rollup
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L1/messagequeue/L1MessageQueue.sol --pkg messagequeue --out ./scroll/L1/messagequeue/L1MessageQueue.go
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L1/priceoracle/L2GasPriceOracle.sol --pkg priceoracle --out ./scroll/L1/priceoracle/L2GasPriceOracle.go
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L1/scrollchain/ScrollChain.sol --pkg scrollchain --out ./scroll/L1/scrollchain/ScrollChain.go
abigen --sol ./scroll/L1/rollup/L1MessageQueue.sol --pkg rollup --out ./scroll/L1/rollup/L1MessageQueue.go --contract L1MessageQueue
abigen --sol ./scroll/L1/rollup/L2GasPriceOracle.sol --pkg rollup --out ./scroll/L1/rollup/L2GasPriceOracle.go --contract L2GasPriceOracle
abigen --sol ./scroll/L1/rollup/ScrollChain.sol --pkg rollup --out ./scroll/L1/rollup/ScrollChain.go --contract ScrollChain
#L1
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L1/L1ScrollMessenger.sol --pkg l1 --out ./scroll/L1/L1ScrollMessenger.go
abigen --sol ./scroll/L1/L1ScrollMessenger.sol --pkg l1 --out ./scroll/L1/L1ScrollMessenger.go --contract L1ScrollMessenger
#L2/gateways
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L2/ethgateway/L2ETHGateway.sol --pkg ethgateway --out ./scroll/L2/ethgateway/L2ETHGateway.go
abigen --sol ./scroll/L2/gateways/L2ETHGateway.sol --pkg gateways --out ./scroll/L2/gateways/L2ETHGateway.go --contract L2ETHGateway
#L2/predeploys
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L2/container/L1BlockContainer.sol --pkg container --out ./scroll/L2/container/L1BlockContainer.go
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L2/priceoracle/L1GasPriceOracle.sol --pkg priceoracle --out ./scroll/L2/priceoracle/L1GasPriceOracle.go
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L2/messagequeue/L2MessageQueue.sol --pkg messagequeue --out ./scroll/L2/messagequeue/L2MessageQueue.go
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L2/feevault/L2TxFeeVault.sol --pkg feevault --out ./scroll/L2/feevault/L2TxFeeVault.go
abigen --sol ./scroll/L2/predeploys/L1BlockContainer.sol --pkg predeploys --out ./scroll/L2/predeploys/L1BlockContainer.go --contract L1BlockContainer
abigen --sol ./scroll/L2/predeploys/L1GasPriceOracle.sol --pkg predeploys --out ./scroll/L2/predeploys/L1GasPriceOracle.go --contract L1GasPriceOracle
abigen --sol ./scroll/L2/predeploys/L2MessageQueue.sol --pkg predeploys --out ./scroll/L2/predeploys/L2MessageQueue.go --contract L2MessageQueue
abigen --sol ./scroll/L2/predeploys/L2TxFeeVault.sol --pkg predeploys --out ./scroll/L2/predeploys/L2TxFeeVault.go --contract L2TxFeeVault
#L2
go run github.com/scroll-tech/go-ethereum/cmd/abigen --sol ./scroll/L2/L2ScrollMessenger.sol --pkg l2 --out ./scroll/L2/L2ScrollMessenger.go
abigen --sol ./scroll/L2/L2ScrollMessenger.sol --pkg l2 --out ./scroll/L2/L2ScrollMessenger.go --contract L2ScrollMessenger
clean:
find ./ -type f -name "*.go" | xargs rm -r