mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-12 15:38:18 -05:00
Compare commits
10 Commits
feat/debug
...
feat/integ
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7efb5a803b | ||
|
|
f0d6590406 | ||
|
|
357fe3cf2c | ||
|
|
d62f9e4f5a | ||
|
|
59a47b3d2f | ||
|
|
a2a8f85107 | ||
|
|
84c76050c2 | ||
|
|
100713c7c0 | ||
|
|
40654cc35c | ||
|
|
d3c5946ddf |
@@ -21,8 +21,8 @@ type MockApp struct {
|
||||
|
||||
mockApps map[utils.MockAppName]docker.AppAPI
|
||||
|
||||
originFile string
|
||||
bridgeFile string
|
||||
originConfigFile string
|
||||
BridgeConfigFile string
|
||||
|
||||
args []string
|
||||
}
|
||||
@@ -32,11 +32,11 @@ func NewBridgeApp(base *docker.App, file string) *MockApp {
|
||||
|
||||
bridgeFile := fmt.Sprintf("/tmp/%d_bridge-config.json", base.Timestamp)
|
||||
bridgeApp := &MockApp{
|
||||
base: base,
|
||||
mockApps: make(map[utils.MockAppName]docker.AppAPI),
|
||||
originFile: file,
|
||||
bridgeFile: bridgeFile,
|
||||
args: []string{"--log.debug", "--config", bridgeFile},
|
||||
base: base,
|
||||
mockApps: make(map[utils.MockAppName]docker.AppAPI),
|
||||
originConfigFile: file,
|
||||
BridgeConfigFile: bridgeFile,
|
||||
args: []string{"--log.debug", "--config", bridgeFile},
|
||||
}
|
||||
if err := bridgeApp.MockConfig(true); err != nil {
|
||||
panic(err)
|
||||
@@ -75,23 +75,40 @@ func (b *MockApp) WaitExit() {
|
||||
// Free stop and release bridge mocked apps.
|
||||
func (b *MockApp) Free() {
|
||||
b.WaitExit()
|
||||
_ = os.Remove(b.bridgeFile)
|
||||
_ = os.Remove(b.BridgeConfigFile)
|
||||
}
|
||||
|
||||
// MockConfig creates a new bridge config.
|
||||
func (b *MockApp) MockConfig(store bool) error {
|
||||
base := b.base
|
||||
// Load origin bridge config file.
|
||||
cfg, err := config.NewConfig(b.originFile)
|
||||
cfg, err := config.NewConfig(b.originConfigFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cfg.L1Config.Endpoint = base.L1gethImg.Endpoint()
|
||||
cfg.L2Config.RelayerConfig.SenderConfig.Endpoint = base.L1gethImg.Endpoint()
|
||||
cfg.L2Config.Endpoint = base.L2gethImg.Endpoint()
|
||||
cfg.L1Config.RelayerConfig.SenderConfig.Endpoint = base.L2gethImg.Endpoint()
|
||||
var (
|
||||
l1Cfg, l2Cfg = cfg.L1Config, cfg.L2Config
|
||||
l1Contracts, l2Contracts = base.L1Contracts, base.L2Contracts
|
||||
)
|
||||
l1Cfg.Confirmations = 0
|
||||
|
||||
// set l1 and l2 chain endpoint.
|
||||
l1Cfg.Endpoint = base.L1gethImg.Endpoint()
|
||||
l2Cfg.RelayerConfig.SenderConfig.Endpoint = base.L1gethImg.Endpoint()
|
||||
l2Cfg.Endpoint = base.L2gethImg.Endpoint()
|
||||
l1Cfg.RelayerConfig.SenderConfig.Endpoint = base.L2gethImg.Endpoint()
|
||||
cfg.DBConfig.DSN = base.DBImg.Endpoint()
|
||||
|
||||
// set l1 scroll contracts addresses.
|
||||
l1Cfg.L1MessageQueueAddress = l1Contracts.L1MessageQueue
|
||||
l1Cfg.ScrollChainContractAddress = l1Contracts.L1WETH
|
||||
l1Cfg.L1MessengerAddress = l1Contracts.L1ScrollMessenger
|
||||
|
||||
// set l2 scroll contracts addresses.
|
||||
l2Cfg.L2MessageQueueAddress = l2Contracts.L2MessageQueue
|
||||
l2Cfg.L2MessengerAddress = l2Contracts.L2ScrollMessenger
|
||||
|
||||
b.Config = cfg
|
||||
|
||||
if !store {
|
||||
@@ -102,5 +119,5 @@ func (b *MockApp) MockConfig(store bool) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return os.WriteFile(b.bridgeFile, data, 0600)
|
||||
return os.WriteFile(b.BridgeConfigFile, data, 0600)
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"1212121212121212121212121212121212121212121212121212121212121212"
|
||||
],
|
||||
"gas_oracle_sender_private_keys": [
|
||||
"1212121212121212121212121212121212121212121212121212121212121212"
|
||||
"1313131313131313131313131313131313131313131313131313131313131313"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -66,10 +66,10 @@
|
||||
"1212121212121212121212121212121212121212121212121212121212121212"
|
||||
],
|
||||
"gas_oracle_sender_private_keys": [
|
||||
"1212121212121212121212121212121212121212121212121212121212121212"
|
||||
"1313131313131313131313131313131313131313131313131313131313131313"
|
||||
],
|
||||
"rollup_sender_private_keys": [
|
||||
"1212121212121212121212121212121212121212121212121212121212121212"
|
||||
"1414141414141414141414141414141414141414141414141414141414141414"
|
||||
]
|
||||
},
|
||||
"batch_proposer_config": {
|
||||
|
||||
@@ -1,9 +1,49 @@
|
||||
.PHONY: all erc20 greeter
|
||||
.PHONY: all erc20 greeter scroll
|
||||
|
||||
all: erc20 greeter
|
||||
all: erc20 greeter scroll
|
||||
|
||||
erc20:
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./erc20/ERC20Mock.json --pkg erc20 --out ./erc20/ERC20Mock.go
|
||||
|
||||
greeter:
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./greeter/Greeter.json --pkg greeter --out ./greeter/Greeter.go
|
||||
|
||||
scroll:
|
||||
#L1/gateways
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/gateways/L1ERC20Gateway.json --pkg gateways --out ./scroll/L1/gateways/L1ERC20Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/gateways/L1ERC721Gateway.json --pkg gateways --out ./scroll/L1/gateways/L1ERC721Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/gateways/L1ERC1155Gateway.json --pkg gateways --out ./scroll/L1/gateways/L1ERC1155Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/gateways/L1GatewayRouter.json --pkg gateways --out ./scroll/L1/gateways/L1GatewayRouter.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/gateways/L1StandardERC20Gateway.json --pkg gateways --out ./scroll/L1/gateways/L1StandardERC20Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/gateways/L1CustomERC20Gateway.json --pkg gateways --out ./scroll/L1/gateways/L1CustomERC20Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/gateways/L1WETHGateway.json --pkg gateways --out ./scroll/L1/gateways/L1WETHGateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/gateways/L1ETHGateway.json --pkg gateways --out ./scroll/L1/gateways/L1ETHGateway.go
|
||||
#L1/rollup
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/rollup/L1MessageQueue.json --pkg rollup --out ./scroll/L1/rollup/L1MessageQueue.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/rollup/L2GasPriceOracle.json --pkg rollup --out ./scroll/L1/rollup/L2GasPriceOracle.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/rollup/ScrollChain.json --pkg rollup --out ./scroll/L1/rollup/ScrollChain.go
|
||||
#L1
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L1/L1ScrollMessenger.json --pkg l1 --out ./scroll/L1/L1ScrollMessenger.go
|
||||
#L2/gateways
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/gateways/L2CustomERC20Gateway.json --pkg gateways --out ./scroll/L2/gateways/L2CustomERC20Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/gateways/L2ERC20Gateway.json --pkg gateways --out ./scroll/L2/gateways/L2ERC20Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/gateways/L2ERC721Gateway.json --pkg gateways --out ./scroll/L2/gateways/L2ERC721Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/gateways/L2ERC1155Gateway.json --pkg gateways --out ./scroll/L2/gateways/L2ERC1155Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/gateways/L2GatewayRouter.json --pkg gateways --out ./scroll/L2/gateways/L2GatewayRouter.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/gateways/L2StandardERC20Gateway.json --pkg gateways --out ./scroll/L2/gateways/L2StandardERC20Gateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/gateways/L2WETHGateway.json --pkg gateways --out ./scroll/L2/gateways/L2WETHGateway.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/gateways/L2ETHGateway.json --pkg gateways --out ./scroll/L2/gateways/L2ETHGateway.go
|
||||
#L2/predeploys
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/predeploys/L1BlockContainer.json --pkg predeploys --out ./scroll/L2/predeploys/L1BlockContainer.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/predeploys/L1GasPriceOracle.json --pkg predeploys --out ./scroll/L2/predeploys/L1GasPriceOracle.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/predeploys/L2MessageQueue.json --pkg predeploys --out ./scroll/L2/predeploys/L2MessageQueue.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/predeploys/L2TxFeeVault.json --pkg predeploys --out ./scroll/L2/predeploys/L2TxFeeVault.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/predeploys/WETH9.json --pkg predeploys --out ./scroll/L2/predeploys/WETH9.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/predeploys/Whitelist.json --pkg predeploys --out ./scroll/L2/predeploys/Whitelist.go
|
||||
#L2
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/L2/L2ScrollMessenger.json --pkg l2 --out ./scroll/L2/L2ScrollMessenger.go
|
||||
#External
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/external/External.json --pkg external --out ./scroll/external/External.go
|
||||
#Libraries
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/libraries/ScrollStandardERC20.json --pkg libraries --out ./scroll/libraries/ScrollStandardERC20.go
|
||||
go run github.com/scroll-tech/go-ethereum/cmd/abigen --combined-json ./scroll/libraries/ScrollStandardERC20Factory.json --pkg libraries --out ./scroll/libraries/ScrollStandardERC20Factory.go
|
||||
|
||||
1
common/bytecode/scroll/L1/.gitignore
vendored
Normal file
1
common/bytecode/scroll/L1/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.go
|
||||
1743
common/bytecode/scroll/L1/L1ScrollMessenger.json
Normal file
1743
common/bytecode/scroll/L1/L1ScrollMessenger.json
Normal file
File diff suppressed because one or more lines are too long
407
common/bytecode/scroll/L1/gateways/L1CustomERC20Gateway.json
Normal file
407
common/bytecode/scroll/L1/gateways/L1CustomERC20Gateway.json
Normal file
File diff suppressed because one or more lines are too long
642
common/bytecode/scroll/L1/gateways/L1ERC1155Gateway.json
Normal file
642
common/bytecode/scroll/L1/gateways/L1ERC1155Gateway.json
Normal file
File diff suppressed because one or more lines are too long
237
common/bytecode/scroll/L1/gateways/L1ERC20Gateway.json
Normal file
237
common/bytecode/scroll/L1/gateways/L1ERC20Gateway.json
Normal file
@@ -0,0 +1,237 @@
|
||||
{
|
||||
"contracts": {
|
||||
"scroll/L1/gateways/L1ERC20Gateway.sol:L1ERC20Gateway": {
|
||||
"abi": [
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "l1Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "l2Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "bytes",
|
||||
"name": "data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "DepositERC20",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "l1Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "l2Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "bytes",
|
||||
"name": "data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "FinalizeWithdrawERC20",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_gasLimit",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "depositERC20",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_gasLimit",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "depositERC20",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "_data",
|
||||
"type": "bytes"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_gasLimit",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "depositERC20AndCall",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_l1Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_l2Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "_data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "finalizeWithdrawERC20",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_l1Token",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "getL2ERC20Address",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"bin": ""
|
||||
}
|
||||
},
|
||||
"version": "0.8.17+commit.8df45f5f.Darwin.appleclang"
|
||||
}
|
||||
525
common/bytecode/scroll/L1/gateways/L1ERC721Gateway.json
Normal file
525
common/bytecode/scroll/L1/gateways/L1ERC721Gateway.json
Normal file
File diff suppressed because one or more lines are too long
231
common/bytecode/scroll/L1/gateways/L1ETHGateway.json
Normal file
231
common/bytecode/scroll/L1/gateways/L1ETHGateway.json
Normal file
File diff suppressed because one or more lines are too long
619
common/bytecode/scroll/L1/gateways/L1GatewayRouter.json
Normal file
619
common/bytecode/scroll/L1/gateways/L1GatewayRouter.json
Normal file
File diff suppressed because one or more lines are too long
335
common/bytecode/scroll/L1/gateways/L1StandardERC20Gateway.json
Normal file
335
common/bytecode/scroll/L1/gateways/L1StandardERC20Gateway.json
Normal file
File diff suppressed because one or more lines are too long
345
common/bytecode/scroll/L1/gateways/L1WETHGateway.json
Normal file
345
common/bytecode/scroll/L1/gateways/L1WETHGateway.json
Normal file
File diff suppressed because one or more lines are too long
322
common/bytecode/scroll/L1/rollup/L1MessageQueue.json
Normal file
322
common/bytecode/scroll/L1/rollup/L1MessageQueue.json
Normal file
File diff suppressed because one or more lines are too long
297
common/bytecode/scroll/L1/rollup/L2GasPriceOracle.json
Normal file
297
common/bytecode/scroll/L1/rollup/L2GasPriceOracle.json
Normal file
File diff suppressed because one or more lines are too long
702
common/bytecode/scroll/L1/rollup/ScrollChain.json
Normal file
702
common/bytecode/scroll/L1/rollup/ScrollChain.json
Normal file
File diff suppressed because one or more lines are too long
640
common/bytecode/scroll/L2/L2ScrollMessenger.json
Normal file
640
common/bytecode/scroll/L2/L2ScrollMessenger.json
Normal file
File diff suppressed because one or more lines are too long
426
common/bytecode/scroll/L2/gateways/L2CustomERC20Gateway.json
Normal file
426
common/bytecode/scroll/L2/gateways/L2CustomERC20Gateway.json
Normal file
File diff suppressed because one or more lines are too long
642
common/bytecode/scroll/L2/gateways/L2ERC1155Gateway.json
Normal file
642
common/bytecode/scroll/L2/gateways/L2ERC1155Gateway.json
Normal file
File diff suppressed because one or more lines are too long
256
common/bytecode/scroll/L2/gateways/L2ERC20Gateway.json
Normal file
256
common/bytecode/scroll/L2/gateways/L2ERC20Gateway.json
Normal file
@@ -0,0 +1,256 @@
|
||||
{
|
||||
"contracts": {
|
||||
"scroll/L2/gateways/L2ERC20Gateway.sol:L2ERC20Gateway": {
|
||||
"abi": [
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "l1Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "l2Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "bytes",
|
||||
"name": "data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "FinalizeDepositERC20",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "l1Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "l2Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "bytes",
|
||||
"name": "data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "WithdrawERC20",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "l1Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "l2Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "finalizeDepositERC20",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "l2Token",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "getL1ERC20Address",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "l1Token",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "getL2ERC20Address",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_gasLimit",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "withdrawERC20",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_gasLimit",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "withdrawERC20",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_amount",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "_data",
|
||||
"type": "bytes"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_gasLimit",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "withdrawERC20AndCall",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"bin": ""
|
||||
}
|
||||
},
|
||||
"version": "0.8.17+commit.8df45f5f.Darwin.appleclang"
|
||||
}
|
||||
525
common/bytecode/scroll/L2/gateways/L2ERC721Gateway.json
Normal file
525
common/bytecode/scroll/L2/gateways/L2ERC721Gateway.json
Normal file
File diff suppressed because one or more lines are too long
231
common/bytecode/scroll/L2/gateways/L2ETHGateway.json
Normal file
231
common/bytecode/scroll/L2/gateways/L2ETHGateway.json
Normal file
File diff suppressed because one or more lines are too long
638
common/bytecode/scroll/L2/gateways/L2GatewayRouter.json
Normal file
638
common/bytecode/scroll/L2/gateways/L2GatewayRouter.json
Normal file
File diff suppressed because one or more lines are too long
336
common/bytecode/scroll/L2/gateways/L2StandardERC20Gateway.json
Normal file
336
common/bytecode/scroll/L2/gateways/L2StandardERC20Gateway.json
Normal file
File diff suppressed because one or more lines are too long
364
common/bytecode/scroll/L2/gateways/L2WETHGateway.json
Normal file
364
common/bytecode/scroll/L2/gateways/L2WETHGateway.json
Normal file
File diff suppressed because one or more lines are too long
349
common/bytecode/scroll/L2/predeploys/L1BlockContainer.json
Normal file
349
common/bytecode/scroll/L2/predeploys/L1BlockContainer.json
Normal file
File diff suppressed because one or more lines are too long
273
common/bytecode/scroll/L2/predeploys/L1GasPriceOracle.json
Normal file
273
common/bytecode/scroll/L2/predeploys/L1GasPriceOracle.json
Normal file
@@ -0,0 +1,273 @@
|
||||
{
|
||||
"contracts": {
|
||||
"scroll/L2/predeploys/L1GasPriceOracle.sol:L1GasPriceOracle": {
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_owner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "l1BaseFee",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "L1BaseFeeUpdated",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "overhead",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "OverheadUpdated",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_oldOwner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "OwnershipTransferred",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "scalar",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "ScalarUpdated",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "_oldWhitelist",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "_newWhitelist",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "UpdateWhitelist",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "_data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "getL1Fee",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "bytes",
|
||||
"name": "_data",
|
||||
"type": "bytes"
|
||||
}
|
||||
],
|
||||
"name": "getL1GasUsed",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "l1BaseFee",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "overhead",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "owner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "renounceOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "scalar",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_l1BaseFee",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "setL1BaseFee",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_overhead",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "setOverhead",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_scalar",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "setScalar",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "transferOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_newWhitelist",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "updateWhitelist",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "whitelist",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "contract IWhitelist",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"bin": "608060405234801561001057600080fd5b5060405161094138038061094183398101604081905261002f9161008e565b6100388161003e565b506100be565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100a057600080fd5b81516001600160a01b03811681146100b757600080fd5b9392505050565b610874806100cd6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063bede39b511610066578063bede39b51461018d578063de26c4a1146101a0578063f2fde38b146101b3578063f45e65d8146101c657600080fd5b8063715018a6146101475780638da5cb5b1461014f57806393e59dc11461017a57600080fd5b80630c18c162146100d45780633577afc5146100f05780633d0f963e1461010557806349948e0e14610118578063519b4bd31461012b5780637046559714610134575b600080fd5b6100dd60025481565b6040519081526020015b60405180910390f35b6101036100fe366004610672565b6101cf565b005b61010361011336600461068b565b610291565b6100dd6101263660046106d1565b61031c565b6100dd60015481565b610103610142366004610672565b610361565b610103610416565b600054610162906001600160a01b031681565b6040516001600160a01b0390911681526020016100e7565b600454610162906001600160a01b031681565b61010361019b366004610672565b61044c565b6100dd6101ae3660046106d1565b610533565b6101036101c136600461068b565b610596565b6100dd60035481565b6000546001600160a01b031633146102025760405162461bcd60e51b81526004016101f990610782565b60405180910390fd5b621c9c388111156102555760405162461bcd60e51b815260206004820152601760248201527f657863656564206d6178696d756d206f7665726865616400000000000000000060448201526064016101f9565b60028190556040518181527f32740b35c0ea213650f60d44366b4fb211c9033b50714e4a1d34e65d5beb9bb4906020015b60405180910390a150565b6000546001600160a01b031633146102bb5760405162461bcd60e51b81526004016101f990610782565b600480546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f22d1c35fe072d2e42c3c8f9bd4a0d34aa84a0101d020a62517b33fdb3174e5f7910160405180910390a15050565b60008061032883610533565b905060006001548261033a91906107b9565b9050633b9aca006003548261034f91906107b9565b61035991906107e4565b949350505050565b6000546001600160a01b0316331461038b5760405162461bcd60e51b81526004016101f990610782565b61039b633b9aca006103e86107b9565b8111156103e15760405162461bcd60e51b8152602060048201526014602482015273657863656564206d6178696d756d207363616c6560601b60448201526064016101f9565b60038190556040518181527f3336cd9708eaf2769a0f0dc0679f30e80f15dcd88d1921b5a16858e8b85c591a90602001610286565b6000546001600160a01b031633146104405760405162461bcd60e51b81526004016101f990610782565b61044a6000610622565b565b6004805460405163efc7840160e01b815233928101929092526001600160a01b03169063efc7840190602401602060405180830381865afa158015610495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b99190610806565b6104fe5760405162461bcd60e51b81526020600482015260166024820152752737ba103bb434ba32b634b9ba32b21039b2b73232b960511b60448201526064016101f9565b60018190556040518181527f351fb23757bb5ea0546c85b7996ddd7155f96b939ebaa5ff7bc49c75f27f2c4490602001610286565b80516000908190815b818110156105865784818151811061055657610556610828565b01602001516001600160f81b0319166000036105775760048301925061057e565b6010830192505b60010161053c565b5050600254016104400192915050565b6000546001600160a01b031633146105c05760405162461bcd60e51b81526004016101f990610782565b6001600160a01b0381166106165760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016101f9565b61061f81610622565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561068457600080fd5b5035919050565b60006020828403121561069d57600080fd5b81356001600160a01b03811681146106b457600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156106e357600080fd5b813567ffffffffffffffff808211156106fb57600080fd5b818401915084601f83011261070f57600080fd5b813581811115610721576107216106bb565b604051601f8201601f19908116603f01168101908382118183101715610749576107496106bb565b8160405282815287602084870101111561076257600080fd5b826020860160208301376000928101602001929092525095945050505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b80820281158282048414176107de57634e487b7160e01b600052601160045260246000fd5b92915050565b60008261080157634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561081857600080fd5b815180151581146106b457600080fd5b634e487b7160e01b600052603260045260246000fdfea26469706673582212201c98d19f8bb4842db4083fd4395f8be55b5537cd9cc84c94de56dd07f20f2a9a64736f6c63430008110033"
|
||||
}
|
||||
},
|
||||
"version": "0.8.17+commit.8df45f5f.Darwin.appleclang"
|
||||
}
|
||||
189
common/bytecode/scroll/L2/predeploys/L2MessageQueue.json
Normal file
189
common/bytecode/scroll/L2/predeploys/L2MessageQueue.json
Normal file
@@ -0,0 +1,189 @@
|
||||
{
|
||||
"contracts": {
|
||||
"scroll/L2/predeploys/L2MessageQueue.sol:L2MessageQueue": {
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_owner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "index",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "bytes32",
|
||||
"name": "messageHash",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"name": "AppendMessage",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_oldOwner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "OwnershipTransferred",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "_messageHash",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"name": "appendMessage",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "branches",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "initialize",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "messageRoot",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bytes32",
|
||||
"name": "",
|
||||
"type": "bytes32"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "messenger",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "nextMessageIndex",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "owner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "renounceOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "transferOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_messenger",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "updateMessenger",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"bin": "608060405234801561001057600080fd5b5060405161071e38038061071e83398101604081905261002f91610090565b6100388161003e565b506100c0565b605280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156100a257600080fd5b81516001600160a01b03811681146100b957600080fd5b9392505050565b61064f806100cf6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806383cc76601161006657806383cc76601461010f5780638da5cb5b146101225780639e7adc7914610135578063d4b9f4fa14610148578063f2fde38b1461015157600080fd5b806326aad7b7146100a35780633cb747bf146100bf578063600a2e77146100ea578063715018a6146100fd5780638129fc1c14610107575b600080fd5b6100ac60015481565b6040519081526020015b60405180910390f35b6053546100d2906001600160a01b031681565b6040516001600160a01b0390911681526020016100b6565b6100ac6100f8366004610519565b610164565b610105610209565b005b61010561023f565b6100ac61011d366004610519565b610247565b6052546100d2906001600160a01b031681565b610105610143366004610532565b61025e565b6100ac60005481565b61010561015f366004610532565b6102fa565b6053546000906001600160a01b031633146101b75760405162461bcd60e51b815260206004820152600e60248201526d37b7363c9036b2b9b9b2b733b2b960911b60448201526064015b60405180910390fd5b6000806101c384610386565b60408051838152602081018890529294509092507ffaa617c2d8ce12c62637dbce76efcc18dae60574aa95709bdcedce7e76071693910160405180910390a19392505050565b6052546001600160a01b031633146102335760405162461bcd60e51b81526004016101ae90610562565b61023d6000610455565b565b61023d6104a7565b602a816028811061025757600080fd5b0154905081565b6052546001600160a01b031633146102885760405162461bcd60e51b81526004016101ae90610562565b600154156102d85760405162461bcd60e51b815260206004820152601760248201527f63616e6e6f7420757064617465206d657373656e67657200000000000000000060448201526064016101ae565b605380546001600160a01b0319166001600160a01b0392909216919091179055565b6052546001600160a01b031633146103245760405162461bcd60e51b81526004016101ae90610562565b6001600160a01b03811661037a5760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016101ae565b61038381610455565b50565b600154600090819083825b8215610425576103a2600284610599565b6000036103ee5781602a82602881106103bd576103bd6105bb565b01556103e782600283602881106103d6576103d66105bb565b015460009182526020526040902090565b9150610419565b610416602a8260288110610404576104046105bb565b01548360009182526020526040902090565b91505b600192831c9201610391565b81602a8260288110610439576104396105bb565b0155506000819055600180548082019091559590945092505050565b605280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005b60286104b78260016105e7565b1015610383576104e8600282602881106104d3576104d36105bb565b0154600283602881106103d6576103d66105bb565b60026104f58360016105e7565b60288110610505576105056105bb565b01558061051181610600565b9150506104aa565b60006020828403121561052b57600080fd5b5035919050565b60006020828403121561054457600080fd5b81356001600160a01b038116811461055b57600080fd5b9392505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b6000826105b657634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156105fa576105fa6105d1565b92915050565b600060018201610612576106126105d1565b506001019056fea26469706673582212207432771484e2f96fab1320fa6db8132bafc7a1070b9661d72ca0c2b097ccc93764736f6c63430008110033"
|
||||
}
|
||||
},
|
||||
"version": "0.8.17+commit.8df45f5f.Darwin.appleclang"
|
||||
}
|
||||
205
common/bytecode/scroll/L2/predeploys/L2TxFeeVault.json
Normal file
205
common/bytecode/scroll/L2/predeploys/L2TxFeeVault.json
Normal file
@@ -0,0 +1,205 @@
|
||||
{
|
||||
"contracts": {
|
||||
"scroll/L2/predeploys/L2TxFeeVault.sol:L2TxFeeVault": {
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_owner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_recipient",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_oldOwner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "OwnershipTransferred",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "value",
|
||||
"type": "uint256"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "to",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "address",
|
||||
"name": "from",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "Withdrawal",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "messenger",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "minWithdrawAmount",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "owner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "recipient",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "renounceOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "totalProcessed",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "transferOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_messenger",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "updateMessenger",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "_minWithdrawAmount",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "updateMinWithdrawAmount",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_recipient",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "updateRecipient",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "withdraw",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"stateMutability": "payable",
|
||||
"type": "receive"
|
||||
}
|
||||
],
|
||||
"bin": "608060405234801561001057600080fd5b5060405161078938038061078983398101604081905261002f916100db565b8181678ac7230489e800006100438361006f565b600155600380546001600160a01b0319166001600160a01b03929092169190911790555061010e915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100d657600080fd5b919050565b600080604083850312156100ee57600080fd5b6100f7836100bf565b9150610105602084016100bf565b90509250929050565b61066c8061011d6000396000f3fe6080604052600436106100a05760003560e01c806384411d651161006457806384411d65146101595780638da5cb5b1461016f5780639e7adc791461018f578063f2fde38b146101af578063feec756c146101cf578063ff4f3546146101ef57600080fd5b80633cb747bf146100ac5780633ccfd60b146100e9578063457e1a491461010057806366d003ac14610124578063715018a61461014457600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506002546100cc906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100f557600080fd5b506100fe61020f565b005b34801561010c57600080fd5b5061011660015481565b6040519081526020016100e0565b34801561013057600080fd5b506003546100cc906001600160a01b031681565b34801561015057600080fd5b506100fe610371565b34801561016557600080fd5b5061011660045481565b34801561017b57600080fd5b506000546100cc906001600160a01b031681565b34801561019b57600080fd5b506100fe6101aa36600461054a565b6103a7565b3480156101bb57600080fd5b506100fe6101ca36600461054a565b6103f3565b3480156101db57600080fd5b506100fe6101ea36600461054a565b61047f565b3480156101fb57600080fd5b506100fe61020a36600461057a565b6104cb565b60015447908110156102a15760405162461bcd60e51b815260206004820152604a60248201527f4665655661756c743a207769746864726177616c20616d6f756e74206d75737460448201527f2062652067726561746572207468616e206d696e696d756d20776974686472616064820152691dd85b08185b5bdd5b9d60b21b608482015260a4015b60405180910390fd5b6004805482019055600354604080518381526001600160a01b0390921660208301523382820152517fc8a211cc64b6ed1b50595a9fcb1932b6d1e5a6e8ef15b60e5b1f988ea9086bba9181900360600190a1600254600354604080516020810182526000808252915163b2267a7b60e01b81526001600160a01b039485169463b2267a7b94879461033c949190921692859290600401610593565b6000604051808303818588803b15801561035557600080fd5b505af1158015610369573d6000803e3d6000fd5b505050505050565b6000546001600160a01b0316331461039b5760405162461bcd60e51b8152600401610298906105ff565b6103a560006104fa565b565b6000546001600160a01b031633146103d15760405162461bcd60e51b8152600401610298906105ff565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461041d5760405162461bcd60e51b8152600401610298906105ff565b6001600160a01b0381166104735760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f20616464726573730000006044820152606401610298565b61047c816104fa565b50565b6000546001600160a01b031633146104a95760405162461bcd60e51b8152600401610298906105ff565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146104f55760405162461bcd60e51b8152600401610298906105ff565b600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561055c57600080fd5b81356001600160a01b038116811461057357600080fd5b9392505050565b60006020828403121561058c57600080fd5b5035919050565b60018060a01b038516815260006020858184015260806040840152845180608085015260005b818110156105d55786810183015185820160a0015282016105b9565b50600060a0828601015260a0601f19601f8301168501019250505082606083015295945050505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e657200000000000000000060408201526060019056fea2646970667358221220dcfa71b82537a035f973551a5691e8d33e9d8768387a62ce2e7de75750c9e3c464736f6c63430008110033"
|
||||
}
|
||||
},
|
||||
"version": "0.8.17+commit.8df45f5f.Darwin.appleclang"
|
||||
}
|
||||
294
common/bytecode/scroll/L2/predeploys/WETH9.json
Normal file
294
common/bytecode/scroll/L2/predeploys/WETH9.json
Normal file
@@ -0,0 +1,294 @@
|
||||
{
|
||||
"contracts": {
|
||||
"WETH9.sol:WETH9": {
|
||||
"abi": [
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "src",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "guy",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "wad",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Approval",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "dst",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "wad",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Deposit",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "src",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "dst",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "wad",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Transfer",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "src",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "uint256",
|
||||
"name": "wad",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "Withdrawal",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "allowance",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "guy",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "wad",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "approve",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "balanceOf",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "decimals",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint8",
|
||||
"name": "",
|
||||
"type": "uint8"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "deposit",
|
||||
"outputs": [],
|
||||
"stateMutability": "payable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "name",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "symbol",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "string",
|
||||
"name": "",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "totalSupply",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "dst",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "wad",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transfer",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "src",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "dst",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "wad",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "transferFrom",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "uint256",
|
||||
"name": "wad",
|
||||
"type": "uint256"
|
||||
}
|
||||
],
|
||||
"name": "withdraw",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"stateMutability": "payable",
|
||||
"type": "receive"
|
||||
}
|
||||
],
|
||||
"bin": "60c0604052600d60809081526c2bb930b83832b21022ba3432b960991b60a05260009061002c9082610114565b506040805180820190915260048152630ae8aa8960e31b60208201526001906100559082610114565b506002805460ff1916601217905534801561006f57600080fd5b506101d3565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061009f57607f821691505b6020821081036100bf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561010f57600081815260208120601f850160051c810160208610156100ec5750805b601f850160051c820191505b8181101561010b578281556001016100f8565b5050505b505050565b81516001600160401b0381111561012d5761012d610075565b6101418161013b845461008b565b846100c5565b602080601f831160018114610176576000841561015e5750858301515b600019600386901b1c1916600185901b17855561010b565b600085815260208120601f198616915b828110156101a557888601518255948401946001909101908401610186565b50858210156101c35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610715806101e26000396000f3fe6080604052600436106100a05760003560e01c8063313ce56711610064578063313ce5671461016c57806370a082311461019857806395d89b41146101c5578063a9059cbb146101da578063d0e30db0146101fa578063dd62ed3e1461020257600080fd5b806306fdde03146100b4578063095ea7b3146100df57806318160ddd1461010f57806323b872dd1461012c5780632e1a7d4d1461014c57600080fd5b366100af576100ad61023a565b005b600080fd5b3480156100c057600080fd5b506100c9610288565b6040516100d6919061056e565b60405180910390f35b3480156100eb57600080fd5b506100ff6100fa3660046105d8565b610316565b60405190151581526020016100d6565b34801561011b57600080fd5b50475b6040519081526020016100d6565b34801561013857600080fd5b506100ff610147366004610602565b610382565b34801561015857600080fd5b506100ad61016736600461063e565b6104b9565b34801561017857600080fd5b506002546101869060ff1681565b60405160ff90911681526020016100d6565b3480156101a457600080fd5b5061011e6101b3366004610657565b60036020526000908152604090205481565b3480156101d157600080fd5b506100c961054d565b3480156101e657600080fd5b506100ff6101f53660046105d8565b61055a565b6100ad61023a565b34801561020e57600080fd5b5061011e61021d366004610672565b600460209081526000928352604080842090915290825290205481565b3360008181526003602090815260409182902080543490810190915591519182527fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c910160405180910390a2565b60008054610295906106a5565b80601f01602080910402602001604051908101604052809291908181526020018280546102c1906106a5565b801561030e5780601f106102e35761010080835404028352916020019161030e565b820191906000526020600020905b8154815290600101906020018083116102f157829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103719086815260200190565b60405180910390a350600192915050565b6001600160a01b0383166000908152600360205260408120548211156103a757600080fd5b6001600160a01b03841633148015906103e557506001600160a01b038416600090815260046020908152604080832033845290915290205460001914155b15610445576001600160a01b038416600090815260046020908152604080832033845290915290205482111561041a57600080fd5b6001600160a01b03841660009081526004602090815260408083203384529091529020805483900390555b6001600160a01b03808516600081815260036020526040808220805487900390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104a79086815260200190565b60405180910390a35060019392505050565b336000908152600360205260409020548111156104d557600080fd5b33600081815260036020526040808220805485900390555183156108fc0291849190818181858888f19350505050158015610514573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b60018054610295906106a5565b6000610567338484610382565b9392505050565b600060208083528351808285015260005b8181101561059b5785810183015185820160400152820161057f565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146105d357600080fd5b919050565b600080604083850312156105eb57600080fd5b6105f4836105bc565b946020939093013593505050565b60008060006060848603121561061757600080fd5b610620846105bc565b925061062e602085016105bc565b9150604084013590509250925092565b60006020828403121561065057600080fd5b5035919050565b60006020828403121561066957600080fd5b610567826105bc565b6000806040838503121561068557600080fd5b61068e836105bc565b915061069c602084016105bc565b90509250929050565b600181811c908216806106b957607f821691505b6020821081036106d957634e487b7160e01b600052602260045260246000fd5b5091905056fea264697066735822122058a8215b91082f79e569166dbb8e4b203b24e565519a4e44e503f096c918ac1b64736f6c63430008110033"
|
||||
}
|
||||
},
|
||||
"version": "0.8.17+commit.8df45f5f.Darwin.appleclang"
|
||||
}
|
||||
129
common/bytecode/scroll/L2/predeploys/Whitelist.json
Normal file
129
common/bytecode/scroll/L2/predeploys/Whitelist.json
Normal file
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"contracts": {
|
||||
"Whitelist.sol:Whitelist": {
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_owner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_oldOwner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "OwnershipTransferred",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_account",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": false,
|
||||
"internalType": "bool",
|
||||
"name": "_status",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"name": "WhitelistStatusChanged",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_sender",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "isSenderAllowed",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "owner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "renounceOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "transferOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address[]",
|
||||
"name": "_accounts",
|
||||
"type": "address[]"
|
||||
},
|
||||
{
|
||||
"internalType": "bool",
|
||||
"name": "_status",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"name": "updateWhitelistStatus",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"bin": "608060405234801561001057600080fd5b5060405161058c38038061058c83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b6104f9806100936000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c57806379586dd7146100665780638da5cb5b14610079578063efc78401146100a9578063f2fde38b146100e5575b600080fd5b6100646100f8565b005b610064610074366004610356565b610137565b60005461008c906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100d56100b736600461042d565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100a0565b6100646100f336600461042d565b610238565b6000546001600160a01b0316331461012b5760405162461bcd60e51b81526004016101229061044f565b60405180910390fd5b61013560006102c4565b565b6000546001600160a01b031633146101615760405162461bcd60e51b81526004016101229061044f565b60005b825181101561023357816001600085848151811061018457610184610486565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508281815181106101d5576101d5610486565b60200260200101516001600160a01b03167f8daaf060c3306c38e068a75c054bf96ecd85a3db1252712c4d93632744c42e0d83604051610219911515815260200190565b60405180910390a28061022b8161049c565b915050610164565b505050565b6000546001600160a01b031633146102625760405162461bcd60e51b81526004016101229061044f565b6001600160a01b0381166102b85760405162461bcd60e51b815260206004820152601d60248201527f6e6577206f776e657220697320746865207a65726f20616464726573730000006044820152606401610122565b6102c1816102c4565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b038116811461034157600080fd5b919050565b8035801515811461034157600080fd5b6000806040838503121561036957600080fd5b823567ffffffffffffffff8082111561038157600080fd5b818501915085601f83011261039557600080fd5b81356020828211156103a9576103a9610314565b8160051b604051601f19603f830116810181811086821117156103ce576103ce610314565b6040529283528183019350848101820192898411156103ec57600080fd5b948201945b83861015610411576104028661032a565b855294820194938201936103f1565b96506104209050878201610346565b9450505050509250929050565b60006020828403121561043f57600080fd5b6104488261032a565b9392505050565b60208082526017908201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600182016104bc57634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220a63efbab90c35477222a31d2cbe502ea57d2bf3e43c07431c0797047a6bfaa7564736f6c63430008110033"
|
||||
}
|
||||
},
|
||||
"version": "0.8.17+commit.8df45f5f.Darwin.appleclang"
|
||||
}
|
||||
308
common/bytecode/scroll/external/External.json
vendored
Normal file
308
common/bytecode/scroll/external/External.json
vendored
Normal file
File diff suppressed because one or more lines are too long
479
common/bytecode/scroll/libraries/ScrollStandardERC20.json
Normal file
479
common/bytecode/scroll/libraries/ScrollStandardERC20.json
Normal file
File diff suppressed because one or more lines are too long
153
common/bytecode/scroll/libraries/ScrollStandardERC20Factory.json
Normal file
153
common/bytecode/scroll/libraries/ScrollStandardERC20Factory.json
Normal file
@@ -0,0 +1,153 @@
|
||||
{
|
||||
"contracts": {
|
||||
"scroll/libraries/ScrollStandardERC20Factory.sol:ScrollStandardERC20Factory": {
|
||||
"abi": [
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_implementation",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "constructor"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_l1Token",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "_l2Token",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "DeployToken",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"anonymous": false,
|
||||
"inputs": [
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "previousOwner",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"indexed": true,
|
||||
"internalType": "address",
|
||||
"name": "newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "OwnershipTransferred",
|
||||
"type": "event"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_gateway",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_l1Token",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "computeL2TokenAddress",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_gateway",
|
||||
"type": "address"
|
||||
},
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "_l1Token",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "deployL2Token",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "implementation",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "owner",
|
||||
"outputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"stateMutability": "view",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [],
|
||||
"name": "renounceOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
},
|
||||
{
|
||||
"inputs": [
|
||||
{
|
||||
"internalType": "address",
|
||||
"name": "newOwner",
|
||||
"type": "address"
|
||||
}
|
||||
],
|
||||
"name": "transferOwnership",
|
||||
"outputs": [],
|
||||
"stateMutability": "nonpayable",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"bin": "608060405234801561001057600080fd5b5060405161064238038061064283398101604081905261002f91610107565b610038336100b7565b6001600160a01b0381166100925760405162461bcd60e51b815260206004820152601b60248201527f7a65726f20696d706c656d656e746174696f6e20616464726573730000000000604482015260640160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055610137565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561011957600080fd5b81516001600160a01b038116811461013057600080fd5b9392505050565b6104fc806101466000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80635c60da1b1461006757806361e98ca114610096578063715018a6146100a95780637bdbcbbf146100b35780638da5cb5b146100c6578063f2fde38b146100d7575b600080fd5b60015461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61007a6100a4366004610443565b6100ea565b6100b161011a565b005b61007a6100c1366004610443565b610159565b6000546001600160a01b031661007a565b6100b16100e5366004610476565b6101a9565b6000806100f78484610244565b600154909150610110906001600160a01b0316826102ca565b9150505b92915050565b6000546001600160a01b0316331461014d5760405162461bcd60e51b815260040161014490610491565b60405180910390fd5b6101576000610337565b565b600080546001600160a01b031633146101845760405162461bcd60e51b815260040161014490610491565b60006101908484610244565b600154909150610110906001600160a01b031682610387565b6000546001600160a01b031633146101d35760405162461bcd60e51b815260040161014490610491565b6001600160a01b0381166102385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610144565b61024181610337565b50565b6040516bffffffffffffffffffffffff19606083901b1660208201526000908390603401604051602081830303815290604052805190602001206040516020016102ac92919060609290921b6bffffffffffffffffffffffff19168252601482015260340190565b60405160208183030381529060405280519060200120905092915050565b6000610330838330604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b8152606093841b60148201526f5af43d82803e903d91602b57fd5bf3ff60801b6028820152921b6038830152604c8201526037808220606c830152605591012090565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528360601b60148201526e5af43d82803e903d91602b57fd5bf360881b6028820152826037826000f59150506001600160a01b0381166101145760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610144565b80356001600160a01b038116811461043e57600080fd5b919050565b6000806040838503121561045657600080fd5b61045f83610427565b915061046d60208401610427565b90509250929050565b60006020828403121561048857600080fd5b61033082610427565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220a22c8dbd9f00add51d52c56373782b410ac3198d44de2cc04ba9d1ef6a8ddbd364736f6c63430008110033"
|
||||
}
|
||||
},
|
||||
"version": "0.8.17+commit.8df45f5f.Darwin.appleclang"
|
||||
}
|
||||
37
common/docker/config.go
Normal file
37
common/docker/config.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"github.com/scroll-tech/go-ethereum/common"
|
||||
)
|
||||
|
||||
// L1Contracts stores pre-deployed contracts address of scroll_l1geth
|
||||
type L1Contracts struct {
|
||||
L1WETH common.Address `json:"L1WETH"`
|
||||
L2GasPriceOracle common.Address `json:"L2GasPriceOracle"`
|
||||
L1ScrollChain common.Address `json:"L1ScrollChain"`
|
||||
L1MessageQueue common.Address `json:"L1MessageQueue"`
|
||||
L1ScrollMessenger common.Address `json:"L1ScrollMessenger"`
|
||||
L1GatewayRouter common.Address `json:"L1GatewayRouter"`
|
||||
L1StandardERC20Gateway common.Address `json:"L1StandardERC20Gateway"`
|
||||
}
|
||||
|
||||
// L2Contracts stores pre-deployed contracts address of scroll_l2geth
|
||||
type L2Contracts struct {
|
||||
L1BlockContainer common.Address `json:"L1BlockContainer"`
|
||||
L1GasPriceOracle common.Address `json:"L1GasPriceOracle"`
|
||||
L2ProxyAdmin common.Address `json:"L2ProxyAdmin"`
|
||||
L2ScrollStandardERC20Factory common.Address `json:"L2ScrollStandardERC20Factory"`
|
||||
L2ScrollMessenger common.Address `json:"L2ScrollMessenger"`
|
||||
L2MessageQueue common.Address `json:"L2MessageQueue"`
|
||||
L2TxFeeVault common.Address `json:"L2TxFeeVault"`
|
||||
L2GatewayRouter common.Address `json:"L2GatewayRouter"`
|
||||
L2StandardERC20Gateway common.Address `json:"L2StandardERC20Gateway"`
|
||||
}
|
||||
|
||||
// ContractsList all contracts addresses which are needed to be tested.
|
||||
type ContractsList struct {
|
||||
L1Contracts *L1Contracts `json:"l1_contracts,omitempty"`
|
||||
L2Contracts *L2Contracts `json:"l2_contracts,omitempty"`
|
||||
ERC20 common.Address `json:"erc20,omitempty"`
|
||||
Greeter common.Address `json:"greeter,omitempty"`
|
||||
}
|
||||
24
common/docker/contracts_list.json
Normal file
24
common/docker/contracts_list.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"l1_contracts": {
|
||||
"L1WETH": "0x7ecd3166e45b8fc8ff5b6f88af405f05c84fe28b",
|
||||
"L2GasPriceOracle": "0xf0fb0109ec4c0ffe1c3708010ac39df342ad13c6",
|
||||
"L1ScrollChain": "0x2dfda18f6e0c753f37323a5465a4a2999901f772",
|
||||
"L1MessageQueue": "0x4221e6c50c004a0a6d5b83e17077c2dbaf3be239",
|
||||
"L1ScrollMessenger": "0x5edd6a65e63d4bf5955bf890e1889f5d00d12f4e",
|
||||
"L1GatewayRouter": "0xba3e049c06254d4d02d4895e82a29d56e788a9f0",
|
||||
"L1StandardERC20Gateway": "0x81bfe9f57ef1a68f09c298fc5d756f657a69d809"
|
||||
},
|
||||
"l2_contracts": {
|
||||
"L1BlockContainer": "0xf0fb0109ec4c0ffe1c3708010ac39df342ad13c6",
|
||||
"L1GasPriceOracle": "0x5edd6a65e63d4bf5955bf890e1889f5d00d12f4e",
|
||||
"L2ProxyAdmin": "0x52128e5d5812f699f9ed2f56f744e1eefe78db92",
|
||||
"L2ScrollStandardERC20Factory": "0x6edca115a58590c2b236284a6c62dec3103d8fc4",
|
||||
"L2ScrollMessenger": "0x4221e6c50c004a0a6d5b83e17077c2dbaf3be239",
|
||||
"L2MessageQueue": "0xf86a9a06e2464539d139ec6d3ad3c63e9bb4bd3c",
|
||||
"L2TxFeeVault": "0x81bfe9f57ef1a68f09c298fc5d756f657a69d809",
|
||||
"L2GatewayRouter": "0x7363726f6c6c6c02000000000000000000000007",
|
||||
"L2StandardERC20Gateway": "0x24dd98a7f678bfaa5453130ddba5f7aa1b594df0"
|
||||
},
|
||||
"erc20": "0xd1c8d1a7bdef9cf9e9d05f01bd36d5f8a7501d3f",
|
||||
"greeter": "0xba3e049c06254d4d02d4895e82a29d56e788a9f0"
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package docker
|
||||
import (
|
||||
"crypto/rand"
|
||||
"database/sql"
|
||||
_ "embed" //nolint:golint
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/big"
|
||||
@@ -25,6 +26,9 @@ var (
|
||||
dbStartPort = 30000
|
||||
)
|
||||
|
||||
//go:embed contracts_list.json
|
||||
var contractsList []byte
|
||||
|
||||
// AppAPI app interface.
|
||||
type AppAPI interface {
|
||||
WaitResult(t *testing.T, timeout time.Duration, keyword string) bool
|
||||
@@ -43,6 +47,9 @@ type App struct {
|
||||
DBConfig *database.DBConfig
|
||||
DBConfigFile string
|
||||
|
||||
// pre deployed contracts' addresses.
|
||||
ContractsList
|
||||
|
||||
// common time stamp.
|
||||
Timestamp int
|
||||
}
|
||||
@@ -57,6 +64,11 @@ func NewDockerApp() *App {
|
||||
DBImg: newTestDBDocker("postgres"),
|
||||
DBConfigFile: fmt.Sprintf("/tmp/%d_db-config.json", timestamp),
|
||||
}
|
||||
|
||||
// Unmarshal contracts addresses.
|
||||
if err := json.Unmarshal(contractsList, &app.ContractsList); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := app.mockDBConfig(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7,44 +7,78 @@ import (
|
||||
|
||||
"github.com/scroll-tech/go-ethereum/accounts/abi/bind"
|
||||
"github.com/scroll-tech/go-ethereum/common"
|
||||
"github.com/scroll-tech/go-ethereum/core/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
l1gateways "scroll-tech/common/bytecode/scroll/L1/gateways"
|
||||
l2gateways "scroll-tech/common/bytecode/scroll/L2/gateways"
|
||||
|
||||
"scroll-tech/common/bytecode/erc20"
|
||||
"scroll-tech/common/bytecode/greeter"
|
||||
stypes "scroll-tech/common/types"
|
||||
"scroll-tech/common/utils"
|
||||
|
||||
"scroll-tech/database"
|
||||
"scroll-tech/database/migrate"
|
||||
"scroll-tech/database/orm"
|
||||
)
|
||||
|
||||
var (
|
||||
erc20Address = common.HexToAddress("0x7363726f6c6c6c20000000000000000000000014")
|
||||
greeterAddress = common.HexToAddress("0x7363726f6c6c6c20000000000000000000000015")
|
||||
// Balance equal to 1e28
|
||||
amount = new(big.Int).SetBytes(common.FromHex("204fce5e3e25020000000000"))
|
||||
ether = big.NewInt(1e18)
|
||||
)
|
||||
|
||||
func TestStandardERC20Gateway(t *testing.T) {
|
||||
base.RunL1Geth(t)
|
||||
base.RunL2Geth(t)
|
||||
l1Cli, err := base.L1Client()
|
||||
assert.Nil(t, err)
|
||||
|
||||
l2Cli, err := base.L2Client()
|
||||
assert.NoError(t, err)
|
||||
|
||||
l1StandardERC20, err := l1gateways.NewL1StandardERC20Gateway(base.L1Contracts.L1StandardERC20Gateway, l1Cli)
|
||||
assert.NoError(t, err)
|
||||
|
||||
l2StandardERC20, err := l2gateways.NewL2StandardERC20Gateway(base.L2Contracts.L2StandardERC20Gateway, l2Cli)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// check l2 standard erc20 address.
|
||||
l2ERC20_0, err := l1StandardERC20.GetL2ERC20Address(nil, base.L1Contracts.L1WETH)
|
||||
assert.NoError(t, err)
|
||||
l2ERC20_1, err := l2StandardERC20.GetL2ERC20Address(nil, base.L1Contracts.L1WETH)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, l2ERC20_0, l2ERC20_1)
|
||||
}
|
||||
|
||||
func TestERC20(t *testing.T) {
|
||||
base.RunL2Geth(t)
|
||||
l2Cli, err := base.L2Client()
|
||||
assert.Nil(t, err)
|
||||
|
||||
token, err := erc20.NewERC20Mock(erc20Address, l2Cli)
|
||||
token, err := erc20.NewERC20Mock(base.ERC20, l2Cli)
|
||||
assert.NoError(t, err)
|
||||
|
||||
auth, err := bind.NewKeyedTransactorWithChainID(bridgeApp.Config.L2Config.RelayerConfig.MessageSenderPrivateKeys[0], base.L2gethImg.ChainID())
|
||||
auth, err := bind.NewKeyedTransactorWithChainID(bridgeApp.Config.L2Config.RelayerConfig.GasOracleSenderPrivateKeys[0], base.L2gethImg.ChainID())
|
||||
assert.NoError(t, err)
|
||||
|
||||
authBls0, err := token.BalanceOf(nil, auth.From)
|
||||
assert.NoError(t, err)
|
||||
|
||||
tokenBls0, err := token.BalanceOf(nil, erc20Address)
|
||||
tokenBls0, err := token.BalanceOf(nil, base.ERC20)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// create tx to transfer balance.
|
||||
value := big.NewInt(1000)
|
||||
tx, err := token.Transfer(auth, erc20Address, value)
|
||||
to := common.HexToAddress("0x85fd9d96a42972f8301b886e77838f363e72dff7")
|
||||
tx, err := token.Transfer(auth, to, value)
|
||||
assert.NoError(t, err)
|
||||
bind.WaitMined(context.Background(), l2Cli, tx)
|
||||
|
||||
authBls1, err := token.BalanceOf(nil, auth.From)
|
||||
assert.NoError(t, err)
|
||||
|
||||
tokenBls1, err := token.BalanceOf(nil, erc20Address)
|
||||
tokenBls1, err := token.BalanceOf(nil, to)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// check balance.
|
||||
@@ -57,18 +91,114 @@ func TestGreeter(t *testing.T) {
|
||||
l2Cli, err := base.L2Client()
|
||||
assert.Nil(t, err)
|
||||
|
||||
auth, err := bind.NewKeyedTransactorWithChainID(bridgeApp.Config.L2Config.RelayerConfig.MessageSenderPrivateKeys[0], base.L2gethImg.ChainID())
|
||||
auth, err := bind.NewKeyedTransactorWithChainID(bridgeApp.Config.L2Config.RelayerConfig.GasOracleSenderPrivateKeys[0], base.L2gethImg.ChainID())
|
||||
assert.NoError(t, err)
|
||||
|
||||
token, err := greeter.NewGreeter(greeterAddress, l2Cli)
|
||||
token, err := greeter.NewGreeter(base.Greeter, l2Cli)
|
||||
assert.NoError(t, err)
|
||||
|
||||
val := big.NewInt(100)
|
||||
tx, err := token.SetValue(auth, val)
|
||||
assert.NoError(t, err)
|
||||
_, err = bind.WaitMined(context.Background(), l2Cli, tx)
|
||||
assert.NoError(t, err)
|
||||
|
||||
res, err := token.Retrieve(nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, val.String(), res.String())
|
||||
}
|
||||
|
||||
func TestMintERC20(t *testing.T) {
|
||||
t.Log(base.L1Contracts.L1WETH.String())
|
||||
base.RunL1Geth(t)
|
||||
l1Cli, err := base.L1Client()
|
||||
assert.Nil(t, err)
|
||||
|
||||
L1ERC20, err := erc20.NewERC20Mock(base.L1Contracts.L1WETH, l1Cli)
|
||||
assert.NoError(t, err)
|
||||
|
||||
l1Auth, err := bind.NewKeyedTransactorWithChainID(bridgeApp.Config.L2Config.RelayerConfig.GasOracleSenderPrivateKeys[0], base.L1gethImg.ChainID())
|
||||
assert.NoError(t, err)
|
||||
|
||||
// check init balance in erc20 contract.
|
||||
val, err := L1ERC20.BalanceOf(nil, l1Auth.From)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, amount, val)
|
||||
|
||||
// Approve for l1 standard erc20 gateway.
|
||||
allow, err := L1ERC20.Allowance(nil, l1Auth.From, base.L1Contracts.L1StandardERC20Gateway)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, amount, allow)
|
||||
}
|
||||
|
||||
func TestCheckL1Address(t *testing.T) {
|
||||
base.RunL1Geth(t)
|
||||
base.RunL2Geth(t)
|
||||
l1Cli, err := base.L1Client()
|
||||
assert.Nil(t, err)
|
||||
|
||||
l2Cli, err := base.L2Client()
|
||||
assert.NoError(t, err)
|
||||
|
||||
l1StandardERC20, err := l1gateways.NewL1StandardERC20Gateway(base.L1Contracts.L1StandardERC20Gateway, l1Cli)
|
||||
assert.NoError(t, err)
|
||||
|
||||
l2StandardERC20, err := l2gateways.NewL2StandardERC20Gateway(base.L2Contracts.L2StandardERC20Gateway, l2Cli)
|
||||
assert.NoError(t, err)
|
||||
|
||||
l2ERC20_l1, err := l1StandardERC20.GetL2ERC20Address(nil, base.L1Contracts.L1WETH)
|
||||
assert.NoError(t, err)
|
||||
t.Log(l2ERC20_l1.String())
|
||||
|
||||
l2ERC20_l2, err := l2StandardERC20.GetL2ERC20Address(nil, base.L1Contracts.L1WETH)
|
||||
assert.NoError(t, err)
|
||||
t.Log(l2ERC20_l2.String())
|
||||
|
||||
// check l2 erc20 address.
|
||||
assert.Equal(t, l2ERC20_l1, l2ERC20_l2)
|
||||
}
|
||||
|
||||
func TestStandardERC20Deposit(t *testing.T) {
|
||||
base.RunImages(t)
|
||||
// Reset db.
|
||||
assert.NoError(t, migrate.ResetDB(base.DBClient(t)))
|
||||
t.Log("bridge config file: ", bridgeApp.BridgeConfigFile)
|
||||
|
||||
// check result.
|
||||
db, err := database.NewOrmFactory(base.DBConfig)
|
||||
assert.NoError(t, err)
|
||||
|
||||
l1Cli, err := base.L1Client()
|
||||
assert.Nil(t, err)
|
||||
|
||||
l1StandardERC20, err := l1gateways.NewL1StandardERC20Gateway(base.L1Contracts.L1StandardERC20Gateway, l1Cli)
|
||||
assert.NoError(t, err)
|
||||
l1Auth, err := bind.NewKeyedTransactorWithChainID(bridgeApp.Config.L2Config.RelayerConfig.GasOracleSenderPrivateKeys[0], base.L1gethImg.ChainID())
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Run event_watcher process.
|
||||
bridgeApp.RunApp(t, utils.EventWatcherApp)
|
||||
|
||||
// l1 => l2 deposit transfer.
|
||||
tx, err := l1StandardERC20.DepositERC20(l1Auth, base.L1Contracts.L1WETH, ether, big.NewInt(100000000))
|
||||
assert.NoError(t, err)
|
||||
receipt, err := bind.WaitMined(context.Background(), l1Cli, tx)
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, receipt.Status == types.ReceiptStatusSuccessful)
|
||||
t.Log("block number: ", receipt.BlockNumber.Int64())
|
||||
|
||||
var (
|
||||
l1MsgOrm = db.(orm.L1MessageOrm)
|
||||
l1Msgs []*stypes.L1Message
|
||||
)
|
||||
// Catch event result.
|
||||
utils.TryTimes(30, func() bool {
|
||||
l1Msgs, err = l1MsgOrm.GetL1MessagesByStatus(stypes.MsgPending, 1)
|
||||
return err == nil && len(l1Msgs) != 0
|
||||
})
|
||||
assert.Equal(t, 1, len(l1Msgs))
|
||||
assert.Equal(t, receipt.BlockNumber.Uint64(), l1Msgs[0].Height)
|
||||
assert.Equal(t, receipt.TxHash.String(), l1Msgs[0].Layer1Hash)
|
||||
|
||||
bridgeApp.WaitExit()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user