diff --git a/.gitignore b/.gitignore index d01bd1a..efe3eb1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,8 @@ Cargo.lock # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ \ No newline at end of file +#.idea/ + +# Added by cargo + +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..1f98be2 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,40 @@ +[package] +name = "citrea-e2e" +version = "0.1.0" +edition = "2021" +resolver = "2" + +[dependencies] +anyhow = { version = "1.0.68", default-features = false, features = ["std"] } +async-trait = "0.1.71" +bitcoin = { version = "0.32.2", features = ["serde", "rand"] } +bitcoincore-rpc = { version = "0.18.0" } +bollard = { version = "0.17.1" } +futures = "0.3" +log = "0.4" +rand = "0.8" +serde = { version = "1.0.192", default-features = false, features = ["alloc", "derive"] } +serde_json = { version = "1.0", default-features = false } +tempfile = "3.8" +tokio = { version = "1.39", features = ["full"] } +toml = "0.8.0" +which = "6.0.3" + +# Eth client dependencies +alloy = { version = "0.2.1", features = ["hyper", "consensus", "rpc-types-eth", "provider-http", "signers", "signer-local"] } +jsonrpsee = { version = "0.24.2", features = ["http-client", "ws-client"] } +reqwest = { version = "0.12.5", features = ["rustls-tls", "json", "http2"], default-features = false } +reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "a206eb3690e5a51d3c797fed2a6ed722e36863eb", default-features = false } +reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", rev = "a206eb3690e5a51d3c797fed2a6ed722e36863eb", default-features = false } +reth-rpc-types = { git = "https://github.com/paradigmxyz/reth", rev = "a206eb3690e5a51d3c797fed2a6ed722e36863eb", default-features = false, features = ["jsonrpsee-types"] } + +# Citrea dependencies +bitcoin-da = { git = "https://github.com/chainwayxyz/citrea", features = ["native"] } +citrea-primitives = { git = "https://github.com/chainwayxyz/citrea" } +citrea-sequencer = { git = "https://github.com/chainwayxyz/citrea" } +sov-ledger-rpc = { git = "https://github.com/chainwayxyz/citrea", features = ["client"] } +sov-rollup-interface = { git = "https://github.com/chainwayxyz/citrea" } +sov-stf-runner = { git = "https://github.com/chainwayxyz/citrea", features = ["native"] } + +[patch.crates-io] +bitcoincore-rpc = { version = "0.18.0", git = "https://github.com/chainwayxyz/rust-bitcoincore-rpc.git", rev = "0ae498d" } diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8d63166 --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +.PHONY: help + +help: ## Display this help message + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +.PHONY: build +build: ## Build the project + @cargo build + + +clean: ## Cleans compiled + @cargo clean + +install-dev-tools: ## Installs all necessary cargo helpers + cargo install --locked dprint + cargo install cargo-llvm-cov + cargo install cargo-hack + cargo install --locked cargo-udeps + cargo install flaky-finder + cargo install --locked cargo-nextest + cargo install --version 1.7.0 cargo-binstall + cargo binstall --no-confirm cargo-risczero@1.0.5 + cargo risczero install --version r0.1.79.0-2 + rustup target add thumbv6m-none-eabi + rustup component add llvm-tools-preview + +lint: ## cargo check and clippy. Skip clippy on guest code since it's not supported by risc0 + ## fmt first, because it's the cheapest + dprint check + cargo +nightly fmt --all --check + cargo check --all-targets --all-features + $(MAKE) check-fuzz + SKIP_GUEST_BUILD=1 cargo clippy --all-targets --all-features + +lint-fix: ## dprint fmt, cargo fmt, fix and clippy. Skip clippy on guest code since it's not supported by risc0 + dprint fmt + cargo +nightly fmt --all + cargo fix --allow-dirty + SKIP_GUEST_BUILD=1 cargo clippy --fix --allow-dirty + +docs: ## Generates documentation locally + cargo doc --open + +set-git-hook: + git config core.hooksPath .githooks diff --git a/README.md b/README.md index 69ddc08..3775066 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # citrea-e2e + E2E Test framework for citrea diff --git a/dprint.json b/dprint.json new file mode 100644 index 0000000..662c9f9 --- /dev/null +++ b/dprint.json @@ -0,0 +1,11 @@ +{ + "markdown": { + }, + "toml": { + }, + "excludes": [], + "plugins": [ + "https://plugins.dprint.dev/markdown-0.17.8.wasm", + "https://plugins.dprint.dev/toml-0.6.3.wasm" + ] +} diff --git a/resources/genesis/bitcoin-regtest/accounts.json b/resources/genesis/bitcoin-regtest/accounts.json new file mode 100644 index 0000000..f65b078 --- /dev/null +++ b/resources/genesis/bitcoin-regtest/accounts.json @@ -0,0 +1,3 @@ +{ + "pub_keys": [] +} diff --git a/resources/genesis/bitcoin-regtest/evm.json b/resources/genesis/bitcoin-regtest/evm.json new file mode 100644 index 0000000..4e4670b --- /dev/null +++ b/resources/genesis/bitcoin-regtest/evm.json @@ -0,0 +1,158 @@ +{ + "data": [ + { + "address": "0x0f820f428ae436c1000b27577bf5bbf09bfec8f2", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x3100000000000000000000000000000000000001", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000001", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000002", + "balance": "0x115eec47f6cf7e35000000", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000002", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000003", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000003", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000004", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000004", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000005", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000005", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x31ffffffffffffffffffffffffffffffffffffff", + "balance": "0x0", + "code": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610499565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee3660046104bd565b610229565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461050c565b610291565b34801561013057600080fd5b506100d161013f3660046104bd565b610300565b34801561015057600080fd5b506100d161015f366004610499565b610336565b34801561017057600080fd5b506100a061017f366004610499565b6103b4565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d91906105ea565b949350505050565b61021d6103da565b6102276000610434565b565b6102316103da565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561027557600080fd5b505af1158015610289573d6000803e3d6000fd5b505050505050565b6102996103da565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906102c99086908690600401610607565b6000604051808303818588803b1580156102e257600080fd5b505af11580156102f6573d6000803e3d6000fd5b5050505050505050565b6103086103da565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe69060240161025b565b61033e6103da565b6001600160a01b0381166103a85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6103b181610434565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b6000546001600160a01b031633146102275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146103b157600080fd5b6000602082840312156104ab57600080fd5b81356104b681610484565b9392505050565b600080604083850312156104d057600080fd5b82356104db81610484565b915060208301356104eb81610484565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561052157600080fd5b833561052c81610484565b9250602084013561053c81610484565b9150604084013567ffffffffffffffff81111561055857600080fd5b8401601f8101861361056957600080fd5b803567ffffffffffffffff811115610583576105836104f6565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156105b2576105b26104f6565b6040528181528282016020018810156105ca57600080fd5b816020840160208301376000602083830101528093505050509250925092565b6000602082840312156105fc57600080fd5b81516104b681610484565b60018060a01b0383168152604060208201526000825180604084015260005b818110156106435760208186018101516060868401015201610626565b506000606082850101526060601f19601f830116840101915050939250505056", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + } + }, + { + "address": "0x3200000000000000000000000000000000000001", + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806357e871e71161007157806357e871e71461014c57806361b207e214610155578063a91d8b3d14610182578063d269a03e146101a2578063d761753e146101b5578063ee82ac5e146101e857600080fd5b80630466efc4146100ae5780630e27bc11146100e15780631f578333146100f657806334cdf78d146101095780634ffd344a14610129575b600080fd5b6100ce6100bc366004610598565b60009081526002602052604090205490565b6040519081526020015b60405180910390f35b6100f46100ef3660046105b1565b610208565b005b6100f4610104366004610598565b610330565b6100ce610117366004610598565b60016020526000908152604090205481565b61013c61013736600461061c565b6103de565b60405190151581526020016100d8565b6100ce60005481565b6100ce610163366004610598565b6000908152600160209081526040808320548352600290915290205490565b6100ce610190366004610598565b60026020526000908152604090205481565b61013c6101b036600461061c565b610404565b6101d073deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b6040516001600160a01b0390911681526020016100d8565b6100ce6101f6366004610598565b60009081526001602052604090205490565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146102705760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c65720060448201526064015b60405180910390fd5b60008054908190036102b65760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b6044820152606401610267565b60008181526001602081905260409091208490556102d5908290610677565b60009081558381526002602090815260409182902084905581518381529081018590529081018390527f32eff959e2e8d1609edc4b39ccf75900aa6c1da5719f8432752963fdf008234f9060600160405180910390a1505050565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146103935760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c6572006044820152606401610267565b600054156103d95760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610267565b600055565b6000858152600160205260408120546103fa908686868661040f565b9695505050505050565b60006103fa86868686865b6000858152600260209081526040808320548151601f870184900484028101840190925285825291610462918891849190899089908190840183828082843760009201919091525089925061046d915050565b979650505050505050565b6000838514801561047c575081155b801561048757508251155b15610494575060016104a3565b6104a0858486856104ab565b90505b949350505050565b6000602084516104bb9190610698565b156104c8575060006104a3565b83516000036104d9575060006104a3565b818560005b8651811015610548576104f2600284610698565b6001036105165761050f6105098883016020015190565b83610555565b915061052f565b61052c826105278984016020015190565b610555565b91505b60019290921c91610541602082610677565b90506104de565b5090931495945050505050565b6000610561838361056a565b90505b92915050565b60008260005281602052602060006040600060025afa50602060006020600060025afa505060005192915050565b6000602082840312156105aa57600080fd5b5035919050565b600080604083850312156105c457600080fd5b50508035926020909101359150565b60008083601f8401126105e557600080fd5b50813567ffffffffffffffff8111156105fd57600080fd5b60208301915083602082850101111561061557600080fd5b9250929050565b60008060008060006080868803121561063457600080fd5b8535945060208601359350604086013567ffffffffffffffff81111561065957600080fd5b610665888289016105d3565b96999598509660600135949350505050565b8082018082111561056457634e487b7160e01b600052601160045260246000fd5b6000826106b557634e487b7160e01b600052601260045260246000fd5b50069056" + }, + { + "address": "0x3200000000000000000000000000000000000002", + "balance": "0x0", + "code": "0x60806040526004361061019c5760003560e01c80638786dba7116100ec578063d761753e1161008a578063e613ae0011610064578063e613ae001461048e578063f119a9bd146104a9578063f2fde38b146104c9578063f8e655d2146104e957600080fd5b8063d761753e14610431578063dd95c7c614610459578063e30c39781461047957600080fd5b8063a41c5cf3116100c6578063a41c5cf3146103af578063b3ab15fb146103c4578063bafa9eb2146103e4578063c045577b1461040457600080fd5b80638786dba71461037257806387f8bf56146103855780638da5cb5b1461039a57600080fd5b8063570ca73511610159578063715018a611610133578063715018a61461031357806374ab4a8314610328578063781952a81461034857806379ba50971461035d57600080fd5b8063570ca735146102945780635d3e3176146102d15780635e3cc740146102f357600080fd5b806311e53a01146101a1578063158ef93e146101e1578063198546231461020b5780634126013714610220578063419759f514610240578063471ba1e314610256575b600080fd5b3480156101ad57600080fd5b506101ce6101bc3660046129ee565b60276020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156101ed57600080fd5b506000546101fb9060ff1681565b60405190151581526020016101d8565b61021e610219366004612a4b565b610509565b005b34801561022c57600080fd5b5061021e61023b366004612afb565b6106e2565b34801561024c57600080fd5b506101ce60215481565b34801561026257600080fd5b506102766102713660046129ee565b6108ef565b604080519283526001600160e01b03199091166020830152016101d8565b3480156102a057600080fd5b506000546102b99061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016101d8565b3480156102dd57600080fd5b506102e6610920565b6040516101d89190612b96565b3480156102ff57600080fd5b5061021e61030e366004612be2565b6109ae565b34801561031f57600080fd5b5061021e610d65565b34801561033457600080fd5b5061021e610343366004612c1e565b610d79565b34801561035457600080fd5b506026546101ce565b34801561036957600080fd5b5061021e610f4c565b61021e610380366004612c88565b610f94565b34801561039157600080fd5b506102e66110bb565b3480156103a657600080fd5b506102b96110c8565b3480156103bb57600080fd5b506102e66110fd565b3480156103d057600080fd5b5061021e6103df366004612cb4565b61110a565b3480156103f057600080fd5b506101fb6103ff3660046129ee565b61117b565b34801561041057600080fd5b506101ce61041f3660046129ee565b60286020526000908152604090205481565b34801561043d57600080fd5b506102b973deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b34801561046557600080fd5b5061021e610474366004612be2565b6111a6565b34801561048557600080fd5b506102b9611606565b34801561049a57600080fd5b506102b96001603160981b0181565b3480156104b557600080fd5b5061021e6104c4366004612cdd565b61162f565b3480156104d557600080fd5b5061021e6104e4366004612cb4565b6116a3565b3480156104f557600080fd5b5061021e610504366004612d1e565b611728565b82811461054f5760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b60448201526064015b60405180910390fd5b60215461055d908490612d97565b34146105a55760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610546565b60265460005b848110156106da57600060405180604001604052808888858181106105d2576105d2612dae565b9050602002013581526020018686858181106105f0576105f0612dae565b90506020020160208101906106059190612dc4565b6001600160e01b03191690526026805460018101825560009190915281517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a359460029092029182015560208201517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3595909101805463ffffffff191660e09290921c91909117905590507f3311a04a346a103ac115cca33028a2bc82f1964805860d0d3fc84a2772496ada816106b98486612ddf565b426040516106c993929190612df2565b60405180910390a1506001016105ab565b505050505050565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146107455760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c6572006044820152606401610546565b60005460ff16156107985760405162461bcd60e51b815260206004820152601f60248201527f436f6e747261637420697320616c726561647920696e697469616c697a6564006044820152606401610546565b806000036107e85760405162461bcd60e51b815260206004820152601a60248201527f4465706f73697420616d6f756e742063616e6e6f7420626520300000000000006044820152606401610546565b60008490036108095760405162461bcd60e51b815260040161054690612e20565b6000805460ff191660011790556023610823858783612ef0565b506024610831838583612ef0565b50602181905560008054610100600160a81b03191674deaddeaddeaddeaddeaddeaddeaddeaddeaddead001781556040805191825273deaddeaddeaddeaddeaddeaddeaddeaddeaddead60208301527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910160405180910390a17f80bd1fdfe157286ce420ee763f91748455b249605748e5df12dad9844402bafc858585856040516108e09493929190612fd8565b60405180910390a15050505050565b602681815481106108ff57600080fd5b60009182526020909120600290910201805460019091015490915060e01b82565b6025805461092d90612e6d565b80601f016020809104026020016040519081016040528092919081815260200182805461095990612e6d565b80156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b505050505081565b6109b7816117a2565b5060009050610a066109cc606084018461300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ac592505050565b915060009050610a63610a1c606085018561300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a5e925060019150869050613050565b611adc565b90506000610a7082611c54565b90506000610a88610a8383836020611cd6565b611d99565b90506000610aa9610a836020808651610aa19190613050565b869190611cd6565b600083815260276020526040812054919250819003610b015760405162461bcd60e51b815260206004820152601460248201527311195c1bdcda5d08191bc81b9bdd08195e1a5cdd60621b6044820152606401610546565b6000610b4d610b1360808a018a61300a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250611e1e915050565b90506000610b5c826001611f01565b9050600060258054610b6d90612e6d565b915060009050610b7e838284611cd6565b9050610c148160258054610b9190612e6d565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90612e6d565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b5050505050612085565b610c605760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420736c6173684f7254616b65207363726970740000000000006044820152606401610546565b6000602881610c70600189613050565b815260200190815260200160002054905060008160001480610c9a5750610c968861215c565b8214155b905080610ce95760405162461bcd60e51b815260206004820152601960248201527f4f70657261746f72206973206e6f74206d616c6963696f7573000000000000006044820152606401610546565b600180896103e88110610cfe57610cfe612dae565b602091828204019190066101000a81548160ff0219169083151502179055507ff918cdaebea74c5a8c3b02d7404c162f507551b158202cedcba9b6a74eabdff288604051610d4e91815260200190565b60405180910390a150505050505050505050505050565b610d6d612169565b610d77600061219b565b565b610d82836117a2565b5060009050610dd3610d97604086018661300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121d7915050565b90506000610de08261232a565b90506000610ded83612337565b9050600060268581548110610e0457610e04612dae565b60009182526020918290206040805180820190915260029290920201805480835260019091015460e01b6001600160e01b03191692820192909252915083148015610e665750816001600160e01b03191681602001516001600160e01b031916145b610ea65760405162461bcd60e51b81526020600482015260116024820152706e6f74206d61746368696e67205554584f60781b6044820152606401610546565b6000610eb86109cc60608a018a61300a565b915060009050610ece610a1c60608b018b61300a565b90506000610edb82611c54565b90506000610ee882611d99565b9050610ef38161215c565b60008a8152602860209081526040918290209290925580518b81529182018390527feedf47c2f61b040827944fd45e44ef6d742354b34e1af7dd99a56f444ec79347910160405180910390a15050505050505050505050565b3380610f56611606565b6001600160a01b031614610f885760405163118cdaa760e01b81526001600160a01b0382166004820152602401610546565b610f918161219b565b50565b6021543414610fdf5760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610546565b6040805180820182528381526001600160e01b03198316602082019081526026805460018101825560009190915282517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3594600283029081019190915591517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3595909201805463ffffffff191660e09390931c9290921790915591519091907f3311a04a346a103ac115cca33028a2bc82f1964805860d0d3fc84a2772496ada906110ad90849084904290612df2565b60405180910390a150505050565b6024805461092d90612e6d565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6023805461092d90612e6d565b611112612169565b60008054610100600160a81b0319166101006001600160a01b038481168281029390931793849055604080519290940416815260208101919091527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910160405180910390a150565b6001816103e8811061118c57600080fd5b60209182820401919006915054906101000a900460ff1681565b60005461010090046001600160a01b031633146112055760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610546565b600080611211836117a2565b915091508060011461125e5760405162461bcd60e51b815260206004820152601660248201527513db9b1e481bdb99481a5b9c1d5d08185b1b1bddd95960521b6044820152606401610546565b60006113096112706020860186612dc4565b61127d604087018761300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112bf92505050606088018861300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113049250505060c0890160a08a01612dc4565b612344565b6000818152602760205260409020549091501561135d5760405162461bcd60e51b81526020600482015260126024820152711d1e125908185b1c9958591e481cdc195b9d60721b6044820152606401610546565b60226000815461136c90613063565b9182905550600082815260276020526040812091909155611393610b13608087018761300a565b905060006113a082611ac5565b915050806003146113eb5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964207769746e657373206974656d7360581b6044820152606401610546565b60006113f8836001611f01565b905060006023805461140990612e6d565b91506000905061141a838284611cd6565b905061142d8160238054610b9190612e6d565b6114725760405162461bcd60e51b8152602060048201526016602482015275125b9d985b1a590819195c1bdcda5d081cd8dc9a5c1d60521b6044820152606401610546565b60006114a66024805461148490612e6d565b86516114909250613050565b6024805461149d90612e6d565b87929150611cd6565b90506114b98160248054610b9190612e6d565b6114fd5760405162461bcd60e51b8152602060048201526015602482015274092dcecc2d8d2c840e6c6e4d2e0e840e6eaccccd2f605b1b6044820152606401610546565b600061150885612374565b602254604080518d8152602081018c90526001600160a01b038416818301524260608201526080810192909252519192507fa82453ca34121b3ecb910d957824e27c5dc6465315949facd15fb72886490058919081900360a00190a16021546040516000916001600160a01b038416918381818185875af1925050503d80600081146115b0576040519150601f19603f3d011682016040523d82523d6000602084013e6115b5565b606091505b50509050806115f85760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610546565b505050505050505050505050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c006110ed565b611637612169565b60008190036116585760405162461bcd60e51b815260040161054690612e20565b6025611665828483612ef0565b507f8578c80bdea3ff51431011ed88db9cb415de2cf64f9ed5e7137288268cbdeb2c828260405161169792919061307c565b60405180910390a15050565b6116ab612169565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556116ef6110c8565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b611730612169565b60008390036117515760405162461bcd60e51b815260040161054690612e20565b602361175e848683612ef0565b50602461176c828483612ef0565b507f80bd1fdfe157286ce420ee763f91748455b249605748e5df12dad9844402bafc848484846040516110ad9493929190612fd8565b600080806118026117b66020860186612dc4565b6117c66040870160208801613090565b6117d3604088018861300a565b6117e060608a018a61300a565b6117ed60808c018c61300a565b6117fd60c08e0160a08f01612dc4565b6123aa565b905061184e611814604086018661300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123de92505050565b61189a5760405162461bcd60e51b815260206004820152601d60248201527f56696e206973206e6f742070726f7065726c7920666f726d61747465640000006044820152606401610546565b6118e46118aa606086018661300a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061248292505050565b6119305760405162461bcd60e51b815260206004820152601e60248201527f566f7574206973206e6f742070726f7065726c7920666f726d617474656400006044820152606401610546565b60006119426109cc604087018761300a565b91506119929050611956608087018761300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250859250612519915050565b6119e85760405162461bcd60e51b815260206004820152602160248201527f5769746e657373206973206e6f742070726f7065726c7920666f726d617474656044820152601960fa1b6064820152608401610546565b6001603160981b01634ffd344a60e087013584611a0860c08a018a61300a565b8a61010001356040518663ffffffff1660e01b8152600401611a2e9594939291906130ba565b602060405180830381865afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6f91906130ec565b611abb5760405162461bcd60e51b815260206004820152601b60248201527f5472616e73616374696f6e206973206e6f7420696e20626c6f636b00000000006044820152606401610546565b9094909350915050565b600080611ad383600061258e565b91509150915091565b6060600080611aea85611ac5565b909250905060018201611b0f5760405162461bcd60e51b81526004016105469061310e565b808410611b525760405162461bcd60e51b81526020600482015260116024820152702b37baba103932b0b21037bb32b9393ab760791b6044820152606401610546565b600080611b60846001612ddf565b905060005b86811015611bde57611b778883612730565b92506000198303611bca5760405162461bcd60e51b815260206004820152601a60248201527f42616420566172496e7420696e207363726970745075626b65790000000000006044820152606401610546565b611bd48383612ddf565b9150600101611b65565b50611be98782612730565b91506000198203611c3c5760405162461bcd60e51b815260206004820152601a60248201527f42616420566172496e7420696e207363726970745075626b65790000000000006044820152606401610546565b611c47878284611cd6565b9450505050505b92915050565b606081600981518110611c6957611c69612dae565b6020910101516001600160f81b031916603560f91b14611c9757505060408051602081019091526000815290565b600082600a81518110611cac57611cac612dae565b01602001516001600160f81b031981169150611ccf908490600b9060f81c611cd6565b9392505050565b606081600003611cf55750604080516020810190915260008152611ccf565b6000611d018385612ddf565b90508381118015611d13575080855110155b611d555760405162461bcd60e51b8152602060048201526013602482015272536c696365206f7574206f6620626f756e647360681b6044820152606401610546565b604051915082604083010160405282825283850182038460208701018481015b80821015611d8e57815183830152602082019150611d75565b505050509392505050565b60008151600003611dac57506000919050565b81516020811115611e0a5760405162461bcd60e51b815260206004820152602260248201527f42797465732063616e6e6f74206265206d6f7265207468616e20333220627974604482015261657360f01b6064820152608401610546565b60209283015192036008029190911c919050565b606060008060005b84811015611e9757611e388683612794565b92506000198303611e835760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610546565b611e8d8383612ddf565b9150600101611e26565b50611ea28582612794565b91506000198203611eed5760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610546565b611ef8858284611cd6565b95945050505050565b6060600080611f0f85611ac5565b909250905060018201611f345760405162461bcd60e51b81526004016105469061310e565b808410611f765760405162461bcd60e51b815260206004820152601060248201526f2b34b7103932b0b21037bb32b9393ab760811b6044820152606401610546565b600080611f84846001612ddf565b905060005b8681101561200f57611f9b888361258e565b909550925060018301611fe55760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610546565b82611ff1866001612ddf565b611ffb9190612ddf565b6120059083612ddf565b9150600101611f89565b5061201a878261258e565b9094509150600182016120645760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610546565b611c47816120728685612ddf565b61207d906001612ddf565b899190611cd6565b8151815160009190811461209d576000915050611c4e565b60206000805b8383116120d357505084810151848201516020909201918082146120ce576000945050505050611c4e565b6120a3565b60006120e0602085613050565b90505b8481101561214e578681815181106120fd576120fd612dae565b602001015160f81c60f81b6001600160f81b03191688828151811061212457612124612dae565b01602001516001600160f81b0319161461214657600095505050505050611c4e565b6001016120e3565b506001979650505050505050565b6000611c4e826001612ddf565b336121726110c8565b6001600160a01b031614610d775760405163118cdaa760e01b8152336004820152602401610546565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556121d382612836565b5050565b60606000806121e585611ac5565b90925090506001820161220a5760405162461bcd60e51b81526004016105469061310e565b80841061224c5760405162461bcd60e51b815260206004820152601060248201526f2b34b7103932b0b21037bb32b9393ab760811b6044820152606401610546565b60008061225a846001612ddf565b905060005b868110156122d25761227188836128a7565b925060001983036122be5760405162461bcd60e51b815260206004820152601760248201527642616420566172496e7420696e2073637269707453696760481b6044820152606401610546565b6122c88383612ddf565b915060010161225f565b506122dd87826128a7565b91506000198203611c3c5760405162461bcd60e51b815260206004820152601760248201527642616420566172496e7420696e2073637269707453696760481b6044820152606401610546565b6020810151600090611c4e565b6000611c4e8260206128f0565b6000611ef8858585856040516020016123609493929190613150565b6040516020818303038152906040526128ff565b6000806023805461238490612e6d565b91506000905061239684836014611cd6565b61239f906131ad565b60601c949350505050565b60006123d08a8a8a8a8a8a8a8a8a60405160200161236099989796959493929190613200565b9a9950505050505050505050565b60008060006123ec84611ac5565b90925090508015806123ff575060001982145b1561240e575060009392505050565b600061241b836001612ddf565b905060005b82811015612475578551821061243c5750600095945050505050565b600061244887846128a7565b90506000198103612460575060009695505050505050565b61246a8184612ddf565b925050600101612420565b5093519093149392505050565b600080600061249084611ac5565b90925090508015806124a3575060001982145b156124b2575060009392505050565b60006124bf836001612ddf565b905060005b8281101561247557855182106124e05750600095945050505050565b60006124ec8784612730565b90506000198103612504575060009695505050505050565b61250e8184612ddf565b9250506001016124c4565b60008160000361252b57506000611c4e565b6000805b83811015612582578451821061254a57600092505050611c4e565b60006125568684612794565b9050600019810361256d5760009350505050611c4e565b6125778184612ddf565b92505060010161252f565b50835114905092915050565b600080600061259d8585612926565b90508060ff166000036125d25760008585815181106125be576125be612dae565b016020015190935060f81c91506127299050565b836125de826001613269565b60ff166125eb9190612ddf565b855110156126025760001960009250925050612729565b60008160ff166002036126465761263b612627612620876001612ddf565b88906128f0565b62ffff0060e882901c1660f89190911c1790565b61ffff16905061271f565b8160ff1660040361269557612688612662612620876001612ddf565b60d881901c63ff00ff001662ff00ff60e89290921c9190911617601081811b91901c1790565b63ffffffff16905061271f565b8160ff1660080361271f576127136126b1612620876001612ddf565b60c01c64ff000000ff600882811c91821665ff000000ff009390911b92831617601090811b6001600160401b031666ff00ff00ff00ff9290921667ff00ff00ff00ff009093169290921790911c65ffff0000ffff1617602081811c91901b1790565b6001600160401b031690505b60ff909116925090505b9250929050565b600061273d826009612ddf565b8351101561274e5750600019611c4e565b60008061276585612760866008612ddf565b61258e565b90925090506001820161277e5760001992505050611c4e565b8061278a836009612ddf565b611ef89190612ddf565b60008060006127a3858561258e565b9092509050600182016127bc5760001992505050611c4e565b6000806127ca846001612ddf565b905060005b8381101561282b576127e588612760848a612ddf565b9095509250600183016128015760001995505050505050611c4e565b8261280d866001612ddf565b6128179190612ddf565b6128219083612ddf565b91506001016127cf565b509695505050505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60008060006128b685856129ac565b9092509050600182016128cf5760001992505050611c4e565b806128db836025612ddf565b6128e59190612ddf565b611ef8906004612ddf565b6000611ccf8383016020015190565b60006020600083516020850160025afa50602060006020600060025afa5050600051919050565b600082828151811061293a5761293a612dae565b016020015160f81c60ff0361295157506008611c4e565b82828151811061296357612963612dae565b016020015160f81c60fe0361297a57506004611c4e565b82828151811061298c5761298c612dae565b016020015160f81c60fd036129a357506002611c4e565b50600092915050565b6000806129ba836025612ddf565b845110156129cf575060001990506000612729565b6000806129e186612760876024612ddf565b9097909650945050505050565b600060208284031215612a0057600080fd5b5035919050565b60008083601f840112612a1957600080fd5b5081356001600160401b03811115612a3057600080fd5b6020830191508360208260051b850101111561272957600080fd5b60008060008060408587031215612a6157600080fd5b84356001600160401b03811115612a7757600080fd5b612a8387828801612a07565b90955093505060208501356001600160401b03811115612aa257600080fd5b612aae87828801612a07565b95989497509550505050565b60008083601f840112612acc57600080fd5b5081356001600160401b03811115612ae357600080fd5b60208301915083602082850101111561272957600080fd5b600080600080600060608688031215612b1357600080fd5b85356001600160401b03811115612b2957600080fd5b612b3588828901612aba565b90965094505060208601356001600160401b03811115612b5457600080fd5b612b6088828901612aba565b96999598509660400135949350505050565b60005b83811015612b8d578181015183820152602001612b75565b50506000910152565b6020815260008251806020840152612bb5816040850160208701612b72565b601f01601f19169190910160400192915050565b60006101208284031215612bdc57600080fd5b50919050565b600060208284031215612bf457600080fd5b81356001600160401b03811115612c0a57600080fd5b612c1684828501612bc9565b949350505050565b600080600060608486031215612c3357600080fd5b83356001600160401b03811115612c4957600080fd5b612c5586828701612bc9565b9660208601359650604090950135949350505050565b80356001600160e01b031981168114612c8357600080fd5b919050565b60008060408385031215612c9b57600080fd5b82359150612cab60208401612c6b565b90509250929050565b600060208284031215612cc657600080fd5b81356001600160a01b0381168114611ccf57600080fd5b60008060208385031215612cf057600080fd5b82356001600160401b03811115612d0657600080fd5b612d1285828601612aba565b90969095509350505050565b60008060008060408587031215612d3457600080fd5b84356001600160401b03811115612d4a57600080fd5b612d5687828801612aba565b90955093505060208501356001600160401b03811115612d7557600080fd5b612aae87828801612aba565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611c4e57611c4e612d81565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612dd657600080fd5b611ccf82612c6b565b80820180821115611c4e57611c4e612d81565b835181526020938401516001600160e01b031916938101939093526040830191909152606082015260800190565b6020808252601e908201527f4465706f736974207363726970742063616e6e6f7420626520656d7074790000604082015260600190565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680612e8157607f821691505b602082108103612bdc57634e487b7160e01b600052602260045260246000fd5b601f821115612eeb57806000526020600020601f840160051c81016020851015612ec85750805b601f840160051c820191505b81811015612ee85760008155600101612ed4565b50505b505050565b6001600160401b03831115612f0757612f07612e57565b612f1b83612f158354612e6d565b83612ea1565b6000601f841160018114612f4f5760008515612f375750838201355b600019600387901b1c1916600186901b178355612ee8565b600083815260209020601f19861690835b82811015612f805786850135825560209485019460019092019101612f60565b5086821015612f9d5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000612fec604083018688612faf565b8281036020840152612fff818587612faf565b979650505050505050565b6000808335601e1984360301811261302157600080fd5b8301803591506001600160401b0382111561303b57600080fd5b60200191503681900382131561272957600080fd5b81810381811115611c4e57611c4e612d81565b60006001820161307557613075612d81565b5060010190565b602081526000612c16602083018486612faf565b6000602082840312156130a257600080fd5b81356001600160f01b031981168114611ccf57600080fd5b8581528460208201526080604082015260006130da608083018587612faf565b90508260608301529695505050505050565b6000602082840312156130fe57600080fd5b81518015158114611ccf57600080fd5b60208082526022908201527f52656164206f76657272756e20647572696e6720566172496e742070617273696040820152616e6760f01b606082015260800190565b6001600160e01b0319851681528351600090613173816004850160208901612b72565b84519083019061318a816004840160208901612b72565b6001600160e01b0319949094169301600481019390935250506008019392505050565b805160208201516bffffffffffffffffffffffff198116919060148210156131f9576bffffffffffffffffffffffff196bffffffffffffffffffffffff198360140360031b1b82161692505b5050919050565b6001600160e01b03198a1681526001600160f01b031989166004820152868860068301376000878201600681016000815287898237506000908701600601908152848682376001600160e01b031993909316929093019182525060040198975050505050505050565b60ff8181168382160190811115611c4e57611c4e612d8156" + }, + { + "address": "0x3200000000000000000000000000000000000003", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3200000000000000000000000000000000000004", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3200000000000000000000000000000000000005", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3aeeb871f83c85e68ffd1868bef3425ed6649d39", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x66f68692c03eb9c0656d676f2f4bd13eba40d1b7", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x9fcdf8f60d3009656e50bf805cd53c7335b284fb", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xaafb7442f7f00b64057c2e9eae2815bb63ee0ece", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xc2f8eed77da1583f7bae0a3125dc7bc426002dde", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xd44821f906e3909b8ae944f7060551c33b922cc9", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xe756fdf89367ef428b48bca2d272ec8ecec053fd", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + } + ], + "chain_id": 5655, + "limit_contract_code_size": null, + "spec": { + "0": "SHANGHAI" + }, + "coinbase": "0x3100000000000000000000000000000000000005", + "starting_base_fee": 1000000000, + "block_gas_limit": 30000000, + "base_fee_params": { + "max_change_denominator": 8, + "elasticity_multiplier": 2 + }, + "difficulty": 0, + "extra_data": "0x", + "timestamp": 0, + "nonce": 0 +} \ No newline at end of file diff --git a/resources/genesis/bitcoin-regtest/soft_confirmation_rule_enforcer.json b/resources/genesis/bitcoin-regtest/soft_confirmation_rule_enforcer.json new file mode 100644 index 0000000..f9faf7a --- /dev/null +++ b/resources/genesis/bitcoin-regtest/soft_confirmation_rule_enforcer.json @@ -0,0 +1,4 @@ +{ + "max_l2_blocks_per_l1": 86400, + "authority": "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7p8jrm4zqrr8r94" +} \ No newline at end of file diff --git a/resources/genesis/devnet/accounts.json b/resources/genesis/devnet/accounts.json new file mode 100644 index 0000000..f65b078 --- /dev/null +++ b/resources/genesis/devnet/accounts.json @@ -0,0 +1,3 @@ +{ + "pub_keys": [] +} diff --git a/resources/genesis/devnet/evm.json b/resources/genesis/devnet/evm.json new file mode 100644 index 0000000..bcc073b --- /dev/null +++ b/resources/genesis/devnet/evm.json @@ -0,0 +1,38 @@ +{ + "data": + [ + { + "address": "0x3100000000000000000000000000000000000001", + "balance": "0x00", + "code": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806357e871e71161007157806357e871e71461014c57806361b207e214610155578063a91d8b3d14610182578063d269a03e146101a2578063d761753e146101b5578063ee82ac5e146101e857600080fd5b80630466efc4146100ae5780630e27bc11146100e15780631f578333146100f657806334cdf78d146101095780634ffd344a14610129575b600080fd5b6100ce6100bc366004610599565b60009081526002602052604090205490565b6040519081526020015b60405180910390f35b6100f46100ef3660046105b2565b610208565b005b6100f4610104366004610599565b610331565b6100ce610117366004610599565b60016020526000908152604090205481565b61013c61013736600461061d565b6103df565b60405190151581526020016100d8565b6100ce60005481565b6100ce610163366004610599565b6000908152600160209081526040808320548352600290915290205490565b6100ce610190366004610599565b60026020526000908152604090205481565b61013c6101b036600461061d565b610405565b6101d073deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b6040516001600160a01b0390911681526020016100d8565b6100ce6101f6366004610599565b60009081526001602052604090205490565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146102705760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c65720060448201526064015b60405180910390fd5b60008054908190036102b65760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b6044820152606401610267565b60008181526001602081905260409091208490556102d5908290610678565b6000908155838152600260209081526040808320859055915482519081529081018590529081018390527f32eff959e2e8d1609edc4b39ccf75900aa6c1da5719f8432752963fdf008234f9060600160405180910390a1505050565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146103945760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c6572006044820152606401610267565b600054156103da5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610267565b600055565b6000858152600160205260408120546103fb9086868686610410565b9695505050505050565b60006103fb86868686865b6000858152600260209081526040808320548151601f870184900484028101840190925285825291610463918891849190899089908190840183828082843760009201919091525089925061046e915050565b979650505050505050565b6000838514801561047d575081155b801561048857508251155b15610495575060016104a4565b6104a1858486856104ac565b90505b949350505050565b6000602084516104bc9190610699565b156104c9575060006104a4565b83516000036104da575060006104a4565b818560005b8651811015610549576104f3600284610699565b6001036105175761051061050a8883016020015190565b83610556565b9150610530565b61052d826105288984016020015190565b610556565b91505b60019290921c91610542602082610678565b90506104df565b5090931495945050505050565b6000610562838361056b565b90505b92915050565b60008260005281602052602060006040600060025afa50602060006020600060025afa505060005192915050565b6000602082840312156105ab57600080fd5b5035919050565b600080604083850312156105c557600080fd5b50508035926020909101359150565b60008083601f8401126105e657600080fd5b50813567ffffffffffffffff8111156105fe57600080fd5b60208301915083602082850101111561061657600080fd5b9250929050565b60008060008060006080868803121561063557600080fd5b8535945060208601359350604086013567ffffffffffffffff81111561065a57600080fd5b610666888289016105d4565b96999598509660600135949350505050565b8082018082111561056557634e487b7160e01b600052601160045260246000fd5b6000826106b657634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212202fa9b28760396981b6b0d8418d5de50f0783041c49eced580ada3a97fdbcae6f64736f6c63430008190033" + }, + { + "address": "0x3100000000000000000000000000000000000002", + "balance": "0x115EEC47F6CF7E35000000", + "code": "0x6080604052600436106101355760003560e01c80638e19899e116100ab578063d761753e1161006f578063d761753e1461033a578063dd95c7c614610362578063e30c397814610382578063e613ae00146103a2578063ec6925a7146103bd578063f2fde38b146103d857600080fd5b80638e19899e146102b25780639f963f59146102c5578063b3ab15fb146102e5578063b93780f614610305578063d1c444561461031a57600080fd5b80635e0e5b3e116100fd5780635e0e5b3e14610201578063715018a614610231578063781952a81461024657806379ba50971461025b57806387f8bf56146102705780638da5cb5b1461029257600080fd5b8063158ef93e1461013a57806343e31687146101705780634507fc6914610194578063570ca735146101b657806359c19cee146101ee575b600080fd5b34801561014657600080fd5b5060015461015b90600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b34801561017c57600080fd5b5061018660035481565b604051908152602001610167565b3480156101a057600080fd5b506101b46101af366004611ec0565b6103f8565b005b3480156101c257600080fd5b506002546101d6906001600160a01b031681565b6040516001600160a01b039091168152602001610167565b6101b46101fc366004611f48565b61064e565b34801561020d57600080fd5b5061015b61021c366004611fbd565b60066020526000908152604090205460ff1681565b34801561023d57600080fd5b506101b461075e565b34801561025257600080fd5b50600754610186565b34801561026757600080fd5b506101b46107d4565b34801561027c57600080fd5b5061028561089a565b6040516101679190611fd6565b34801561029e57600080fd5b506000546101d6906001600160a01b031681565b6101b46102c0366004611fbd565b610928565b3480156102d157600080fd5b506101b46102e0366004612025565b6109f1565b3480156102f157600080fd5b506101b4610300366004612099565b610b24565b34801561031157600080fd5b50610285610ba3565b34801561032657600080fd5b50610186610335366004611fbd565b610bb0565b34801561034657600080fd5b506101d673deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b34801561036e57600080fd5b506101b461037d3660046120b4565b610bd1565b34801561038e57600080fd5b506001546101d6906001600160a01b031681565b3480156103ae57600080fd5b506101d66001603160981b0181565b3480156103c957600080fd5b50610186662386f26fc1000081565b3480156103e457600080fd5b506101b46103f3366004612099565b611376565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146104605760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c65720060448201526064015b60405180910390fd5b600154600160a01b900460ff16156104ba5760405162461bcd60e51b815260206004820152601f60248201527f436f6e747261637420697320616c726561647920696e697469616c697a6564006044820152606401610457565b8160000361050a5760405162461bcd60e51b815260206004820152601a60248201527f566572696669657220636f756e742063616e6e6f7420626520300000000000006044820152606401610457565b600085900361055b5760405162461bcd60e51b815260206004820152601e60248201527f4465706f736974207363726970742063616e6e6f7420626520656d70747900006044820152606401610457565b6001805460ff60a01b1916600160a01b179055600461057b868883612191565b506005610589848683612191565b5060038290556002805473deaddeaddeaddeaddeaddeaddeaddeaddeaddead6001600160a01b03199182168117909255600080549091166001600160a01b0384161781556040805191825260208201929092527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910160405180910390a17f89ed79f38bee253aee2fb8d52df0d71b4aaf0843800d093a499a55eeca455c34868686868660405161063e95949392919061227b565b60405180910390a1505050505050565b61065f81662386f26fc100006122cb565b34146106a75760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610457565b60075460005b828110156107585760078484838181106106c9576106c96122e2565b835460018101855560009485526020948590209190940292909201359190920155507fc96d1af655ee5eb07357bb1097f3b2f247ea0c4e3cf5f9a5c8449c4f8b64fb6b84848381811061071e5761071e6122e2565b90506020020135828461073191906122f8565b604080519283526020830191909152429082015260600160405180910390a16001016106ad565b50505050565b6000546001600160a01b031633146107885760405162461bcd60e51b81526004016104579061230b565b600080546001600160a01b03191681556040805182815260208101929092527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0910160405180910390a1565b6001546001600160a01b0316331461082e5760405162461bcd60e51b815260206004820152601b60248201527f43616c6c6572206973206e6f742070656e64696e67206f776e657200000000006044820152606401610457565b60008054600180546001600160a01b03198084166001600160a01b038084169190911786559116909155604080519190921680825260208201939093527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091015b60405180910390a150565b600580546108a790612106565b80601f01602080910402602001604051908101604052809291908181526020018280546108d390612106565b80156109205780601f106108f557610100808354040283529160200191610920565b820191906000526020600020905b81548152906001019060200180831161090357829003601f168201915b505050505081565b662386f26fc1000034146109785760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610457565b600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68881018290556040805183815260208101839052428183015290517fc96d1af655ee5eb07357bb1097f3b2f247ea0c4e3cf5f9a5c8449c4f8b64fb6b9181900360600190a15050565b6000546001600160a01b03163314610a1b5760405162461bcd60e51b81526004016104579061230b565b80600003610a6b5760405162461bcd60e51b815260206004820152601a60248201527f566572696669657220636f756e742063616e6e6f7420626520300000000000006044820152606401610457565b6000849003610abc5760405162461bcd60e51b815260206004820152601e60248201527f4465706f736974207363726970742063616e6e6f7420626520656d70747900006044820152606401610457565b6004610ac9858783612191565b506005610ad7838583612191565b5060038190556040517f89ed79f38bee253aee2fb8d52df0d71b4aaf0843800d093a499a55eeca455c3490610b15908790879087908790879061227b565b60405180910390a15050505050565b6000546001600160a01b03163314610b4e5760405162461bcd60e51b81526004016104579061230b565b600280546001600160a01b0319166001600160a01b0383169081179091556040805182815260208101929092527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910161088f565b600480546108a790612106565b60078181548110610bc057600080fd5b600091825260209091200154905081565b6002546001600160a01b03163314610c2b5760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610457565b6000610c89610c3d6020840184612338565b610c4d6040850160208601612362565b610c5a604086018661238c565b610c67606088018861238c565b610c7460808a018a61238c565b610c8460c08c0160a08d01612338565b6113fc565b60008181526006602052604090205490915060ff1615610ce15760405162461bcd60e51b81526020600482015260136024820152721ddd1e125908185b1c9958591e481cdc195b9d606a1b6044820152606401610457565b60008181526006602052604090819020805460ff19166001179055610d4690610d0c9084018461238c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061144492505050565b610d925760405162461bcd60e51b815260206004820152601d60248201527f56696e206973206e6f742070726f7065726c7920666f726d61747465640000006044820152606401610457565b610ddc610da2606084018461238c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506114e892505050565b610e285760405162461bcd60e51b815260206004820152601e60248201527f566f7574206973206e6f742070726f7065726c7920666f726d617474656400006044820152606401610457565b6000610e74610e3a604085018561238c565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061157f92505050565b91505080600114610ec05760405162461bcd60e51b815260206004820152601660248201527513db9b1e481bdb99481a5b9c1d5d08185b1b1bddd95960521b6044820152606401610457565b610f0c610ed0608085018561238c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250859250611596915050565b610f625760405162461bcd60e51b815260206004820152602160248201527f5769746e657373206973206e6f742070726f7065726c7920666f726d617474656044820152601960fa1b6064820152608401610457565b6001603160981b01634ffd344a60e085013584610f8260c088018861238c565b8861010001356040518663ffffffff1660e01b8152600401610fa89594939291906123d3565b602060405180830381865afa158015610fc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe99190612405565b6110355760405162461bcd60e51b815260206004820152601b60248201527f5472616e73616374696f6e206973206e6f7420696e20626c6f636b00000000006044820152606401610457565b6000611081611047608086018661238c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250925061160c915050565b9050600061108e8261157f565b91505060035460026110a091906122f8565b81146110e65760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964207769746e657373206974656d7360581b6044820152606401610457565b60006110f4836003546116ef565b905060006004805461110590612106565b9150600090506111168382846118b9565b90506111ac816004805461112990612106565b80601f016020809104026020016040519081016040528092919081815260200182805461115590612106565b80156111a25780601f10611177576101008083540402835291602001916111a2565b820191906000526020600020905b81548152906001019060200180831161118557829003601f168201915b505050505061197d565b6111f15760405162461bcd60e51b8152602060048201526016602482015275125b9d985b1a590819195c1bdcda5d081cd8dc9a5c1d60521b6044820152606401610457565b60006112206112018460146122f8565b61120c8560146122f8565b86516112189190612427565b8691906118b9565b9050611233816005805461112990612106565b6112775760405162461bcd60e51b8152602060048201526015602482015274092dcecc2d8d2c840e6c6e4d2e0e840e6eaccccd2f605b1b6044820152606401610457565b600061128285611a3f565b604080518b81526001600160a01b0383166020820152428183015290519192507f182fa52899142d44ff5c45a6354d3b3e868d5b07db6a65580b39bd321bdaf8ac919081900360600190a16000816001600160a01b0316662386f26fc1000060405160006040518083038185875af1925050503d8060008114611321576040519150601f19603f3d011682016040523d82523d6000602084013e611326565b606091505b50509050806113695760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610457565b5050505050505050505050565b6000546001600160a01b031633146113a05760405162461bcd60e51b81526004016104579061230b565b600180546001600160a01b0319166001600160a01b038381169182179092556000546040805191909316815260208101919091527fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278910161088f565b60006114368a8a8a8a8a8a8a8a8a6040516020016114229998979695949392919061243a565b604051602081830303815290604052611a75565b9a9950505050505050505050565b60008060006114528461157f565b9092509050801580611465575060001982145b15611474575060009392505050565b60006114818360016122f8565b905060005b828110156114db57855182106114a25750600095945050505050565b60006114ae8784611a9c565b905060001981036114c6575060009695505050505050565b6114d081846122f8565b925050600101611486565b5093519093149392505050565b60008060006114f68461157f565b9092509050801580611509575060001982145b15611518575060009392505050565b60006115258360016122f8565b905060005b828110156114db57855182106115465750600095945050505050565b60006115528784611ae5565b9050600019810361156a575060009695505050505050565b61157481846122f8565b92505060010161152a565b60008061158d836000611b49565b91509150915091565b6000816000036115a857506000611606565b6000805b838110156115ff57845182106115c757600092505050611606565b60006115d38684611ced565b905060001981036115ea5760009350505050611606565b6115f481846122f8565b9250506001016115ac565b5083511490505b92915050565b606060008060005b84811015611685576116268683611ced565b925060001983036116715760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610457565b61167b83836122f8565b9150600101611614565b506116908582611ced565b915060001982036116db5760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610457565b6116e68582846118b9565b95945050505050565b60606000806116fd8561157f565b90925090506001820161175d5760405162461bcd60e51b815260206004820152602260248201527f52656164206f76657272756e20647572696e6720566172496e742070617273696044820152616e6760f01b6064820152608401610457565b80841061179f5760405162461bcd60e51b815260206004820152601060248201526f2b34b7103932b0b21037bb32b9393ab760811b6044820152606401610457565b6000806117ad8460016122f8565b905060005b86811015611838576117c48883611b49565b90955092506001830161180e5760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610457565b8261181a8660016122f8565b61182491906122f8565b61182e90836122f8565b91506001016117b2565b506118438782611b49565b90945091506001820161188d5760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610457565b6118ae8161189b86856122f8565b6118a69060016122f8565b8991906118b9565b979650505050505050565b6060816000036118d85750604080516020810190915260008152611976565b60006118e483856122f8565b905083811180156118f6575080855110155b6119385760405162461bcd60e51b8152602060048201526013602482015272536c696365206f7574206f6620626f756e647360681b6044820152606401610457565b604051915082604083010160405282825283850182038460208701018481015b8082101561197157815183830152602082019150611958565b505050505b9392505050565b600081518351146119c75760405162461bcd60e51b8152602060048201526014602482015273098cadccee8d0e640c8de40dcdee840dac2e8c6d60631b6044820152606401610457565b825160005b81811015611a34578381815181106119e6576119e66122e2565b602001015160f81c60f81b6001600160f81b031916858281518110611a0d57611a0d6122e2565b01602001516001600160f81b03191614611a2c57600092505050611606565b6001016119cc565b506001949350505050565b60008060048054611a4f90612106565b915060009050611a61848360146118b9565b611a6a906124a2565b60601c949350505050565b60006020600083516020850160025afa50602060006020600060025afa5050600051919050565b6000806000611aab8585611d8b565b909250905060018201611ac45760001992505050611606565b80611ad08360256122f8565b611ada91906122f8565b6116e69060046122f8565b6000611af28260096122f8565b83511015611b035750600019611606565b600080611b1a85611b158660086122f8565b611b49565b909250905060018201611b335760001992505050611606565b80611b3f8360096122f8565b6116e691906122f8565b6000806000611b588585611dcd565b90508060ff16600003611b8d576000858581518110611b7957611b796122e2565b016020015190935060f81c9150611ce69050565b83611b998260016124de565b60ff16611ba691906122f8565b85511015611bbd5760001960009250925050611ce6565b60008160ff16600203611c0157611bf6611be2611bdb8760016122f8565b8890611e53565b62ffff0060e882901c1660f89190911c1790565b61ffff169050611cdc565b8160ff16600403611c5057611c43611c1d611bdb8760016122f8565b60d881901c63ff00ff001662ff00ff60e89290921c9190911617601081811b91901c1790565b63ffffffff169050611cdc565b8160ff16600803611cdc57611ccf611c6c611bdb8760016122f8565b60c01c64ff000000ff600882811c91821665ff000000ff009390911b92831617601090811b67ffffffffffffffff1666ff00ff00ff00ff9290921667ff00ff00ff00ff009093169290921790911c65ffff0000ffff1617602081811c91901b1790565b67ffffffffffffffff1690505b60ff909116925090505b9250929050565b6000806000611cfc8585611b49565b909250905060018201611d155760001992505050611606565b600080611d238460016122f8565b905060005b83811015611d8057611d3a8883611b49565b909550925060018301611d565760001995505050505050611606565b82611d628660016122f8565b611d6c91906122f8565b611d7690836122f8565b9150600101611d28565b509695505050505050565b600080611d998360256122f8565b84511015611dae575060001990506000611ce6565b600080611dc086611b158760246122f8565b9097909650945050505050565b6000828281518110611de157611de16122e2565b016020015160f81c60ff03611df857506008611606565b828281518110611e0a57611e0a6122e2565b016020015160f81c60fe03611e2157506004611606565b828281518110611e3357611e336122e2565b016020015160f81c60fd03611e4a57506002611606565b50600092915050565b60006119768383016020015190565b60008083601f840112611e7457600080fd5b50813567ffffffffffffffff811115611e8c57600080fd5b602083019150836020828501011115611ce657600080fd5b80356001600160a01b0381168114611ebb57600080fd5b919050565b60008060008060008060808789031215611ed957600080fd5b863567ffffffffffffffff80821115611ef157600080fd5b611efd8a838b01611e62565b90985096506020890135915080821115611f1657600080fd5b50611f2389828a01611e62565b90955093505060408701359150611f3c60608801611ea4565b90509295509295509295565b60008060208385031215611f5b57600080fd5b823567ffffffffffffffff80821115611f7357600080fd5b818501915085601f830112611f8757600080fd5b813581811115611f9657600080fd5b8660208260051b8501011115611fab57600080fd5b60209290920196919550909350505050565b600060208284031215611fcf57600080fd5b5035919050565b60006020808352835180602085015260005b8181101561200457858101830151858201604001528201611fe8565b506000604082860101526040601f19601f8301168501019250505092915050565b60008060008060006060868803121561203d57600080fd5b853567ffffffffffffffff8082111561205557600080fd5b61206189838a01611e62565b9097509550602088013591508082111561207a57600080fd5b5061208788828901611e62565b96999598509660400135949350505050565b6000602082840312156120ab57600080fd5b61197682611ea4565b6000602082840312156120c657600080fd5b813567ffffffffffffffff8111156120dd57600080fd5b8201610120818503121561197657600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061211a57607f821691505b60208210810361213a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561218c576000816000526020600020601f850160051c810160208610156121695750805b601f850160051c820191505b8181101561218857828155600101612175565b5050505b505050565b67ffffffffffffffff8311156121a9576121a96120f0565b6121bd836121b78354612106565b83612140565b6000601f8411600181146121f157600085156121d95750838201355b600019600387901b1c1916600186901b17835561224b565b600083815260209020601f19861690835b828110156122225786850135825560209485019460019092019101612202565b508682101561223f5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60608152600061228f606083018789612252565b82810360208401526122a2818688612252565b9150508260408301529695505050505050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611606576116066122b5565b634e487b7160e01b600052603260045260246000fd5b80820180821115611606576116066122b5565b60208082526013908201527221b0b63632b91034b9903737ba1037bbb732b960691b604082015260600190565b60006020828403121561234a57600080fd5b81356001600160e01b03198116811461197657600080fd5b60006020828403121561237457600080fd5b81356001600160f01b03198116811461197657600080fd5b6000808335601e198436030181126123a357600080fd5b83018035915067ffffffffffffffff8211156123be57600080fd5b602001915036819003821315611ce657600080fd5b8581528460208201526080604082015260006123f3608083018587612252565b90508260608301529695505050505050565b60006020828403121561241757600080fd5b8151801515811461197657600080fd5b81810381811115611606576116066122b5565b6001600160e01b03198a811682526001600160f01b03198a166004830152600090888a60068501378883016006810160008152888a82375087810190506006810160008152868882375093169390920160068101939093525050600a01979650505050505050565b805160208201516bffffffffffffffffffffffff1980821692919060148310156124d65780818460140360031b1b83161693505b505050919050565b60ff8181168382160190811115611606576116066122b556fea26469706673582212208ac886a40f4e63c08869cffdbd467cd0915776904e3e07abc50ccf0e78458f5d64736f6c63430008190033" + }, + { + "address": "0x66f68692c03eB9C0656D676f2F4bD13eba40D1B7", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + } + ], + "chain_id": 62298, + "limit_contract_code_size": 24576, + "spec": + { + "0": "SHANGHAI" + }, + "coinbase": "0xE8290ff822D3cfEa7A826FbEd4761Dc13f1fc0f2", + "starting_base_fee": 1000000000, + "block_gas_limit": 8000000, + "base_fee_params": + { + "max_change_denominator": 8, + "elasticity_multiplier": 2 + }, + "difficulty": 0, + "extra_data": "0x", + "timestamp": 0, + "nonce": 0 +} \ No newline at end of file diff --git a/resources/genesis/devnet/soft_confirmation_rule_enforcer.json b/resources/genesis/devnet/soft_confirmation_rule_enforcer.json new file mode 100644 index 0000000..b13b6d0 --- /dev/null +++ b/resources/genesis/devnet/soft_confirmation_rule_enforcer.json @@ -0,0 +1,4 @@ +{ + "max_l2_blocks_per_l1": 86400, + "authority": "sov1tz5dqrfqrtcsejn4ux7a3dscljqcgvxzf4qarcl5tmqsgsymxw3se4x3a0" +} \ No newline at end of file diff --git a/resources/genesis/mock-dockerized/accounts.json b/resources/genesis/mock-dockerized/accounts.json new file mode 100644 index 0000000..f65b078 --- /dev/null +++ b/resources/genesis/mock-dockerized/accounts.json @@ -0,0 +1,3 @@ +{ + "pub_keys": [] +} diff --git a/resources/genesis/mock-dockerized/evm.json b/resources/genesis/mock-dockerized/evm.json new file mode 100644 index 0000000..4e4670b --- /dev/null +++ b/resources/genesis/mock-dockerized/evm.json @@ -0,0 +1,158 @@ +{ + "data": [ + { + "address": "0x0f820f428ae436c1000b27577bf5bbf09bfec8f2", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x3100000000000000000000000000000000000001", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000001", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000002", + "balance": "0x115eec47f6cf7e35000000", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000002", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000003", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000003", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000004", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000004", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000005", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000005", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x31ffffffffffffffffffffffffffffffffffffff", + "balance": "0x0", + "code": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610499565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee3660046104bd565b610229565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461050c565b610291565b34801561013057600080fd5b506100d161013f3660046104bd565b610300565b34801561015057600080fd5b506100d161015f366004610499565b610336565b34801561017057600080fd5b506100a061017f366004610499565b6103b4565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d91906105ea565b949350505050565b61021d6103da565b6102276000610434565b565b6102316103da565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561027557600080fd5b505af1158015610289573d6000803e3d6000fd5b505050505050565b6102996103da565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906102c99086908690600401610607565b6000604051808303818588803b1580156102e257600080fd5b505af11580156102f6573d6000803e3d6000fd5b5050505050505050565b6103086103da565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe69060240161025b565b61033e6103da565b6001600160a01b0381166103a85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6103b181610434565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b6000546001600160a01b031633146102275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146103b157600080fd5b6000602082840312156104ab57600080fd5b81356104b681610484565b9392505050565b600080604083850312156104d057600080fd5b82356104db81610484565b915060208301356104eb81610484565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561052157600080fd5b833561052c81610484565b9250602084013561053c81610484565b9150604084013567ffffffffffffffff81111561055857600080fd5b8401601f8101861361056957600080fd5b803567ffffffffffffffff811115610583576105836104f6565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156105b2576105b26104f6565b6040528181528282016020018810156105ca57600080fd5b816020840160208301376000602083830101528093505050509250925092565b6000602082840312156105fc57600080fd5b81516104b681610484565b60018060a01b0383168152604060208201526000825180604084015260005b818110156106435760208186018101516060868401015201610626565b506000606082850101526060601f19601f830116840101915050939250505056", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + } + }, + { + "address": "0x3200000000000000000000000000000000000001", + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806357e871e71161007157806357e871e71461014c57806361b207e214610155578063a91d8b3d14610182578063d269a03e146101a2578063d761753e146101b5578063ee82ac5e146101e857600080fd5b80630466efc4146100ae5780630e27bc11146100e15780631f578333146100f657806334cdf78d146101095780634ffd344a14610129575b600080fd5b6100ce6100bc366004610598565b60009081526002602052604090205490565b6040519081526020015b60405180910390f35b6100f46100ef3660046105b1565b610208565b005b6100f4610104366004610598565b610330565b6100ce610117366004610598565b60016020526000908152604090205481565b61013c61013736600461061c565b6103de565b60405190151581526020016100d8565b6100ce60005481565b6100ce610163366004610598565b6000908152600160209081526040808320548352600290915290205490565b6100ce610190366004610598565b60026020526000908152604090205481565b61013c6101b036600461061c565b610404565b6101d073deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b6040516001600160a01b0390911681526020016100d8565b6100ce6101f6366004610598565b60009081526001602052604090205490565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146102705760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c65720060448201526064015b60405180910390fd5b60008054908190036102b65760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b6044820152606401610267565b60008181526001602081905260409091208490556102d5908290610677565b60009081558381526002602090815260409182902084905581518381529081018590529081018390527f32eff959e2e8d1609edc4b39ccf75900aa6c1da5719f8432752963fdf008234f9060600160405180910390a1505050565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146103935760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c6572006044820152606401610267565b600054156103d95760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610267565b600055565b6000858152600160205260408120546103fa908686868661040f565b9695505050505050565b60006103fa86868686865b6000858152600260209081526040808320548151601f870184900484028101840190925285825291610462918891849190899089908190840183828082843760009201919091525089925061046d915050565b979650505050505050565b6000838514801561047c575081155b801561048757508251155b15610494575060016104a3565b6104a0858486856104ab565b90505b949350505050565b6000602084516104bb9190610698565b156104c8575060006104a3565b83516000036104d9575060006104a3565b818560005b8651811015610548576104f2600284610698565b6001036105165761050f6105098883016020015190565b83610555565b915061052f565b61052c826105278984016020015190565b610555565b91505b60019290921c91610541602082610677565b90506104de565b5090931495945050505050565b6000610561838361056a565b90505b92915050565b60008260005281602052602060006040600060025afa50602060006020600060025afa505060005192915050565b6000602082840312156105aa57600080fd5b5035919050565b600080604083850312156105c457600080fd5b50508035926020909101359150565b60008083601f8401126105e557600080fd5b50813567ffffffffffffffff8111156105fd57600080fd5b60208301915083602082850101111561061557600080fd5b9250929050565b60008060008060006080868803121561063457600080fd5b8535945060208601359350604086013567ffffffffffffffff81111561065957600080fd5b610665888289016105d3565b96999598509660600135949350505050565b8082018082111561056457634e487b7160e01b600052601160045260246000fd5b6000826106b557634e487b7160e01b600052601260045260246000fd5b50069056" + }, + { + "address": "0x3200000000000000000000000000000000000002", + "balance": "0x0", + "code": "0x60806040526004361061019c5760003560e01c80638786dba7116100ec578063d761753e1161008a578063e613ae0011610064578063e613ae001461048e578063f119a9bd146104a9578063f2fde38b146104c9578063f8e655d2146104e957600080fd5b8063d761753e14610431578063dd95c7c614610459578063e30c39781461047957600080fd5b8063a41c5cf3116100c6578063a41c5cf3146103af578063b3ab15fb146103c4578063bafa9eb2146103e4578063c045577b1461040457600080fd5b80638786dba71461037257806387f8bf56146103855780638da5cb5b1461039a57600080fd5b8063570ca73511610159578063715018a611610133578063715018a61461031357806374ab4a8314610328578063781952a81461034857806379ba50971461035d57600080fd5b8063570ca735146102945780635d3e3176146102d15780635e3cc740146102f357600080fd5b806311e53a01146101a1578063158ef93e146101e1578063198546231461020b5780634126013714610220578063419759f514610240578063471ba1e314610256575b600080fd5b3480156101ad57600080fd5b506101ce6101bc3660046129ee565b60276020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156101ed57600080fd5b506000546101fb9060ff1681565b60405190151581526020016101d8565b61021e610219366004612a4b565b610509565b005b34801561022c57600080fd5b5061021e61023b366004612afb565b6106e2565b34801561024c57600080fd5b506101ce60215481565b34801561026257600080fd5b506102766102713660046129ee565b6108ef565b604080519283526001600160e01b03199091166020830152016101d8565b3480156102a057600080fd5b506000546102b99061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016101d8565b3480156102dd57600080fd5b506102e6610920565b6040516101d89190612b96565b3480156102ff57600080fd5b5061021e61030e366004612be2565b6109ae565b34801561031f57600080fd5b5061021e610d65565b34801561033457600080fd5b5061021e610343366004612c1e565b610d79565b34801561035457600080fd5b506026546101ce565b34801561036957600080fd5b5061021e610f4c565b61021e610380366004612c88565b610f94565b34801561039157600080fd5b506102e66110bb565b3480156103a657600080fd5b506102b96110c8565b3480156103bb57600080fd5b506102e66110fd565b3480156103d057600080fd5b5061021e6103df366004612cb4565b61110a565b3480156103f057600080fd5b506101fb6103ff3660046129ee565b61117b565b34801561041057600080fd5b506101ce61041f3660046129ee565b60286020526000908152604090205481565b34801561043d57600080fd5b506102b973deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b34801561046557600080fd5b5061021e610474366004612be2565b6111a6565b34801561048557600080fd5b506102b9611606565b34801561049a57600080fd5b506102b96001603160981b0181565b3480156104b557600080fd5b5061021e6104c4366004612cdd565b61162f565b3480156104d557600080fd5b5061021e6104e4366004612cb4565b6116a3565b3480156104f557600080fd5b5061021e610504366004612d1e565b611728565b82811461054f5760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b60448201526064015b60405180910390fd5b60215461055d908490612d97565b34146105a55760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610546565b60265460005b848110156106da57600060405180604001604052808888858181106105d2576105d2612dae565b9050602002013581526020018686858181106105f0576105f0612dae565b90506020020160208101906106059190612dc4565b6001600160e01b03191690526026805460018101825560009190915281517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a359460029092029182015560208201517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3595909101805463ffffffff191660e09290921c91909117905590507f3311a04a346a103ac115cca33028a2bc82f1964805860d0d3fc84a2772496ada816106b98486612ddf565b426040516106c993929190612df2565b60405180910390a1506001016105ab565b505050505050565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146107455760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c6572006044820152606401610546565b60005460ff16156107985760405162461bcd60e51b815260206004820152601f60248201527f436f6e747261637420697320616c726561647920696e697469616c697a6564006044820152606401610546565b806000036107e85760405162461bcd60e51b815260206004820152601a60248201527f4465706f73697420616d6f756e742063616e6e6f7420626520300000000000006044820152606401610546565b60008490036108095760405162461bcd60e51b815260040161054690612e20565b6000805460ff191660011790556023610823858783612ef0565b506024610831838583612ef0565b50602181905560008054610100600160a81b03191674deaddeaddeaddeaddeaddeaddeaddeaddeaddead001781556040805191825273deaddeaddeaddeaddeaddeaddeaddeaddeaddead60208301527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910160405180910390a17f80bd1fdfe157286ce420ee763f91748455b249605748e5df12dad9844402bafc858585856040516108e09493929190612fd8565b60405180910390a15050505050565b602681815481106108ff57600080fd5b60009182526020909120600290910201805460019091015490915060e01b82565b6025805461092d90612e6d565b80601f016020809104026020016040519081016040528092919081815260200182805461095990612e6d565b80156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b505050505081565b6109b7816117a2565b5060009050610a066109cc606084018461300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ac592505050565b915060009050610a63610a1c606085018561300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a5e925060019150869050613050565b611adc565b90506000610a7082611c54565b90506000610a88610a8383836020611cd6565b611d99565b90506000610aa9610a836020808651610aa19190613050565b869190611cd6565b600083815260276020526040812054919250819003610b015760405162461bcd60e51b815260206004820152601460248201527311195c1bdcda5d08191bc81b9bdd08195e1a5cdd60621b6044820152606401610546565b6000610b4d610b1360808a018a61300a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250611e1e915050565b90506000610b5c826001611f01565b9050600060258054610b6d90612e6d565b915060009050610b7e838284611cd6565b9050610c148160258054610b9190612e6d565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90612e6d565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b5050505050612085565b610c605760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420736c6173684f7254616b65207363726970740000000000006044820152606401610546565b6000602881610c70600189613050565b815260200190815260200160002054905060008160001480610c9a5750610c968861215c565b8214155b905080610ce95760405162461bcd60e51b815260206004820152601960248201527f4f70657261746f72206973206e6f74206d616c6963696f7573000000000000006044820152606401610546565b600180896103e88110610cfe57610cfe612dae565b602091828204019190066101000a81548160ff0219169083151502179055507ff918cdaebea74c5a8c3b02d7404c162f507551b158202cedcba9b6a74eabdff288604051610d4e91815260200190565b60405180910390a150505050505050505050505050565b610d6d612169565b610d77600061219b565b565b610d82836117a2565b5060009050610dd3610d97604086018661300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121d7915050565b90506000610de08261232a565b90506000610ded83612337565b9050600060268581548110610e0457610e04612dae565b60009182526020918290206040805180820190915260029290920201805480835260019091015460e01b6001600160e01b03191692820192909252915083148015610e665750816001600160e01b03191681602001516001600160e01b031916145b610ea65760405162461bcd60e51b81526020600482015260116024820152706e6f74206d61746368696e67205554584f60781b6044820152606401610546565b6000610eb86109cc60608a018a61300a565b915060009050610ece610a1c60608b018b61300a565b90506000610edb82611c54565b90506000610ee882611d99565b9050610ef38161215c565b60008a8152602860209081526040918290209290925580518b81529182018390527feedf47c2f61b040827944fd45e44ef6d742354b34e1af7dd99a56f444ec79347910160405180910390a15050505050505050505050565b3380610f56611606565b6001600160a01b031614610f885760405163118cdaa760e01b81526001600160a01b0382166004820152602401610546565b610f918161219b565b50565b6021543414610fdf5760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610546565b6040805180820182528381526001600160e01b03198316602082019081526026805460018101825560009190915282517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3594600283029081019190915591517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3595909201805463ffffffff191660e09390931c9290921790915591519091907f3311a04a346a103ac115cca33028a2bc82f1964805860d0d3fc84a2772496ada906110ad90849084904290612df2565b60405180910390a150505050565b6024805461092d90612e6d565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6023805461092d90612e6d565b611112612169565b60008054610100600160a81b0319166101006001600160a01b038481168281029390931793849055604080519290940416815260208101919091527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910160405180910390a150565b6001816103e8811061118c57600080fd5b60209182820401919006915054906101000a900460ff1681565b60005461010090046001600160a01b031633146112055760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610546565b600080611211836117a2565b915091508060011461125e5760405162461bcd60e51b815260206004820152601660248201527513db9b1e481bdb99481a5b9c1d5d08185b1b1bddd95960521b6044820152606401610546565b60006113096112706020860186612dc4565b61127d604087018761300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112bf92505050606088018861300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113049250505060c0890160a08a01612dc4565b612344565b6000818152602760205260409020549091501561135d5760405162461bcd60e51b81526020600482015260126024820152711d1e125908185b1c9958591e481cdc195b9d60721b6044820152606401610546565b60226000815461136c90613063565b9182905550600082815260276020526040812091909155611393610b13608087018761300a565b905060006113a082611ac5565b915050806003146113eb5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964207769746e657373206974656d7360581b6044820152606401610546565b60006113f8836001611f01565b905060006023805461140990612e6d565b91506000905061141a838284611cd6565b905061142d8160238054610b9190612e6d565b6114725760405162461bcd60e51b8152602060048201526016602482015275125b9d985b1a590819195c1bdcda5d081cd8dc9a5c1d60521b6044820152606401610546565b60006114a66024805461148490612e6d565b86516114909250613050565b6024805461149d90612e6d565b87929150611cd6565b90506114b98160248054610b9190612e6d565b6114fd5760405162461bcd60e51b8152602060048201526015602482015274092dcecc2d8d2c840e6c6e4d2e0e840e6eaccccd2f605b1b6044820152606401610546565b600061150885612374565b602254604080518d8152602081018c90526001600160a01b038416818301524260608201526080810192909252519192507fa82453ca34121b3ecb910d957824e27c5dc6465315949facd15fb72886490058919081900360a00190a16021546040516000916001600160a01b038416918381818185875af1925050503d80600081146115b0576040519150601f19603f3d011682016040523d82523d6000602084013e6115b5565b606091505b50509050806115f85760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610546565b505050505050505050505050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c006110ed565b611637612169565b60008190036116585760405162461bcd60e51b815260040161054690612e20565b6025611665828483612ef0565b507f8578c80bdea3ff51431011ed88db9cb415de2cf64f9ed5e7137288268cbdeb2c828260405161169792919061307c565b60405180910390a15050565b6116ab612169565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556116ef6110c8565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b611730612169565b60008390036117515760405162461bcd60e51b815260040161054690612e20565b602361175e848683612ef0565b50602461176c828483612ef0565b507f80bd1fdfe157286ce420ee763f91748455b249605748e5df12dad9844402bafc848484846040516110ad9493929190612fd8565b600080806118026117b66020860186612dc4565b6117c66040870160208801613090565b6117d3604088018861300a565b6117e060608a018a61300a565b6117ed60808c018c61300a565b6117fd60c08e0160a08f01612dc4565b6123aa565b905061184e611814604086018661300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123de92505050565b61189a5760405162461bcd60e51b815260206004820152601d60248201527f56696e206973206e6f742070726f7065726c7920666f726d61747465640000006044820152606401610546565b6118e46118aa606086018661300a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061248292505050565b6119305760405162461bcd60e51b815260206004820152601e60248201527f566f7574206973206e6f742070726f7065726c7920666f726d617474656400006044820152606401610546565b60006119426109cc604087018761300a565b91506119929050611956608087018761300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250859250612519915050565b6119e85760405162461bcd60e51b815260206004820152602160248201527f5769746e657373206973206e6f742070726f7065726c7920666f726d617474656044820152601960fa1b6064820152608401610546565b6001603160981b01634ffd344a60e087013584611a0860c08a018a61300a565b8a61010001356040518663ffffffff1660e01b8152600401611a2e9594939291906130ba565b602060405180830381865afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6f91906130ec565b611abb5760405162461bcd60e51b815260206004820152601b60248201527f5472616e73616374696f6e206973206e6f7420696e20626c6f636b00000000006044820152606401610546565b9094909350915050565b600080611ad383600061258e565b91509150915091565b6060600080611aea85611ac5565b909250905060018201611b0f5760405162461bcd60e51b81526004016105469061310e565b808410611b525760405162461bcd60e51b81526020600482015260116024820152702b37baba103932b0b21037bb32b9393ab760791b6044820152606401610546565b600080611b60846001612ddf565b905060005b86811015611bde57611b778883612730565b92506000198303611bca5760405162461bcd60e51b815260206004820152601a60248201527f42616420566172496e7420696e207363726970745075626b65790000000000006044820152606401610546565b611bd48383612ddf565b9150600101611b65565b50611be98782612730565b91506000198203611c3c5760405162461bcd60e51b815260206004820152601a60248201527f42616420566172496e7420696e207363726970745075626b65790000000000006044820152606401610546565b611c47878284611cd6565b9450505050505b92915050565b606081600981518110611c6957611c69612dae565b6020910101516001600160f81b031916603560f91b14611c9757505060408051602081019091526000815290565b600082600a81518110611cac57611cac612dae565b01602001516001600160f81b031981169150611ccf908490600b9060f81c611cd6565b9392505050565b606081600003611cf55750604080516020810190915260008152611ccf565b6000611d018385612ddf565b90508381118015611d13575080855110155b611d555760405162461bcd60e51b8152602060048201526013602482015272536c696365206f7574206f6620626f756e647360681b6044820152606401610546565b604051915082604083010160405282825283850182038460208701018481015b80821015611d8e57815183830152602082019150611d75565b505050509392505050565b60008151600003611dac57506000919050565b81516020811115611e0a5760405162461bcd60e51b815260206004820152602260248201527f42797465732063616e6e6f74206265206d6f7265207468616e20333220627974604482015261657360f01b6064820152608401610546565b60209283015192036008029190911c919050565b606060008060005b84811015611e9757611e388683612794565b92506000198303611e835760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610546565b611e8d8383612ddf565b9150600101611e26565b50611ea28582612794565b91506000198203611eed5760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610546565b611ef8858284611cd6565b95945050505050565b6060600080611f0f85611ac5565b909250905060018201611f345760405162461bcd60e51b81526004016105469061310e565b808410611f765760405162461bcd60e51b815260206004820152601060248201526f2b34b7103932b0b21037bb32b9393ab760811b6044820152606401610546565b600080611f84846001612ddf565b905060005b8681101561200f57611f9b888361258e565b909550925060018301611fe55760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610546565b82611ff1866001612ddf565b611ffb9190612ddf565b6120059083612ddf565b9150600101611f89565b5061201a878261258e565b9094509150600182016120645760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610546565b611c47816120728685612ddf565b61207d906001612ddf565b899190611cd6565b8151815160009190811461209d576000915050611c4e565b60206000805b8383116120d357505084810151848201516020909201918082146120ce576000945050505050611c4e565b6120a3565b60006120e0602085613050565b90505b8481101561214e578681815181106120fd576120fd612dae565b602001015160f81c60f81b6001600160f81b03191688828151811061212457612124612dae565b01602001516001600160f81b0319161461214657600095505050505050611c4e565b6001016120e3565b506001979650505050505050565b6000611c4e826001612ddf565b336121726110c8565b6001600160a01b031614610d775760405163118cdaa760e01b8152336004820152602401610546565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556121d382612836565b5050565b60606000806121e585611ac5565b90925090506001820161220a5760405162461bcd60e51b81526004016105469061310e565b80841061224c5760405162461bcd60e51b815260206004820152601060248201526f2b34b7103932b0b21037bb32b9393ab760811b6044820152606401610546565b60008061225a846001612ddf565b905060005b868110156122d25761227188836128a7565b925060001983036122be5760405162461bcd60e51b815260206004820152601760248201527642616420566172496e7420696e2073637269707453696760481b6044820152606401610546565b6122c88383612ddf565b915060010161225f565b506122dd87826128a7565b91506000198203611c3c5760405162461bcd60e51b815260206004820152601760248201527642616420566172496e7420696e2073637269707453696760481b6044820152606401610546565b6020810151600090611c4e565b6000611c4e8260206128f0565b6000611ef8858585856040516020016123609493929190613150565b6040516020818303038152906040526128ff565b6000806023805461238490612e6d565b91506000905061239684836014611cd6565b61239f906131ad565b60601c949350505050565b60006123d08a8a8a8a8a8a8a8a8a60405160200161236099989796959493929190613200565b9a9950505050505050505050565b60008060006123ec84611ac5565b90925090508015806123ff575060001982145b1561240e575060009392505050565b600061241b836001612ddf565b905060005b82811015612475578551821061243c5750600095945050505050565b600061244887846128a7565b90506000198103612460575060009695505050505050565b61246a8184612ddf565b925050600101612420565b5093519093149392505050565b600080600061249084611ac5565b90925090508015806124a3575060001982145b156124b2575060009392505050565b60006124bf836001612ddf565b905060005b8281101561247557855182106124e05750600095945050505050565b60006124ec8784612730565b90506000198103612504575060009695505050505050565b61250e8184612ddf565b9250506001016124c4565b60008160000361252b57506000611c4e565b6000805b83811015612582578451821061254a57600092505050611c4e565b60006125568684612794565b9050600019810361256d5760009350505050611c4e565b6125778184612ddf565b92505060010161252f565b50835114905092915050565b600080600061259d8585612926565b90508060ff166000036125d25760008585815181106125be576125be612dae565b016020015190935060f81c91506127299050565b836125de826001613269565b60ff166125eb9190612ddf565b855110156126025760001960009250925050612729565b60008160ff166002036126465761263b612627612620876001612ddf565b88906128f0565b62ffff0060e882901c1660f89190911c1790565b61ffff16905061271f565b8160ff1660040361269557612688612662612620876001612ddf565b60d881901c63ff00ff001662ff00ff60e89290921c9190911617601081811b91901c1790565b63ffffffff16905061271f565b8160ff1660080361271f576127136126b1612620876001612ddf565b60c01c64ff000000ff600882811c91821665ff000000ff009390911b92831617601090811b6001600160401b031666ff00ff00ff00ff9290921667ff00ff00ff00ff009093169290921790911c65ffff0000ffff1617602081811c91901b1790565b6001600160401b031690505b60ff909116925090505b9250929050565b600061273d826009612ddf565b8351101561274e5750600019611c4e565b60008061276585612760866008612ddf565b61258e565b90925090506001820161277e5760001992505050611c4e565b8061278a836009612ddf565b611ef89190612ddf565b60008060006127a3858561258e565b9092509050600182016127bc5760001992505050611c4e565b6000806127ca846001612ddf565b905060005b8381101561282b576127e588612760848a612ddf565b9095509250600183016128015760001995505050505050611c4e565b8261280d866001612ddf565b6128179190612ddf565b6128219083612ddf565b91506001016127cf565b509695505050505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60008060006128b685856129ac565b9092509050600182016128cf5760001992505050611c4e565b806128db836025612ddf565b6128e59190612ddf565b611ef8906004612ddf565b6000611ccf8383016020015190565b60006020600083516020850160025afa50602060006020600060025afa5050600051919050565b600082828151811061293a5761293a612dae565b016020015160f81c60ff0361295157506008611c4e565b82828151811061296357612963612dae565b016020015160f81c60fe0361297a57506004611c4e565b82828151811061298c5761298c612dae565b016020015160f81c60fd036129a357506002611c4e565b50600092915050565b6000806129ba836025612ddf565b845110156129cf575060001990506000612729565b6000806129e186612760876024612ddf565b9097909650945050505050565b600060208284031215612a0057600080fd5b5035919050565b60008083601f840112612a1957600080fd5b5081356001600160401b03811115612a3057600080fd5b6020830191508360208260051b850101111561272957600080fd5b60008060008060408587031215612a6157600080fd5b84356001600160401b03811115612a7757600080fd5b612a8387828801612a07565b90955093505060208501356001600160401b03811115612aa257600080fd5b612aae87828801612a07565b95989497509550505050565b60008083601f840112612acc57600080fd5b5081356001600160401b03811115612ae357600080fd5b60208301915083602082850101111561272957600080fd5b600080600080600060608688031215612b1357600080fd5b85356001600160401b03811115612b2957600080fd5b612b3588828901612aba565b90965094505060208601356001600160401b03811115612b5457600080fd5b612b6088828901612aba565b96999598509660400135949350505050565b60005b83811015612b8d578181015183820152602001612b75565b50506000910152565b6020815260008251806020840152612bb5816040850160208701612b72565b601f01601f19169190910160400192915050565b60006101208284031215612bdc57600080fd5b50919050565b600060208284031215612bf457600080fd5b81356001600160401b03811115612c0a57600080fd5b612c1684828501612bc9565b949350505050565b600080600060608486031215612c3357600080fd5b83356001600160401b03811115612c4957600080fd5b612c5586828701612bc9565b9660208601359650604090950135949350505050565b80356001600160e01b031981168114612c8357600080fd5b919050565b60008060408385031215612c9b57600080fd5b82359150612cab60208401612c6b565b90509250929050565b600060208284031215612cc657600080fd5b81356001600160a01b0381168114611ccf57600080fd5b60008060208385031215612cf057600080fd5b82356001600160401b03811115612d0657600080fd5b612d1285828601612aba565b90969095509350505050565b60008060008060408587031215612d3457600080fd5b84356001600160401b03811115612d4a57600080fd5b612d5687828801612aba565b90955093505060208501356001600160401b03811115612d7557600080fd5b612aae87828801612aba565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611c4e57611c4e612d81565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612dd657600080fd5b611ccf82612c6b565b80820180821115611c4e57611c4e612d81565b835181526020938401516001600160e01b031916938101939093526040830191909152606082015260800190565b6020808252601e908201527f4465706f736974207363726970742063616e6e6f7420626520656d7074790000604082015260600190565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680612e8157607f821691505b602082108103612bdc57634e487b7160e01b600052602260045260246000fd5b601f821115612eeb57806000526020600020601f840160051c81016020851015612ec85750805b601f840160051c820191505b81811015612ee85760008155600101612ed4565b50505b505050565b6001600160401b03831115612f0757612f07612e57565b612f1b83612f158354612e6d565b83612ea1565b6000601f841160018114612f4f5760008515612f375750838201355b600019600387901b1c1916600186901b178355612ee8565b600083815260209020601f19861690835b82811015612f805786850135825560209485019460019092019101612f60565b5086821015612f9d5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000612fec604083018688612faf565b8281036020840152612fff818587612faf565b979650505050505050565b6000808335601e1984360301811261302157600080fd5b8301803591506001600160401b0382111561303b57600080fd5b60200191503681900382131561272957600080fd5b81810381811115611c4e57611c4e612d81565b60006001820161307557613075612d81565b5060010190565b602081526000612c16602083018486612faf565b6000602082840312156130a257600080fd5b81356001600160f01b031981168114611ccf57600080fd5b8581528460208201526080604082015260006130da608083018587612faf565b90508260608301529695505050505050565b6000602082840312156130fe57600080fd5b81518015158114611ccf57600080fd5b60208082526022908201527f52656164206f76657272756e20647572696e6720566172496e742070617273696040820152616e6760f01b606082015260800190565b6001600160e01b0319851681528351600090613173816004850160208901612b72565b84519083019061318a816004840160208901612b72565b6001600160e01b0319949094169301600481019390935250506008019392505050565b805160208201516bffffffffffffffffffffffff198116919060148210156131f9576bffffffffffffffffffffffff196bffffffffffffffffffffffff198360140360031b1b82161692505b5050919050565b6001600160e01b03198a1681526001600160f01b031989166004820152868860068301376000878201600681016000815287898237506000908701600601908152848682376001600160e01b031993909316929093019182525060040198975050505050505050565b60ff8181168382160190811115611c4e57611c4e612d8156" + }, + { + "address": "0x3200000000000000000000000000000000000003", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3200000000000000000000000000000000000004", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3200000000000000000000000000000000000005", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3aeeb871f83c85e68ffd1868bef3425ed6649d39", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x66f68692c03eb9c0656d676f2f4bd13eba40d1b7", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x9fcdf8f60d3009656e50bf805cd53c7335b284fb", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xaafb7442f7f00b64057c2e9eae2815bb63ee0ece", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xc2f8eed77da1583f7bae0a3125dc7bc426002dde", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xd44821f906e3909b8ae944f7060551c33b922cc9", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xe756fdf89367ef428b48bca2d272ec8ecec053fd", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + } + ], + "chain_id": 5655, + "limit_contract_code_size": null, + "spec": { + "0": "SHANGHAI" + }, + "coinbase": "0x3100000000000000000000000000000000000005", + "starting_base_fee": 1000000000, + "block_gas_limit": 30000000, + "base_fee_params": { + "max_change_denominator": 8, + "elasticity_multiplier": 2 + }, + "difficulty": 0, + "extra_data": "0x", + "timestamp": 0, + "nonce": 0 +} \ No newline at end of file diff --git a/resources/genesis/mock-dockerized/soft_confirmation_rule_enforcer.json b/resources/genesis/mock-dockerized/soft_confirmation_rule_enforcer.json new file mode 100644 index 0000000..f9faf7a --- /dev/null +++ b/resources/genesis/mock-dockerized/soft_confirmation_rule_enforcer.json @@ -0,0 +1,4 @@ +{ + "max_l2_blocks_per_l1": 86400, + "authority": "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7p8jrm4zqrr8r94" +} \ No newline at end of file diff --git a/resources/genesis/mock/accounts.json b/resources/genesis/mock/accounts.json new file mode 100644 index 0000000..f65b078 --- /dev/null +++ b/resources/genesis/mock/accounts.json @@ -0,0 +1,3 @@ +{ + "pub_keys": [] +} diff --git a/resources/genesis/mock/evm.json b/resources/genesis/mock/evm.json new file mode 100644 index 0000000..4e4670b --- /dev/null +++ b/resources/genesis/mock/evm.json @@ -0,0 +1,158 @@ +{ + "data": [ + { + "address": "0x0f820f428ae436c1000b27577bf5bbf09bfec8f2", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x3100000000000000000000000000000000000001", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000001", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000002", + "balance": "0x115eec47f6cf7e35000000", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000002", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000003", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000003", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000004", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000004", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000005", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000005", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x31ffffffffffffffffffffffffffffffffffffff", + "balance": "0x0", + "code": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610499565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee3660046104bd565b610229565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461050c565b610291565b34801561013057600080fd5b506100d161013f3660046104bd565b610300565b34801561015057600080fd5b506100d161015f366004610499565b610336565b34801561017057600080fd5b506100a061017f366004610499565b6103b4565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d91906105ea565b949350505050565b61021d6103da565b6102276000610434565b565b6102316103da565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561027557600080fd5b505af1158015610289573d6000803e3d6000fd5b505050505050565b6102996103da565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906102c99086908690600401610607565b6000604051808303818588803b1580156102e257600080fd5b505af11580156102f6573d6000803e3d6000fd5b5050505050505050565b6103086103da565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe69060240161025b565b61033e6103da565b6001600160a01b0381166103a85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6103b181610434565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b6000546001600160a01b031633146102275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146103b157600080fd5b6000602082840312156104ab57600080fd5b81356104b681610484565b9392505050565b600080604083850312156104d057600080fd5b82356104db81610484565b915060208301356104eb81610484565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561052157600080fd5b833561052c81610484565b9250602084013561053c81610484565b9150604084013567ffffffffffffffff81111561055857600080fd5b8401601f8101861361056957600080fd5b803567ffffffffffffffff811115610583576105836104f6565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156105b2576105b26104f6565b6040528181528282016020018810156105ca57600080fd5b816020840160208301376000602083830101528093505050509250925092565b6000602082840312156105fc57600080fd5b81516104b681610484565b60018060a01b0383168152604060208201526000825180604084015260005b818110156106435760208186018101516060868401015201610626565b506000606082850101526060601f19601f830116840101915050939250505056", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + } + }, + { + "address": "0x3200000000000000000000000000000000000001", + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806357e871e71161007157806357e871e71461014c57806361b207e214610155578063a91d8b3d14610182578063d269a03e146101a2578063d761753e146101b5578063ee82ac5e146101e857600080fd5b80630466efc4146100ae5780630e27bc11146100e15780631f578333146100f657806334cdf78d146101095780634ffd344a14610129575b600080fd5b6100ce6100bc366004610598565b60009081526002602052604090205490565b6040519081526020015b60405180910390f35b6100f46100ef3660046105b1565b610208565b005b6100f4610104366004610598565b610330565b6100ce610117366004610598565b60016020526000908152604090205481565b61013c61013736600461061c565b6103de565b60405190151581526020016100d8565b6100ce60005481565b6100ce610163366004610598565b6000908152600160209081526040808320548352600290915290205490565b6100ce610190366004610598565b60026020526000908152604090205481565b61013c6101b036600461061c565b610404565b6101d073deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b6040516001600160a01b0390911681526020016100d8565b6100ce6101f6366004610598565b60009081526001602052604090205490565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146102705760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c65720060448201526064015b60405180910390fd5b60008054908190036102b65760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b6044820152606401610267565b60008181526001602081905260409091208490556102d5908290610677565b60009081558381526002602090815260409182902084905581518381529081018590529081018390527f32eff959e2e8d1609edc4b39ccf75900aa6c1da5719f8432752963fdf008234f9060600160405180910390a1505050565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146103935760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c6572006044820152606401610267565b600054156103d95760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610267565b600055565b6000858152600160205260408120546103fa908686868661040f565b9695505050505050565b60006103fa86868686865b6000858152600260209081526040808320548151601f870184900484028101840190925285825291610462918891849190899089908190840183828082843760009201919091525089925061046d915050565b979650505050505050565b6000838514801561047c575081155b801561048757508251155b15610494575060016104a3565b6104a0858486856104ab565b90505b949350505050565b6000602084516104bb9190610698565b156104c8575060006104a3565b83516000036104d9575060006104a3565b818560005b8651811015610548576104f2600284610698565b6001036105165761050f6105098883016020015190565b83610555565b915061052f565b61052c826105278984016020015190565b610555565b91505b60019290921c91610541602082610677565b90506104de565b5090931495945050505050565b6000610561838361056a565b90505b92915050565b60008260005281602052602060006040600060025afa50602060006020600060025afa505060005192915050565b6000602082840312156105aa57600080fd5b5035919050565b600080604083850312156105c457600080fd5b50508035926020909101359150565b60008083601f8401126105e557600080fd5b50813567ffffffffffffffff8111156105fd57600080fd5b60208301915083602082850101111561061557600080fd5b9250929050565b60008060008060006080868803121561063457600080fd5b8535945060208601359350604086013567ffffffffffffffff81111561065957600080fd5b610665888289016105d3565b96999598509660600135949350505050565b8082018082111561056457634e487b7160e01b600052601160045260246000fd5b6000826106b557634e487b7160e01b600052601260045260246000fd5b50069056" + }, + { + "address": "0x3200000000000000000000000000000000000002", + "balance": "0x0", + "code": "0x60806040526004361061019c5760003560e01c80638786dba7116100ec578063d761753e1161008a578063e613ae0011610064578063e613ae001461048e578063f119a9bd146104a9578063f2fde38b146104c9578063f8e655d2146104e957600080fd5b8063d761753e14610431578063dd95c7c614610459578063e30c39781461047957600080fd5b8063a41c5cf3116100c6578063a41c5cf3146103af578063b3ab15fb146103c4578063bafa9eb2146103e4578063c045577b1461040457600080fd5b80638786dba71461037257806387f8bf56146103855780638da5cb5b1461039a57600080fd5b8063570ca73511610159578063715018a611610133578063715018a61461031357806374ab4a8314610328578063781952a81461034857806379ba50971461035d57600080fd5b8063570ca735146102945780635d3e3176146102d15780635e3cc740146102f357600080fd5b806311e53a01146101a1578063158ef93e146101e1578063198546231461020b5780634126013714610220578063419759f514610240578063471ba1e314610256575b600080fd5b3480156101ad57600080fd5b506101ce6101bc3660046129ee565b60276020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156101ed57600080fd5b506000546101fb9060ff1681565b60405190151581526020016101d8565b61021e610219366004612a4b565b610509565b005b34801561022c57600080fd5b5061021e61023b366004612afb565b6106e2565b34801561024c57600080fd5b506101ce60215481565b34801561026257600080fd5b506102766102713660046129ee565b6108ef565b604080519283526001600160e01b03199091166020830152016101d8565b3480156102a057600080fd5b506000546102b99061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016101d8565b3480156102dd57600080fd5b506102e6610920565b6040516101d89190612b96565b3480156102ff57600080fd5b5061021e61030e366004612be2565b6109ae565b34801561031f57600080fd5b5061021e610d65565b34801561033457600080fd5b5061021e610343366004612c1e565b610d79565b34801561035457600080fd5b506026546101ce565b34801561036957600080fd5b5061021e610f4c565b61021e610380366004612c88565b610f94565b34801561039157600080fd5b506102e66110bb565b3480156103a657600080fd5b506102b96110c8565b3480156103bb57600080fd5b506102e66110fd565b3480156103d057600080fd5b5061021e6103df366004612cb4565b61110a565b3480156103f057600080fd5b506101fb6103ff3660046129ee565b61117b565b34801561041057600080fd5b506101ce61041f3660046129ee565b60286020526000908152604090205481565b34801561043d57600080fd5b506102b973deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b34801561046557600080fd5b5061021e610474366004612be2565b6111a6565b34801561048557600080fd5b506102b9611606565b34801561049a57600080fd5b506102b96001603160981b0181565b3480156104b557600080fd5b5061021e6104c4366004612cdd565b61162f565b3480156104d557600080fd5b5061021e6104e4366004612cb4565b6116a3565b3480156104f557600080fd5b5061021e610504366004612d1e565b611728565b82811461054f5760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b60448201526064015b60405180910390fd5b60215461055d908490612d97565b34146105a55760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610546565b60265460005b848110156106da57600060405180604001604052808888858181106105d2576105d2612dae565b9050602002013581526020018686858181106105f0576105f0612dae565b90506020020160208101906106059190612dc4565b6001600160e01b03191690526026805460018101825560009190915281517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a359460029092029182015560208201517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3595909101805463ffffffff191660e09290921c91909117905590507f3311a04a346a103ac115cca33028a2bc82f1964805860d0d3fc84a2772496ada816106b98486612ddf565b426040516106c993929190612df2565b60405180910390a1506001016105ab565b505050505050565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146107455760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c6572006044820152606401610546565b60005460ff16156107985760405162461bcd60e51b815260206004820152601f60248201527f436f6e747261637420697320616c726561647920696e697469616c697a6564006044820152606401610546565b806000036107e85760405162461bcd60e51b815260206004820152601a60248201527f4465706f73697420616d6f756e742063616e6e6f7420626520300000000000006044820152606401610546565b60008490036108095760405162461bcd60e51b815260040161054690612e20565b6000805460ff191660011790556023610823858783612ef0565b506024610831838583612ef0565b50602181905560008054610100600160a81b03191674deaddeaddeaddeaddeaddeaddeaddeaddeaddead001781556040805191825273deaddeaddeaddeaddeaddeaddeaddeaddeaddead60208301527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910160405180910390a17f80bd1fdfe157286ce420ee763f91748455b249605748e5df12dad9844402bafc858585856040516108e09493929190612fd8565b60405180910390a15050505050565b602681815481106108ff57600080fd5b60009182526020909120600290910201805460019091015490915060e01b82565b6025805461092d90612e6d565b80601f016020809104026020016040519081016040528092919081815260200182805461095990612e6d565b80156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b505050505081565b6109b7816117a2565b5060009050610a066109cc606084018461300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ac592505050565b915060009050610a63610a1c606085018561300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a5e925060019150869050613050565b611adc565b90506000610a7082611c54565b90506000610a88610a8383836020611cd6565b611d99565b90506000610aa9610a836020808651610aa19190613050565b869190611cd6565b600083815260276020526040812054919250819003610b015760405162461bcd60e51b815260206004820152601460248201527311195c1bdcda5d08191bc81b9bdd08195e1a5cdd60621b6044820152606401610546565b6000610b4d610b1360808a018a61300a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250611e1e915050565b90506000610b5c826001611f01565b9050600060258054610b6d90612e6d565b915060009050610b7e838284611cd6565b9050610c148160258054610b9190612e6d565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90612e6d565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b5050505050612085565b610c605760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420736c6173684f7254616b65207363726970740000000000006044820152606401610546565b6000602881610c70600189613050565b815260200190815260200160002054905060008160001480610c9a5750610c968861215c565b8214155b905080610ce95760405162461bcd60e51b815260206004820152601960248201527f4f70657261746f72206973206e6f74206d616c6963696f7573000000000000006044820152606401610546565b600180896103e88110610cfe57610cfe612dae565b602091828204019190066101000a81548160ff0219169083151502179055507ff918cdaebea74c5a8c3b02d7404c162f507551b158202cedcba9b6a74eabdff288604051610d4e91815260200190565b60405180910390a150505050505050505050505050565b610d6d612169565b610d77600061219b565b565b610d82836117a2565b5060009050610dd3610d97604086018661300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121d7915050565b90506000610de08261232a565b90506000610ded83612337565b9050600060268581548110610e0457610e04612dae565b60009182526020918290206040805180820190915260029290920201805480835260019091015460e01b6001600160e01b03191692820192909252915083148015610e665750816001600160e01b03191681602001516001600160e01b031916145b610ea65760405162461bcd60e51b81526020600482015260116024820152706e6f74206d61746368696e67205554584f60781b6044820152606401610546565b6000610eb86109cc60608a018a61300a565b915060009050610ece610a1c60608b018b61300a565b90506000610edb82611c54565b90506000610ee882611d99565b9050610ef38161215c565b60008a8152602860209081526040918290209290925580518b81529182018390527feedf47c2f61b040827944fd45e44ef6d742354b34e1af7dd99a56f444ec79347910160405180910390a15050505050505050505050565b3380610f56611606565b6001600160a01b031614610f885760405163118cdaa760e01b81526001600160a01b0382166004820152602401610546565b610f918161219b565b50565b6021543414610fdf5760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610546565b6040805180820182528381526001600160e01b03198316602082019081526026805460018101825560009190915282517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3594600283029081019190915591517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3595909201805463ffffffff191660e09390931c9290921790915591519091907f3311a04a346a103ac115cca33028a2bc82f1964805860d0d3fc84a2772496ada906110ad90849084904290612df2565b60405180910390a150505050565b6024805461092d90612e6d565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6023805461092d90612e6d565b611112612169565b60008054610100600160a81b0319166101006001600160a01b038481168281029390931793849055604080519290940416815260208101919091527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910160405180910390a150565b6001816103e8811061118c57600080fd5b60209182820401919006915054906101000a900460ff1681565b60005461010090046001600160a01b031633146112055760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610546565b600080611211836117a2565b915091508060011461125e5760405162461bcd60e51b815260206004820152601660248201527513db9b1e481bdb99481a5b9c1d5d08185b1b1bddd95960521b6044820152606401610546565b60006113096112706020860186612dc4565b61127d604087018761300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112bf92505050606088018861300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113049250505060c0890160a08a01612dc4565b612344565b6000818152602760205260409020549091501561135d5760405162461bcd60e51b81526020600482015260126024820152711d1e125908185b1c9958591e481cdc195b9d60721b6044820152606401610546565b60226000815461136c90613063565b9182905550600082815260276020526040812091909155611393610b13608087018761300a565b905060006113a082611ac5565b915050806003146113eb5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964207769746e657373206974656d7360581b6044820152606401610546565b60006113f8836001611f01565b905060006023805461140990612e6d565b91506000905061141a838284611cd6565b905061142d8160238054610b9190612e6d565b6114725760405162461bcd60e51b8152602060048201526016602482015275125b9d985b1a590819195c1bdcda5d081cd8dc9a5c1d60521b6044820152606401610546565b60006114a66024805461148490612e6d565b86516114909250613050565b6024805461149d90612e6d565b87929150611cd6565b90506114b98160248054610b9190612e6d565b6114fd5760405162461bcd60e51b8152602060048201526015602482015274092dcecc2d8d2c840e6c6e4d2e0e840e6eaccccd2f605b1b6044820152606401610546565b600061150885612374565b602254604080518d8152602081018c90526001600160a01b038416818301524260608201526080810192909252519192507fa82453ca34121b3ecb910d957824e27c5dc6465315949facd15fb72886490058919081900360a00190a16021546040516000916001600160a01b038416918381818185875af1925050503d80600081146115b0576040519150601f19603f3d011682016040523d82523d6000602084013e6115b5565b606091505b50509050806115f85760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610546565b505050505050505050505050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c006110ed565b611637612169565b60008190036116585760405162461bcd60e51b815260040161054690612e20565b6025611665828483612ef0565b507f8578c80bdea3ff51431011ed88db9cb415de2cf64f9ed5e7137288268cbdeb2c828260405161169792919061307c565b60405180910390a15050565b6116ab612169565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556116ef6110c8565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b611730612169565b60008390036117515760405162461bcd60e51b815260040161054690612e20565b602361175e848683612ef0565b50602461176c828483612ef0565b507f80bd1fdfe157286ce420ee763f91748455b249605748e5df12dad9844402bafc848484846040516110ad9493929190612fd8565b600080806118026117b66020860186612dc4565b6117c66040870160208801613090565b6117d3604088018861300a565b6117e060608a018a61300a565b6117ed60808c018c61300a565b6117fd60c08e0160a08f01612dc4565b6123aa565b905061184e611814604086018661300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123de92505050565b61189a5760405162461bcd60e51b815260206004820152601d60248201527f56696e206973206e6f742070726f7065726c7920666f726d61747465640000006044820152606401610546565b6118e46118aa606086018661300a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061248292505050565b6119305760405162461bcd60e51b815260206004820152601e60248201527f566f7574206973206e6f742070726f7065726c7920666f726d617474656400006044820152606401610546565b60006119426109cc604087018761300a565b91506119929050611956608087018761300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250859250612519915050565b6119e85760405162461bcd60e51b815260206004820152602160248201527f5769746e657373206973206e6f742070726f7065726c7920666f726d617474656044820152601960fa1b6064820152608401610546565b6001603160981b01634ffd344a60e087013584611a0860c08a018a61300a565b8a61010001356040518663ffffffff1660e01b8152600401611a2e9594939291906130ba565b602060405180830381865afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6f91906130ec565b611abb5760405162461bcd60e51b815260206004820152601b60248201527f5472616e73616374696f6e206973206e6f7420696e20626c6f636b00000000006044820152606401610546565b9094909350915050565b600080611ad383600061258e565b91509150915091565b6060600080611aea85611ac5565b909250905060018201611b0f5760405162461bcd60e51b81526004016105469061310e565b808410611b525760405162461bcd60e51b81526020600482015260116024820152702b37baba103932b0b21037bb32b9393ab760791b6044820152606401610546565b600080611b60846001612ddf565b905060005b86811015611bde57611b778883612730565b92506000198303611bca5760405162461bcd60e51b815260206004820152601a60248201527f42616420566172496e7420696e207363726970745075626b65790000000000006044820152606401610546565b611bd48383612ddf565b9150600101611b65565b50611be98782612730565b91506000198203611c3c5760405162461bcd60e51b815260206004820152601a60248201527f42616420566172496e7420696e207363726970745075626b65790000000000006044820152606401610546565b611c47878284611cd6565b9450505050505b92915050565b606081600981518110611c6957611c69612dae565b6020910101516001600160f81b031916603560f91b14611c9757505060408051602081019091526000815290565b600082600a81518110611cac57611cac612dae565b01602001516001600160f81b031981169150611ccf908490600b9060f81c611cd6565b9392505050565b606081600003611cf55750604080516020810190915260008152611ccf565b6000611d018385612ddf565b90508381118015611d13575080855110155b611d555760405162461bcd60e51b8152602060048201526013602482015272536c696365206f7574206f6620626f756e647360681b6044820152606401610546565b604051915082604083010160405282825283850182038460208701018481015b80821015611d8e57815183830152602082019150611d75565b505050509392505050565b60008151600003611dac57506000919050565b81516020811115611e0a5760405162461bcd60e51b815260206004820152602260248201527f42797465732063616e6e6f74206265206d6f7265207468616e20333220627974604482015261657360f01b6064820152608401610546565b60209283015192036008029190911c919050565b606060008060005b84811015611e9757611e388683612794565b92506000198303611e835760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610546565b611e8d8383612ddf565b9150600101611e26565b50611ea28582612794565b91506000198203611eed5760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610546565b611ef8858284611cd6565b95945050505050565b6060600080611f0f85611ac5565b909250905060018201611f345760405162461bcd60e51b81526004016105469061310e565b808410611f765760405162461bcd60e51b815260206004820152601060248201526f2b34b7103932b0b21037bb32b9393ab760811b6044820152606401610546565b600080611f84846001612ddf565b905060005b8681101561200f57611f9b888361258e565b909550925060018301611fe55760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610546565b82611ff1866001612ddf565b611ffb9190612ddf565b6120059083612ddf565b9150600101611f89565b5061201a878261258e565b9094509150600182016120645760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610546565b611c47816120728685612ddf565b61207d906001612ddf565b899190611cd6565b8151815160009190811461209d576000915050611c4e565b60206000805b8383116120d357505084810151848201516020909201918082146120ce576000945050505050611c4e565b6120a3565b60006120e0602085613050565b90505b8481101561214e578681815181106120fd576120fd612dae565b602001015160f81c60f81b6001600160f81b03191688828151811061212457612124612dae565b01602001516001600160f81b0319161461214657600095505050505050611c4e565b6001016120e3565b506001979650505050505050565b6000611c4e826001612ddf565b336121726110c8565b6001600160a01b031614610d775760405163118cdaa760e01b8152336004820152602401610546565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556121d382612836565b5050565b60606000806121e585611ac5565b90925090506001820161220a5760405162461bcd60e51b81526004016105469061310e565b80841061224c5760405162461bcd60e51b815260206004820152601060248201526f2b34b7103932b0b21037bb32b9393ab760811b6044820152606401610546565b60008061225a846001612ddf565b905060005b868110156122d25761227188836128a7565b925060001983036122be5760405162461bcd60e51b815260206004820152601760248201527642616420566172496e7420696e2073637269707453696760481b6044820152606401610546565b6122c88383612ddf565b915060010161225f565b506122dd87826128a7565b91506000198203611c3c5760405162461bcd60e51b815260206004820152601760248201527642616420566172496e7420696e2073637269707453696760481b6044820152606401610546565b6020810151600090611c4e565b6000611c4e8260206128f0565b6000611ef8858585856040516020016123609493929190613150565b6040516020818303038152906040526128ff565b6000806023805461238490612e6d565b91506000905061239684836014611cd6565b61239f906131ad565b60601c949350505050565b60006123d08a8a8a8a8a8a8a8a8a60405160200161236099989796959493929190613200565b9a9950505050505050505050565b60008060006123ec84611ac5565b90925090508015806123ff575060001982145b1561240e575060009392505050565b600061241b836001612ddf565b905060005b82811015612475578551821061243c5750600095945050505050565b600061244887846128a7565b90506000198103612460575060009695505050505050565b61246a8184612ddf565b925050600101612420565b5093519093149392505050565b600080600061249084611ac5565b90925090508015806124a3575060001982145b156124b2575060009392505050565b60006124bf836001612ddf565b905060005b8281101561247557855182106124e05750600095945050505050565b60006124ec8784612730565b90506000198103612504575060009695505050505050565b61250e8184612ddf565b9250506001016124c4565b60008160000361252b57506000611c4e565b6000805b83811015612582578451821061254a57600092505050611c4e565b60006125568684612794565b9050600019810361256d5760009350505050611c4e565b6125778184612ddf565b92505060010161252f565b50835114905092915050565b600080600061259d8585612926565b90508060ff166000036125d25760008585815181106125be576125be612dae565b016020015190935060f81c91506127299050565b836125de826001613269565b60ff166125eb9190612ddf565b855110156126025760001960009250925050612729565b60008160ff166002036126465761263b612627612620876001612ddf565b88906128f0565b62ffff0060e882901c1660f89190911c1790565b61ffff16905061271f565b8160ff1660040361269557612688612662612620876001612ddf565b60d881901c63ff00ff001662ff00ff60e89290921c9190911617601081811b91901c1790565b63ffffffff16905061271f565b8160ff1660080361271f576127136126b1612620876001612ddf565b60c01c64ff000000ff600882811c91821665ff000000ff009390911b92831617601090811b6001600160401b031666ff00ff00ff00ff9290921667ff00ff00ff00ff009093169290921790911c65ffff0000ffff1617602081811c91901b1790565b6001600160401b031690505b60ff909116925090505b9250929050565b600061273d826009612ddf565b8351101561274e5750600019611c4e565b60008061276585612760866008612ddf565b61258e565b90925090506001820161277e5760001992505050611c4e565b8061278a836009612ddf565b611ef89190612ddf565b60008060006127a3858561258e565b9092509050600182016127bc5760001992505050611c4e565b6000806127ca846001612ddf565b905060005b8381101561282b576127e588612760848a612ddf565b9095509250600183016128015760001995505050505050611c4e565b8261280d866001612ddf565b6128179190612ddf565b6128219083612ddf565b91506001016127cf565b509695505050505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60008060006128b685856129ac565b9092509050600182016128cf5760001992505050611c4e565b806128db836025612ddf565b6128e59190612ddf565b611ef8906004612ddf565b6000611ccf8383016020015190565b60006020600083516020850160025afa50602060006020600060025afa5050600051919050565b600082828151811061293a5761293a612dae565b016020015160f81c60ff0361295157506008611c4e565b82828151811061296357612963612dae565b016020015160f81c60fe0361297a57506004611c4e565b82828151811061298c5761298c612dae565b016020015160f81c60fd036129a357506002611c4e565b50600092915050565b6000806129ba836025612ddf565b845110156129cf575060001990506000612729565b6000806129e186612760876024612ddf565b9097909650945050505050565b600060208284031215612a0057600080fd5b5035919050565b60008083601f840112612a1957600080fd5b5081356001600160401b03811115612a3057600080fd5b6020830191508360208260051b850101111561272957600080fd5b60008060008060408587031215612a6157600080fd5b84356001600160401b03811115612a7757600080fd5b612a8387828801612a07565b90955093505060208501356001600160401b03811115612aa257600080fd5b612aae87828801612a07565b95989497509550505050565b60008083601f840112612acc57600080fd5b5081356001600160401b03811115612ae357600080fd5b60208301915083602082850101111561272957600080fd5b600080600080600060608688031215612b1357600080fd5b85356001600160401b03811115612b2957600080fd5b612b3588828901612aba565b90965094505060208601356001600160401b03811115612b5457600080fd5b612b6088828901612aba565b96999598509660400135949350505050565b60005b83811015612b8d578181015183820152602001612b75565b50506000910152565b6020815260008251806020840152612bb5816040850160208701612b72565b601f01601f19169190910160400192915050565b60006101208284031215612bdc57600080fd5b50919050565b600060208284031215612bf457600080fd5b81356001600160401b03811115612c0a57600080fd5b612c1684828501612bc9565b949350505050565b600080600060608486031215612c3357600080fd5b83356001600160401b03811115612c4957600080fd5b612c5586828701612bc9565b9660208601359650604090950135949350505050565b80356001600160e01b031981168114612c8357600080fd5b919050565b60008060408385031215612c9b57600080fd5b82359150612cab60208401612c6b565b90509250929050565b600060208284031215612cc657600080fd5b81356001600160a01b0381168114611ccf57600080fd5b60008060208385031215612cf057600080fd5b82356001600160401b03811115612d0657600080fd5b612d1285828601612aba565b90969095509350505050565b60008060008060408587031215612d3457600080fd5b84356001600160401b03811115612d4a57600080fd5b612d5687828801612aba565b90955093505060208501356001600160401b03811115612d7557600080fd5b612aae87828801612aba565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611c4e57611c4e612d81565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612dd657600080fd5b611ccf82612c6b565b80820180821115611c4e57611c4e612d81565b835181526020938401516001600160e01b031916938101939093526040830191909152606082015260800190565b6020808252601e908201527f4465706f736974207363726970742063616e6e6f7420626520656d7074790000604082015260600190565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680612e8157607f821691505b602082108103612bdc57634e487b7160e01b600052602260045260246000fd5b601f821115612eeb57806000526020600020601f840160051c81016020851015612ec85750805b601f840160051c820191505b81811015612ee85760008155600101612ed4565b50505b505050565b6001600160401b03831115612f0757612f07612e57565b612f1b83612f158354612e6d565b83612ea1565b6000601f841160018114612f4f5760008515612f375750838201355b600019600387901b1c1916600186901b178355612ee8565b600083815260209020601f19861690835b82811015612f805786850135825560209485019460019092019101612f60565b5086821015612f9d5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000612fec604083018688612faf565b8281036020840152612fff818587612faf565b979650505050505050565b6000808335601e1984360301811261302157600080fd5b8301803591506001600160401b0382111561303b57600080fd5b60200191503681900382131561272957600080fd5b81810381811115611c4e57611c4e612d81565b60006001820161307557613075612d81565b5060010190565b602081526000612c16602083018486612faf565b6000602082840312156130a257600080fd5b81356001600160f01b031981168114611ccf57600080fd5b8581528460208201526080604082015260006130da608083018587612faf565b90508260608301529695505050505050565b6000602082840312156130fe57600080fd5b81518015158114611ccf57600080fd5b60208082526022908201527f52656164206f76657272756e20647572696e6720566172496e742070617273696040820152616e6760f01b606082015260800190565b6001600160e01b0319851681528351600090613173816004850160208901612b72565b84519083019061318a816004840160208901612b72565b6001600160e01b0319949094169301600481019390935250506008019392505050565b805160208201516bffffffffffffffffffffffff198116919060148210156131f9576bffffffffffffffffffffffff196bffffffffffffffffffffffff198360140360031b1b82161692505b5050919050565b6001600160e01b03198a1681526001600160f01b031989166004820152868860068301376000878201600681016000815287898237506000908701600601908152848682376001600160e01b031993909316929093019182525060040198975050505050505050565b60ff8181168382160190811115611c4e57611c4e612d8156" + }, + { + "address": "0x3200000000000000000000000000000000000003", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3200000000000000000000000000000000000004", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3200000000000000000000000000000000000005", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3aeeb871f83c85e68ffd1868bef3425ed6649d39", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x66f68692c03eb9c0656d676f2f4bd13eba40d1b7", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0x9fcdf8f60d3009656e50bf805cd53c7335b284fb", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xaafb7442f7f00b64057c2e9eae2815bb63ee0ece", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xc2f8eed77da1583f7bae0a3125dc7bc426002dde", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xd44821f906e3909b8ae944f7060551c33b922cc9", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xe756fdf89367ef428b48bca2d272ec8ecec053fd", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + }, + { + "address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "balance": "0xffffffffffffffffffffffffffffff", + "code": "0x" + } + ], + "chain_id": 5655, + "limit_contract_code_size": null, + "spec": { + "0": "SHANGHAI" + }, + "coinbase": "0x3100000000000000000000000000000000000005", + "starting_base_fee": 1000000000, + "block_gas_limit": 30000000, + "base_fee_params": { + "max_change_denominator": 8, + "elasticity_multiplier": 2 + }, + "difficulty": 0, + "extra_data": "0x", + "timestamp": 0, + "nonce": 0 +} \ No newline at end of file diff --git a/resources/genesis/mock/soft_confirmation_rule_enforcer.json b/resources/genesis/mock/soft_confirmation_rule_enforcer.json new file mode 100644 index 0000000..f9faf7a --- /dev/null +++ b/resources/genesis/mock/soft_confirmation_rule_enforcer.json @@ -0,0 +1,4 @@ +{ + "max_l2_blocks_per_l1": 86400, + "authority": "sov1l6n2cku82yfqld30lanm2nfw43n2auc8clw7r5u5m6s7p8jrm4zqrr8r94" +} \ No newline at end of file diff --git a/resources/genesis/testnet/accounts.json b/resources/genesis/testnet/accounts.json new file mode 100644 index 0000000..f65b078 --- /dev/null +++ b/resources/genesis/testnet/accounts.json @@ -0,0 +1,3 @@ +{ + "pub_keys": [] +} diff --git a/resources/genesis/testnet/evm.json b/resources/genesis/testnet/evm.json new file mode 100644 index 0000000..81731ae --- /dev/null +++ b/resources/genesis/testnet/evm.json @@ -0,0 +1,108 @@ +{ + "data": [ + { + "address": "0x3100000000000000000000000000000000000001", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000001", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000002", + "balance": "0x115eec47f6cf7e35000000", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000002", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x0000000000000000000000007f2108e9b2f0a1ea8765e16adc17fb02f3cd4972", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000003", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000006897742d001ddbbfea824a447cf7873f490c3410", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000003", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000576843e07fa5ebd45d72c90fee0a614b0b6a8e73", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000004", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000006897742d001ddbbfea824a447cf7873f490c3410", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000004", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000576843e07fa5ebd45d72c90fee0a614b0b6a8e73", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x3100000000000000000000000000000000000005", + "balance": "0x0", + "code": "0x60806040523661001357610011610017565b005b6100115b61001f610169565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a5761005361019c565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a576100536101f3565b63070d7c6960e41b6001600160e01b031982160161009a57610053610239565b621eb96f60e61b6001600160e01b03198216016100b95761005361026a565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102aa565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102be565b565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101a66102ce565b60006101b53660048184610683565b8101906101c291906106c9565b90506101df816040518060200160405280600081525060006102d9565b505060408051602081019091526000815290565b60606000806102053660048184610683565b81019061021291906106fa565b91509150610222828260016102d9565b604051806020016040528060008152509250505090565b60606102436102ce565b60006102523660048184610683565b81019061025f91906106c9565b90506101df81610305565b60606102746102ce565b600061027e610169565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102b46102ce565b600061027e61035c565b6101676102c961035c565b61036b565b341561016757600080fd5b6102e28361038f565b6000825111806102ef5750805b15610300576102fe83836103cf565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61032e610169565b604080516001600160a01b03928316815291841660208301520160405180910390a1610359816103fb565b50565b60006103666104a4565b905090565b3660008037600080366000845af43d6000803e80801561038a573d6000f35b3d6000fd5b610398816104cc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606103f4838360405180606001604052806027815260200161083860279139610560565b9392505050565b6001600160a01b0381166104605760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61018d565b6001600160a01b0381163b6105395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610483565b6060600080856001600160a01b03168560405161057d91906107e8565b600060405180830381855af49150503d80600081146105b8576040519150601f19603f3d011682016040523d82523d6000602084013e6105bd565b606091505b50915091506105ce868383876105d8565b9695505050505050565b60608315610647578251600003610640576001600160a01b0385163b6106405760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b5081610651565b6106518383610659565b949350505050565b8151156106695781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610804565b6000808585111561069357600080fd5b838611156106a057600080fd5b5050820193919092039150565b80356001600160a01b03811681146106c457600080fd5b919050565b6000602082840312156106db57600080fd5b6103f4826106ad565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561070d57600080fd5b610716836106ad565b9150602083013567ffffffffffffffff81111561073257600080fd5b8301601f8101851361074357600080fd5b803567ffffffffffffffff81111561075d5761075d6106e4565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561078c5761078c6106e4565b6040528181528282016020018710156107a457600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156107df5781810151838201526020016107c7565b50506000910152565b600082516107fa8184602087016107c4565b9190910192915050565b60208152600082518060208401526108238160408501602087016107c4565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000006897742d001ddbbfea824a447cf7873f490c3410", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x00000000000000000000000000000000000000000000000006f05b59d3b20000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000003200000000000000000000000000000000000005", + "0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300": "0x000000000000000000000000576843e07fa5ebd45d72c90fee0a614b0b6a8e73", + "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000031ffffffffffffffffffffffffffffffffffffff" + } + }, + { + "address": "0x31ffffffffffffffffffffffffffffffffffffff", + "balance": "0x0", + "code": "0x60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610499565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee3660046104bd565b610229565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461050c565b610291565b34801561013057600080fd5b506100d161013f3660046104bd565b610300565b34801561015057600080fd5b506100d161015f366004610499565b610336565b34801561017057600080fd5b506100a061017f366004610499565b6103b4565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d91906105ea565b949350505050565b61021d6103da565b6102276000610434565b565b6102316103da565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561027557600080fd5b505af1158015610289573d6000803e3d6000fd5b505050505050565b6102996103da565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906102c99086908690600401610607565b6000604051808303818588803b1580156102e257600080fd5b505af11580156102f6573d6000803e3d6000fd5b5050505050505050565b6103086103da565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe69060240161025b565b61033e6103da565b6001600160a01b0381166103a85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6103b181610434565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b6000546001600160a01b031633146102275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146103b157600080fd5b6000602082840312156104ab57600080fd5b81356104b681610484565b9392505050565b600080604083850312156104d057600080fd5b82356104db81610484565b915060208301356104eb81610484565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561052157600080fd5b833561052c81610484565b9250602084013561053c81610484565b9150604084013567ffffffffffffffff81111561055857600080fd5b8401601f8101861361056957600080fd5b803567ffffffffffffffff811115610583576105836104f6565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156105b2576105b26104f6565b6040528181528282016020018810156105ca57600080fd5b816020840160208301376000602083830101528093505050509250925092565b6000602082840312156105fc57600080fd5b81516104b681610484565b60018060a01b0383168152604060208201526000825180604084015260005b818110156106435760208186018101516060868401015201610626565b506000606082850101526060601f19601f830116840101915050939250505056", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x00000000000000000000000084e767448f9b4a37a3df6f7b063f00151226307f" + } + }, + { + "address": "0x3200000000000000000000000000000000000001", + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806357e871e71161007157806357e871e71461014c57806361b207e214610155578063a91d8b3d14610182578063d269a03e146101a2578063d761753e146101b5578063ee82ac5e146101e857600080fd5b80630466efc4146100ae5780630e27bc11146100e15780631f578333146100f657806334cdf78d146101095780634ffd344a14610129575b600080fd5b6100ce6100bc366004610599565b60009081526002602052604090205490565b6040519081526020015b60405180910390f35b6100f46100ef3660046105b2565b610208565b005b6100f4610104366004610599565b610331565b6100ce610117366004610599565b60016020526000908152604090205481565b61013c61013736600461061d565b6103df565b60405190151581526020016100d8565b6100ce60005481565b6100ce610163366004610599565b6000908152600160209081526040808320548352600290915290205490565b6100ce610190366004610599565b60026020526000908152604090205481565b61013c6101b036600461061d565b610405565b6101d073deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b6040516001600160a01b0390911681526020016100d8565b6100ce6101f6366004610599565b60009081526001602052604090205490565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146102705760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c65720060448201526064015b60405180910390fd5b60008054908190036102b65760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b6044820152606401610267565b60008181526001602081905260409091208490556102d5908290610678565b6000908155838152600260209081526040808320859055915482519081529081018590529081018390527f32eff959e2e8d1609edc4b39ccf75900aa6c1da5719f8432752963fdf008234f9060600160405180910390a1505050565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146103945760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c6572006044820152606401610267565b600054156103da5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610267565b600055565b6000858152600160205260408120546103fb9086868686610410565b9695505050505050565b60006103fb86868686865b6000858152600260209081526040808320548151601f870184900484028101840190925285825291610463918891849190899089908190840183828082843760009201919091525089925061046e915050565b979650505050505050565b6000838514801561047d575081155b801561048857508251155b15610495575060016104a4565b6104a1858486856104ac565b90505b949350505050565b6000602084516104bc9190610699565b156104c9575060006104a4565b83516000036104da575060006104a4565b818560005b8651811015610549576104f3600284610699565b6001036105175761051061050a8883016020015190565b83610556565b9150610530565b61052d826105288984016020015190565b610556565b91505b60019290921c91610542602082610678565b90506104df565b5090931495945050505050565b6000610562838361056b565b90505b92915050565b60008260005281602052602060006040600060025afa50602060006020600060025afa505060005192915050565b6000602082840312156105ab57600080fd5b5035919050565b600080604083850312156105c557600080fd5b50508035926020909101359150565b60008083601f8401126105e657600080fd5b50813567ffffffffffffffff8111156105fe57600080fd5b60208301915083602082850101111561061657600080fd5b9250929050565b60008060008060006080868803121561063557600080fd5b8535945060208601359350604086013567ffffffffffffffff81111561065a57600080fd5b610666888289016105d4565b96999598509660600135949350505050565b8082018082111561056557634e487b7160e01b600052601160045260246000fd5b6000826106b657634e487b7160e01b600052601260045260246000fd5b50069056" + }, + { + "address": "0x3200000000000000000000000000000000000002", + "balance": "0x0", + "code": "0x60806040526004361061019c5760003560e01c80638786dba7116100ec578063d761753e1161008a578063e613ae0011610064578063e613ae001461048e578063f119a9bd146104a9578063f2fde38b146104c9578063f8e655d2146104e957600080fd5b8063d761753e14610431578063dd95c7c614610459578063e30c39781461047957600080fd5b8063a41c5cf3116100c6578063a41c5cf3146103af578063b3ab15fb146103c4578063bafa9eb2146103e4578063c045577b1461040457600080fd5b80638786dba71461037257806387f8bf56146103855780638da5cb5b1461039a57600080fd5b8063570ca73511610159578063715018a611610133578063715018a61461031357806374ab4a8314610328578063781952a81461034857806379ba50971461035d57600080fd5b8063570ca735146102945780635d3e3176146102d15780635e3cc740146102f357600080fd5b806311e53a01146101a1578063158ef93e146101e1578063198546231461020b5780634126013714610220578063419759f514610240578063471ba1e314610256575b600080fd5b3480156101ad57600080fd5b506101ce6101bc3660046129ee565b60276020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156101ed57600080fd5b506000546101fb9060ff1681565b60405190151581526020016101d8565b61021e610219366004612a4b565b610509565b005b34801561022c57600080fd5b5061021e61023b366004612afb565b6106e2565b34801561024c57600080fd5b506101ce60215481565b34801561026257600080fd5b506102766102713660046129ee565b6108ef565b604080519283526001600160e01b03199091166020830152016101d8565b3480156102a057600080fd5b506000546102b99061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016101d8565b3480156102dd57600080fd5b506102e6610920565b6040516101d89190612b96565b3480156102ff57600080fd5b5061021e61030e366004612be2565b6109ae565b34801561031f57600080fd5b5061021e610d65565b34801561033457600080fd5b5061021e610343366004612c1e565b610d79565b34801561035457600080fd5b506026546101ce565b34801561036957600080fd5b5061021e610f4c565b61021e610380366004612c88565b610f94565b34801561039157600080fd5b506102e66110bb565b3480156103a657600080fd5b506102b96110c8565b3480156103bb57600080fd5b506102e66110fd565b3480156103d057600080fd5b5061021e6103df366004612cb4565b61110a565b3480156103f057600080fd5b506101fb6103ff3660046129ee565b61117b565b34801561041057600080fd5b506101ce61041f3660046129ee565b60286020526000908152604090205481565b34801561043d57600080fd5b506102b973deaddeaddeaddeaddeaddeaddeaddeaddeaddead81565b34801561046557600080fd5b5061021e610474366004612be2565b6111a6565b34801561048557600080fd5b506102b9611606565b34801561049a57600080fd5b506102b96001603160981b0181565b3480156104b557600080fd5b5061021e6104c4366004612cdd565b61162f565b3480156104d557600080fd5b5061021e6104e4366004612cb4565b6116a3565b3480156104f557600080fd5b5061021e610504366004612d1e565b611728565b82811461054f5760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b60448201526064015b60405180910390fd5b60215461055d908490612d97565b34146105a55760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610546565b60265460005b848110156106da57600060405180604001604052808888858181106105d2576105d2612dae565b9050602002013581526020018686858181106105f0576105f0612dae565b90506020020160208101906106059190612dc4565b6001600160e01b03191690526026805460018101825560009190915281517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a359460029092029182015560208201517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3595909101805463ffffffff191660e09290921c91909117905590507f3311a04a346a103ac115cca33028a2bc82f1964805860d0d3fc84a2772496ada816106b98486612ddf565b426040516106c993929190612df2565b60405180910390a1506001016105ab565b505050505050565b3373deaddeaddeaddeaddeaddeaddeaddeaddeaddead146107455760405162461bcd60e51b815260206004820152601f60248201527f63616c6c6572206973206e6f74207468652073797374656d2063616c6c6572006044820152606401610546565b60005460ff16156107985760405162461bcd60e51b815260206004820152601f60248201527f436f6e747261637420697320616c726561647920696e697469616c697a6564006044820152606401610546565b806000036107e85760405162461bcd60e51b815260206004820152601a60248201527f4465706f73697420616d6f756e742063616e6e6f7420626520300000000000006044820152606401610546565b60008490036108095760405162461bcd60e51b815260040161054690612e20565b6000805460ff191660011790556023610823858783612ef0565b506024610831838583612ef0565b50602181905560008054610100600160a81b03191674deaddeaddeaddeaddeaddeaddeaddeaddeaddead001781556040805191825273deaddeaddeaddeaddeaddeaddeaddeaddeaddead60208301527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910160405180910390a17f80bd1fdfe157286ce420ee763f91748455b249605748e5df12dad9844402bafc858585856040516108e09493929190612fd8565b60405180910390a15050505050565b602681815481106108ff57600080fd5b60009182526020909120600290910201805460019091015490915060e01b82565b6025805461092d90612e6d565b80601f016020809104026020016040519081016040528092919081815260200182805461095990612e6d565b80156109a65780601f1061097b576101008083540402835291602001916109a6565b820191906000526020600020905b81548152906001019060200180831161098957829003601f168201915b505050505081565b6109b7816117a2565b5060009050610a066109cc606084018461300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611ac592505050565b915060009050610a63610a1c606085018561300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a5e925060019150869050613050565b611adc565b90506000610a7082611c54565b90506000610a88610a8383836020611cd6565b611d99565b90506000610aa9610a836020808651610aa19190613050565b869190611cd6565b600083815260276020526040812054919250819003610b015760405162461bcd60e51b815260206004820152601460248201527311195c1bdcda5d08191bc81b9bdd08195e1a5cdd60621b6044820152606401610546565b6000610b4d610b1360808a018a61300a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250611e1e915050565b90506000610b5c826001611f01565b9050600060258054610b6d90612e6d565b915060009050610b7e838284611cd6565b9050610c148160258054610b9190612e6d565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90612e6d565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b5050505050612085565b610c605760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420736c6173684f7254616b65207363726970740000000000006044820152606401610546565b6000602881610c70600189613050565b815260200190815260200160002054905060008160001480610c9a5750610c968861215c565b8214155b905080610ce95760405162461bcd60e51b815260206004820152601960248201527f4f70657261746f72206973206e6f74206d616c6963696f7573000000000000006044820152606401610546565b600180896103e88110610cfe57610cfe612dae565b602091828204019190066101000a81548160ff0219169083151502179055507ff918cdaebea74c5a8c3b02d7404c162f507551b158202cedcba9b6a74eabdff288604051610d4e91815260200190565b60405180910390a150505050505050505050505050565b610d6d612169565b610d77600061219b565b565b610d82836117a2565b5060009050610dd3610d97604086018661300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506121d7915050565b90506000610de08261232a565b90506000610ded83612337565b9050600060268581548110610e0457610e04612dae565b60009182526020918290206040805180820190915260029290920201805480835260019091015460e01b6001600160e01b03191692820192909252915083148015610e665750816001600160e01b03191681602001516001600160e01b031916145b610ea65760405162461bcd60e51b81526020600482015260116024820152706e6f74206d61746368696e67205554584f60781b6044820152606401610546565b6000610eb86109cc60608a018a61300a565b915060009050610ece610a1c60608b018b61300a565b90506000610edb82611c54565b90506000610ee882611d99565b9050610ef38161215c565b60008a8152602860209081526040918290209290925580518b81529182018390527feedf47c2f61b040827944fd45e44ef6d742354b34e1af7dd99a56f444ec79347910160405180910390a15050505050505050505050565b3380610f56611606565b6001600160a01b031614610f885760405163118cdaa760e01b81526001600160a01b0382166004820152602401610546565b610f918161219b565b50565b6021543414610fdf5760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610546565b6040805180820182528381526001600160e01b03198316602082019081526026805460018101825560009190915282517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3594600283029081019190915591517f744a2cf8fd7008e3d53b67916e73460df9fa5214e3ef23dd4259ca09493a3595909201805463ffffffff191660e09390931c9290921790915591519091907f3311a04a346a103ac115cca33028a2bc82f1964805860d0d3fc84a2772496ada906110ad90849084904290612df2565b60405180910390a150505050565b6024805461092d90612e6d565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6023805461092d90612e6d565b611112612169565b60008054610100600160a81b0319166101006001600160a01b038481168281029390931793849055604080519290940416815260208101919091527ffbe5b6cbafb274f445d7fed869dc77a838d8243a22c460de156560e8857cad03910160405180910390a150565b6001816103e8811061118c57600080fd5b60209182820401919006915054906101000a900460ff1681565b60005461010090046001600160a01b031633146112055760405162461bcd60e51b815260206004820152601a60248201527f63616c6c6572206973206e6f7420746865206f70657261746f720000000000006044820152606401610546565b600080611211836117a2565b915091508060011461125e5760405162461bcd60e51b815260206004820152601660248201527513db9b1e481bdb99481a5b9c1d5d08185b1b1bddd95960521b6044820152606401610546565b60006113096112706020860186612dc4565b61127d604087018761300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112bf92505050606088018861300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113049250505060c0890160a08a01612dc4565b612344565b6000818152602760205260409020549091501561135d5760405162461bcd60e51b81526020600482015260126024820152711d1e125908185b1c9958591e481cdc195b9d60721b6044820152606401610546565b60226000815461136c90613063565b9182905550600082815260276020526040812091909155611393610b13608087018761300a565b905060006113a082611ac5565b915050806003146113eb5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964207769746e657373206974656d7360581b6044820152606401610546565b60006113f8836001611f01565b905060006023805461140990612e6d565b91506000905061141a838284611cd6565b905061142d8160238054610b9190612e6d565b6114725760405162461bcd60e51b8152602060048201526016602482015275125b9d985b1a590819195c1bdcda5d081cd8dc9a5c1d60521b6044820152606401610546565b60006114a66024805461148490612e6d565b86516114909250613050565b6024805461149d90612e6d565b87929150611cd6565b90506114b98160248054610b9190612e6d565b6114fd5760405162461bcd60e51b8152602060048201526015602482015274092dcecc2d8d2c840e6c6e4d2e0e840e6eaccccd2f605b1b6044820152606401610546565b600061150885612374565b602254604080518d8152602081018c90526001600160a01b038416818301524260608201526080810192909252519192507fa82453ca34121b3ecb910d957824e27c5dc6465315949facd15fb72886490058919081900360a00190a16021546040516000916001600160a01b038416918381818185875af1925050503d80600081146115b0576040519150601f19603f3d011682016040523d82523d6000602084013e6115b5565b606091505b50509050806115f85760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610546565b505050505050505050505050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c006110ed565b611637612169565b60008190036116585760405162461bcd60e51b815260040161054690612e20565b6025611665828483612ef0565b507f8578c80bdea3ff51431011ed88db9cb415de2cf64f9ed5e7137288268cbdeb2c828260405161169792919061307c565b60405180910390a15050565b6116ab612169565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556116ef6110c8565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b611730612169565b60008390036117515760405162461bcd60e51b815260040161054690612e20565b602361175e848683612ef0565b50602461176c828483612ef0565b507f80bd1fdfe157286ce420ee763f91748455b249605748e5df12dad9844402bafc848484846040516110ad9493929190612fd8565b600080806118026117b66020860186612dc4565b6117c66040870160208801613090565b6117d3604088018861300a565b6117e060608a018a61300a565b6117ed60808c018c61300a565b6117fd60c08e0160a08f01612dc4565b6123aa565b905061184e611814604086018661300a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123de92505050565b61189a5760405162461bcd60e51b815260206004820152601d60248201527f56696e206973206e6f742070726f7065726c7920666f726d61747465640000006044820152606401610546565b6118e46118aa606086018661300a565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061248292505050565b6119305760405162461bcd60e51b815260206004820152601e60248201527f566f7574206973206e6f742070726f7065726c7920666f726d617474656400006044820152606401610546565b60006119426109cc604087018761300a565b91506119929050611956608087018761300a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250859250612519915050565b6119e85760405162461bcd60e51b815260206004820152602160248201527f5769746e657373206973206e6f742070726f7065726c7920666f726d617474656044820152601960fa1b6064820152608401610546565b6001603160981b01634ffd344a60e087013584611a0860c08a018a61300a565b8a61010001356040518663ffffffff1660e01b8152600401611a2e9594939291906130ba565b602060405180830381865afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6f91906130ec565b611abb5760405162461bcd60e51b815260206004820152601b60248201527f5472616e73616374696f6e206973206e6f7420696e20626c6f636b00000000006044820152606401610546565b9094909350915050565b600080611ad383600061258e565b91509150915091565b6060600080611aea85611ac5565b909250905060018201611b0f5760405162461bcd60e51b81526004016105469061310e565b808410611b525760405162461bcd60e51b81526020600482015260116024820152702b37baba103932b0b21037bb32b9393ab760791b6044820152606401610546565b600080611b60846001612ddf565b905060005b86811015611bde57611b778883612730565b92506000198303611bca5760405162461bcd60e51b815260206004820152601a60248201527f42616420566172496e7420696e207363726970745075626b65790000000000006044820152606401610546565b611bd48383612ddf565b9150600101611b65565b50611be98782612730565b91506000198203611c3c5760405162461bcd60e51b815260206004820152601a60248201527f42616420566172496e7420696e207363726970745075626b65790000000000006044820152606401610546565b611c47878284611cd6565b9450505050505b92915050565b606081600981518110611c6957611c69612dae565b6020910101516001600160f81b031916603560f91b14611c9757505060408051602081019091526000815290565b600082600a81518110611cac57611cac612dae565b01602001516001600160f81b031981169150611ccf908490600b9060f81c611cd6565b9392505050565b606081600003611cf55750604080516020810190915260008152611ccf565b6000611d018385612ddf565b90508381118015611d13575080855110155b611d555760405162461bcd60e51b8152602060048201526013602482015272536c696365206f7574206f6620626f756e647360681b6044820152606401610546565b604051915082604083010160405282825283850182038460208701018481015b80821015611d8e57815183830152602082019150611d75565b505050509392505050565b60008151600003611dac57506000919050565b81516020811115611e0a5760405162461bcd60e51b815260206004820152602260248201527f42797465732063616e6e6f74206265206d6f7265207468616e20333220627974604482015261657360f01b6064820152608401610546565b60209283015192036008029190911c919050565b606060008060005b84811015611e9757611e388683612794565b92506000198303611e835760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610546565b611e8d8383612ddf565b9150600101611e26565b50611ea28582612794565b91506000198203611eed5760405162461bcd60e51b815260206004820152601560248201527442616420566172496e7420696e207769746e65737360581b6044820152606401610546565b611ef8858284611cd6565b95945050505050565b6060600080611f0f85611ac5565b909250905060018201611f345760405162461bcd60e51b81526004016105469061310e565b808410611f765760405162461bcd60e51b815260206004820152601060248201526f2b34b7103932b0b21037bb32b9393ab760811b6044820152606401610546565b600080611f84846001612ddf565b905060005b8681101561200f57611f9b888361258e565b909550925060018301611fe55760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610546565b82611ff1866001612ddf565b611ffb9190612ddf565b6120059083612ddf565b9150600101611f89565b5061201a878261258e565b9094509150600182016120645760405162461bcd60e51b815260206004820152601260248201527142616420566172496e7420696e206974656d60701b6044820152606401610546565b611c47816120728685612ddf565b61207d906001612ddf565b899190611cd6565b8151815160009190811461209d576000915050611c4e565b60206000805b8383116120d357505084810151848201516020909201918082146120ce576000945050505050611c4e565b6120a3565b60006120e0602085613050565b90505b8481101561214e578681815181106120fd576120fd612dae565b602001015160f81c60f81b6001600160f81b03191688828151811061212457612124612dae565b01602001516001600160f81b0319161461214657600095505050505050611c4e565b6001016120e3565b506001979650505050505050565b6000611c4e826001612ddf565b336121726110c8565b6001600160a01b031614610d775760405163118cdaa760e01b8152336004820152602401610546565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556121d382612836565b5050565b60606000806121e585611ac5565b90925090506001820161220a5760405162461bcd60e51b81526004016105469061310e565b80841061224c5760405162461bcd60e51b815260206004820152601060248201526f2b34b7103932b0b21037bb32b9393ab760811b6044820152606401610546565b60008061225a846001612ddf565b905060005b868110156122d25761227188836128a7565b925060001983036122be5760405162461bcd60e51b815260206004820152601760248201527642616420566172496e7420696e2073637269707453696760481b6044820152606401610546565b6122c88383612ddf565b915060010161225f565b506122dd87826128a7565b91506000198203611c3c5760405162461bcd60e51b815260206004820152601760248201527642616420566172496e7420696e2073637269707453696760481b6044820152606401610546565b6020810151600090611c4e565b6000611c4e8260206128f0565b6000611ef8858585856040516020016123609493929190613150565b6040516020818303038152906040526128ff565b6000806023805461238490612e6d565b91506000905061239684836014611cd6565b61239f906131ad565b60601c949350505050565b60006123d08a8a8a8a8a8a8a8a8a60405160200161236099989796959493929190613200565b9a9950505050505050505050565b60008060006123ec84611ac5565b90925090508015806123ff575060001982145b1561240e575060009392505050565b600061241b836001612ddf565b905060005b82811015612475578551821061243c5750600095945050505050565b600061244887846128a7565b90506000198103612460575060009695505050505050565b61246a8184612ddf565b925050600101612420565b5093519093149392505050565b600080600061249084611ac5565b90925090508015806124a3575060001982145b156124b2575060009392505050565b60006124bf836001612ddf565b905060005b8281101561247557855182106124e05750600095945050505050565b60006124ec8784612730565b90506000198103612504575060009695505050505050565b61250e8184612ddf565b9250506001016124c4565b60008160000361252b57506000611c4e565b6000805b83811015612582578451821061254a57600092505050611c4e565b60006125568684612794565b9050600019810361256d5760009350505050611c4e565b6125778184612ddf565b92505060010161252f565b50835114905092915050565b600080600061259d8585612926565b90508060ff166000036125d25760008585815181106125be576125be612dae565b016020015190935060f81c91506127299050565b836125de826001613269565b60ff166125eb9190612ddf565b855110156126025760001960009250925050612729565b60008160ff166002036126465761263b612627612620876001612ddf565b88906128f0565b62ffff0060e882901c1660f89190911c1790565b61ffff16905061271f565b8160ff1660040361269557612688612662612620876001612ddf565b60d881901c63ff00ff001662ff00ff60e89290921c9190911617601081811b91901c1790565b63ffffffff16905061271f565b8160ff1660080361271f576127136126b1612620876001612ddf565b60c01c64ff000000ff600882811c91821665ff000000ff009390911b92831617601090811b6001600160401b031666ff00ff00ff00ff9290921667ff00ff00ff00ff009093169290921790911c65ffff0000ffff1617602081811c91901b1790565b6001600160401b031690505b60ff909116925090505b9250929050565b600061273d826009612ddf565b8351101561274e5750600019611c4e565b60008061276585612760866008612ddf565b61258e565b90925090506001820161277e5760001992505050611c4e565b8061278a836009612ddf565b611ef89190612ddf565b60008060006127a3858561258e565b9092509050600182016127bc5760001992505050611c4e565b6000806127ca846001612ddf565b905060005b8381101561282b576127e588612760848a612ddf565b9095509250600183016128015760001995505050505050611c4e565b8261280d866001612ddf565b6128179190612ddf565b6128219083612ddf565b91506001016127cf565b509695505050505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60008060006128b685856129ac565b9092509050600182016128cf5760001992505050611c4e565b806128db836025612ddf565b6128e59190612ddf565b611ef8906004612ddf565b6000611ccf8383016020015190565b60006020600083516020850160025afa50602060006020600060025afa5050600051919050565b600082828151811061293a5761293a612dae565b016020015160f81c60ff0361295157506008611c4e565b82828151811061296357612963612dae565b016020015160f81c60fe0361297a57506004611c4e565b82828151811061298c5761298c612dae565b016020015160f81c60fd036129a357506002611c4e565b50600092915050565b6000806129ba836025612ddf565b845110156129cf575060001990506000612729565b6000806129e186612760876024612ddf565b9097909650945050505050565b600060208284031215612a0057600080fd5b5035919050565b60008083601f840112612a1957600080fd5b5081356001600160401b03811115612a3057600080fd5b6020830191508360208260051b850101111561272957600080fd5b60008060008060408587031215612a6157600080fd5b84356001600160401b03811115612a7757600080fd5b612a8387828801612a07565b90955093505060208501356001600160401b03811115612aa257600080fd5b612aae87828801612a07565b95989497509550505050565b60008083601f840112612acc57600080fd5b5081356001600160401b03811115612ae357600080fd5b60208301915083602082850101111561272957600080fd5b600080600080600060608688031215612b1357600080fd5b85356001600160401b03811115612b2957600080fd5b612b3588828901612aba565b90965094505060208601356001600160401b03811115612b5457600080fd5b612b6088828901612aba565b96999598509660400135949350505050565b60005b83811015612b8d578181015183820152602001612b75565b50506000910152565b6020815260008251806020840152612bb5816040850160208701612b72565b601f01601f19169190910160400192915050565b60006101208284031215612bdc57600080fd5b50919050565b600060208284031215612bf457600080fd5b81356001600160401b03811115612c0a57600080fd5b612c1684828501612bc9565b949350505050565b600080600060608486031215612c3357600080fd5b83356001600160401b03811115612c4957600080fd5b612c5586828701612bc9565b9660208601359650604090950135949350505050565b80356001600160e01b031981168114612c8357600080fd5b919050565b60008060408385031215612c9b57600080fd5b82359150612cab60208401612c6b565b90509250929050565b600060208284031215612cc657600080fd5b81356001600160a01b0381168114611ccf57600080fd5b60008060208385031215612cf057600080fd5b82356001600160401b03811115612d0657600080fd5b612d1285828601612aba565b90969095509350505050565b60008060008060408587031215612d3457600080fd5b84356001600160401b03811115612d4a57600080fd5b612d5687828801612aba565b90955093505060208501356001600160401b03811115612d7557600080fd5b612aae87828801612aba565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417611c4e57611c4e612d81565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612dd657600080fd5b611ccf82612c6b565b80820180821115611c4e57611c4e612d81565b835181526020938401516001600160e01b031916938101939093526040830191909152606082015260800190565b6020808252601e908201527f4465706f736974207363726970742063616e6e6f7420626520656d7074790000604082015260600190565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680612e8157607f821691505b602082108103612bdc57634e487b7160e01b600052602260045260246000fd5b601f821115612eeb57806000526020600020601f840160051c81016020851015612ec85750805b601f840160051c820191505b81811015612ee85760008155600101612ed4565b50505b505050565b6001600160401b03831115612f0757612f07612e57565b612f1b83612f158354612e6d565b83612ea1565b6000601f841160018114612f4f5760008515612f375750838201355b600019600387901b1c1916600186901b178355612ee8565b600083815260209020601f19861690835b82811015612f805786850135825560209485019460019092019101612f60565b5086821015612f9d5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000612fec604083018688612faf565b8281036020840152612fff818587612faf565b979650505050505050565b6000808335601e1984360301811261302157600080fd5b8301803591506001600160401b0382111561303b57600080fd5b60200191503681900382131561272957600080fd5b81810381811115611c4e57611c4e612d81565b60006001820161307557613075612d81565b5060010190565b602081526000612c16602083018486612faf565b6000602082840312156130a257600080fd5b81356001600160f01b031981168114611ccf57600080fd5b8581528460208201526080604082015260006130da608083018587612faf565b90508260608301529695505050505050565b6000602082840312156130fe57600080fd5b81518015158114611ccf57600080fd5b60208082526022908201527f52656164206f76657272756e20647572696e6720566172496e742070617273696040820152616e6760f01b606082015260800190565b6001600160e01b0319851681528351600090613173816004850160208901612b72565b84519083019061318a816004840160208901612b72565b6001600160e01b0319949094169301600481019390935250506008019392505050565b805160208201516bffffffffffffffffffffffff198116919060148210156131f9576bffffffffffffffffffffffff196bffffffffffffffffffffffff198360140360031b1b82161692505b5050919050565b6001600160e01b03198a1681526001600160f01b031989166004820152868860068301376000878201600681016000815287898237506000908701600601908152848682376001600160e01b031993909316929093019182525060040198975050505050505050565b60ff8181168382160190811115611c4e57611c4e612d8156" + }, + { + "address": "0x3200000000000000000000000000000000000003", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3200000000000000000000000000000000000004", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + }, + { + "address": "0x3200000000000000000000000000000000000005", + "balance": "0x0", + "code": "0x6080604052600436106100955760003560e01c806379ba50971161005957806379ba50971461014a5780638da5cb5b1461015f578063cc3d272114610174578063e30c397814610198578063f2fde38b146101ad57600080fd5b806335aa134a146100a15780633bbed4a0146100c35780633ccfd60b146100e357806366d003ac146100f8578063715018a61461013557600080fd5b3661009c57005b600080fd5b3480156100ad57600080fd5b506100c16100bc3660046105ad565b6101cd565b005b3480156100cf57600080fd5b506100c16100de3660046105c6565b61021b565b3480156100ef57600080fd5b506100c161027d565b34801561010457600080fd5b50600054610118906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014157600080fd5b506100c1610392565b34801561015657600080fd5b506100c16103a6565b34801561016b57600080fd5b506101186103eb565b34801561018057600080fd5b5061018a60015481565b60405190815260200161012c565b3480156101a457600080fd5b50610118610420565b3480156101b957600080fd5b506100c16101c83660046105c6565b610449565b6101d56104ce565b600180549082905560408051828152602081018490527f3c4f4d8cd2a65b4b1f4eeaf43669b14ab54e43d4842aa0ac8f0e4f9fe0bf5bf991015b60405180910390a15050565b6102236104ce565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f62e69886a5df0ba8ffcacbfc1388754e7abd9bde24b036354c561f1acd4e4593910161020f565b6001544710156102fa5760405162461bcd60e51b815260206004820152603e60248201527f5769746864726177616c20616d6f756e74206d7573742062652067726561746560448201527f72207468616e206d696e696d756d20776974686472617720616d6f756e74000060648201526084015b60405180910390fd5b600080546040516001600160a01b039091169047908381818185875af1925050503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090508061038f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016102f1565b50565b61039a6104ce565b6103a46000610500565b565b33806103b0610420565b6001600160a01b0316146103e25760405163118cdaa760e01b81526001600160a01b03821660048201526024016102f1565b61038f81610500565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610410565b6104516104ce565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b03831690811782556104956103eb565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b336104d76103eb565b6001600160a01b0316146103a45760405163118cdaa760e01b81523360048201526024016102f1565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03191681556105388261053c565b5050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6000602082840312156105bf57600080fd5b5035919050565b6000602082840312156105d857600080fd5b81356001600160a01b03811681146105ef57600080fd5b939250505056" + } + ], + "chain_id": 5115, + "limit_contract_code_size": 24576, + "spec": { + "0": "SHANGHAI" + }, + "coinbase": "0x3100000000000000000000000000000000000005", + "starting_base_fee": 1000000000, + "block_gas_limit": 8000000, + "base_fee_params": { + "max_change_denominator": 8, + "elasticity_multiplier": 2 + }, + "difficulty": 0, + "extra_data": "0x", + "timestamp": 0, + "nonce": 0 +} \ No newline at end of file diff --git a/resources/genesis/testnet/soft_confirmation_rule_enforcer.json b/resources/genesis/testnet/soft_confirmation_rule_enforcer.json new file mode 100644 index 0000000..6ab1899 --- /dev/null +++ b/resources/genesis/testnet/soft_confirmation_rule_enforcer.json @@ -0,0 +1,4 @@ +{ + "max_l2_blocks_per_l1": 86400, + "authority": "sov1aw2ex52a6v4j3gfugrafda3jplwhv24xelpvd29k2sak5waypc6qj9jyle" +} \ No newline at end of file diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..8288054 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "1.79" +components = ["rustfmt", "rust-src", "clippy"] +profile = "minimal" diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..6380de2 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,3 @@ +edition = "2021" +group_imports = "StdExternalCrate" +imports_granularity = "Crate" diff --git a/src/bitcoin.rs b/src/bitcoin.rs new file mode 100644 index 0000000..1af2655 --- /dev/null +++ b/src/bitcoin.rs @@ -0,0 +1,371 @@ +use std::{ + collections::HashSet, + path::PathBuf, + sync::Arc, + time::{Duration, Instant}, +}; + +use anyhow::{bail, Context}; +use async_trait::async_trait; +use bitcoin::Address; +use bitcoin_da::{ + service::{get_relevant_blobs_from_txs, FINALITY_DEPTH}, + spec::blob::BlobWithSender, +}; +use bitcoincore_rpc::{json::AddressType::Bech32m, Auth, Client, RpcApi}; +use citrea_primitives::REVEAL_BATCH_PROOF_PREFIX; +use futures::TryStreamExt; +use tokio::{process::Command, sync::OnceCell, time::sleep}; + +use super::{ + config::BitcoinConfig, + docker::DockerEnv, + framework::TestContext, + traits::{LogProvider, Node, Restart, SpawnOutput}, + Result, +}; +use crate::node::NodeKind; + +pub struct BitcoinNode { + spawn_output: SpawnOutput, + pub config: BitcoinConfig, + client: Client, + gen_addr: OnceCell
, + docker_env: Arc>, +} + +impl BitcoinNode { + pub async fn new(config: &BitcoinConfig, docker: Arc>) -> Result { + let spawn_output = Self::spawn(config, &docker).await?; + + let rpc_url = format!( + "http://127.0.0.1:{}/wallet/{}", + config.rpc_port, + NodeKind::Bitcoin + ); + let client = Client::new( + &rpc_url, + Auth::UserPass(config.rpc_user.clone(), config.rpc_password.clone()), + ) + .await + .context("Failed to create RPC client")?; + + wait_for_rpc_ready(&client, None).await?; + + Ok(Self { + spawn_output, + config: config.clone(), + client, + gen_addr: OnceCell::new(), + docker_env: docker, + }) + } + + pub async fn wait_mempool_len( + &self, + target_len: usize, + timeout: Option, + ) -> Result<()> { + let timeout = timeout.unwrap_or(Duration::from_secs(300)); + let start = Instant::now(); + while start.elapsed() < timeout { + let mempool_len = self.get_raw_mempool().await?.len(); + if mempool_len >= target_len { + return Ok(()); + } + sleep(Duration::from_millis(500)).await; + } + bail!("Timeout waiting for mempool to reach length {}", target_len) + } + + pub async fn fund_wallet(&self, name: String, blocks: u64) -> Result<()> { + let rpc_url = format!("http://127.0.0.1:{}/wallet/{}", self.config.rpc_port, name); + let client = Client::new( + &rpc_url, + Auth::UserPass( + self.config.rpc_user.clone(), + self.config.rpc_password.clone(), + ), + ) + .await + .context("Failed to create RPC client")?; + + let gen_addr = client + .get_new_address(None, Some(Bech32m)) + .await? + .assume_checked(); + client.generate_to_address(blocks, &gen_addr).await?; + Ok(()) + } + + pub async fn get_finalized_height(&self) -> Result { + Ok(self.get_block_count().await? - FINALITY_DEPTH + 1) + } + + pub async fn get_relevant_blobs_from_block(&self, height: u64) -> Result> { + let hash = self.get_block_hash(height).await?; + let block = self.get_block(&hash).await?; + + Ok(get_relevant_blobs_from_txs( + block.txdata, + REVEAL_BATCH_PROOF_PREFIX, + )) + } + + async fn wait_for_shutdown(&self) -> Result<()> { + let timeout_duration = Duration::from_secs(30); + let start = std::time::Instant::now(); + + while start.elapsed() < timeout_duration { + if !self.is_process_running().await? { + println!("Bitcoin daemon has stopped successfully"); + return Ok(()); + } + sleep(Duration::from_millis(200)).await; + } + + bail!("Timeout waiting for Bitcoin daemon to stop") + } + + async fn is_process_running(&self) -> Result { + let data_dir = &self.config.data_dir; + let output = Command::new("pgrep") + .args(["-f", &format!("bitcoind.*{}", data_dir.display())]) + .output() + .await?; + + Ok(output.status.success()) + } + + // Infallible, discard already loaded errors + async fn load_wallets(&self) { + let _ = self.load_wallet(&NodeKind::Bitcoin.to_string()).await; + let _ = self.load_wallet(&NodeKind::Sequencer.to_string()).await; + let _ = self.load_wallet(&NodeKind::Prover.to_string()).await; + } + + // Switch this over to Node signature once we add support for docker to citrea nodes + async fn spawn(config: &BitcoinConfig, docker: &Arc>) -> Result { + match docker.as_ref() { + Some(docker) => docker.spawn(config.into()).await, + None => ::spawn(config), + } + } +} + +#[async_trait] +impl RpcApi for BitcoinNode { + async fn call serde::de::Deserialize<'a>>( + &self, + cmd: &str, + args: &[serde_json::Value], + ) -> bitcoincore_rpc::Result { + self.client.call(cmd, args).await + } + + // Override deprecated generate method. + // Uses or lazy init gen_addr and forward to `generate_to_address` + async fn generate( + &self, + block_num: u64, + _maxtries: Option, + ) -> bitcoincore_rpc::Result> { + let addr = self + .gen_addr + .get_or_init(|| async { + self.client + .get_new_address(None, Some(Bech32m)) + .await + .expect("Failed to generate address") + .assume_checked() + }) + .await; + + self.generate_to_address(block_num, addr).await + } +} + +#[async_trait] +impl Node for BitcoinNode { + type Config = BitcoinConfig; + type Client = Client; + + fn spawn(config: &Self::Config) -> Result { + let args = config.args(); + println!("Running bitcoind with args : {args:?}"); + + Command::new("bitcoind") + .args(&args) + .kill_on_drop(true) + .envs(config.env.clone()) + .spawn() + .context("Failed to spawn bitcoind process") + .map(SpawnOutput::Child) + } + + fn spawn_output(&mut self) -> &mut SpawnOutput { + &mut self.spawn_output + } + + async fn wait_for_ready(&self, timeout: Option) -> Result<()> { + println!("Waiting for ready"); + let start = Instant::now(); + let timeout = timeout.unwrap_or(Duration::from_secs(30)); + while start.elapsed() < timeout { + if wait_for_rpc_ready(&self.client, Some(timeout)) + .await + .is_ok() + { + return Ok(()); + } + tokio::time::sleep(Duration::from_millis(500)).await; + } + anyhow::bail!("Node failed to become ready within the specified timeout") + } + + fn client(&self) -> &Self::Client { + &self.client + } + + fn env(&self) -> Vec<(&'static str, &'static str)> { + self.config.env.clone() + } + + fn config_mut(&mut self) -> &mut Self::Config { + &mut self.config + } +} + +#[async_trait] +impl Restart for BitcoinNode { + async fn wait_until_stopped(&mut self) -> Result<()> { + self.client.stop().await?; + self.stop().await?; + + match &self.spawn_output { + SpawnOutput::Child(_) => self.wait_for_shutdown().await, + SpawnOutput::Container(output) => { + let Some(env) = self.docker_env.as_ref() else { + bail!("Missing docker environment") + }; + env.docker.stop_container(&output.id, None).await?; + + env.docker + .wait_container::(&output.id, None) + .try_collect::>() + .await?; + env.docker.remove_container(&output.id, None).await?; + println!("Docker container {} succesfully removed", output.id); + Ok(()) + } + } + } + + async fn start(&mut self, config: Option) -> Result<()> { + if let Some(config) = config { + self.config = config + } + self.spawn_output = Self::spawn(&self.config, &self.docker_env).await?; + + self.wait_for_ready(None).await?; + + // Reload wallets after restart + self.load_wallets().await; + + Ok(()) + } +} + +impl LogProvider for BitcoinNode { + fn kind(&self) -> NodeKind { + NodeKind::Bitcoin + } + + fn log_path(&self) -> PathBuf { + self.config.data_dir.join("regtest").join("debug.log") + } +} + +pub struct BitcoinNodeCluster { + inner: Vec, +} + +impl BitcoinNodeCluster { + pub async fn new(ctx: &TestContext) -> Result { + let n_nodes = ctx.config.test_case.n_nodes; + let mut cluster = Self { + inner: Vec::with_capacity(n_nodes), + }; + for config in ctx.config.bitcoin.iter() { + let node = BitcoinNode::new(config, Arc::clone(&ctx.docker)).await?; + cluster.inner.push(node) + } + + Ok(cluster) + } + + pub async fn stop_all(&mut self) -> Result<()> { + for node in &mut self.inner { + RpcApi::stop(node).await?; + node.stop().await?; + } + Ok(()) + } + + pub async fn wait_for_sync(&self, timeout: Duration) -> Result<()> { + let start = Instant::now(); + while start.elapsed() < timeout { + let mut heights = HashSet::new(); + for node in &self.inner { + let height = node.get_block_count().await?; + heights.insert(height); + } + + if heights.len() == 1 { + return Ok(()); + } + + sleep(Duration::from_secs(1)).await; + } + bail!("Nodes failed to sync within the specified timeout") + } + + // Connect all bitcoin nodes between them + pub async fn connect_nodes(&self) -> Result<()> { + for (i, from_node) in self.inner.iter().enumerate() { + for (j, to_node) in self.inner.iter().enumerate() { + if i != j { + let ip = match &to_node.spawn_output { + SpawnOutput::Container(container) => container.ip.clone(), + _ => "127.0.0.1".to_string(), + }; + + let add_node_arg = format!("{}:{}", ip, to_node.config.p2p_port); + from_node.add_node(&add_node_arg).await?; + } + } + } + Ok(()) + } + + pub fn get(&self, index: usize) -> Option<&BitcoinNode> { + self.inner.get(index) + } + + #[allow(unused)] + pub fn get_mut(&mut self, index: usize) -> Option<&mut BitcoinNode> { + self.inner.get_mut(index) + } +} + +async fn wait_for_rpc_ready(client: &Client, timeout: Option) -> Result<()> { + let start = Instant::now(); + let timeout = timeout.unwrap_or(Duration::from_secs(300)); + while start.elapsed() < timeout { + match client.get_blockchain_info().await { + Ok(_) => return Ok(()), + Err(_) => sleep(Duration::from_millis(500)).await, + } + } + Err(anyhow::anyhow!("Timeout waiting for RPC to be ready")) +} diff --git a/src/client.rs b/src/client.rs new file mode 100644 index 0000000..09a4c81 --- /dev/null +++ b/src/client.rs @@ -0,0 +1,779 @@ +use std::{ + net::SocketAddr, + str::FromStr, + sync::{ + atomic::{AtomicU64, Ordering}, + mpsc, + }, + time::{Duration, SystemTime}, +}; + +use alloy::{ + providers::{ + network::{Ethereum, EthereumWallet}, + PendingTransactionBuilder, Provider as AlloyProvider, ProviderBuilder, + }, + rpc::types::eth::{Block, Transaction, TransactionReceipt, TransactionRequest}, + signers::{local::PrivateKeySigner, Signer}, + transports::http::{Http, HyperClient}, +}; +use anyhow::{anyhow, bail}; +use jsonrpsee::{ + core::client::{ClientT, SubscriptionClientT}, + http_client::{HttpClient, HttpClientBuilder}, + rpc_params, + ws_client::{PingConfig, WsClient, WsClientBuilder}, +}; +use reth_primitives::{ + Address, BlockId, BlockNumberOrTag, Bytes, Log, TxHash, TxKind, B256, U256, U64, +}; +use reth_rpc_types::{ + trace::geth::{GethDebugTracingOptions, GethTrace}, + Filter, RichBlock, +}; +use serde::de::DeserializeOwned; +use sov_ledger_rpc::client::RpcClient; +use sov_rollup_interface::rpc::{ + LastVerifiedProofResponse, ProofResponse, SequencerCommitmentResponse, + SoftConfirmationResponse, SoftConfirmationStatus, VerifiedProofResponse, +}; +use tokio::time::sleep; + +use crate::Result; + +pub const MAX_FEE_PER_GAS: u128 = 1000000001; + +pub struct L2Client { + pub chain_id: u64, + pub from_addr: Address, + client: Box>>, + http_client: HttpClient, + ws_client: WsClient, + current_nonce: AtomicU64, + pub rpc_addr: SocketAddr, +} + +impl L2Client { + pub async fn new( + chain_id: u64, + key: PrivateKeySigner, + from_addr: Address, + rpc_addr: SocketAddr, + ) -> anyhow::Result { + let http_host = format!("http://localhost:{}", rpc_addr.port()); + let ws_host = format!("ws://localhost:{}", rpc_addr.port()); + + let provider = ProviderBuilder::new() + // .with_recommended_fillers() + .with_chain_id(chain_id) + .wallet(EthereumWallet::from(key)) + .on_hyper_http(http_host.parse().unwrap()); + let client: Box>> = Box::new(provider); + + let http_client = HttpClientBuilder::default() + .request_timeout(Duration::from_secs(120)) + .build(http_host)?; + + let ws_client = WsClientBuilder::default() + .enable_ws_ping(PingConfig::default().inactive_limit(Duration::from_secs(10))) + .build(ws_host) + .await?; + + let client = Self { + chain_id, + from_addr, + client, + ws_client, + http_client, + current_nonce: AtomicU64::new(0), + rpc_addr, + }; + client.sync_nonce().await; + Ok(client) + } + + pub async fn healthcheck(&self) -> Result { + let healthcheck_url = format!("http://localhost:{}/health", self.rpc_addr.port()); + let resp = reqwest::get(healthcheck_url).await?; + Ok(resp.status().as_u16()) + } + + pub async fn spam_publish_batch_request(&self) -> Result<()> { + self.http_client + .request("citrea_testPublishBlock", rpc_params![]) + .await + .map_err(|e| e.into()) + } + + pub async fn send_publish_batch_request(&self) { + let _: () = self + .http_client + .request("citrea_testPublishBlock", rpc_params![]) + .await + .unwrap(); + // Do not decrease the sleep time, otherwise the test will fail! + tokio::time::sleep(Duration::from_millis(100)).await; + } + + pub async fn sync_nonce(&self) { + let nonce = self + .eth_get_transaction_count(self.from_addr, None) + .await + .unwrap(); + self.current_nonce.store(nonce, Ordering::Relaxed); + } + + pub async fn deploy_contract( + &self, + byte_code: Vec, + nonce: Option, + ) -> Result, Ethereum>> { + let nonce = match nonce { + Some(nonce) => nonce, + None => self.current_nonce.fetch_add(1, Ordering::Relaxed), + }; + + let mut req = TransactionRequest::default() + .from(self.from_addr) + .input(byte_code.into()); + req.to = Some(TxKind::Create); + let gas = self.client.estimate_gas(&req).await.unwrap(); + + let req = req + .gas_limit(gas) + .nonce(nonce) + .max_priority_fee_per_gas(10) + .max_fee_per_gas(MAX_FEE_PER_GAS); + + let receipt_req = self.client.send_transaction(req).await?; + Ok(receipt_req) + } + + pub async fn deploy_contract_call( + &self, + byte_code: Vec, + nonce: Option, + ) -> Result { + let nonce = match nonce { + Some(nonce) => nonce, + None => self.current_nonce.load(Ordering::Relaxed), + }; + + let req = TransactionRequest::default() + .from(self.from_addr) + .input(byte_code.into()) + .nonce(nonce); + let gas = self.client.estimate_gas(&req).await.unwrap(); + + let req = req + .gas_limit(gas) + .max_priority_fee_per_gas(10) + .max_fee_per_gas(MAX_FEE_PER_GAS); + + let receipt_req = self.client.call(&req).await?; + + Ok(receipt_req) + } + + pub async fn contract_transaction( + &self, + contract_address: Address, + data: Vec, + nonce: Option, + ) -> PendingTransactionBuilder<'_, Http, Ethereum> { + let nonce = match nonce { + Some(nonce) => nonce, + None => self.current_nonce.fetch_add(1, Ordering::Relaxed), + }; + let req = TransactionRequest::default() + .from(self.from_addr) + .to(contract_address) + .input(data.into()); + + let gas = self.client.estimate_gas(&req).await.unwrap(); + + let req = req + .gas_limit(gas) + .nonce(nonce) + .max_priority_fee_per_gas(10) + .max_fee_per_gas(MAX_FEE_PER_GAS); + + self.client.send_transaction(req).await.unwrap() + } + + #[allow(dead_code)] + pub async fn contract_transaction_with_custom_fee( + &self, + contract_address: Address, + data: Vec, + max_priority_fee_per_gas: u64, + max_fee_per_gas: u64, + value: Option, + nonce: Option, + ) -> PendingTransactionBuilder<'_, Http, Ethereum> { + let nonce = match nonce { + Some(nonce) => nonce, + None => self.current_nonce.fetch_add(1, Ordering::Relaxed), + }; + let req = TransactionRequest::default() + .from(self.from_addr) + .to(contract_address) + .input(data.into()) + .value(value.map(U256::from).unwrap_or_default()); + + let gas = self.client.estimate_gas(&req).await.unwrap(); + + let req = req + .gas_limit(gas) + .nonce(nonce) + .max_priority_fee_per_gas(max_priority_fee_per_gas.into()) + .max_fee_per_gas(max_fee_per_gas.into()); + + self.client.send_transaction(req).await.unwrap() + } + + pub async fn contract_call( + &self, + contract_address: Address, + data: Vec, + _nonce: Option, + ) -> Result { + let req = TransactionRequest::default() + .from(self.from_addr) + .to(contract_address) + .input(data.into()); + + let receipt_req = self.client.call(&req).await?; + + T::from_str(&receipt_req.to_string()).map_err(|_| anyhow!("Failed to parse bytes")) + } + + pub async fn send_eth( + &self, + to_addr: Address, + max_priority_fee_per_gas: Option, + max_fee_per_gas: Option, + nonce: Option, + value: u128, + ) -> Result, Ethereum>> { + let nonce = match nonce { + Some(nonce) => nonce, + None => self.current_nonce.fetch_add(1, Ordering::Relaxed), + }; + + let req = TransactionRequest::default() + .from(self.from_addr) + .to(to_addr) + .value(U256::from(value)); + + let gas = self.client.estimate_gas(&req).await.unwrap(); + + let req = req + .gas_limit(gas) + .nonce(nonce) + .max_priority_fee_per_gas(max_priority_fee_per_gas.unwrap_or(10)) + .max_fee_per_gas(max_fee_per_gas.unwrap_or(MAX_FEE_PER_GAS)); + + self.client + .send_transaction(req) + .await + .map_err(|e| e.into()) + } + + pub async fn send_eth_with_gas( + &self, + to_addr: Address, + max_priority_fee_per_gas: Option, + max_fee_per_gas: Option, + gas: u128, + value: u128, + ) -> Result, Ethereum>> { + let nonce = self.current_nonce.fetch_add(1, Ordering::Relaxed); + + let req = TransactionRequest::default() + .from(self.from_addr) + .to(to_addr) + .value(U256::from(value)) + .gas_limit(gas) + .nonce(nonce) + .max_priority_fee_per_gas(max_priority_fee_per_gas.unwrap_or(10)) + .max_fee_per_gas(max_fee_per_gas.unwrap_or(MAX_FEE_PER_GAS)); + + self.client + .send_transaction(req) + .await + .map_err(|e| e.into()) + } + + pub async fn web3_client_version(&self) -> String { + self.http_client + .request("web3_clientVersion", rpc_params![]) + .await + .unwrap() + } + + pub async fn web3_sha3(&self, bytes: String) -> String { + self.http_client + .request("web3_sha3", rpc_params![bytes]) + .await + .unwrap() + } + + pub async fn eth_accounts(&self) -> Vec
{ + self.http_client + .request("eth_accounts", rpc_params![]) + .await + .unwrap() + } + + pub async fn eth_chain_id(&self) -> u64 { + self.client.get_chain_id().await.unwrap() + } + + pub async fn eth_get_balance( + &self, + address: Address, + block_id: Option, + ) -> Result { + self.http_client + .request("eth_getBalance", rpc_params![address, block_id]) + .await + .map_err(|e| e.into()) + } + + pub async fn eth_get_storage_at( + &self, + address: Address, + index: U256, + block_id: Option, + ) -> Result { + self.http_client + .request("eth_getStorageAt", rpc_params![address, index, block_id]) + .await + .map_err(|e| e.into()) + } + + pub async fn eth_get_code(&self, address: Address, block_id: Option) -> Result { + self.http_client + .request("eth_getCode", rpc_params![address, block_id]) + .await + .map_err(|e| e.into()) + } + + pub async fn eth_get_transaction_count( + &self, + address: Address, + block_id: Option, + ) -> Result { + match self + .http_client + .request::("eth_getTransactionCount", rpc_params![address, block_id]) + .await + { + Ok(count) => Ok(count.saturating_to()), + Err(e) => Err(e.into()), + } + } + + // TODO actually this function returns gas price from the last block (already committed) and it may + // be different from the current gas price (for the next block being committed). + // So because of that users can't fully rely on the returned value. + // A part of https://github.com/chainwayxyz/citrea/issues/150 + pub async fn eth_gas_price(&self) -> U256 { + self.http_client + .request("eth_gasPrice", rpc_params![]) + .await + .unwrap() + } + + pub async fn eth_fee_history( + &self, + block_count: String, + newest_block: BlockNumberOrTag, + reward_percentiles: Option>, + ) -> FeeHistory { + let rpc_params = rpc_params![block_count, newest_block, reward_percentiles]; + self.http_client + .request("eth_feeHistory", rpc_params) + .await + .unwrap() + } + + pub async fn eth_get_block_by_number(&self, block_number: Option) -> Block { + self.http_client + .request("eth_getBlockByNumber", rpc_params![block_number, false]) + .await + .unwrap() + } + + pub async fn eth_get_block_by_number_with_detail( + &self, + block_number: Option, + ) -> Block { + self.http_client + .request("eth_getBlockByNumber", rpc_params![block_number, true]) + .await + .unwrap() + } + + #[allow(dead_code)] + pub async fn eth_get_transaction_by_hash( + &self, + tx_hash: TxHash, + mempool_only: Option, + ) -> Option { + self.http_client + .request( + "eth_getTransactionByHash", + rpc_params![tx_hash, mempool_only], + ) + .await + .unwrap() + } + + pub async fn eth_get_block_receipts( + &self, + block_number_or_hash: BlockId, + ) -> Vec { + self.http_client + .request("eth_getBlockReceipts", rpc_params![block_number_or_hash]) + .await + .unwrap() + } + + pub async fn eth_get_transaction_receipt(&self, tx_hash: TxHash) -> Option { + self.http_client + .request("eth_getTransactionReceipt", rpc_params![tx_hash]) + .await + .unwrap() + } + + pub async fn eth_get_tx_by_block_hash_and_index( + &self, + block_hash: B256, + index: U256, + ) -> Transaction { + self.http_client + .request( + "eth_getTransactionByBlockHashAndIndex", + rpc_params![block_hash, index], + ) + .await + .unwrap() + } + + pub async fn eth_get_tx_by_block_number_and_index( + &self, + block_number: BlockNumberOrTag, + index: U256, + ) -> Transaction { + self.http_client + .request( + "eth_getTransactionByBlockNumberAndIndex", + rpc_params![block_number, index], + ) + .await + .unwrap() + } + + /// params is a tuple of (fromBlock, toBlock, address, topics, blockHash) + /// any of these params are optional + pub async fn eth_get_logs

(&self, params: P) -> Vec + where + P: serde::Serialize, + { + let rpc_params = rpc_params!(params); + let eth_logs: Vec = self + .http_client + .request("eth_getLogs", rpc_params) + .await + .unwrap(); + eth_logs + } + + pub async fn ledger_get_soft_confirmation_by_number( + &self, + num: u64, + ) -> Option { + self.http_client + .request("ledger_getSoftConfirmationByNumber", rpc_params![num]) + .await + .unwrap() + } + + pub async fn ledger_get_soft_confirmation_status( + &self, + soft_confirmation_receipt: u64, + ) -> Result> { + self.http_client + .request( + "ledger_getSoftConfirmationStatus", + rpc_params![soft_confirmation_receipt], + ) + .await + .map_err(|e| e.into()) + } + + pub async fn ledger_get_last_scanned_l1_height(&self) -> u64 { + self.http_client + .request("ledger_getLastScannedL1Hieght", rpc_params![]) + .await + .unwrap() + } + + pub async fn ledger_get_sequencer_commitments_on_slot_by_number( + &self, + height: u64, + ) -> anyhow::Result>> { + self.http_client + .request( + "ledger_getSequencerCommitmentsOnSlotByNumber", + rpc_params![height], + ) + .await + .map_err(|e| e.into()) + } + + pub async fn ledger_get_proofs_by_slot_height(&self, height: u64) -> Vec { + self.http_client + .request("ledger_getProofsBySlotHeight", rpc_params![height]) + .await + .unwrap() + } + + pub async fn ledger_get_verified_proofs_by_slot_height( + &self, + height: u64, + ) -> Option> { + self.http_client + .request("ledger_getVerifiedProofsBySlotHeight", rpc_params![height]) + .await + .ok() + } + + pub async fn ledger_get_last_verified_proof(&self) -> Option { + self.http_client + .request("ledger_getLastVerifiedProof", rpc_params![]) + .await + .ok() + } + + pub async fn ledger_get_sequencer_commitments_on_slot_by_hash( + &self, + hash: [u8; 32], + ) -> Result>> { + self.http_client + .request( + "ledger_getSequencerCommitmentsOnSlotByHash", + rpc_params![hash], + ) + .await + .map_err(|e| e.into()) + } + + pub async fn ledger_get_head_soft_confirmation( + &self, + ) -> Result> { + self.http_client + .request("ledger_getHeadSoftConfirmation", rpc_params![]) + .await + .map_err(|e| e.into()) + } + + pub async fn ledger_get_head_soft_confirmation_height(&self) -> Result> { + self.http_client + .request("ledger_getHeadSoftConfirmationHeight", rpc_params![]) + .await + .map_err(|e| e.into()) + } + + pub async fn get_max_l2_blocks_per_l1(&self) -> u64 { + self.http_client + .request( + "softConfirmationRuleEnforcer_getMaxL2BlocksPerL1", + rpc_params![], + ) + .await + .unwrap() + } + + pub async fn debug_trace_transaction( + &self, + tx_hash: TxHash, + opts: Option, + ) -> GethTrace { + self.http_client + .request("debug_traceTransaction", rpc_params![tx_hash, opts]) + .await + .unwrap() + } + + pub async fn debug_trace_block_by_number( + &self, + block_number: BlockNumberOrTag, + opts: Option, + ) -> Vec { + self.http_client + .request("debug_traceBlockByNumber", rpc_params![block_number, opts]) + .await + .unwrap() + } + + pub async fn debug_trace_block_by_hash( + &self, + block_hash: B256, + opts: Option, + ) -> Vec { + self.http_client + .request("debug_traceBlockByHash", rpc_params![block_hash, opts]) + .await + .unwrap() + } + + pub async fn debug_trace_chain( + &self, + start_block: BlockNumberOrTag, + end_block: BlockNumberOrTag, + opts: Option, + ) -> Vec { + let mut subscription = self + .ws_client + .subscribe( + "debug_subscribe", + rpc_params!["traceChain", start_block, end_block, opts], + "debug_unsubscribe", + ) + .await + .unwrap(); + + let BlockNumberOrTag::Number(start_block) = start_block else { + panic!("Only numbers for start block"); + }; + let end_block = match end_block { + BlockNumberOrTag::Number(b) => b, + BlockNumberOrTag::Latest => self.eth_block_number().await, + _ => panic!("Only number and latest"), + }; + let mut traces: Vec> = vec![]; + for _ in start_block..end_block { + let block_traces = subscription.next().await.unwrap().unwrap(); + traces.push(block_traces); + } + + traces.into_iter().flatten().collect() + } + + pub async fn subscribe_new_heads(&self) -> mpsc::Receiver { + let (tx, rx) = mpsc::channel(); + let mut subscription = self + .ws_client + .subscribe("eth_subscribe", rpc_params!["newHeads"], "eth_unsubscribe") + .await + .unwrap(); + + tokio::spawn(async move { + loop { + let Some(Ok(block)) = subscription.next().await else { + return; + }; + tx.send(block).unwrap(); + } + }); + + rx + } + + pub async fn subscribe_logs(&self, filter: Filter) -> mpsc::Receiver { + let (tx, rx) = mpsc::channel(); + let mut subscription = self + .ws_client + .subscribe( + "eth_subscribe", + rpc_params!["logs", filter], + "eth_unsubscribe", + ) + .await + .unwrap(); + + tokio::spawn(async move { + loop { + let Some(Ok(log)) = subscription.next().await else { + return; + }; + tx.send(log).unwrap(); + } + }); + + rx + } + + pub async fn eth_block_number(&self) -> u64 { + let block_number: U256 = self + .http_client + .request("eth_blockNumber", rpc_params![]) + .await + .unwrap(); + + block_number.saturating_to() + } + + pub async fn citrea_sync_status(&self) -> T + where + T: DeserializeOwned, + { + self.http_client + .request::("citrea_syncStatus", rpc_params![]) + .await + .unwrap() + } + + pub async fn wait_for_l2_block(&self, num: u64, timeout: Option) -> Result<()> { + let start = SystemTime::now(); + let timeout = timeout.unwrap_or(Duration::from_secs(30)); // Default 30 seconds timeout + loop { + let latest_block = self + .http_client + .get_head_soft_confirmation_height() + .await + .expect("Expected height to be Some"); + + if latest_block >= num { + break; + } + + let now = SystemTime::now(); + if start + timeout <= now { + bail!("Timeout. Lbtest L2 block is {:?}", latest_block); + } + + sleep(Duration::from_secs(1)).await; + } + Ok(()) + } +} + +#[derive(serde::Deserialize, Debug)] +#[serde(rename_all = "camelCase")] +#[allow(dead_code)] +// ethers version of FeeHistory doesn't accept None reward +pub struct FeeHistory { + pub base_fee_per_gas: Vec, + pub gas_used_ratio: Vec, + pub oldest_block: U256, + pub reward: Option>>, +} + +#[allow(clippy::borrowed_box)] +pub async fn make_test_client(rpc_address: SocketAddr) -> Result> { + let chain_id: u64 = 5655; + let key = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" + .parse::() + .unwrap() + .with_chain_id(Some(chain_id)); + + let from_addr = Address::from_str("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266").unwrap(); + + Ok(Box::new( + L2Client::new(chain_id, key, from_addr, rpc_address).await?, + )) +} diff --git a/src/config/bitcoin.rs b/src/config/bitcoin.rs new file mode 100644 index 0000000..447bad3 --- /dev/null +++ b/src/config/bitcoin.rs @@ -0,0 +1,64 @@ +use std::path::PathBuf; + +use bitcoin::Network; +use tempfile::TempDir; + +#[derive(Debug, Clone)] +pub struct BitcoinConfig { + pub p2p_port: u16, + pub rpc_port: u16, + pub rpc_user: String, + pub rpc_password: String, + pub data_dir: PathBuf, + pub extra_args: Vec<&'static str>, + pub network: Network, + pub docker_image: Option, + pub env: Vec<(&'static str, &'static str)>, + pub idx: usize, +} + +impl Default for BitcoinConfig { + fn default() -> Self { + Self { + p2p_port: 0, + rpc_port: 0, + rpc_user: "user".to_string(), + rpc_password: "password".to_string(), + data_dir: TempDir::new() + .expect("Failed to create temporary directory") + .into_path(), + extra_args: Vec::new(), + network: Network::Regtest, + docker_image: Some("bitcoin/bitcoin:latest".to_string()), + env: Vec::new(), + idx: 0, + } + } +} + +impl BitcoinConfig { + fn base_args(&self) -> Vec { + vec![ + "-regtest".to_string(), + format!("-datadir={}", self.data_dir.display()), + format!("-port={}", self.p2p_port), + format!("-rpcport={}", self.rpc_port), + format!("-rpcuser={}", self.rpc_user), + format!("-rpcpassword={}", self.rpc_password), + "-server".to_string(), + "-daemonwait".to_string(), + "-txindex".to_string(), + "-addresstype=bech32m".to_string(), + "-debug=net".to_string(), + "-debug=rpc".to_string(), + ] + } + + pub fn args(&self) -> Vec { + [ + self.base_args(), + self.extra_args.iter().map(|&s| s.to_string()).collect(), + ] + .concat() + } +} diff --git a/src/config/docker.rs b/src/config/docker.rs new file mode 100644 index 0000000..1e5c0ab --- /dev/null +++ b/src/config/docker.rs @@ -0,0 +1,77 @@ +use std::path::PathBuf; + +use super::{BitcoinConfig, FullSequencerConfig}; +use crate::utils::get_genesis_path; + +#[derive(Debug)] +pub struct VolumeConfig { + pub name: String, + pub target: String, +} + +#[derive(Debug)] +pub struct DockerConfig { + pub ports: Vec, + pub image: String, + pub cmd: Vec, + pub log_path: PathBuf, + pub volume: VolumeConfig, +} + +impl From<&BitcoinConfig> for DockerConfig { + fn from(v: &BitcoinConfig) -> Self { + let mut args = v.args(); + + // Docker specific args + args.extend([ + "-rpcallowip=0.0.0.0/0".to_string(), + "-rpcbind=0.0.0.0".to_string(), + "-daemonwait=0".to_string(), + ]); + + Self { + ports: vec![v.rpc_port, v.p2p_port], + image: v + .docker_image + .clone() + .unwrap_or_else(|| "bitcoin/bitcoin:latest".to_string()), + cmd: args, + log_path: v.data_dir.join("regtest").join("debug.log"), + volume: VolumeConfig { + name: format!("bitcoin-{}", v.idx), + target: "/home/bitcoin/.bitcoin".to_string(), + }, + } + } +} + +impl From<&FullSequencerConfig> for DockerConfig { + fn from(v: &FullSequencerConfig) -> Self { + let args = vec![ + "--da-layer".to_string(), + "bitcoin".to_string(), + "--rollup-config-path".to_string(), + "sequencer_rollup_config.toml".to_string(), + "--sequencer-config-path".to_string(), + "sequencer_config.toml".to_string(), + "--genesis-paths".to_string(), + get_genesis_path(v.dir.parent().expect("Couldn't get parent dir")) + .display() + .to_string(), + ]; + + Self { + ports: vec![v.rollup.rpc.bind_port], + image: v + .docker_image + .clone() + .unwrap_or_else(|| "citrea:latest".to_string()), // Default to local image + cmd: args, + log_path: v.dir.join("stdout"), + volume: VolumeConfig { + name: "sequencer".to_string(), + target: "/sequencer/data".to_string(), + }, + } + } +} diff --git a/src/config/mod.rs b/src/config/mod.rs new file mode 100644 index 0000000..c5fcdd9 --- /dev/null +++ b/src/config/mod.rs @@ -0,0 +1,33 @@ +mod bitcoin; +mod docker; +mod rollup; +mod test; +mod test_case; +mod utils; + +use std::path::PathBuf; + +pub use bitcoin::BitcoinConfig; +pub use bitcoin_da::service::BitcoinServiceConfig; +pub use citrea_sequencer::SequencerConfig; +pub use docker::DockerConfig; +pub use rollup::{default_rollup_config, RollupConfig}; +pub use sov_stf_runner::{ + FullNodeConfig, ProverConfig, RollupPublicKeys, RpcConfig, RunnerConfig, StorageConfig, +}; +pub use test::TestConfig; +pub use test_case::{TestCaseConfig, TestCaseEnv}; +pub use utils::config_to_file; + +#[derive(Clone, Debug)] +pub struct FullL2NodeConfig { + pub node: T, + pub rollup: RollupConfig, + pub docker_image: Option, + pub dir: PathBuf, + pub env: Vec<(&'static str, &'static str)>, +} + +pub type FullSequencerConfig = FullL2NodeConfig; +pub type FullProverConfig = FullL2NodeConfig; +pub type FullFullNodeConfig = FullL2NodeConfig<()>; diff --git a/src/config/rollup.rs b/src/config/rollup.rs new file mode 100644 index 0000000..8e75183 --- /dev/null +++ b/src/config/rollup.rs @@ -0,0 +1,72 @@ +use tempfile::TempDir; + +use super::BitcoinConfig; +use crate::config::{ + BitcoinServiceConfig, FullNodeConfig, RollupPublicKeys, RpcConfig, StorageConfig, +}; +pub type RollupConfig = FullNodeConfig; + +pub fn default_rollup_config() -> RollupConfig { + RollupConfig { + rpc: RpcConfig { + bind_host: "127.0.0.1".into(), + bind_port: 0, + max_connections: 100, + max_request_body_size: 10 * 1024 * 1024, + max_response_body_size: 10 * 1024 * 1024, + batch_requests_limit: 50, + enable_subscriptions: true, + max_subscriptions_per_connection: 100, + }, + storage: StorageConfig { + path: TempDir::new() + .expect("Failed to create temporary directory") + .into_path(), + db_max_open_files: None, + }, + runner: None, + da: BitcoinServiceConfig { + node_url: String::new(), + node_username: String::from("user"), + node_password: String::from("password"), + network: bitcoin::Network::Regtest, + da_private_key: None, + tx_backup_dir: TempDir::new() + .expect("Failed to create temporary directory") + .into_path() + .display() + .to_string(), + }, + public_keys: RollupPublicKeys { + sequencer_public_key: vec![ + 32, 64, 64, 227, 100, 193, 15, 43, 236, 156, 31, 229, 0, 161, 205, 76, 36, 124, + 137, 214, 80, 160, 30, 215, 232, 44, 171, 168, 103, 135, 124, 33, + ], + // private key [4, 95, 252, 129, 163, 193, 253, 179, 175, 19, 89, 219, 242, 209, 20, 176, 179, 239, 191, 127, 41, 204, 156, 93, 160, 18, 103, 170, 57, 210, 199, 141] + // Private Key (WIF): KwNDSCvKqZqFWLWN1cUzvMiJQ7ck6ZKqR6XBqVKyftPZtvmbE6YD + sequencer_da_pub_key: vec![ + 3, 136, 195, 18, 11, 187, 25, 37, 38, 109, 184, 237, 247, 208, 131, 219, 162, 70, + 35, 174, 234, 47, 239, 247, 60, 51, 174, 242, 247, 112, 186, 222, 30, + ], + // private key [117, 186, 249, 100, 208, 116, 89, 70, 0, 54, 110, 91, 17, 26, 29, 168, 248, 107, 46, 254, 45, 34, 218, 81, 200, 216, 33, 38, 160, 252, 172, 114] + // Private Key (WIF): L1AZdJXzDGGENBBPZGSL7dKJnwn5xSKqzszgK6CDwiBGThYQEVTo + prover_da_pub_key: vec![ + 2, 138, 232, 157, 214, 46, 7, 210, 235, 33, 105, 239, 71, 169, 105, 233, 239, 84, + 172, 112, 13, 54, 9, 206, 106, 138, 251, 218, 15, 28, 137, 112, 127, + ], + }, + } +} + +impl From for BitcoinServiceConfig { + fn from(v: BitcoinConfig) -> Self { + Self { + node_url: format!("127.0.0.1:{}", v.rpc_port), + node_username: v.rpc_user, + node_password: v.rpc_password, + network: v.network, + da_private_key: None, + tx_backup_dir: "".to_string(), + } + } +} diff --git a/src/config/test.rs b/src/config/test.rs new file mode 100644 index 0000000..ae7ea58 --- /dev/null +++ b/src/config/test.rs @@ -0,0 +1,13 @@ +use super::{ + bitcoin::BitcoinConfig, test_case::TestCaseConfig, FullFullNodeConfig, FullProverConfig, + FullSequencerConfig, +}; + +#[derive(Clone)] +pub struct TestConfig { + pub test_case: TestCaseConfig, + pub bitcoin: Vec, + pub sequencer: FullSequencerConfig, + pub prover: FullProverConfig, + pub full_node: FullFullNodeConfig, +} diff --git a/src/config/test_case.rs b/src/config/test_case.rs new file mode 100644 index 0000000..bd7acae --- /dev/null +++ b/src/config/test_case.rs @@ -0,0 +1,72 @@ +use std::{path::PathBuf, time::Duration}; + +use tempfile::TempDir; + +#[derive(Clone, Default)] +pub struct TestCaseEnv { + pub test: Vec<(&'static str, &'static str)>, + pub full_node: Vec<(&'static str, &'static str)>, + pub sequencer: Vec<(&'static str, &'static str)>, + pub prover: Vec<(&'static str, &'static str)>, + pub bitcoin: Vec<(&'static str, &'static str)>, +} + +impl TestCaseEnv { + // Base env that should apply to every test cases + fn base_env() -> Vec<(&'static str, &'static str)> { + vec![("NO_COLOR", "1")] + } + + fn test_env(&self) -> Vec<(&'static str, &'static str)> { + [Self::base_env(), self.test.clone()].concat() + } + + pub fn sequencer(&self) -> Vec<(&'static str, &'static str)> { + [self.test_env(), self.sequencer.clone()].concat() + } + + pub fn prover(&self) -> Vec<(&'static str, &'static str)> { + [self.test_env(), self.prover.clone()].concat() + } + + pub fn full_node(&self) -> Vec<(&'static str, &'static str)> { + [self.test_env(), self.full_node.clone()].concat() + } + + pub fn bitcoin(&self) -> Vec<(&'static str, &'static str)> { + [self.test_env(), self.bitcoin.clone()].concat() + } +} + +#[derive(Clone)] +pub struct TestCaseConfig { + pub n_nodes: usize, + pub with_sequencer: bool, + pub with_full_node: bool, + pub with_prover: bool, + #[allow(unused)] + pub timeout: Duration, + pub dir: PathBuf, + pub docker: bool, + // Either a relative dir from workspace root, i.e. "./resources/genesis/devnet" + // Or an absolute path. + // Defaults to resources/genesis/bitcoin-regtest + pub genesis_dir: Option, +} + +impl Default for TestCaseConfig { + fn default() -> Self { + TestCaseConfig { + n_nodes: 1, + with_sequencer: true, + with_prover: false, + with_full_node: false, + timeout: Duration::from_secs(60), + dir: TempDir::new() + .expect("Failed to create temporary directory") + .into_path(), + docker: std::env::var("USE_DOCKER").map_or(false, |v| v.parse().unwrap_or(false)), + genesis_dir: None, + } + } +} diff --git a/src/config/utils.rs b/src/config/utils.rs new file mode 100644 index 0000000..49beb15 --- /dev/null +++ b/src/config/utils.rs @@ -0,0 +1,14 @@ +use std::path::Path; + +use serde::Serialize; + +pub fn config_to_file(config: &C, path: &P) -> std::io::Result<()> +where + C: Serialize, + P: AsRef, +{ + let toml = + toml::to_string(config).map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; + std::fs::write(path, toml)?; + Ok(()) +} diff --git a/src/docker.rs b/src/docker.rs new file mode 100644 index 0000000..e248a52 --- /dev/null +++ b/src/docker.rs @@ -0,0 +1,282 @@ +use std::{ + collections::{HashMap, HashSet}, + io::{stdout, Write}, + path::PathBuf, +}; + +use anyhow::{anyhow, Context, Result}; +use bollard::{ + container::{Config, LogOutput, LogsOptions, NetworkingConfig}, + image::CreateImageOptions, + models::{EndpointSettings, Mount, PortBinding}, + network::CreateNetworkOptions, + secret::MountTypeEnum, + service::HostConfig, + volume::CreateVolumeOptions, + Docker, +}; +use futures::StreamExt; +use tokio::{fs::File, io::AsyncWriteExt, task::JoinHandle}; + +use super::{config::DockerConfig, traits::SpawnOutput, utils::generate_test_id}; +use crate::traits::ContainerSpawnOutput; + +pub struct DockerEnv { + pub docker: Docker, + pub network_id: String, + pub network_name: String, + id: String, + volumes: HashSet, +} + +impl DockerEnv { + pub async fn new(n_nodes: usize) -> Result { + let docker = + Docker::connect_with_local_defaults().context("Failed to connect to Docker")?; + let test_id = generate_test_id(); + let (network_id, network_name) = Self::create_network(&docker, &test_id).await?; + let volumes = Self::create_volumes(&docker, &test_id, n_nodes).await?; + + Ok(Self { + docker, + network_id, + network_name, + id: test_id, + volumes, + }) + } + + async fn create_volumes( + docker: &Docker, + test_case_id: &str, + n_nodes: usize, + ) -> Result> { + let volume_configs = vec![("bitcoin", n_nodes)]; + let mut volumes = HashSet::new(); + + for (name, n) in volume_configs { + for i in 0..n { + let volume_name = format!("{name}-{i}-{test_case_id}"); + docker + .create_volume(CreateVolumeOptions { + name: volume_name.clone(), + driver: "local".to_string(), + driver_opts: HashMap::new(), + labels: HashMap::new(), + }) + .await?; + + volumes.insert(volume_name); + } + } + + Ok(volumes) + } + + async fn create_network(docker: &Docker, test_case_id: &str) -> Result<(String, String)> { + let network_name = format!("test_network_{}", test_case_id); + let options = CreateNetworkOptions { + name: network_name.clone(), + check_duplicate: true, + driver: "bridge".to_string(), + ..Default::default() + }; + + let id = docker + .create_network(options) + .await? + .id + .context("Error getting network id")?; + Ok((id, network_name)) + } + + pub async fn spawn(&self, config: DockerConfig) -> Result { + println!("Spawning docker with config {config:#?}"); + let exposed_ports: HashMap> = config + .ports + .iter() + .map(|port| (format!("{}/tcp", port), HashMap::new())) + .collect(); + + let port_bindings: HashMap>> = config + .ports + .iter() + .map(|port| { + ( + format!("{}/tcp", port), + Some(vec![PortBinding { + host_ip: Some("0.0.0.0".to_string()), + host_port: Some(port.to_string()), + }]), + ) + }) + .collect(); + + let mut network_config = HashMap::new(); + network_config.insert(self.network_id.clone(), EndpointSettings::default()); + + let volume_name = format!("{}-{}", config.volume.name, self.id); + let mount = Mount { + target: Some(config.volume.target.clone()), + source: Some(volume_name), + typ: Some(MountTypeEnum::VOLUME), + ..Default::default() + }; + + let container_config = Config { + image: Some(config.image), + cmd: Some(config.cmd), + exposed_ports: Some(exposed_ports), + host_config: Some(HostConfig { + port_bindings: Some(port_bindings), + // binds: Some(vec![config.dir]), + mounts: Some(vec![mount]), + ..Default::default() + }), + networking_config: Some(NetworkingConfig { + endpoints_config: network_config, + }), + tty: Some(true), + ..Default::default() + }; + + let image = container_config + .image + .as_ref() + .context("Image not specified in config")?; + self.ensure_image_exists(image).await?; + + // println!("options :{options:?}"); + // println!("config :{container_config:?}"); + + let container = self + .docker + .create_container::(None, container_config) + .await + .map_err(|e| anyhow!("Failed to create Docker container {e}"))?; + + self.docker + .start_container::(&container.id, None) + .await + .context("Failed to start Docker container")?; + + let inspect_result = self.docker.inspect_container(&container.id, None).await?; + let ip_address = inspect_result + .network_settings + .and_then(|ns| ns.networks) + .and_then(|networks| { + networks + .values() + .next() + .and_then(|network| network.ip_address.clone()) + }) + .context("Failed to get container IP address")?; + + // Extract container logs to host + // This spawns a background task to continuously stream logs from the container. + // The task will run until the container is stopped or removed during cleanup. + Self::extract_container_logs(self.docker.clone(), container.id.clone(), config.log_path); + + Ok(SpawnOutput::Container(ContainerSpawnOutput { + id: container.id, + ip: ip_address, + })) + } + + async fn ensure_image_exists(&self, image: &str) -> Result<()> { + let images = self + .docker + .list_images::(None) + .await + .context("Failed to list Docker images")?; + if images + .iter() + .any(|img| img.repo_tags.contains(&image.to_string())) + { + return Ok(()); + } + + println!("Pulling image: {}", image); + let options = Some(CreateImageOptions { + from_image: image, + ..Default::default() + }); + + let mut stream = self.docker.create_image(options, None, None); + while let Some(result) = stream.next().await { + match result { + Ok(info) => { + if let (Some(status), Some(progress)) = (info.status, info.progress) { + print!("\r{}: {} ", status, progress); + stdout().flush().unwrap(); + } + } + Err(e) => return Err(anyhow::anyhow!("Failed to pull image: {}", e)), + } + } + println!("Image succesfully pulled"); + + Ok(()) + } + + pub async fn cleanup(&self) -> Result<()> { + let containers = self.docker.list_containers::(None).await?; + for container in containers { + if let (Some(id), Some(networks)) = ( + container.id, + container.network_settings.and_then(|ns| ns.networks), + ) { + if networks.contains_key(&self.network_name) { + self.docker.stop_container(&id, None).await?; + self.docker.remove_container(&id, None).await?; + } + } + } + + self.docker.remove_network(&self.network_name).await?; + + for volume_name in &self.volumes { + self.docker.remove_volume(volume_name, None).await?; + } + + Ok(()) + } + + fn extract_container_logs( + docker: Docker, + container_id: String, + log_path: PathBuf, + ) -> JoinHandle> { + tokio::spawn(async move { + if let Some(parent) = log_path.parent() { + tokio::fs::create_dir_all(parent) + .await + .context("Failed to create log directory")?; + } + let mut log_file = File::create(log_path) + .await + .context("Failed to create log file")?; + let mut log_stream = docker.logs::( + &container_id, + Some(LogsOptions { + follow: true, + stdout: true, + stderr: true, + ..Default::default() + }), + ); + + while let Some(Ok(log_output)) = log_stream.next().await { + let log_line = match log_output { + LogOutput::Console { message } | LogOutput::StdOut { message } => message, + _ => continue, + }; + log_file + .write_all(&log_line) + .await + .context("Failed to write log line")?; + } + Ok(()) + }) + } +} diff --git a/src/framework.rs b/src/framework.rs new file mode 100644 index 0000000..756bc01 --- /dev/null +++ b/src/framework.rs @@ -0,0 +1,201 @@ +use std::{future::Future, sync::Arc}; + +use bitcoincore_rpc::RpcApi; + +use super::{ + bitcoin::BitcoinNodeCluster, + config::TestConfig, + docker::DockerEnv, + full_node::FullNode, + node::NodeKind, + sequencer::Sequencer, + traits::{LogProvider, LogProviderErased, Node}, + Result, +}; +use crate::{prover::Prover, utils::tail_file}; + +pub struct TestContext { + pub config: TestConfig, + pub docker: Arc>, +} + +impl TestContext { + async fn new(config: TestConfig) -> Self { + let docker = if config.test_case.docker { + Some(DockerEnv::new(config.test_case.n_nodes).await.unwrap()) + } else { + None + }; + Self { + config, + docker: Arc::new(docker), + } + } +} + +pub struct TestFramework { + ctx: TestContext, + pub bitcoin_nodes: BitcoinNodeCluster, + pub sequencer: Option, + pub prover: Option, + pub full_node: Option, + show_logs: bool, + pub initial_da_height: u64, +} + +async fn create_optional(pred: bool, f: impl Future>) -> Result> { + if pred { + Ok(Some(f.await?)) + } else { + Ok(None) + } +} + +impl TestFramework { + pub async fn new(config: TestConfig) -> Result { + anyhow::ensure!( + config.test_case.n_nodes > 0, + "At least one bitcoin node has to be running" + ); + + let ctx = TestContext::new(config).await; + + let bitcoin_nodes = BitcoinNodeCluster::new(&ctx).await?; + + // tokio::time::sleep(std::time::Duration::from_secs(30)).await; + Ok(Self { + bitcoin_nodes, + sequencer: None, + prover: None, + full_node: None, + ctx, + show_logs: true, + initial_da_height: 0, + }) + } + + pub async fn init_nodes(&mut self) -> Result<()> { + // Has to initialize sequencer first since prover and full node depend on it + self.sequencer = create_optional( + self.ctx.config.test_case.with_sequencer, + Sequencer::new(&self.ctx), + ) + .await?; + + (self.prover, self.full_node) = tokio::try_join!( + create_optional( + self.ctx.config.test_case.with_prover, + Prover::new(&self.ctx) + ), + create_optional( + self.ctx.config.test_case.with_full_node, + FullNode::new(&self.ctx) + ), + )?; + + Ok(()) + } + + fn get_nodes_as_log_provider(&self) -> Vec<&dyn LogProviderErased> { + vec![ + self.bitcoin_nodes.get(0).map(LogProvider::as_erased), + self.sequencer.as_ref().map(LogProvider::as_erased), + self.full_node.as_ref().map(LogProvider::as_erased), + self.prover.as_ref().map(LogProvider::as_erased), + ] + .into_iter() + .flatten() + .collect() + } + + pub fn show_log_paths(&self) { + if self.show_logs { + println!( + "Logs available at {}", + self.ctx.config.test_case.dir.display() + ); + + for node in self.get_nodes_as_log_provider() { + println!( + "{} logs available at : {}", + node.kind(), + node.log_path().display() + ); + } + } + } + + pub fn dump_log(&self) -> Result<()> { + println!("Dumping logs:"); + + let n_lines = std::env::var("TAIL_N_LINES") + .ok() + .and_then(|v| v.parse::().ok()) + .unwrap_or(25); + for node in self.get_nodes_as_log_provider() { + println!("{} logs (last {n_lines} lines):", node.kind()); + if let Err(e) = tail_file(&node.log_path(), n_lines) { + eprint!("{e}"); + } + } + Ok(()) + } + + pub async fn stop(&mut self) -> Result<()> { + println!("Stopping framework..."); + + if let Some(sequencer) = &mut self.sequencer { + let _ = sequencer.stop().await; + println!("Successfully stopped sequencer"); + } + + if let Some(prover) = &mut self.prover { + let _ = prover.stop().await; + println!("Successfully stopped prover"); + } + + if let Some(full_node) = &mut self.full_node { + let _ = full_node.stop().await; + println!("Successfully stopped full_node"); + } + + let _ = self.bitcoin_nodes.stop_all().await; + println!("Successfully stopped bitcoin nodes"); + + if let Some(docker) = self.ctx.docker.as_ref() { + let _ = docker.cleanup().await; + println!("Successfully cleaned docker"); + } + + Ok(()) + } + + pub async fn fund_da_wallets(&mut self) -> Result<()> { + let da = self.bitcoin_nodes.get(0).unwrap(); + + da.create_wallet(&NodeKind::Sequencer.to_string(), None, None, None, None) + .await?; + da.create_wallet(&NodeKind::Prover.to_string(), None, None, None, None) + .await?; + da.create_wallet(&NodeKind::Bitcoin.to_string(), None, None, None, None) + .await?; + + let blocks_to_mature = 100; + let blocks_to_fund = 25; + if self.ctx.config.test_case.with_sequencer { + da.fund_wallet(NodeKind::Sequencer.to_string(), blocks_to_fund) + .await?; + } + + if self.ctx.config.test_case.with_prover { + da.fund_wallet(NodeKind::Prover.to_string(), blocks_to_fund) + .await?; + } + da.fund_wallet(NodeKind::Bitcoin.to_string(), blocks_to_fund) + .await?; + + da.generate(blocks_to_mature, None).await?; + self.initial_da_height = da.get_block_count().await?; + Ok(()) + } +} diff --git a/src/full_node.rs b/src/full_node.rs new file mode 100644 index 0000000..3ed3860 --- /dev/null +++ b/src/full_node.rs @@ -0,0 +1,186 @@ +use std::{fs::File, net::SocketAddr, path::PathBuf, process::Stdio}; + +use anyhow::{bail, Context}; +use async_trait::async_trait; +use sov_rollup_interface::rpc::{SequencerCommitmentResponse, VerifiedProofResponse}; +use tokio::{ + process::Command, + time::{sleep, Duration, Instant}, +}; + +use super::{ + config::{config_to_file, FullFullNodeConfig, TestConfig}, + framework::TestContext, + node::NodeKind, + traits::{LogProvider, Node, SpawnOutput}, + utils::{get_citrea_path, get_stderr_path, get_stdout_path, retry}, + Result, +}; +use crate::{ + client::{make_test_client, L2Client}, + utils::get_genesis_path, +}; + +#[allow(unused)] +pub struct FullNode { + spawn_output: SpawnOutput, + config: FullFullNodeConfig, + pub client: Box, +} + +impl FullNode { + pub async fn new(ctx: &TestContext) -> Result { + let TestConfig { + full_node: full_node_config, + .. + } = &ctx.config; + + let spawn_output = Self::spawn(full_node_config)?; + + let socket_addr = SocketAddr::new( + full_node_config + .rollup + .rpc + .bind_host + .parse() + .context("Failed to parse bind host")?, + full_node_config.rollup.rpc.bind_port, + ); + let client = retry(|| async { make_test_client(socket_addr).await }, None).await?; + + Ok(Self { + spawn_output, + config: full_node_config.clone(), + client, + }) + } + + pub async fn wait_for_sequencer_commitments( + &self, + height: u64, + timeout: Option, + ) -> Result> { + let start = Instant::now(); + let timeout = timeout.unwrap_or(Duration::from_secs(30)); + + loop { + if start.elapsed() >= timeout { + bail!("FullNode failed to get sequencer commitments within the specified timeout"); + } + + match self + .client + .ledger_get_sequencer_commitments_on_slot_by_number(height) + .await + { + Ok(Some(commitments)) => return Ok(commitments), + Ok(None) => sleep(Duration::from_millis(500)).await, + Err(e) => bail!("Error fetching sequencer commitments: {}", e), + } + } + } + + pub async fn wait_for_zkproofs( + &self, + height: u64, + timeout: Option, + ) -> Result> { + let start = Instant::now(); + let timeout = timeout.unwrap_or(Duration::from_secs(30)); + + loop { + if start.elapsed() >= timeout { + bail!("FullNode failed to get zkproofs within the specified timeout"); + } + + match self + .client + .ledger_get_verified_proofs_by_slot_height(height) + .await + { + Some(proofs) => return Ok(proofs), + None => sleep(Duration::from_millis(500)).await, + } + } + } +} + +#[async_trait] +impl Node for FullNode { + type Config = FullFullNodeConfig; + type Client = L2Client; + + fn spawn(config: &Self::Config) -> Result { + let citrea = get_citrea_path(); + let dir = &config.dir; + + let stdout_file = + File::create(get_stdout_path(dir)).context("Failed to create stdout file")?; + let stderr_file = + File::create(get_stderr_path(dir)).context("Failed to create stderr file")?; + + let rollup_config_path = dir.join("full_node_rollup_config.toml"); + config_to_file(&config.rollup, &rollup_config_path)?; + + Command::new(citrea) + .arg("--da-layer") + .arg("bitcoin") + .arg("--rollup-config-path") + .arg(rollup_config_path) + .arg("--genesis-paths") + .arg(get_genesis_path( + dir.parent().expect("Couldn't get parent dir"), + )) + .envs(config.env.clone()) + .stdout(Stdio::from(stdout_file)) + .stderr(Stdio::from(stderr_file)) + .kill_on_drop(true) + .spawn() + .context("Failed to spawn citrea process") + .map(SpawnOutput::Child) + } + + fn spawn_output(&mut self) -> &mut SpawnOutput { + &mut self.spawn_output + } + + async fn wait_for_ready(&self, timeout: Option) -> Result<()> { + let start = Instant::now(); + + let timeout = timeout.unwrap_or(Duration::from_secs(30)); + while start.elapsed() < timeout { + if self + .client + .ledger_get_head_soft_confirmation() + .await + .is_ok() + { + return Ok(()); + } + sleep(Duration::from_millis(500)).await; + } + bail!("FullNode failed to become ready within the specified timeout") + } + + fn client(&self) -> &Self::Client { + &self.client + } + + fn env(&self) -> Vec<(&'static str, &'static str)> { + self.config.env.clone() + } + + fn config_mut(&mut self) -> &mut Self::Config { + &mut self.config + } +} + +impl LogProvider for FullNode { + fn kind(&self) -> NodeKind { + NodeKind::FullNode + } + + fn log_path(&self) -> PathBuf { + get_stdout_path(&self.config.dir) + } +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..86aaa53 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,15 @@ +mod bitcoin; +pub mod client; +pub mod config; +mod docker; +pub mod framework; +mod full_node; +pub mod node; +mod prover; +mod sequencer; +pub mod test_case; +pub mod traits; + +mod utils; + +pub type Result = anyhow::Result; diff --git a/src/node.rs b/src/node.rs new file mode 100644 index 0000000..04d8a16 --- /dev/null +++ b/src/node.rs @@ -0,0 +1,20 @@ +use std::fmt; + +#[derive(Debug)] +pub enum NodeKind { + Bitcoin, + Prover, + Sequencer, + FullNode, +} + +impl fmt::Display for NodeKind { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + NodeKind::Bitcoin => write!(f, "bitcoin"), + NodeKind::Prover => write!(f, "prover"), + NodeKind::Sequencer => write!(f, "sequencer"), + NodeKind::FullNode => write!(f, "full-node"), + } + } +} diff --git a/src/prover.rs b/src/prover.rs new file mode 100644 index 0000000..cf495db --- /dev/null +++ b/src/prover.rs @@ -0,0 +1,161 @@ +use std::{fs::File, net::SocketAddr, path::PathBuf, process::Stdio, time::SystemTime}; + +use anyhow::{bail, Context}; +use async_trait::async_trait; +use log::debug; +use tokio::{ + process::Command, + time::{sleep, Duration, Instant}, +}; + +use super::{ + config::{config_to_file, FullProverConfig, TestConfig}, + framework::TestContext, + node::NodeKind, + traits::{LogProvider, Node, SpawnOutput}, + utils::{get_citrea_path, get_stderr_path, get_stdout_path, retry}, + Result, +}; +use crate::{ + client::{make_test_client, L2Client}, + utils::get_genesis_path, +}; + +#[allow(unused)] +pub struct Prover { + spawn_output: SpawnOutput, + config: FullProverConfig, + pub client: Box, +} + +impl Prover { + pub async fn new(ctx: &TestContext) -> Result { + let TestConfig { + prover: prover_config, + .. + } = &ctx.config; + + let spawn_output = Self::spawn(prover_config)?; + + let socket_addr = SocketAddr::new( + prover_config + .rollup + .rpc + .bind_host + .parse() + .context("Failed to parse bind host")?, + prover_config.rollup.rpc.bind_port, + ); + let client = retry(|| async { make_test_client(socket_addr).await }, None).await?; + + Ok(Self { + spawn_output, + config: prover_config.to_owned(), + client, + }) + } + + pub async fn wait_for_l1_height(&self, height: u64, timeout: Option) -> Result<()> { + let start = SystemTime::now(); + let timeout = timeout.unwrap_or(Duration::from_secs(600)); + loop { + debug!("Waiting for prover height {}", height); + let latest_block = self.client.ledger_get_last_scanned_l1_height().await; + if latest_block >= height { + break; + } + + let now = SystemTime::now(); + if start + timeout <= now { + bail!("Timeout. Latest prover L1 height is {}", latest_block); + } + + sleep(Duration::from_secs(1)).await; + } + Ok(()) + } +} + +#[async_trait] +impl Node for Prover { + type Config = FullProverConfig; + type Client = L2Client; + + fn spawn(config: &Self::Config) -> Result { + let citrea = get_citrea_path(); + let dir = &config.dir; + + let stdout_file = + File::create(get_stdout_path(dir)).context("Failed to create stdout file")?; + let stderr_file = + File::create(get_stderr_path(dir)).context("Failed to create stderr file")?; + + let config_path = dir.join("prover_config.toml"); + config_to_file(&config.node, &config_path)?; + + let rollup_config_path = dir.join("prover_rollup_config.toml"); + config_to_file(&config.rollup, &rollup_config_path)?; + + Command::new(citrea) + .arg("--da-layer") + .arg("bitcoin") + .arg("--rollup-config-path") + .arg(rollup_config_path) + .arg("--prover-config-path") + .arg(config_path) + .arg("--genesis-paths") + .arg(get_genesis_path( + dir.parent().expect("Couldn't get parent dir"), + )) + .envs(config.env.clone()) + .stdout(Stdio::from(stdout_file)) + .stderr(Stdio::from(stderr_file)) + .kill_on_drop(true) + .spawn() + .context("Failed to spawn citrea process") + .map(SpawnOutput::Child) + } + + fn spawn_output(&mut self) -> &mut SpawnOutput { + &mut self.spawn_output + } + + async fn wait_for_ready(&self, timeout: Option) -> Result<()> { + let start = Instant::now(); + let timeout = timeout.unwrap_or(Duration::from_secs(30)); + while start.elapsed() < timeout { + if self + .client + .ledger_get_head_soft_confirmation() + .await + .is_ok() + { + return Ok(()); + } + sleep(Duration::from_millis(500)).await; + } + anyhow::bail!("Prover failed to become ready within the specified timeout") + } + + fn client(&self) -> &Self::Client { + &self.client + } + + fn env(&self) -> Vec<(&'static str, &'static str)> { + self.config.env.clone() + } + + fn config_mut(&mut self) -> &mut Self::Config { + &mut self.config + } +} + +impl LogProvider for Prover { + fn kind(&self) -> NodeKind { + NodeKind::Prover + } + + fn log_path(&self) -> PathBuf { + get_stdout_path(&self.config.dir) + } +} diff --git a/src/sequencer.rs b/src/sequencer.rs new file mode 100644 index 0000000..eeec3c4 --- /dev/null +++ b/src/sequencer.rs @@ -0,0 +1,148 @@ +use std::{fs::File, net::SocketAddr, path::PathBuf, process::Stdio}; + +use anyhow::Context; +use async_trait::async_trait; +use tokio::{ + process::Command, + time::{sleep, Duration, Instant}, +}; + +use super::{ + config::{config_to_file, FullSequencerConfig, TestConfig}, + framework::TestContext, + node::NodeKind, + traits::{LogProvider, Node, SpawnOutput}, + utils::{get_citrea_path, get_stderr_path, get_stdout_path, retry}, + Result, +}; +use crate::{ + client::{make_test_client, L2Client}, + utils::get_genesis_path, +}; + +#[allow(unused)] +pub struct Sequencer { + spawn_output: SpawnOutput, + config: FullSequencerConfig, + pub client: Box, +} + +impl Sequencer { + pub async fn new(ctx: &TestContext) -> Result { + let TestConfig { + sequencer: config, .. + } = &ctx.config; + + let spawn_output = Self::spawn(config)?; + + let socket_addr = SocketAddr::new( + config + .rollup + .rpc + .bind_host + .parse() + .context("Failed to parse bind host")?, + config.rollup.rpc.bind_port, + ); + + let client = retry(|| async { make_test_client(socket_addr).await }, None).await?; + + Ok(Self { + spawn_output, + config: config.clone(), + client, + }) + } + + pub fn dir(&self) -> &PathBuf { + &self.config.dir + } + + pub fn min_soft_confirmations_per_commitment(&self) -> u64 { + self.config.node.min_soft_confirmations_per_commitment + } +} + +#[async_trait] +impl Node for Sequencer { + type Config = FullSequencerConfig; + type Client = L2Client; + + fn spawn(config: &Self::Config) -> Result { + let citrea = get_citrea_path(); + let dir = &config.dir; + + let stdout_file = + File::create(get_stdout_path(dir)).context("Failed to create stdout file")?; + let stderr_file = + File::create(get_stderr_path(dir)).context("Failed to create stderr file")?; + + let config_path = dir.join("sequencer_config.toml"); + config_to_file(&config.node, &config_path)?; + + let rollup_config_path = dir.join("sequencer_rollup_config.toml"); + config_to_file(&config.rollup, &rollup_config_path)?; + + Command::new(citrea) + .arg("--da-layer") + .arg("bitcoin") + .arg("--rollup-config-path") + .arg(rollup_config_path) + .arg("--sequencer-config-path") + .arg(config_path) + .arg("--genesis-paths") + .arg(get_genesis_path( + dir.parent().expect("Couldn't get parent dir"), + )) + .envs(config.env.clone()) + .stdout(Stdio::from(stdout_file)) + .stderr(Stdio::from(stderr_file)) + .kill_on_drop(true) + .spawn() + .context("Failed to spawn citrea process") + .map(SpawnOutput::Child) + } + + fn spawn_output(&mut self) -> &mut SpawnOutput { + &mut self.spawn_output + } + + async fn wait_for_ready(&self, timeout: Option) -> Result<()> { + let start = Instant::now(); + let timeout = timeout.unwrap_or(Duration::from_secs(30)); + while start.elapsed() < timeout { + if self + .client + .ledger_get_head_soft_confirmation() + .await + .is_ok() + { + return Ok(()); + } + sleep(Duration::from_millis(500)).await; + } + anyhow::bail!("Sequencer failed to become ready within the specified timeout") + } + + fn client(&self) -> &Self::Client { + &self.client + } + + fn env(&self) -> Vec<(&'static str, &'static str)> { + self.config.env.clone() + } + + fn config_mut(&mut self) -> &mut Self::Config { + &mut self.config + } +} + +impl LogProvider for Sequencer { + fn kind(&self) -> NodeKind { + NodeKind::Sequencer + } + + fn log_path(&self) -> PathBuf { + get_stdout_path(self.dir()) + } +} diff --git a/src/test_case.rs b/src/test_case.rs new file mode 100644 index 0000000..0dc1b9d --- /dev/null +++ b/src/test_case.rs @@ -0,0 +1,352 @@ +//! This module provides the TestCaseRunner and TestCase trait for running and defining test cases. +//! It handles setup, execution, and cleanup of test environments. + +use std::{ + panic::{self}, + path::{Path, PathBuf}, + time::Duration, +}; + +use anyhow::{bail, Context}; +use async_trait::async_trait; +use futures::FutureExt; + +use super::{ + config::{ + default_rollup_config, BitcoinConfig, FullFullNodeConfig, FullProverConfig, + FullSequencerConfig, RollupConfig, TestCaseConfig, TestCaseEnv, TestConfig, + }, + framework::TestFramework, + node::NodeKind, + utils::{copy_directory, get_available_port}, + Result, +}; +use crate::{ + config::{ + BitcoinServiceConfig, ProverConfig, RpcConfig, RunnerConfig, SequencerConfig, StorageConfig, + }, + traits::Node, + utils::{get_default_genesis_path, get_workspace_root}, +}; + +// TestCaseRunner manages the lifecycle of a test case, including setup, execution, and cleanup. +/// It creates a test framework with the associated configs, spawns required nodes, connects them, +/// runs the test case, and performs cleanup afterwards. The `run` method handles any panics that +/// might occur during test execution and takes care of cleaning up and stopping the child processes. +pub struct TestCaseRunner(T); + +impl TestCaseRunner { + /// Creates a new TestCaseRunner with the given test case. + pub fn new(test_case: T) -> Self { + Self(test_case) + } + + /// Internal method to fund the wallets, connect the nodes, wait for them to be ready. + async fn prepare(&self, f: &mut TestFramework) -> Result<()> { + f.fund_da_wallets().await?; + f.init_nodes().await?; + f.show_log_paths(); + f.bitcoin_nodes.connect_nodes().await?; + + if let Some(sequencer) = &f.sequencer { + sequencer + .wait_for_ready(Some(Duration::from_secs(5))) + .await?; + } + + Ok(()) + } + + async fn run_test_case(&mut self, f: &mut TestFramework) -> Result<()> { + self.prepare(f).await?; + self.0.setup(f).await?; + self.0.run_test(f).await + } + + /// Executes the test case, handling any panics and performing cleanup. + /// + /// This sets up the framework, executes the test, and ensures cleanup is performed even if a panic occurs. + pub async fn run(mut self) -> Result<()> { + let mut framework = None; + let result = panic::AssertUnwindSafe(async { + framework = Some(TestFramework::new(Self::generate_test_config()?).await?); + let f = framework.as_mut().unwrap(); + self.run_test_case(f).await + }) + .catch_unwind() + .await; + + let f = framework + .as_mut() + .expect("Framework not correctly initialized"); + + if result.is_err() { + if let Err(e) = f.dump_log() { + eprintln!("Error dumping log: {}", e); + } + } + + f.stop().await?; + + // Additional test cleanup + self.0.cleanup().await?; + + match result { + Ok(Ok(())) => Ok(()), + Ok(Err(e)) => Err(e), + Err(panic_error) => { + let panic_msg = panic_error + .downcast_ref::() + .map(|s| s.to_string()) + .unwrap_or_else(|| "Unknown panic".to_string()); + bail!(panic_msg) + } + } + } + + fn generate_test_config() -> Result { + let test_case = T::test_config(); + let env = T::test_env(); + let bitcoin = T::bitcoin_config(); + let prover = T::prover_config(); + let sequencer = T::sequencer_config(); + let sequencer_rollup = default_rollup_config(); + let prover_rollup = default_rollup_config(); + let full_node_rollup = default_rollup_config(); + + let [bitcoin_dir, dbs_dir, prover_dir, sequencer_dir, full_node_dir, genesis_dir, tx_backup_dir] = + create_dirs(&test_case.dir)?; + + copy_genesis_dir(&test_case.genesis_dir, &genesis_dir)?; + + let mut bitcoin_confs = vec![]; + for i in 0..test_case.n_nodes { + let data_dir = bitcoin_dir.join(i.to_string()); + std::fs::create_dir_all(&data_dir) + .with_context(|| format!("Failed to create {} directory", data_dir.display()))?; + + let p2p_port = get_available_port()?; + let rpc_port = get_available_port()?; + + bitcoin_confs.push(BitcoinConfig { + p2p_port, + rpc_port, + data_dir, + env: env.bitcoin().clone(), + idx: i, + ..bitcoin.clone() + }) + } + + // Target first bitcoin node as DA for now + let da_config: BitcoinServiceConfig = bitcoin_confs[0].clone().into(); + + let sequencer_rollup = { + let bind_port = get_available_port()?; + let node_kind = NodeKind::Sequencer.to_string(); + RollupConfig { + da: BitcoinServiceConfig { + da_private_key: Some( + "045FFC81A3C1FDB3AF1359DBF2D114B0B3EFBF7F29CC9C5DA01267AA39D2C78D" + .to_string(), + ), + node_url: format!("http://{}/wallet/{}", da_config.node_url, node_kind), + tx_backup_dir: tx_backup_dir.display().to_string(), + ..da_config.clone() + }, + storage: StorageConfig { + path: dbs_dir.join(format!("{}-db", node_kind)), + db_max_open_files: None, + }, + rpc: RpcConfig { + bind_port, + ..sequencer_rollup.rpc + }, + ..sequencer_rollup + } + }; + + let runner_config = Some(RunnerConfig { + sequencer_client_url: format!( + "http://{}:{}", + sequencer_rollup.rpc.bind_host, sequencer_rollup.rpc.bind_port, + ), + include_tx_body: true, + accept_public_input_as_proven: Some(true), + sync_blocks_count: 10, + }); + + let prover_rollup = { + let bind_port = get_available_port()?; + let node_kind = NodeKind::Prover.to_string(); + RollupConfig { + da: BitcoinServiceConfig { + da_private_key: Some( + "75BAF964D074594600366E5B111A1DA8F86B2EFE2D22DA51C8D82126A0FCAC72" + .to_string(), + ), + node_url: format!("http://{}/wallet/{}", da_config.node_url, node_kind), + tx_backup_dir: tx_backup_dir.display().to_string(), + ..da_config.clone() + }, + storage: StorageConfig { + path: dbs_dir.join(format!("{}-db", node_kind)), + db_max_open_files: None, + }, + rpc: RpcConfig { + bind_port, + ..prover_rollup.rpc + }, + runner: runner_config.clone(), + ..prover_rollup + } + }; + + let full_node_rollup = { + let bind_port = get_available_port()?; + let node_kind = NodeKind::FullNode.to_string(); + RollupConfig { + da: BitcoinServiceConfig { + node_url: format!( + "http://{}/wallet/{}", + da_config.node_url, + NodeKind::Bitcoin // Use default wallet + ), + tx_backup_dir: tx_backup_dir.display().to_string(), + ..da_config.clone() + }, + storage: StorageConfig { + path: dbs_dir.join(format!("{}-db", node_kind)), + db_max_open_files: None, + }, + rpc: RpcConfig { + bind_port, + ..full_node_rollup.rpc + }, + runner: runner_config.clone(), + ..full_node_rollup + } + }; + + Ok(TestConfig { + bitcoin: bitcoin_confs, + sequencer: FullSequencerConfig { + rollup: sequencer_rollup, + dir: sequencer_dir, + docker_image: None, + node: sequencer, + env: env.sequencer(), + }, + prover: FullProverConfig { + rollup: prover_rollup, + dir: prover_dir, + docker_image: None, + node: prover, + env: env.prover(), + }, + full_node: FullFullNodeConfig { + rollup: full_node_rollup, + dir: full_node_dir, + docker_image: None, + node: (), + env: env.full_node(), + }, + test_case, + }) + } +} + +/// Defines the interface for implementing test cases. +/// +/// This trait should be implemented by every test case to define the configuration +/// and inner test logic. It provides default configurations that should be sane for most test cases, +/// which can be overridden by implementing the associated methods. +#[async_trait] +pub trait TestCase: Send + Sync + 'static { + /// Returns the test case configuration. + /// Override this method to provide custom test configurations. + fn test_config() -> TestCaseConfig { + TestCaseConfig::default() + } + + /// Returns the test case env. + /// Override this method to provide custom env per node. + fn test_env() -> TestCaseEnv { + TestCaseEnv::default() + } + + /// Returns the Bitcoin configuration for the test. + /// Override this method to provide a custom Bitcoin configuration. + fn bitcoin_config() -> BitcoinConfig { + BitcoinConfig::default() + } + + /// Returns the sequencer configuration for the test. + /// Override this method to provide a custom sequencer configuration. + fn sequencer_config() -> SequencerConfig { + SequencerConfig::default() + } + + /// Returns the prover configuration for the test. + /// Override this method to provide a custom prover configuration. + fn prover_config() -> ProverConfig { + ProverConfig::default() + } + + /// Returns the test setup + /// Override this method to add custom initialization logic + async fn setup(&self, _framework: &mut TestFramework) -> Result<()> { + Ok(()) + } + + /// Implements the actual test logic. + /// + /// This method is where the test case should be implemented. It receives + /// a reference to the TestFramework, which provides access to the test environment. + /// + /// # Arguments + /// * `framework` - A reference to the TestFramework instance + async fn run_test(&mut self, framework: &mut TestFramework) -> Result<()>; + + async fn cleanup(&self) -> Result<()> { + Ok(()) + } +} + +fn create_dirs(base_dir: &Path) -> Result<[PathBuf; 7]> { + let paths = [ + NodeKind::Bitcoin.to_string(), + "dbs".to_string(), + NodeKind::Prover.to_string(), + NodeKind::Sequencer.to_string(), + NodeKind::FullNode.to_string(), + "genesis".to_string(), + "inscription_txs".to_string(), + ] + .map(|dir| base_dir.join(dir)); + + for path in &paths { + std::fs::create_dir_all(path) + .with_context(|| format!("Failed to create {} directory", path.display()))?; + } + + Ok(paths) +} + +fn copy_genesis_dir(genesis_dir: &Option, target_dir: &Path) -> std::io::Result<()> { + println!("1"); + let genesis_dir = + genesis_dir + .as_ref() + .map(PathBuf::from) + .map_or_else(get_default_genesis_path, |dir| { + if dir.is_absolute() { + dir + } else { + get_workspace_root().join(dir) + } + }); + + println!("2"); + copy_directory(genesis_dir, target_dir) +} diff --git a/src/traits.rs b/src/traits.rs new file mode 100644 index 0000000..6245dc9 --- /dev/null +++ b/src/traits.rs @@ -0,0 +1,137 @@ +use std::{path::PathBuf, time::Duration}; + +use anyhow::Context; +use async_trait::async_trait; +use bollard::{container::StopContainerOptions, Docker}; +use tokio::process::Child; + +use super::Result; +use crate::{client::L2Client, node::NodeKind}; + +#[derive(Debug)] +pub struct ContainerSpawnOutput { + pub id: String, + pub ip: String, +} + +#[derive(Debug)] +pub enum SpawnOutput { + Child(Child), + Container(ContainerSpawnOutput), +} + +/// The Node trait defines the common interface shared between +/// BitcoinNode, Prover, Sequencer and FullNode +#[async_trait] +pub trait Node: Send { + type Config: Send; + type Client; + + /// Spawn a new node with specific config and return its child + fn spawn(test_config: &Self::Config) -> Result; + fn spawn_output(&mut self) -> &mut SpawnOutput; + + fn config_mut(&mut self) -> &mut Self::Config; + + /// Stops the running node + async fn stop(&mut self) -> Result<()> { + match self.spawn_output() { + SpawnOutput::Child(process) => { + process + .kill() + .await + .context("Failed to kill child process")?; + Ok(()) + } + SpawnOutput::Container(ContainerSpawnOutput { id, .. }) => { + println!("Stopping container {id}"); + let docker = + Docker::connect_with_local_defaults().context("Failed to connect to Docker")?; + docker + .stop_container(id, Some(StopContainerOptions { t: 10 })) + .await + .context("Failed to stop Docker container")?; + Ok(()) + } + } + } + + /// Wait for the node to be reachable by its client. + async fn wait_for_ready(&self, timeout: Option) -> Result<()>; + + fn client(&self) -> &Self::Client; + + #[allow(unused)] + fn env(&self) -> Vec<(&'static str, &'static str)> { + Vec::new() + } +} + +pub trait L2Node: Node {} + +impl L2Node for T where T: Node {} + +// Two patterns supported : +// - Call wait_until_stopped, runs any extra commands needed for testing purposes, call start again. +// - Call restart if you need to wait for node to be fully shutdown and brough back up with new config. +#[async_trait] +pub trait Restart: Node + Send { + async fn wait_until_stopped(&mut self) -> Result<()>; + async fn start(&mut self, new_config: Option) -> Result<()>; + + // Default implementation to support waiting for node to be fully shutdown and brough back up with new config. + async fn restart(&mut self, new_config: Option) -> Result<()> { + self.wait_until_stopped().await?; + self.start(new_config).await + } +} + +#[async_trait] +impl Restart for T +where + T: L2Node + Send, +{ + async fn wait_until_stopped(&mut self) -> Result<()> { + self.stop().await?; + match self.spawn_output() { + SpawnOutput::Child(pid) => pid.wait().await?, + SpawnOutput::Container(_) => unimplemented!("L2 nodes don't run in docker yet"), + }; + Ok(()) + } + + async fn start(&mut self, new_config: Option) -> Result<()> { + let config = self.config_mut(); + if let Some(new_config) = new_config { + *config = new_config + } + *self.spawn_output() = Self::spawn(config)?; + self.wait_for_ready(None).await + } +} + +pub trait LogProvider: Node { + fn kind(&self) -> NodeKind; + fn log_path(&self) -> PathBuf; + fn as_erased(&self) -> &dyn LogProviderErased + where + Self: Sized, + { + self + } +} + +pub trait LogProviderErased { + fn kind(&self) -> NodeKind; + fn log_path(&self) -> PathBuf; +} + +impl LogProviderErased for T { + fn kind(&self) -> NodeKind { + LogProvider::kind(self) + } + + fn log_path(&self) -> PathBuf { + LogProvider::log_path(self) + } +} diff --git a/src/utils.rs b/src/utils.rs new file mode 100644 index 0000000..928d8ae --- /dev/null +++ b/src/utils.rs @@ -0,0 +1,133 @@ +use std::{ + fs, + fs::File, + future::Future, + io, + io::{BufRead, BufReader}, + net::TcpListener, + path::{Path, PathBuf}, +}; + +use anyhow::bail; +use rand::{distributions::Alphanumeric, thread_rng, Rng}; +use tokio::time::{sleep, Duration, Instant}; +use which::which; + +use super::Result; + +pub fn get_available_port() -> Result { + let listener = TcpListener::bind("127.0.0.1:0")?; + Ok(listener.local_addr()?.port()) +} + +pub fn get_workspace_root() -> PathBuf { + let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + manifest_dir + .ancestors() + .next() + .expect("Failed to find workspace root") + .to_path_buf() +} + +/// Get citrea path from CITREA env or resolves to PATH using which. +pub fn get_citrea_path() -> PathBuf { + std::env::var("CITREA").map_or_else(|_| which("citrea").unwrap(), PathBuf::from) +} + +pub fn get_stdout_path(dir: &Path) -> PathBuf { + dir.join("stdout.log") +} + +pub fn get_stderr_path(dir: &Path) -> PathBuf { + dir.join("stderr.log") +} + +/// Get genesis path from resources +/// TODO: assess need for customable genesis path in e2e tests +pub fn get_default_genesis_path() -> PathBuf { + let workspace_root = get_workspace_root(); + let mut path = workspace_root.to_path_buf(); + path.push("resources"); + path.push("genesis"); + path.push("bitcoin-regtest"); + path +} + +pub fn get_genesis_path(dir: &Path) -> PathBuf { + dir.join("genesis") +} + +pub fn generate_test_id() -> String { + thread_rng() + .sample_iter(&Alphanumeric) + .take(10) + .map(char::from) + .collect() +} + +pub fn copy_directory(src: impl AsRef, dst: impl AsRef) -> io::Result<()> { + let src = src.as_ref(); + let dst = dst.as_ref(); + + if !dst.exists() { + fs::create_dir_all(dst)?; + } + + for entry in fs::read_dir(src)? { + let entry = entry?; + let ty = entry.file_type()?; + let file_name = entry.file_name(); + let src_path = src.join(&file_name); + let dst_path = dst.join(&file_name); + + if ty.is_dir() { + copy_directory(&src_path, &dst_path)?; + } else { + fs::copy(&src_path, &dst_path)?; + } + } + + Ok(()) +} + +pub async fn retry(f: F, timeout: Option) -> Result +where + F: Fn() -> Fut, + Fut: Future>, +{ + let start = Instant::now(); + let timeout = start + timeout.unwrap_or_else(|| Duration::from_secs(5)); + + loop { + match tokio::time::timeout_at(timeout, f()).await { + Ok(Ok(result)) => return Ok(result), + Ok(Err(e)) => { + if Instant::now() >= timeout { + return Err(e); + } + sleep(Duration::from_millis(500)).await; + } + Err(elapsed) => bail!("Timeout expired {elapsed}"), + } + } +} + +pub fn tail_file(path: &Path, lines: usize) -> Result<()> { + let file = File::open(path)?; + let reader = BufReader::new(file); + let mut last_lines = Vec::with_capacity(lines); + + for line in reader.lines() { + let line = line?; + if last_lines.len() >= lines { + last_lines.remove(0); + } + last_lines.push(line); + } + + for line in last_lines { + println!("{}", line); + } + + Ok(()) +}