diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7ea01174be..dda8f68f11 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -69,7 +69,7 @@ jobs: tags: scrolltech/rollup-relayer:${{github.ref_name}} # cache-from: type=gha,scope=${{ github.workflow }} # cache-to: type=gha,scope=${{ github.workflow }} - bridgehistoryapi-cross-msg-fetcher: + bridgehistoryapi-fetcher: runs-on: ubuntu-latest steps: - name: Checkout code @@ -81,16 +81,16 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push bridgehistoryapi-cross-msg-fetcher docker + - name: Build and push bridgehistoryapi-fetcher docker uses: docker/build-push-action@v2 with: context: . - file: ./build/dockerfiles/bridgehistoryapi-cross-msg-fetcher.Dockerfile + file: ./build/dockerfiles/bridgehistoryapi-fetcher.Dockerfile push: true - tags: scrolltech/bridgehistoryapi-cross-msg-fetcher:${{github.ref_name}} + tags: scrolltech/bridgehistoryapi-fetcher:${{github.ref_name}} # cache-from: type=gha,scope=${{ github.workflow }} # cache-to: type=gha,scope=${{ github.workflow }} - bridgehistoryapi-server: + bridgehistoryapi-api: runs-on: ubuntu-latest steps: - name: Checkout code @@ -102,13 +102,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push bridgehistoryapi-server docker + - name: Build and push bridgehistoryapi-api docker uses: docker/build-push-action@v2 with: context: . - file: ./build/dockerfiles/bridgehistoryapi-server.Dockerfile + file: ./build/dockerfiles/bridgehistoryapi-api.Dockerfile push: true - tags: scrolltech/bridgehistoryapi-server:${{github.ref_name}} + tags: scrolltech/bridgehistoryapi-api:${{github.ref_name}} # cache-from: type=gha,scope=${{ github.workflow }} # cache-to: type=gha,scope=${{ github.workflow }} coordinator-api: diff --git a/Makefile b/Makefile index 7fa10c8be4..9ccd856efe 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: fmt dev_docker build_test_docker run_test_docker clean +.PHONY: fmt dev_docker build_test_docker run_test_docker clean update L2GETH_TAG=scroll-v5.1.6 @@ -6,6 +6,15 @@ help: ## Display this help message @grep -h \ -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' +update: + go work sync + cd $(PWD)/bridge-history-api/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy + cd $(PWD)/common/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG}&& go mod tidy + cd $(PWD)/coordinator/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy + cd $(PWD)/database/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy + cd $(PWD)/prover/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG}&& go mod tidy + cd $(PWD)/rollup/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy + cd $(PWD)/tests/integration-test/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy lint: ## The code's format and security checks. make -C rollup lint @@ -17,13 +26,13 @@ lint: ## The code's format and security checks. fmt: ## format the code go work sync - cd $(PWD)/bridge-history-api/ && go get -u github.com/ethereum/go-ethereum@latest && go mod tidy - cd $(PWD)/common/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy - cd $(PWD)/coordinator/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy - cd $(PWD)/database/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy - cd $(PWD)/prover/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy - cd $(PWD)/rollup/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy - cd $(PWD)/tests/integration-test/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy + cd $(PWD)/bridge-history-api/ && go mod tidy + cd $(PWD)/common/ && go mod tidy + cd $(PWD)/coordinator/ && go mod tidy + cd $(PWD)/database/ && go mod tidy + cd $(PWD)/prover/ && go mod tidy + cd $(PWD)/rollup/ && go mod tidy + cd $(PWD)/tests/integration-test/ && go mod tidy goimports -local $(PWD)/bridge-history-api/ -w . goimports -local $(PWD)/common/ -w . diff --git a/bridge-history-api/Makefile b/bridge-history-api/Makefile index 9d77a47c20..361b081f4e 100644 --- a/bridge-history-api/Makefile +++ b/bridge-history-api/Makefile @@ -1,6 +1,7 @@ .PHONY: lint REPO_ROOT_DIR=./.. IMAGE_VERSION=latest +PWD=$(shell pwd) lint: ## Lint the files - used for CI GOBIN=$(PWD)/build/bin go run ../build/lint.go @@ -11,16 +12,31 @@ test: bridgehistoryapi-db-cli: go build -o $(PWD)/build/bin/bridgehistoryapi-db-cli ./cmd/db_cli -bridgehistoryapi-cross-msg-fetcher: - go build -o $(PWD)/build/bin/bridgehistoryapi-cross-msg-fetcher ./cmd/cross_msg_fetcher +bridgehistoryapi-fetcher: + go build -o $(PWD)/build/bin/bridgehistoryapi-fetcher ./cmd/fetcher -bridgehistoryapi-server: - go build -o $(PWD)/build/bin/bridgehistoryapi-server ./cmd/backend_server +bridgehistoryapi-api: + go build -o $(PWD)/build/bin/bridgehistoryapi-api ./cmd/api -db-docker: +reset-env: + if docker ps -a -q -f name=bridgehistoryapi-redis | grep -q . ; then \ + docker stop bridgehistoryapi-redis; \ + docker rm bridgehistoryapi-redis; \ + fi + docker run --name bridgehistoryapi-redis -d -p 6379:6379 redis:latest + if docker ps -a -q -f name=bridgehistoryapi-history-db | grep -q . ; then \ + docker stop bridgehistoryapi-history-db; \ + docker rm bridgehistoryapi-history-db; \ + fi docker run --name bridgehistoryapi-history-db -p 5444:5432 -e POSTGRES_PASSWORD=123456 -e POSTGRES_DB=test -d postgres + until docker exec bridgehistoryapi-history-db pg_isready -h localhost -p 5432 -U postgres > /dev/null; do \ + echo "Waiting for postgres to be ready..."; \ + sleep 1; \ + done + echo "Postgres is ready." + go build -o $(PWD)/build/bin/bridgehistoryapi-db-cli ./cmd/db_cli && $(PWD)/build/bin/bridgehistoryapi-db-cli reset bridgehistoryapi-docker: - DOCKER_BUILDKIT=1 docker build -t scrolltech/bridgehistoryapi-cross-msg-fetcher:${IMAGE_VERSION} ${REPO_ROOT_DIR}/ -f ${REPO_ROOT_DIR}/build/dockerfiles/bridgehistoryapi-cross-msg-fetcher.Dockerfile - DOCKER_BUILDKIT=1 docker build -t scrolltech/bridgehistoryapi-server:${IMAGE_VERSION} ${REPO_ROOT_DIR}/ -f ${REPO_ROOT_DIR}/build/dockerfiles/bridgehistoryapi-server.Dockerfile - DOCKER_BUILDKIT=1 docker build -t scrolltech/bridgehistoryapi-db-cli:${IMAGE_VERSION} ${REPO_ROOT_DIR}/ -f ${REPO_ROOT_DIR}/build/dockerfiles/bridgehistoryapi-db-cli.Dockerfile \ No newline at end of file + DOCKER_BUILDKIT=1 docker build -t scrolltech/bridgehistoryapi-fetcher:${IMAGE_VERSION} ${REPO_ROOT_DIR}/ -f ${REPO_ROOT_DIR}/build/dockerfiles/bridgehistoryapi-fetcher.Dockerfile + DOCKER_BUILDKIT=1 docker build -t scrolltech/bridgehistoryapi-api:${IMAGE_VERSION} ${REPO_ROOT_DIR}/ -f ${REPO_ROOT_DIR}/build/dockerfiles/bridgehistoryapi-api.Dockerfile + DOCKER_BUILDKIT=1 docker build -t scrolltech/bridgehistoryapi-db-cli:${IMAGE_VERSION} ${REPO_ROOT_DIR}/ -f ${REPO_ROOT_DIR}/build/dockerfiles/bridgehistoryapi-db-cli.Dockerfile diff --git a/bridge-history-api/README.md b/bridge-history-api/README.md index 8e90444538..2a9ad28554 100644 --- a/bridge-history-api/README.md +++ b/bridge-history-api/README.md @@ -14,30 +14,27 @@ Provide init, show version, rollback, and check status services of DB ./build/bin/bridgehistoryapi-db-cli [command] ``` -### bridgehistoryapi-cross-msg-fetcher +### bridgehistoryapi-fetcher -Fetch the transactions from both l1 and l2 +Fetch the transactions from both L1 and L2 ``` cd ./bridge-history-api - make bridgehistoryapi-cross-msg-fetcher - ./build/bin/bridgehistoryapi-cross-msg-fetcher + make bridgehistoryapi-fetcher + ./build/bin/bridgehistoryapi-fetcher ``` -### bridgehistoryapi-server +### bridgehistoryapi-api provides REST APIs. Please refer to the API details below. ``` cd ./bridge-history-api - make bridgehistoryapi-server - ./build/bin/bridgehistoryapi-server + make bridgehistoryapi-api + ./build/bin/bridgehistoryapi-api ``` -## APIs provided by bridgehistoryapi-server +## APIs provided by bridgehistoryapi-api -assume `bridgehistoryapi-server` listening on `https://localhost:8080` -can change this port by modifying `config.json` - -1. `/txs` +1. `/api/txs` ``` // @Summary get all txs under the given address // @Accept plain @@ -49,34 +46,36 @@ can change this port by modifying `config.json` // @Router /api/txs [get] ``` -2. `/txsbyhashes` +2. `/api/l2/withdrawals` ``` -// @Summary get txs by given tx hashes +// @Summary get all L2 withdrawals under given address // @Accept plain // @Produce plain -// @Param hashes query string array true "array of hashes list" -// @Success 200 -// @Router /api/txsbyhashes [post] +// @Param address query string true "wallet address" +// @Param page_size query int true "page size" +// @Param page query int true "page" +// @Success 200 +// @Router /api/l2/withdrawals [get] ``` -3. `/claimable` +3. `/api/l2/unclaimed/withdrawals` ``` -// @Summary get all claimable txs under the given address +// @Summary get all L2 unclaimed withdrawals under the given address // @Accept plain // @Produce plain // @Param address query string true "wallet address" // @Param page_size query int true "page size" // @Param page query int true "page" // @Success 200 -// @Router /api/claimable [get] +// @Router /api/l2/unclaimed/withdrawals [get] ``` -4. `/withdraw_root` +4. `/api/txsbyhashes` ``` -// @Summary get withdraw_root of given batch index +// @Summary get txs by given tx hashes // @Accept plain // @Produce plain -// @Param batch_index query string true "batch_index" +// @Param hashes query string array true "array of hashes" // @Success 200 -// @Router /api/withdraw_root [get] +// @Router /api/txsbyhashes [post] ``` diff --git a/bridge-history-api/abi/backend_abi.go b/bridge-history-api/abi/backend_abi.go index 70c650c959..92553630a4 100644 --- a/bridge-history-api/abi/backend_abi.go +++ b/bridge-history-api/abi/backend_abi.go @@ -3,253 +3,158 @@ package backendabi import ( "math/big" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/accounts/abi" + "github.com/scroll-tech/go-ethereum/accounts/abi/bind" + "github.com/scroll-tech/go-ethereum/common" ) var ( - // L1ETHGatewayABI holds information about L1ETHGateway's context and available invokable methods. - L1ETHGatewayABI *abi.ABI - // L1StandardERC20GatewayABI holds information about L1StandardERC20Gateway's context and available invokable methods. - L1StandardERC20GatewayABI *abi.ABI - L1WETHGatewayABI *abi.ABI - L1CustomERC20GatewayABI *abi.ABI - L1ERC721GatewayABI *abi.ABI - L1ERC1155GatewayABI *abi.ABI - L2CustomERC20GatewayABI *abi.ABI - L2ERC721GatewayABI *abi.ABI - // L2ETHGatewayABI holds information about L2ETHGateway contract's context and available invokable methods. - L2ETHGatewayABI *abi.ABI - L2WETHGatewayABI *abi.ABI - // L2StandardERC20GatewayABI holds information about L2StandardERC20Gateway's context and available invokable methods. - L2StandardERC20GatewayABI *abi.ABI - L2ERC1155GatewayABI *abi.ABI + IL1ETHGatewayABI *abi.ABI + IL1ERC20GatewayABI *abi.ABI + IL1ERC721GatewayABI *abi.ABI + IL1ERC1155GatewayABI *abi.ABI + + IL2ETHGatewayABI *abi.ABI + IL2ERC20GatewayABI *abi.ABI + IL2ERC721GatewayABI *abi.ABI + IL2ERC1155GatewayABI *abi.ABI + + IL1ScrollMessengerABI *abi.ABI + IL2ScrollMessengerABI *abi.ABI + + IScrollChainABI *abi.ABI + + IL1MessageQueueABI *abi.ABI L1DepositETHSig common.Hash - L1DepositWETHSig common.Hash L1DepositERC20Sig common.Hash - L1DepositERC1155Sig common.Hash - L2WithdrawETHSig common.Hash - L2WithdrawWETHSig common.Hash - L2WithdrawERC20Sig common.Hash - L1DepositCustomERC20Sig common.Hash L1DepositERC721Sig common.Hash - L2WithdrawCustomERC20Sig common.Hash - L2WithdrawERC721Sig common.Hash - L2WithdrawERC1155Sig common.Hash + L1BatchDepositERC721Sig common.Hash + L1DepositERC1155Sig common.Hash + L1BatchDepositERC1155Sig common.Hash - // batch nft sigs - L1BatchDepositERC721Sig common.Hash - L1BatchDepositERC1155Sig common.Hash + L2WithdrawETHSig common.Hash + L2WithdrawERC20Sig common.Hash + L2WithdrawERC721Sig common.Hash L2BatchWithdrawERC721Sig common.Hash + L2WithdrawERC1155Sig common.Hash L2BatchWithdrawERC1155Sig common.Hash - // scroll monorepo - - // ScrollChainABI holds information about ScrollChain's context and available invokable methods. - ScrollChainABI *abi.ABI - // ScrollChainV2ABI holds information about ScrollChainV2's context and available invokable methods. - ScrollChainV2ABI *abi.ABI - // L1ScrollMessengerABI holds information about L1ScrollMessenger's context and available invokable methods. - L1ScrollMessengerABI *abi.ABI - // L1MessageQueueABI holds information about L1MessageQueue contract's context and available invokable methods. - L1MessageQueueABI *abi.ABI - // L2GasPriceOracleABI holds information about L2GasPriceOracle's context and available invokable methods. - L2GasPriceOracleABI *abi.ABI - - // L2ScrollMessengerABI holds information about L2ScrollMessenger's context and available invokable methods. - L2ScrollMessengerABI *abi.ABI - // L1BlockContainerABI holds information about L1BlockContainer contract's context and available invokable methods. - L1BlockContainerABI *abi.ABI - // L1GasPriceOracleABI holds information about L1GasPriceOracle's context and available invokable methods. - L1GasPriceOracleABI *abi.ABI - // L2MessageQueueABI holds information about L2MessageQueue contract's context and available invokable methods. - L2MessageQueueABI *abi.ABI - - // L1SentMessageEventSignature = keccak256("SentMessage(address,address,uint256,uint256,uint256,bytes)") - L1SentMessageEventSignature common.Hash - // L1RelayedMessageEventSignature = keccak256("RelayedMessage(bytes32)") - L1RelayedMessageEventSignature common.Hash - // L1FailedRelayedMessageEventSignature = keccak256("FailedRelayedMessage(bytes32)") - L1FailedRelayedMessageEventSignature common.Hash - - // L1CommitBatchEventSignature = keccak256("CommitBatch(uint256,bytes32)") - L1CommitBatchEventSignature common.Hash - // L1FinalizeBatchEventSignature = keccak256("FinalizeBatch(uint256,bytes32)") - L1FinalizeBatchEventSignature common.Hash - - // L1QueueTransactionEventSignature = keccak256("QueueTransaction(address,address,uint256,uint256,uint256,bytes)") - L1QueueTransactionEventSignature common.Hash - - // L2SentMessageEventSignature = keccak256("SentMessage(address,address,uint256,uint256,uint256,bytes,uint256,uint256)") - L2SentMessageEventSignature common.Hash - // L2RelayedMessageEventSignature = keccak256("RelayedMessage(bytes32)") - L2RelayedMessageEventSignature common.Hash - // L2FailedRelayedMessageEventSignature = keccak256("FailedRelayedMessage(bytes32)") - L2FailedRelayedMessageEventSignature common.Hash - - // L2AppendMessageEventSignature = keccak256("AppendMessage(uint256,bytes32)") - L2AppendMessageEventSignature common.Hash + L1SentMessageEventSig common.Hash + L1RelayedMessageEventSig common.Hash + L1FailedRelayedMessageEventSig common.Hash + L2SentMessageEventSig common.Hash + L2RelayedMessageEventSig common.Hash + L2FailedRelayedMessageEventSig common.Hash + + L1CommitBatchEventSig common.Hash + L1RevertBatchEventSig common.Hash + L1FinalizeBatchEventSig common.Hash + + L1QueueTransactionEventSig common.Hash + L1DequeueTransactionEventSig common.Hash + L1DropTransactionEventSig common.Hash ) func init() { - L1ETHGatewayABI, _ = L1ETHGatewayMetaData.GetAbi() - L1DepositETHSig = L1ETHGatewayABI.Events["DepositETH"].ID - L1WETHGatewayABI, _ = L1WETHGatewayMetaData.GetAbi() - L1DepositWETHSig = L1WETHGatewayABI.Events["DepositERC20"].ID - L1StandardERC20GatewayABI, _ = L1StandardERC20GatewayMetaData.GetAbi() - L1DepositERC20Sig = L1StandardERC20GatewayABI.Events["DepositERC20"].ID - L1CustomERC20GatewayABI, _ = L1CustomERC20GatewayMetaData.GetAbi() - L1DepositCustomERC20Sig = L1CustomERC20GatewayABI.Events["DepositERC20"].ID - L1ERC721GatewayABI, _ = L1ERC721GatewayMetaData.GetAbi() - L1DepositERC721Sig = L1ERC721GatewayABI.Events["DepositERC721"].ID - L1ERC1155GatewayABI, _ = L1ERC1155GatewayMetaData.GetAbi() - L1DepositERC1155Sig = L1ERC1155GatewayABI.Events["DepositERC1155"].ID - L2ETHGatewayABI, _ = L2ETHGatewayMetaData.GetAbi() - L2WithdrawETHSig = L2ETHGatewayABI.Events["WithdrawETH"].ID - L2WETHGatewayABI, _ = L2WETHGatewayMetaData.GetAbi() - L2WithdrawWETHSig = L2WETHGatewayABI.Events["WithdrawERC20"].ID - L2StandardERC20GatewayABI, _ = L2StandardERC20GatewayMetaData.GetAbi() - L2WithdrawERC20Sig = L2StandardERC20GatewayABI.Events["WithdrawERC20"].ID - L2CustomERC20GatewayABI, _ = L2CustomERC20GatewayMetaData.GetAbi() - L2WithdrawCustomERC20Sig = L2CustomERC20GatewayABI.Events["WithdrawERC20"].ID - L2ERC721GatewayABI, _ = L2ERC721GatewayMetaData.GetAbi() - L2WithdrawERC721Sig = L2ERC721GatewayABI.Events["WithdrawERC721"].ID - L2ERC1155GatewayABI, _ = L2ERC1155GatewayMetaData.GetAbi() - L2WithdrawERC1155Sig = L2ERC1155GatewayABI.Events["WithdrawERC1155"].ID - - // batch nft events - L1BatchDepositERC721Sig = L1ERC721GatewayABI.Events["BatchDepositERC721"].ID - L1BatchDepositERC1155Sig = L1ERC1155GatewayABI.Events["BatchDepositERC1155"].ID - L2BatchWithdrawERC721Sig = L2ERC721GatewayABI.Events["BatchWithdrawERC721"].ID - L2BatchWithdrawERC1155Sig = L2ERC1155GatewayABI.Events["BatchWithdrawERC1155"].ID - - // scroll monorepo - ScrollChainABI, _ = ScrollChainMetaData.GetAbi() - ScrollChainV2ABI, _ = ScrollChainV2MetaData.GetAbi() - L1ScrollMessengerABI, _ = L1ScrollMessengerMetaData.GetAbi() - L1MessageQueueABI, _ = L1MessageQueueMetaData.GetAbi() - L2GasPriceOracleABI, _ = L2GasPriceOracleMetaData.GetAbi() - - L2ScrollMessengerABI, _ = L2ScrollMessengerMetaData.GetAbi() - L1BlockContainerABI, _ = L1BlockContainerMetaData.GetAbi() - L2MessageQueueABI, _ = L2MessageQueueMetaData.GetAbi() - L1GasPriceOracleABI, _ = L1GasPriceOracleMetaData.GetAbi() - - L1SentMessageEventSignature = L1ScrollMessengerABI.Events["SentMessage"].ID - L1RelayedMessageEventSignature = L1ScrollMessengerABI.Events["RelayedMessage"].ID - L1FailedRelayedMessageEventSignature = L1ScrollMessengerABI.Events["FailedRelayedMessage"].ID - - L1CommitBatchEventSignature = ScrollChainABI.Events["CommitBatch"].ID - L1FinalizeBatchEventSignature = ScrollChainABI.Events["FinalizeBatch"].ID - - L1QueueTransactionEventSignature = L1MessageQueueABI.Events["QueueTransaction"].ID - - L2SentMessageEventSignature = L2ScrollMessengerABI.Events["SentMessage"].ID - L2RelayedMessageEventSignature = L2ScrollMessengerABI.Events["RelayedMessage"].ID - L2FailedRelayedMessageEventSignature = L2ScrollMessengerABI.Events["FailedRelayedMessage"].ID - - L2AppendMessageEventSignature = L2MessageQueueABI.Events["AppendMessage"].ID + IL1ETHGatewayABI, _ = IL1ETHGatewayMetaData.GetAbi() + IL1ERC20GatewayABI, _ = IL1ERC20GatewayMetaData.GetAbi() + IL1ERC721GatewayABI, _ = IL1ERC721GatewayMetaData.GetAbi() + IL1ERC1155GatewayABI, _ = IL1ERC1155GatewayMetaData.GetAbi() -} + L1DepositETHSig = IL1ETHGatewayABI.Events["DepositETH"].ID + L1DepositERC20Sig = IL1ERC20GatewayABI.Events["DepositERC20"].ID + L1DepositERC721Sig = IL1ERC721GatewayABI.Events["DepositERC721"].ID + L1BatchDepositERC721Sig = IL1ERC721GatewayABI.Events["BatchDepositERC721"].ID + L1DepositERC1155Sig = IL1ERC1155GatewayABI.Events["DepositERC1155"].ID + L1BatchDepositERC1155Sig = IL1ERC1155GatewayABI.Events["BatchDepositERC1155"].ID -var L1ETHGatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"DepositETH\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeWithdrawETH\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositETHAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", -} + IL2ETHGatewayABI, _ = IL2ETHGatewayMetaData.GetAbi() + IL2ERC20GatewayABI, _ = IL2ERC20GatewayMetaData.GetAbi() + IL2ERC721GatewayABI, _ = IL2ERC721GatewayMetaData.GetAbi() + IL2ERC1155GatewayABI, _ = IL2ERC1155GatewayMetaData.GetAbi() -var L1WETHGatewayMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_WETH\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2WETH\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"DepositERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeWithdrawERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20AndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getL2ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", -} + L2WithdrawETHSig = IL2ETHGatewayABI.Events["WithdrawETH"].ID + L2WithdrawERC20Sig = IL2ERC20GatewayABI.Events["WithdrawERC20"].ID + L2WithdrawERC721Sig = IL2ERC721GatewayABI.Events["WithdrawERC721"].ID + L2BatchWithdrawERC721Sig = IL2ERC721GatewayABI.Events["BatchWithdrawERC721"].ID + L2WithdrawERC1155Sig = IL2ERC1155GatewayABI.Events["WithdrawERC1155"].ID + L2BatchWithdrawERC1155Sig = IL2ERC1155GatewayABI.Events["BatchWithdrawERC1155"].ID -var L1StandardERC20GatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"DepositERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeWithdrawERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20AndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"getL2ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2TokenImplementation\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2TokenFactory\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2TokenFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2TokenImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", -} + IL1ScrollMessengerABI, _ = IL1ScrollMessengerMetaData.GetAbi() -var L2ETHGatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeDepositETH\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"WithdrawETH\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeDepositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawETHAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", -} + L1SentMessageEventSig = IL1ScrollMessengerABI.Events["SentMessage"].ID + L1RelayedMessageEventSig = IL1ScrollMessengerABI.Events["RelayedMessage"].ID + L1FailedRelayedMessageEventSig = IL1ScrollMessengerABI.Events["FailedRelayedMessage"].ID -var L2WETHGatewayMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_WETH\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l1WETH\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeDepositERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"WithdrawERC20\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeDepositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getL1ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getL2ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20AndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", -} + IL2ScrollMessengerABI, _ = IL2ScrollMessengerMetaData.GetAbi() -var L2StandardERC20GatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeDepositERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"WithdrawERC20\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeDepositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"}],\"name\":\"getL1ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"getL2ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenFactory\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20AndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", -} + L2SentMessageEventSig = IL2ScrollMessengerABI.Events["SentMessage"].ID + L2RelayedMessageEventSig = IL2ScrollMessengerABI.Events["RelayedMessage"].ID + L2FailedRelayedMessageEventSig = IL2ScrollMessengerABI.Events["FailedRelayedMessage"].ID -var L1CustomERC20GatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"DepositERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeWithdrawERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"}],\"name\":\"UpdateTokenMapping\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20AndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"getL2ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMapping\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"}],\"name\":\"updateTokenMapping\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", -} + IScrollChainABI, _ = IScrollChainMetaData.GetAbi() -var L1ERC721GatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"DepositERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeWithdrawERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"}],\"name\":\"UpdateTokenMapping\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20AndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"getL2ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMapping\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"}],\"name\":\"updateTokenMapping\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", -} + L1CommitBatchEventSig = IScrollChainABI.Events["CommitBatch"].ID + L1RevertBatchEventSig = IScrollChainABI.Events["RevertBatch"].ID + L1FinalizeBatchEventSig = IScrollChainABI.Events["FinalizeBatch"].ID -var L1ERC1155GatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"BatchDepositERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"DepositERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"FinalizeBatchWithdrawERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"FinalizeWithdrawERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"}],\"name\":\"UpdateTokenMapping\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchDepositERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchDepositERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"finalizeBatchWithdrawERC1155\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"finalizeWithdrawERC1155\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMapping\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"}],\"name\":\"updateTokenMapping\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + IL1MessageQueueABI, _ = IL1MessageQueueMetaData.GetAbi() + + L1QueueTransactionEventSig = IL1MessageQueueABI.Events["QueueTransaction"].ID + L1DequeueTransactionEventSig = IL1MessageQueueABI.Events["DequeueTransaction"].ID + L1DropTransactionEventSig = IL1MessageQueueABI.Events["DropTransaction"].ID } -var L2CustomERC20GatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeDepositERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"UpdateTokenMapping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"WithdrawERC20\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeDepositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"}],\"name\":\"getL1ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getL2ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_router\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMapping\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"updateTokenMapping\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20AndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", +var IL1ETHGatewayMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"DepositETH\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeWithdrawETH\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RefundETH\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositETHAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", } -var L2ERC721GatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"BatchWithdrawERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"FinalizeBatchDepositERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"FinalizeDepositERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"UpdateTokenMapping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"WithdrawERC721\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchWithdrawERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchWithdrawERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"finalizeBatchDepositERC721\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"finalizeDepositERC721\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMapping\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"updateTokenMapping\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", +var IL1ERC20GatewayMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"DepositERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeWithdrawERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RefundERC20\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC20AndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeWithdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"getL2ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } -var L2ERC1155GatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"BatchWithdrawERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"FinalizeBatchDepositERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FinalizeDepositERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"UpdateTokenMapping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawERC1155\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchWithdrawERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchWithdrawERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"finalizeBatchDepositERC1155\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"finalizeDepositERC1155\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMapping\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"updateTokenMapping\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", +var IL1ERC721GatewayMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"BatchDepositERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"BatchRefundERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"DepositERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"FinalizeBatchWithdrawERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"FinalizeWithdrawERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"RefundERC721\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchDepositERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchDepositERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"finalizeBatchWithdrawERC721\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"finalizeWithdrawERC721\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } -// scroll monorepo -// ScrollChainMetaData contains all meta data concerning the ScrollChain contract. -var ScrollChainMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_chainId\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"CommitBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"withdrawRoot\",\"type\":\"bytes32\"}],\"name\":\"FinalizeBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"RevertBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxNumL2TxInChunk\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxNumL2TxInChunk\",\"type\":\"uint256\"}],\"name\":\"UpdateMaxNumL2TxInChunk\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"UpdateProver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"UpdateSequencer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldVerifier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifier\",\"type\":\"address\"}],\"name\":\"UpdateVerifier\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_version\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_parentBatchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"_chunks\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"_skippedL1MessageBitmap\",\"type\":\"bytes\"}],\"name\":\"commitBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"committedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_prevStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_postStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_withdrawRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_aggrProof\",\"type\":\"bytes\"}],\"name\":\"finalizeBatchWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"finalizedStateRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"importGenesisBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_messageQueue\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxNumL2TxInChunk\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_batchIndex\",\"type\":\"uint256\"}],\"name\":\"isBatchFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isProver\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isSequencer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFinalizedBatchIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"layer2ChainId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxNumL2TxInChunk\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageQueue\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"revertBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxNumL2TxInChunk\",\"type\":\"uint256\"}],\"name\":\"updateMaxNumL2TxInChunk\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_status\",\"type\":\"bool\"}],\"name\":\"updateProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_status\",\"type\":\"bool\"}],\"name\":\"updateSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +var IL1ERC1155GatewayMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"BatchDepositERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"BatchRefundERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"DepositERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"FinalizeBatchWithdrawERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"FinalizeWithdrawERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RefundERC1155\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchDepositERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchDepositERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"depositERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"finalizeBatchWithdrawERC1155\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"finalizeWithdrawERC1155\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } -// ScrollChainV2MetaData contains all meta data concerning the ScrollChain contract. -var ScrollChainV2MetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_chainId\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"CommitBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"withdrawRoot\",\"type\":\"bytes32\"}],\"name\":\"FinalizeBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"RevertBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxNumL2TxInChunk\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxNumL2TxInChunk\",\"type\":\"uint256\"}],\"name\":\"UpdateMaxNumL2TxInChunk\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"UpdateProver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"UpdateSequencer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldVerifier\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newVerifier\",\"type\":\"address\"}],\"name\":\"UpdateVerifier\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_version\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"_parentBatchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"_chunks\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"_skippedL1MessageBitmap\",\"type\":\"bytes\"}],\"name\":\"commitBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"committedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_prevStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_postStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_withdrawRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_aggrProof\",\"type\":\"bytes\"}],\"name\":\"finalizeBatchWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"finalizedStateRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"importGenesisBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_messageQueue\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxNumL2TxInChunk\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_batchIndex\",\"type\":\"uint256\"}],\"name\":\"isBatchFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isProver\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isSequencer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFinalizedBatchIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"layer2ChainId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxNumL2TxInChunk\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageQueue\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"revertBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxNumL2TxInChunk\",\"type\":\"uint256\"}],\"name\":\"updateMaxNumL2TxInChunk\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_status\",\"type\":\"bool\"}],\"name\":\"updateProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_status\",\"type\":\"bool\"}],\"name\":\"updateSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +var IL2ETHGatewayMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeDepositETH\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"WithdrawETH\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"finalizeDepositETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawETH\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawETHAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", } -// L1ScrollMessengerMetaData contains all meta data concerning the L1ScrollMessenger contract. -var L1ScrollMessengerMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"FailedRelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"RelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"SentMessage\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"}],\"internalType\":\"structIL1ScrollMessenger.L2MessageProof\",\"name\":\"proof\",\"type\":\"tuple\"}],\"name\":\"relayMessageWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"queueIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"oldGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"newGasLimit\",\"type\":\"uint32\"}],\"name\":\"replayMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xDomainMessageSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +var IL2ERC20GatewayMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"FinalizeDepositERC20\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"WithdrawERC20\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"finalizeDepositERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"}],\"name\":\"getL1ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"}],\"name\":\"getL2ERC20Address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC20AndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", } -// L1MessageQueueMetaData contains all meta data concerning the L1MessageQueue contract. -var L1MessageQueueMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"queueIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"appendCrossDomainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"appendEnforcedTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"estimateCrossDomainMessageFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queueIndex\",\"type\":\"uint256\"}],\"name\":\"getCrossDomainMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextCrossDomainMessageIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +var IL2ERC721GatewayMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"BatchWithdrawERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"FinalizeBatchDepositERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"FinalizeDepositERC721\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"UpdateTokenMapping\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"WithdrawERC721\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchWithdrawERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchWithdrawERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counterpart\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"finalizeBatchDepositERC721\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"finalizeDepositERC721\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counterpart\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"router\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMapping\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_l1Token\",\"type\":\"address\"}],\"name\":\"updateTokenMapping\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC721\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", } -// L2GasPriceOracleMetaData contains all meta data concerning the L2GasPriceOracle contract. -var L2GasPriceOracleMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l2BaseFee\",\"type\":\"uint256\"}],\"name\":\"L2BaseFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"overhead\",\"type\":\"uint256\"}],\"name\":\"OverheadUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"scalar\",\"type\":\"uint256\"}],\"name\":\"ScalarUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"}],\"name\":\"estimateCrossDomainMessageFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"getL1GasUsed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1BaseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2BaseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"overhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"scalar\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l2BaseFee\",\"type\":\"uint256\"}],\"name\":\"setL2BaseFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_overhead\",\"type\":\"uint256\"}],\"name\":\"setOverhead\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_scalar\",\"type\":\"uint256\"}],\"name\":\"setScalar\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +var IL2ERC1155GatewayMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"BatchWithdrawERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"FinalizeBatchDepositERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FinalizeDepositERC1155\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawERC1155\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchWithdrawERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"batchWithdrawERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"finalizeBatchDepositERC1155\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"l1Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"l2Token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"finalizeDepositERC1155\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"withdrawERC1155\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", } -// L2ScrollMessengerMetaData contains all meta data concerning the L2ScrollMessenger contract. -var L2ScrollMessengerMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"FailedRelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"RelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"SentMessage\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"relayMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"stateRootProof\",\"type\":\"bytes\"}],\"internalType\":\"structIL2ScrollMessenger.L1MessageProof\",\"name\":\"proof\",\"type\":\"tuple\"}],\"name\":\"retryMessageWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xDomainMessageSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +var IL1ScrollMessengerMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"FailedRelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"RelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"SentMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxReplayTimes\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxReplayTimes\",\"type\":\"uint256\"}],\"name\":\"UpdateMaxReplayTimes\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"dropMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"merkleProof\",\"type\":\"bytes\"}],\"internalType\":\"structIL1ScrollMessenger.L2MessageProof\",\"name\":\"proof\",\"type\":\"tuple\"}],\"name\":\"relayMessageWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint32\",\"name\":\"newGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"refundAddress\",\"type\":\"address\"}],\"name\":\"replayMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundAddress\",\"type\":\"address\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xDomainMessageSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } -// L1BlockContainerMetaData contains all meta data concerning the L1BlockContainer contract. -var L1BlockContainerMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockTimestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"name\":\"ImportBlock\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"name\":\"getBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"name\":\"getStateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blockHeaderRLP\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"updateGasPriceOracle\",\"type\":\"bool\"}],\"name\":\"importBlockHeader\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestBaseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", +var IL2ScrollMessengerMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"FailedRelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"RelayedMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"messageNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"SentMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxFailedExecutionTimes\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxFailedExecutionTimes\",\"type\":\"uint256\"}],\"name\":\"UpdateMaxFailedExecutionTimes\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"}],\"name\":\"relayMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundAddress\",\"type\":\"address\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xDomainMessageSender\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } -// L2MessageQueueMetaData contains all meta data concerning the L2MessageQueue contract. -var L2MessageQueueMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"}],\"name\":\"AppendMessage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_messageHash\",\"type\":\"bytes32\"}],\"name\":\"appendMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"branches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextMessageIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_messenger\",\"type\":\"address\"}],\"name\":\"updateMessenger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +var IScrollChainMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"CommitBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"withdrawRoot\",\"type\":\"bytes32\"}],\"name\":\"FinalizeBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"RevertBatch\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"parentBatchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"chunks\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"skippedL1MessageBitmap\",\"type\":\"bytes\"}],\"name\":\"commitBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"committedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"prevStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"postStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"withdrawRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"aggrProof\",\"type\":\"bytes\"}],\"name\":\"finalizeBatchWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"finalizedStateRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"isBatchFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFinalizedBatchIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"revertBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"withdrawRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } -// L1GasPriceOracleMetaData contains all meta data concerning the L1GasPriceOracle contract. -var L1GasPriceOracleMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"l1BaseFee\",\"type\":\"uint256\"}],\"name\":\"L1BaseFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"overhead\",\"type\":\"uint256\"}],\"name\":\"OverheadUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"scalar\",\"type\":\"uint256\"}],\"name\":\"ScalarUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"getL1Fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"getL1GasUsed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1BaseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"overhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"scalar\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_l1BaseFee\",\"type\":\"uint256\"}],\"name\":\"setL1BaseFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_overhead\",\"type\":\"uint256\"}],\"name\":\"setOverhead\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_scalar\",\"type\":\"uint256\"}],\"name\":\"setScalar\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +var IL1MessageQueueMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"skippedBitmap\",\"type\":\"uint256\"}],\"name\":\"DequeueTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"DropTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"queueIndex\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"appendCrossDomainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"appendEnforcedTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"calculateIntrinsicGasFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"queueIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"computeTransactionHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"dropCrossDomainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"estimateCrossDomainMessageFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queueIndex\",\"type\":\"uint256\"}],\"name\":\"getCrossDomainMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queueIndex\",\"type\":\"uint256\"}],\"name\":\"isMessageDropped\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"queueIndex\",\"type\":\"uint256\"}],\"name\":\"isMessageSkipped\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextCrossDomainMessageIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingQueueIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"skippedBitmap\",\"type\":\"uint256\"}],\"name\":\"popCrossDomainMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } -// DepositETH represents a DepositETH event -type DepositETH struct { +type ETHMessageEvent struct { From common.Address To common.Address Amount *big.Int @@ -270,8 +175,6 @@ type ERC721MessageEvent struct { L2Token common.Address From common.Address To common.Address - Amount *big.Int - Data []byte TokenID *big.Int } @@ -301,9 +204,6 @@ type BatchERC1155MessageEvent struct { TokenAmounts []*big.Int } -// scroll monorepo - -// L1SentMessageEvent represents a SentMessage event raised by the L1ScrollMessenger contract. type L1SentMessageEvent struct { Sender common.Address Target common.Address @@ -313,32 +213,14 @@ type L1SentMessageEvent struct { Message []byte } -// L1FailedRelayedMessageEvent represents a FailedRelayedMessage event raised by the L1ScrollMessenger contract. -type L1FailedRelayedMessageEvent struct { - MessageHash common.Hash -} - -// L1RelayedMessageEvent represents a RelayedMessage event raised by the L1ScrollMessenger contract. type L1RelayedMessageEvent struct { MessageHash common.Hash } -// L2AppendMessageEvent represents an AppendMessage event raised by the L2MessageQueue contract. -type L2AppendMessageEvent struct { - Index *big.Int +type L1FailedRelayedMessageEvent struct { MessageHash common.Hash } -// L2ImportBlockEvent represents a ImportBlock event raised by the L1BlockContainer contract. -type L2ImportBlockEvent struct { - BlockHash common.Hash - BlockHeight *big.Int - BlockTimestamp *big.Int - BaseFee *big.Int - StateRoot common.Hash -} - -// L2SentMessageEvent represents a SentMessage event raised by the L2ScrollMessenger contract. type L2SentMessageEvent struct { Sender common.Address Target common.Address @@ -348,41 +230,42 @@ type L2SentMessageEvent struct { Message []byte } -// L2FailedRelayedMessageEvent represents a FailedRelayedMessage event raised by the L2ScrollMessenger contract. -type L2FailedRelayedMessageEvent struct { - MessageHash common.Hash -} - -// L2RelayedMessageEvent represents a RelayedMessage event raised by the L2ScrollMessenger contract. type L2RelayedMessageEvent struct { MessageHash common.Hash } -// IScrollChainBatch is an auto generated low-level Go binding around an user-defined struct. -type IScrollChainBatch struct { - Blocks []IScrollChainBlockContext - PrevStateRoot common.Hash - NewStateRoot common.Hash - WithdrawTrieRoot common.Hash - BatchIndex uint64 - ParentBatchHash common.Hash - L2Transactions []byte +type L1CommitBatchEvent struct { + BatchIndex *big.Int + BatchHash common.Hash } -// L1CommitBatchEvent represents a CommitBatch event raised by the ScrollChain contract. -type L1CommitBatchEvent struct { +type L1RevertBatchEvent struct { BatchIndex *big.Int BatchHash common.Hash } -// IScrollChainBlockContext is an auto generated low-level Go binding around a user-defined struct. -type IScrollChainBlockContext struct { - BlockHash common.Hash - ParentHash common.Hash - BlockNumber uint64 - Timestamp uint64 - BaseFee *big.Int - GasLimit uint64 - NumTransactions uint16 - NumL1Messages uint16 +type L1FinalizeBatchEvent struct { + BatchIndex *big.Int + BatchHash common.Hash + StateRoot common.Hash + WithdrawRoot common.Hash +} + +type L1QueueTransactionEvent struct { + Sender common.Address + Target common.Address + Value *big.Int + QueueIndex uint64 + GasLimit *big.Int + Data []byte +} + +type L1DequeueTransactionEvent struct { + StartIndex *big.Int + Count *big.Int + SkippedBitmap *big.Int +} + +type L1DropTransactionEvent struct { + Index *big.Int } diff --git a/bridge-history-api/cmd/backend_server/app/app.go b/bridge-history-api/cmd/api/app/app.go similarity index 62% rename from bridge-history-api/cmd/backend_server/app/app.go rename to bridge-history-api/cmd/api/app/app.go index 790a7c3c30..16a406c709 100644 --- a/bridge-history-api/cmd/backend_server/app/app.go +++ b/bridge-history-api/cmd/api/app/app.go @@ -5,28 +5,29 @@ import ( "os" "os/signal" - "github.com/ethereum/go-ethereum/log" "github.com/gin-gonic/gin" + "github.com/go-redis/redis/v8" "github.com/prometheus/client_golang/prometheus" + "github.com/scroll-tech/go-ethereum/log" "github.com/urfave/cli/v2" - "bridge-history-api/config" - "bridge-history-api/internal/controller" - "bridge-history-api/internal/route" - "bridge-history-api/observability" - "bridge-history-api/utils" -) + "scroll-tech/common/database" + "scroll-tech/common/observability" + "scroll-tech/common/utils" -var ( - app *cli.App + "scroll-tech/bridge-history-api/internal/config" + "scroll-tech/bridge-history-api/internal/controller/api" + "scroll-tech/bridge-history-api/internal/route" ) +var app *cli.App + func init() { app = cli.NewApp() app.Action = action - app.Name = "Scroll Bridge History Web Service" - app.Usage = "The Scroll Bridge History Web Service" + app.Name = "Scroll Bridge History API Web Service" + app.Usage = "The Scroll Bridge History API Web Service" app.Flags = append(app.Flags, utils.CommonFlags...) app.Commands = []*cli.Command{} @@ -42,26 +43,29 @@ func action(ctx *cli.Context) error { if err != nil { log.Crit("failed to load config file", "config file", cfgFile, "error", err) } - db, err := utils.InitDB(cfg.DB) + db, err := database.InitDB(cfg.DB) if err != nil { log.Crit("failed to init db", "err", err) } defer func() { - if deferErr := utils.CloseDB(db); deferErr != nil { + if deferErr := database.CloseDB(db); deferErr != nil { log.Error("failed to close db", "err", err) } }() - // init Prover Stats API - port := cfg.Server.HostPort + redisClient := redis.NewClient(&redis.Options{ + Addr: cfg.Redis.Address, + Password: cfg.Redis.Password, + DB: cfg.Redis.DB, + }) + api.InitController(db, redisClient) router := gin.Default() - controller.InitController(db) - registry := prometheus.DefaultRegisterer route.Route(router, cfg, registry) go func() { - if runServerErr := router.Run(fmt.Sprintf(":%s", port)); runServerErr != nil { + port := ctx.Int(utils.ServicePortFlag.Name) + if runServerErr := router.Run(fmt.Sprintf(":%d", port)); runServerErr != nil { log.Crit("run http server failure", "error", runServerErr) } }() diff --git a/bridge-history-api/cmd/api/main.go b/bridge-history-api/cmd/api/main.go new file mode 100644 index 0000000000..b0eb3a49aa --- /dev/null +++ b/bridge-history-api/cmd/api/main.go @@ -0,0 +1,7 @@ +package main + +import "scroll-tech/bridge-history-api/cmd/api/app" + +func main() { + app.Run() +} diff --git a/bridge-history-api/cmd/backend_server/main.go b/bridge-history-api/cmd/backend_server/main.go deleted file mode 100644 index 7920c63f7d..0000000000 --- a/bridge-history-api/cmd/backend_server/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "bridge-history-api/cmd/backend_server/app" - -func main() { - app.Run() -} diff --git a/bridge-history-api/cmd/cross_msg_fetcher/app/app.go b/bridge-history-api/cmd/cross_msg_fetcher/app/app.go deleted file mode 100644 index d4dfde2519..0000000000 --- a/bridge-history-api/cmd/cross_msg_fetcher/app/app.go +++ /dev/null @@ -1,168 +0,0 @@ -package app - -import ( - "context" - "fmt" - "os" - "os/signal" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" - "github.com/urfave/cli/v2" - - "bridge-history-api/config" - "bridge-history-api/crossmsg" - "bridge-history-api/crossmsg/messageproof" - "bridge-history-api/orm" - "bridge-history-api/utils" -) - -var ( - app *cli.App -) - -func init() { - app = cli.NewApp() - - app.Action = action - app.Name = "Scroll Bridge History API" - app.Usage = "The Scroll Bridge Web Backend" - app.Flags = append(app.Flags, utils.CommonFlags...) - app.Commands = []*cli.Command{} - - app.Before = func(ctx *cli.Context) error { - return utils.LogSetup(ctx) - } -} - -func action(ctx *cli.Context) error { - // Load config file. - cfgFile := ctx.String(utils.ConfigFileFlag.Name) - cfg, err := config.NewConfig(cfgFile) - if err != nil { - log.Crit("failed to load config file", "config file", cfgFile, "error", err) - } - subCtx, cancel := context.WithCancel(ctx.Context) - defer cancel() - - l1client, err := ethclient.Dial(cfg.L1.Endpoint) - if err != nil { - log.Crit("failed to connect l1 geth", "config file", cfgFile, "error", err) - } - l2client, err := ethclient.Dial(cfg.L2.Endpoint) - if err != nil { - log.Crit("failed to connect l2 geth", "config file", cfgFile, "error", err) - } - - db, err := utils.InitDB(cfg.DB) - if err != nil { - log.Crit("failed to init db", "err", err) - } - defer func() { - if deferErr := utils.CloseDB(db); deferErr != nil { - log.Error("failed to close db", "err", err) - } - }() - if err != nil { - log.Crit("failed to connect to db", "config file", cfgFile, "error", err) - } - - l1worker := &crossmsg.FetchEventWorker{F: crossmsg.L1FetchAndSaveEvents, G: crossmsg.GetLatestL1ProcessedHeight, Name: "L1 events fetch Worker"} - - l2worker := &crossmsg.FetchEventWorker{F: crossmsg.L2FetchAndSaveEvents, G: crossmsg.GetLatestL2ProcessedHeight, Name: "L2 events fetch Worker"} - - l1AddressList := []common.Address{ - common.HexToAddress(cfg.L1.CustomERC20GatewayAddr), - common.HexToAddress(cfg.L1.ERC721GatewayAddr), - common.HexToAddress(cfg.L1.ERC1155GatewayAddr), - common.HexToAddress(cfg.L1.MessengerAddr), - common.HexToAddress(cfg.L1.ETHGatewayAddr), - common.HexToAddress(cfg.L1.StandardERC20Gateway), - common.HexToAddress(cfg.L1.WETHGatewayAddr), - } - - if cfg.L1.USDCGatewayAddr != "" { - l1AddressList = append(l1AddressList, common.HexToAddress(cfg.L1.USDCGatewayAddr)) - } - - if cfg.L1.LIDOGatewayAddr != "" { - l1AddressList = append(l1AddressList, common.HexToAddress(cfg.L1.LIDOGatewayAddr)) - } - - if cfg.L2.DAIGatewayAddr != "" { - l1AddressList = append(l1AddressList, common.HexToAddress(cfg.L1.DAIGatewayAddr)) - } - - l2AddressList := []common.Address{ - common.HexToAddress(cfg.L2.CustomERC20GatewayAddr), - common.HexToAddress(cfg.L2.ERC721GatewayAddr), - common.HexToAddress(cfg.L2.ERC1155GatewayAddr), - common.HexToAddress(cfg.L2.MessengerAddr), - common.HexToAddress(cfg.L2.ETHGatewayAddr), - common.HexToAddress(cfg.L2.StandardERC20Gateway), - common.HexToAddress(cfg.L2.WETHGatewayAddr), - } - - if cfg.L2.USDCGatewayAddr != "" { - l2AddressList = append(l2AddressList, common.HexToAddress(cfg.L2.USDCGatewayAddr)) - } - - if cfg.L2.LIDOGatewayAddr != "" { - l2AddressList = append(l2AddressList, common.HexToAddress(cfg.L2.LIDOGatewayAddr)) - } - - if cfg.L2.DAIGatewayAddr != "" { - l2AddressList = append(l2AddressList, common.HexToAddress(cfg.L2.DAIGatewayAddr)) - } - - l1crossMsgFetcher, err := crossmsg.NewMsgFetcher(subCtx, cfg.L1, db, l1client, l1worker, l1AddressList, crossmsg.L1ReorgHandling) - if err != nil { - log.Crit("failed to create l1 cross message fetcher", "error", err) - } - - go l1crossMsgFetcher.Start() - defer l1crossMsgFetcher.Stop() - - l2crossMsgFetcher, err := crossmsg.NewMsgFetcher(subCtx, cfg.L2, db, l2client, l2worker, l2AddressList, crossmsg.L2ReorgHandling) - if err != nil { - log.Crit("failed to create l2 cross message fetcher", "error", err) - } - - go l2crossMsgFetcher.Start() - defer l2crossMsgFetcher.Stop() - - CrossMsgOrm := orm.NewCrossMsg(db) - - // BlockTimestamp fetcher for l1 and l2 - l1BlockTimeFetcher := crossmsg.NewBlockTimestampFetcher(subCtx, cfg.L1.Confirmation, int(cfg.L1.BlockTime), l1client, CrossMsgOrm.UpdateL1BlockTimestamp, CrossMsgOrm.GetL1EarliestNoBlockTimestampHeight) - go l1BlockTimeFetcher.Start() - defer l1BlockTimeFetcher.Stop() - - l2BlockTimeFetcher := crossmsg.NewBlockTimestampFetcher(subCtx, cfg.L2.Confirmation, int(cfg.L2.BlockTime), l2client, CrossMsgOrm.UpdateL2BlockTimestamp, CrossMsgOrm.GetL2EarliestNoBlockTimestampHeight) - go l2BlockTimeFetcher.Start() - defer l2BlockTimeFetcher.Stop() - - // Proof updater and batch fetcher - l2msgProofUpdater := messageproof.NewMsgProofUpdater(subCtx, cfg.L1.Confirmation, cfg.BatchInfoFetcher.BatchIndexStartBlock, db) - batchFetcher := crossmsg.NewBatchInfoFetcher(subCtx, common.HexToAddress(cfg.BatchInfoFetcher.ScrollChainAddr), cfg.BatchInfoFetcher.BatchIndexStartBlock, cfg.L1.Confirmation, int(cfg.L1.BlockTime), l1client, db, l2msgProofUpdater) - go batchFetcher.Start() - defer batchFetcher.Stop() - - // Catch CTRL-C to ensure a graceful shutdown. - interrupt := make(chan os.Signal, 1) - signal.Notify(interrupt, os.Interrupt) - - // Wait until the interrupt signal is received from an OS signal. - <-interrupt - - return nil -} - -// Run event watcher cmd instance. -func Run() { - if err := app.Run(os.Args); err != nil { - _, _ = fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} diff --git a/bridge-history-api/cmd/cross_msg_fetcher/main.go b/bridge-history-api/cmd/cross_msg_fetcher/main.go deleted file mode 100644 index 667a65b365..0000000000 --- a/bridge-history-api/cmd/cross_msg_fetcher/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "bridge-history-api/cmd/cross_msg_fetcher/app" - -func main() { - app.Run() -} diff --git a/bridge-history-api/cmd/db_cli/app/app.go b/bridge-history-api/cmd/db_cli/app/app.go index a8fa472f98..4722b58024 100644 --- a/bridge-history-api/cmd/db_cli/app/app.go +++ b/bridge-history-api/cmd/db_cli/app/app.go @@ -6,17 +6,13 @@ import ( "github.com/urfave/cli/v2" - "bridge-history-api/utils" + "scroll-tech/common/utils" ) -var ( - // Set up database app info. - app *cli.App -) +var app *cli.App func init() { app = cli.NewApp() - // Set up database app info. app.Name = "db_cli" app.Usage = "The Scroll Bridge-history-api DB CLI" app.Flags = append(app.Flags, utils.CommonFlags...) @@ -60,7 +56,8 @@ func init() { Name: "version", Usage: "Rollback to the specified version.", Value: 0, - }}, + }, + }, }, } } diff --git a/bridge-history-api/cmd/db_cli/app/client.go b/bridge-history-api/cmd/db_cli/app/client.go index 4504ed97f2..58e029a441 100644 --- a/bridge-history-api/cmd/db_cli/app/client.go +++ b/bridge-history-api/cmd/db_cli/app/client.go @@ -1,13 +1,15 @@ package app import ( - "github.com/ethereum/go-ethereum/log" + "github.com/scroll-tech/go-ethereum/log" "github.com/urfave/cli/v2" "gorm.io/gorm" - "bridge-history-api/config" - "bridge-history-api/orm/migrate" - "bridge-history-api/utils" + "scroll-tech/common/database" + "scroll-tech/common/utils" + + "scroll-tech/bridge-history-api/internal/config" + "scroll-tech/bridge-history-api/internal/orm/migrate" ) func getConfig(ctx *cli.Context) (*config.Config, error) { @@ -19,8 +21,8 @@ func getConfig(ctx *cli.Context) (*config.Config, error) { return dbCfg, nil } -func initDB(dbCfg *config.DBConfig) (*gorm.DB, error) { - return utils.InitDB(dbCfg) +func initDB(dbCfg *database.Config) (*gorm.DB, error) { + return database.InitDB(dbCfg) } // resetDB clean or reset database. diff --git a/bridge-history-api/cmd/db_cli/main.go b/bridge-history-api/cmd/db_cli/main.go index 53946494ac..93aaa442a8 100644 --- a/bridge-history-api/cmd/db_cli/main.go +++ b/bridge-history-api/cmd/db_cli/main.go @@ -1,6 +1,6 @@ package main -import "bridge-history-api/cmd/db_cli/app" +import "scroll-tech/bridge-history-api/cmd/db_cli/app" func main() { app.Run() diff --git a/bridge-history-api/cmd/fetcher/app/app.go b/bridge-history-api/cmd/fetcher/app/app.go new file mode 100644 index 0000000000..fad766ada4 --- /dev/null +++ b/bridge-history-api/cmd/fetcher/app/app.go @@ -0,0 +1,93 @@ +package app + +import ( + "context" + "fmt" + "os" + "os/signal" + + "github.com/scroll-tech/go-ethereum/ethclient" + "github.com/scroll-tech/go-ethereum/log" + "github.com/urfave/cli/v2" + + "scroll-tech/common/database" + "scroll-tech/common/observability" + "scroll-tech/common/utils" + + "scroll-tech/bridge-history-api/internal/config" + "scroll-tech/bridge-history-api/internal/controller/fetcher" +) + +var app *cli.App + +func init() { + app = cli.NewApp() + + app.Action = action + app.Name = "Scroll Bridge History API Message Fetcher" + app.Usage = "The Scroll Bridge History API Message Fetcher" + app.Flags = append(app.Flags, utils.CommonFlags...) + app.Commands = []*cli.Command{} + + app.Before = func(ctx *cli.Context) error { + return utils.LogSetup(ctx) + } +} + +func action(ctx *cli.Context) error { + cfgFile := ctx.String(utils.ConfigFileFlag.Name) + cfg, err := config.NewConfig(cfgFile) + if err != nil { + log.Crit("failed to load config file", "config file", cfgFile, "error", err) + } + subCtx, cancel := context.WithCancel(ctx.Context) + defer cancel() + + l1Client, err := ethclient.Dial(cfg.L1.Endpoint) + if err != nil { + log.Crit("failed to connect to L1 geth", "endpoint", cfg.L1.Endpoint, "err", err) + } + + l2Client, err := ethclient.Dial(cfg.L2.Endpoint) + if err != nil { + log.Crit("failed to connect to L2 geth", "endpoint", cfg.L2.Endpoint, "err", err) + } + + db, err := database.InitDB(cfg.DB) + if err != nil { + log.Crit("failed to init db", "err", err) + } + defer func() { + if deferErr := database.CloseDB(db); deferErr != nil { + log.Error("failed to close db", "err", err) + } + }() + if err != nil { + log.Crit("failed to connect to db", "config file", cfgFile, "error", err) + } + + observability.Server(ctx, db) + + l1MessageFetcher := fetcher.NewL1MessageFetcher(subCtx, cfg.L1, db, l1Client) + go l1MessageFetcher.Start() + + l2MessageFetcher := fetcher.NewL2MessageFetcher(subCtx, cfg.L2, db, l2Client) + go l2MessageFetcher.Start() + + // Catch CTRL-C to ensure a graceful shutdown. + interrupt := make(chan os.Signal, 1) + signal.Notify(interrupt, os.Interrupt) + + // Wait until the interrupt signal is received from an OS signal. + <-interrupt + + return nil +} + +// Run event watcher cmd instance. +func Run() { + if err := app.Run(os.Args); err != nil { + _, _ = fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} diff --git a/bridge-history-api/cmd/fetcher/main.go b/bridge-history-api/cmd/fetcher/main.go new file mode 100644 index 0000000000..ca46fde3f6 --- /dev/null +++ b/bridge-history-api/cmd/fetcher/main.go @@ -0,0 +1,7 @@ +package main + +import "scroll-tech/bridge-history-api/cmd/fetcher/app" + +func main() { + app.Run() +} diff --git a/bridge-history-api/conf/config.json b/bridge-history-api/conf/config.json new file mode 100644 index 0000000000..e7bcbfac46 --- /dev/null +++ b/bridge-history-api/conf/config.json @@ -0,0 +1,51 @@ +{ + "L1": { + "confirmation": 0, + "endpoint": "https://rpc.ankr.com/eth", + "startHeight": 18306000, + "blockTime": 10, + "fetchLimit": 30, + "MessengerAddr": "0x6774Bcbd5ceCeF1336b5300fb5186a12DDD8b367", + "ETHGatewayAddr": "0x7F2b8C31F88B6006c382775eea88297Ec1e3E905", + "WETHGatewayAddr": "0x7AC440cAe8EB6328de4fA621163a792c1EA9D4fE", + "StandardERC20GatewayAddr": "0xD8A791fE2bE73eb6E6cF1eb0cb3F36adC9B3F8f9", + "CustomERC20GatewayAddr": "0xb2b10a289A229415a124EFDeF310C10cb004B6ff", + "ERC721GatewayAddr": "0x6260aF48e8948617b8FA17F4e5CEa2d21D21554B", + "ERC1155GatewayAddr": "0xb94f7F6ABcb811c5Ac709dE14E37590fcCd975B6", + "USDCGatewayAddr": "0xf1AF3b23DE0A5Ca3CAb7261cb0061C0D779A5c7B", + "LIDOGatewayAddr": "0x6625C6332c9F91F2D27c304E729B86db87A3f504", + "DAIGatewayAddr": "0x67260A8B73C5B77B55c1805218A42A7A6F98F515", + "ScrollChainAddr": "0xa13BAF47339d63B743e7Da8741db5456DAc1E556", + "GatewayRouterAddr": "0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6", + "MessageQueueAddr": "0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B" + }, + "L2": { + "confirmation": 0, + "endpoint": "https://rpc.scroll.io", + "blockTime": 3, + "fetchLimit": 100, + "MessengerAddr": "0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC", + "ETHGatewayAddr": "0x6EA73e05AdC79974B931123675ea8F78FfdacDF0", + "WETHGatewayAddr": "0x7003E7B7186f0E6601203b99F7B8DECBfA391cf9", + "StandardERC20GatewayAddr": "0xE2b4795039517653c5Ae8C2A9BFdd783b48f447A", + "CustomERC20GatewayAddr": "0x64CCBE37c9A82D85A1F2E74649b7A42923067988", + "ERC721GatewayAddr": "0x7bC08E1c04fb41d75F1410363F0c5746Eae80582", + "ERC1155GatewayAddr": "0x62597Cc19703aF10B58feF87B0d5D29eFE263bcc", + "USDCGatewayAddr": "0x33B60d5Dd260d453cAC3782b0bDC01ce84672142", + "LIDOGatewayAddr": "0x8aE8f22226B9d789A36AC81474e633f8bE2856c9", + "DAIGatewayAddr": "0xaC78dff3A87b5b534e366A93E785a0ce8fA6Cc62", + "GatewayRouterAddr": "0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79", + "MessageQueueAddr": "0x5300000000000000000000000000000000000000" + }, + "db": { + "dsn": "postgres://postgres:123456@localhost:5444/test?sslmode=disable", + "driverName": "postgres", + "maxOpenNum": 200, + "maxIdleNum": 20 + }, + "redis": { + "address": "localhost:6379", + "password": "", + "db": 0 + } +} diff --git a/bridge-history-api/config.json b/bridge-history-api/config.json deleted file mode 100644 index 65876314f8..0000000000 --- a/bridge-history-api/config.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "batchInfoFetcher": { - "batchIndexStartBlock": 9091265, - "ScrollChainAddr": "0x1799c3Df650caB9DFBb228C971016707D8f8721D" - }, - "l1": { - "confirmation": 64, - "endpoint": "https://rpc.ankr.com/eth", - "startHeight": 18310747, - "blockTime": 10, - "MessengerAddr": "0x7318152B19c3c97c886D5ee6C2525E62ce8e2abA", - "ETHGatewayAddr": "0xd165b42d857eae2915625819464a2a1f91E5d0A5", - "WETHGatewayAddr": "0xb0255e4C1a919619D1CafBA51021d638c4F71b89", - "StandardERC20Gateway": "0x00fEc01A9b975bA37466B4E9006dF2C71BFE0e48", - "CustomERC20GatewayAddr": "0xD8874B0E6C3CC43C00B69D60c21Ef452d1159bDe", - "ERC721GatewayAddr": "0x131B46649F6882d686a766cb8b68c4cB0ACdeb24", - "ERC1155GatewayAddr": "0xCeE721789FAA05c7F4463efB664520656aB7C7d5", - "USDCGatewayAddr": "0x37ba659D6CC380D12Fb96567CC52FC8e1DF4E334", - "LIDOGatewayAddr": "0x892dDB2899325aBBA1fD00FDA8249B40Cbbc33F9", - "DAIGatewayAddr": "0xD8dD7787f89c7E6243AD32E0d0cCf460243C8130" - }, - "l2": { - "confirmation": 1, - "endpoint": "http://mainnet-l2geth-internal-1.mainnet.scroll.tech:8545", - "blockTime": 3, - "startHeight": 0, - "MessengerAddr": "0xda7c91Ed60DACD28Cb97B180108958c9ACC7698a", - "ETHGatewayAddr": "0x567671187b5FFbcDFe0B6EcF3e56C05508a31A87", - "WETHGatewayAddr": "0x3b03aE2F27d62E0B2b6740CA20Fc07Af4338B791", - "StandardERC20Gateway": "0xb00cb1F6f7C43D2EE8C4e2163a6bEA22441A5B7c", - "CustomERC20GatewayAddr": "0x63CCb38E9d21A72777b203267F2e4ba5C974fC62", - "ERC721GatewayAddr": "0xE2c36a2D8B5528719aE7A42A778b2D08b18d134a", - "ERC1155GatewayAddr": "0xfF14870512e42BFb85a9B7bEfDc06e9aB5A37269", - "USDCGatewayAddr": "0x97D5799CDC8eE2A7452913d7548c7cEE285719FA", - "LIDOGatewayAddr": "0xE9c5C9f67ec7B773fC76440845751F657bb953FF", - "DAIGatewayAddr": "0xC5034eB8F682b73F93C9246aa95A8eBbF82793aA" - }, - "db": { - "dsn": "postgres://postgres:1234@localhost:5444/test?sslmode=disable", - "driverName": "postgres", - "maxOpenNum": 200, - "maxIdleNum": 20 - }, - "server": { - "hostPort": "20006" - } -} diff --git a/bridge-history-api/config/config.go b/bridge-history-api/config/config.go deleted file mode 100644 index 0cc97e1f56..0000000000 --- a/bridge-history-api/config/config.go +++ /dev/null @@ -1,74 +0,0 @@ -package config - -import ( - "encoding/json" - "os" - "path/filepath" -) - -// BatchInfoFetcherConfig is the configuration of BatchInfoFetcher -type BatchInfoFetcherConfig struct { - BatchIndexStartBlock uint64 `json:"batchIndexStartBlock"` - ScrollChainAddr string `json:"ScrollChainAddr"` -} - -// DBConfig db config -type DBConfig struct { - // data source name - DSN string `json:"dsn"` - DriverName string `json:"driverName"` - - MaxOpenNum int `json:"maxOpenNum"` - MaxIdleNum int `json:"maxIdleNum"` -} - -// LayerConfig is the configuration of Layer1/Layer2 -type LayerConfig struct { - Confirmation uint64 `json:"confirmation"` - Endpoint string `json:"endpoint"` - StartHeight uint64 `json:"startHeight"` - BlockTime int64 `json:"blockTime"` - MessengerAddr string `json:"MessengerAddr"` - ETHGatewayAddr string `json:"ETHGatewayAddr"` - WETHGatewayAddr string `json:"WETHGatewayAddr"` - USDCGatewayAddr string `json:"USDCGatewayAddr"` - LIDOGatewayAddr string `json:"LIDOGatewayAddr"` - DAIGatewayAddr string `json:"DAIGatewayAddr"` - StandardERC20Gateway string `json:"StandardERC20Gateway"` - ERC721GatewayAddr string `json:"ERC721GatewayAddr"` - ERC1155GatewayAddr string `json:"ERC1155GatewayAddr"` - CustomERC20GatewayAddr string `json:"CustomERC20GatewayAddr"` -} - -// ServerConfig is the configuration of the bridge history backend server port -type ServerConfig struct { - HostPort string `json:"hostPort"` -} - -// Config is the configuration of the bridge history backend -type Config struct { - // chain config - L1 *LayerConfig `json:"l1"` - L2 *LayerConfig `json:"l2"` - - // data source name - DB *DBConfig `json:"db"` - Server *ServerConfig `json:"server"` - BatchInfoFetcher *BatchInfoFetcherConfig `json:"batchInfoFetcher"` -} - -// NewConfig returns a new instance of Config. -func NewConfig(file string) (*Config, error) { - buf, err := os.ReadFile(filepath.Clean(file)) - if err != nil { - return nil, err - } - - cfg := &Config{} - err = json.Unmarshal(buf, cfg) - if err != nil { - return nil, err - } - - return cfg, nil -} diff --git a/bridge-history-api/crossmsg/batch_info_fetcher.go b/bridge-history-api/crossmsg/batch_info_fetcher.go deleted file mode 100644 index 9ac147ed52..0000000000 --- a/bridge-history-api/crossmsg/batch_info_fetcher.go +++ /dev/null @@ -1,116 +0,0 @@ -package crossmsg - -import ( - "context" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" - "gorm.io/gorm" - - "bridge-history-api/crossmsg/messageproof" - "bridge-history-api/orm" - "bridge-history-api/utils" -) - -// BatchInfoFetcher fetches batch info from l1 chain and update db -type BatchInfoFetcher struct { - ctx context.Context - scrollChainAddr common.Address - batchInfoStartNumber uint64 - confirmation uint64 - blockTimeInSec int - client *ethclient.Client - db *gorm.DB - rollupOrm *orm.RollupBatch - msgProofUpdater *messageproof.MsgProofUpdater -} - -// NewBatchInfoFetcher creates a new BatchInfoFetcher instance -func NewBatchInfoFetcher(ctx context.Context, scrollChainAddr common.Address, batchInfoStartNumber uint64, confirmation uint64, blockTimeInSec int, client *ethclient.Client, db *gorm.DB, msgProofUpdater *messageproof.MsgProofUpdater) *BatchInfoFetcher { - return &BatchInfoFetcher{ - ctx: ctx, - scrollChainAddr: scrollChainAddr, - batchInfoStartNumber: batchInfoStartNumber, - confirmation: confirmation, - blockTimeInSec: blockTimeInSec, - client: client, - db: db, - rollupOrm: orm.NewRollupBatch(db), - msgProofUpdater: msgProofUpdater, - } -} - -// Start the BatchInfoFetcher -func (b *BatchInfoFetcher) Start() { - log.Info("BatchInfoFetcher Start") - // Fetch batch info at beginning - // Then start msg proof updater after db have some bridge batch - err := b.fetchBatchInfo() - if err != nil { - log.Error("fetch batch info at beginning failed: ", "err", err) - } - - go b.msgProofUpdater.Start() - - go func() { - tick := time.NewTicker(time.Duration(b.blockTimeInSec) * time.Second) - for { - select { - case <-b.ctx.Done(): - tick.Stop() - return - case <-tick.C: - err := b.fetchBatchInfo() - if err != nil { - log.Error("fetch batch info failed: ", "err", err) - } - } - } - }() -} - -// Stop the BatchInfoFetcher and call msg proof updater to stop -func (b *BatchInfoFetcher) Stop() { - log.Info("BatchInfoFetcher Stop") - b.msgProofUpdater.Stop() -} - -func (b *BatchInfoFetcher) fetchBatchInfo() error { - number, err := utils.GetSafeBlockNumber(b.ctx, b.client, b.confirmation) - if err != nil { - log.Error("Can not get latest block number: ", "err", err) - return err - } - latestBatchHeight, err := b.rollupOrm.GetLatestRollupBatchProcessedHeight(b.ctx) - if err != nil { - log.Error("Can not get latest BatchInfo: ", "err", err) - return err - } - var startHeight uint64 - if latestBatchHeight == 0 { - log.Info("no batch record in database, start from batchInfoStartNumber", "batchInfoStartNumber", b.batchInfoStartNumber) - startHeight = b.batchInfoStartNumber - } else { - startHeight = latestBatchHeight + 1 - } - if startHeight < b.batchInfoStartNumber { - startHeight = b.batchInfoStartNumber - } - for from := startHeight; number >= from; from += fetchLimit { - to := from + fetchLimit - 1 - // number - confirmation can never be less than 0 since the for loop condition - // but watch out for the overflow - if to > number { - to = number - } - // filter logs to fetch batches - err = FetchAndSaveBatchIndex(b.ctx, b.client, b.db, int64(from), int64(to), b.scrollChainAddr) - if err != nil { - log.Error("Can not fetch and save from chain: ", "err", err) - return err - } - } - return nil -} diff --git a/bridge-history-api/crossmsg/block_timestamp_fetcher.go b/bridge-history-api/crossmsg/block_timestamp_fetcher.go deleted file mode 100644 index 42c8c417f3..0000000000 --- a/bridge-history-api/crossmsg/block_timestamp_fetcher.go +++ /dev/null @@ -1,85 +0,0 @@ -package crossmsg - -import ( - "context" - "math/big" - "time" - - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" -) - -// GetEarliestNoBlockTimestampHeightFunc is a function type that gets the earliest record without block timestamp from database -type GetEarliestNoBlockTimestampHeightFunc func(ctx context.Context) (uint64, error) - -// UpdateBlockTimestampFunc is a function type that updates block timestamp into database -type UpdateBlockTimestampFunc func(ctx context.Context, height uint64, timestamp time.Time) error - -// BlockTimestampFetcher fetches block timestamp from blockchain and saves them to database -type BlockTimestampFetcher struct { - ctx context.Context - confirmation uint64 - blockTimeInSec int - client *ethclient.Client - updateBlockTimestampFunc UpdateBlockTimestampFunc - getEarliestNoBlockTimestampHeightFunc GetEarliestNoBlockTimestampHeightFunc -} - -// NewBlockTimestampFetcher creates a new BlockTimestampFetcher instance -func NewBlockTimestampFetcher(ctx context.Context, confirmation uint64, blockTimeInSec int, client *ethclient.Client, updateBlockTimestampFunc UpdateBlockTimestampFunc, getEarliestNoBlockTimestampHeightFunc GetEarliestNoBlockTimestampHeightFunc) *BlockTimestampFetcher { - return &BlockTimestampFetcher{ - ctx: ctx, - confirmation: confirmation, - blockTimeInSec: blockTimeInSec, - client: client, - getEarliestNoBlockTimestampHeightFunc: getEarliestNoBlockTimestampHeightFunc, - updateBlockTimestampFunc: updateBlockTimestampFunc, - } -} - -// Start the BlockTimestampFetcher -func (b *BlockTimestampFetcher) Start() { - go func() { - tick := time.NewTicker(time.Duration(b.blockTimeInSec) * time.Second) - for { - select { - case <-b.ctx.Done(): - tick.Stop() - return - case <-tick.C: - number, err := b.client.BlockNumber(b.ctx) - if err != nil { - log.Error("Can not get latest block number", "err", err) - continue - } - startHeight, err := b.getEarliestNoBlockTimestampHeightFunc(b.ctx) - if err != nil { - log.Error("Can not get latest record without block timestamp", "err", err) - continue - } - for height := startHeight; number >= height+b.confirmation && height > 0; { - block, err := b.client.HeaderByNumber(b.ctx, new(big.Int).SetUint64(height)) - if err != nil { - log.Error("Can not get block by number", "err", err) - break - } - err = b.updateBlockTimestampFunc(b.ctx, height, time.Unix(int64(block.Time), 0)) - if err != nil { - log.Error("Can not update blockTimestamp into DB ", "err", err) - break - } - height, err = b.getEarliestNoBlockTimestampHeightFunc(b.ctx) - if err != nil { - log.Error("Can not get latest record without block timestamp", "err", err) - break - } - } - } - } - }() -} - -// Stop the BlockTimestampFetcher and log the info -func (b *BlockTimestampFetcher) Stop() { - log.Info("BlockTimestampFetcher Stop") -} diff --git a/bridge-history-api/crossmsg/cross_msg_fetcher.go b/bridge-history-api/crossmsg/cross_msg_fetcher.go deleted file mode 100644 index 2109e8b9ca..0000000000 --- a/bridge-history-api/crossmsg/cross_msg_fetcher.go +++ /dev/null @@ -1,215 +0,0 @@ -package crossmsg - -import ( - "context" - "fmt" - "math/big" - "sync" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" - "github.com/modern-go/reflect2" - "gorm.io/gorm" - - "bridge-history-api/config" - "bridge-history-api/utils" -) - -// MsgFetcher fetches cross message events from blockchain and saves them to database -type MsgFetcher struct { - ctx context.Context - config *config.LayerConfig - db *gorm.DB - client *ethclient.Client - worker *FetchEventWorker - reorgHandling ReorgHandling - addressList []common.Address - cachedHeaders []*types.Header - mu sync.Mutex - reorgStartCh chan struct{} - reorgEndCh chan struct{} -} - -// NewMsgFetcher creates a new MsgFetcher instance -func NewMsgFetcher(ctx context.Context, config *config.LayerConfig, db *gorm.DB, client *ethclient.Client, worker *FetchEventWorker, addressList []common.Address, reorg ReorgHandling) (*MsgFetcher, error) { - msgFetcher := &MsgFetcher{ - ctx: ctx, - config: config, - db: db, - client: client, - worker: worker, - reorgHandling: reorg, - addressList: addressList, - cachedHeaders: make([]*types.Header, 0), - reorgStartCh: make(chan struct{}), - reorgEndCh: make(chan struct{}), - } - return msgFetcher, nil -} - -// Start the MsgFetcher -func (c *MsgFetcher) Start() { - log.Info("MsgFetcher Start") - // fetch missing events from finalized blocks, we don't handle reorgs here - c.forwardFetchAndSaveMissingEvents(c.config.Confirmation) - - tick := time.NewTicker(time.Duration(c.config.BlockTime) * time.Second) - headerTick := time.NewTicker(time.Duration(c.config.BlockTime/2) * time.Second) - go func() { - for { - select { - case <-c.reorgStartCh: - // create timeout here - timeout := time.NewTicker(300 * time.Second) - select { - case <-c.reorgEndCh: - log.Info("Reorg finished") - timeout.Stop() - case <-timeout.C: - // TODO: need to notify the on-call members to handle reorg manually - timeout.Stop() - log.Crit("Reorg timeout") - } - case <-c.ctx.Done(): - tick.Stop() - return - case <-tick.C: - c.mu.Lock() - c.forwardFetchAndSaveMissingEvents(1) - c.mu.Unlock() - } - } - }() - - go func() { - for { - select { - case <-c.ctx.Done(): - headerTick.Stop() - return - case <-headerTick.C: - c.fetchMissingLatestHeaders() - } - } - }() -} - -// Stop the MsgFetcher and log the info -func (c *MsgFetcher) Stop() { - log.Info("MsgFetcher Stop") -} - -// forwardFetchAndSaveMissingEvents will fetch all events from the latest processed height to the latest block number. -func (c *MsgFetcher) forwardFetchAndSaveMissingEvents(confirmation uint64) { - // if we fetch to the latest block, shall not exceed cachedHeaders - var number uint64 - var err error - if len(c.cachedHeaders) != 0 && confirmation == 0 { - number = c.cachedHeaders[len(c.cachedHeaders)-1].Number.Uint64() - 1 - } else { - number, err = utils.GetSafeBlockNumber(c.ctx, c.client, confirmation) - if err != nil { - log.Error(fmt.Sprintf("%s: can not get the safe block number", c.worker.Name), "err", err) - return - } - } - if reflect2.IsNil(c.worker.G) || reflect2.IsNil(c.worker.F) { - log.Error(fmt.Sprintf("%s: invalid get/fetch function", c.worker.Name)) - return - } - processedHeight, err := c.worker.G(c.ctx, c.db) - if err != nil { - log.Error(fmt.Sprintf("%s: can not get latest processed block height", c.worker.Name)) - } - log.Info(fmt.Sprintf("%s: ", c.worker.Name), "height", processedHeight) - if processedHeight <= 0 || processedHeight < c.config.StartHeight { - processedHeight = c.config.StartHeight - } else { - processedHeight++ - } - for from := processedHeight; from <= number; from += fetchLimit { - to := from + fetchLimit - 1 - if to > number { - to = number - } - // watch for overflow here, though its unlikely to happen - err := c.worker.F(c.ctx, c.client, c.db, int64(from), int64(to), c.addressList) - if err != nil { - log.Error(fmt.Sprintf("%s: failed!", c.worker.Name), "err", err) - break - } - } -} - -func (c *MsgFetcher) fetchMissingLatestHeaders() { - var start int64 - number, err := c.client.BlockNumber(c.ctx) - if err != nil { - log.Error("fetchMissingLatestHeaders(): can not get the latest block number", "err", err) - return - } - - if len(c.cachedHeaders) > 0 { - start = c.cachedHeaders[len(c.cachedHeaders)-1].Number.Int64() + 1 - } else { - start = int64(number - c.config.Confirmation) - } - for i := start; i <= int64(number); i++ { - select { - case <-c.ctx.Done(): - close(c.reorgStartCh) - close(c.reorgEndCh) - return - default: - header, err := c.client.HeaderByNumber(c.ctx, big.NewInt(i)) - if err != nil { - log.Error("failed to get latest header", "err", err) - return - } - if len(c.cachedHeaders) == 0 { - c.cachedHeaders = MergeAddIntoHeaderList(c.cachedHeaders, []*types.Header{header}, int(c.config.Confirmation)) - return - } - //check if the fetched header is child from the last cached header - if IsParentAndChild(c.cachedHeaders[len(c.cachedHeaders)-1], header) { - c.cachedHeaders = MergeAddIntoHeaderList(c.cachedHeaders, []*types.Header{header}, int(c.config.Confirmation)) - log.Debug("fetched block into cache", "height", header.Number, "parent hash", header.ParentHash.Hex(), "block hash", c.cachedHeaders[len(c.cachedHeaders)-1].Hash().Hex(), "len", len(c.cachedHeaders)) - continue - } - // reorg happened - log.Warn("Reorg happened", "height", header.Number, "parent hash", header.ParentHash.Hex(), "last cached hash", c.cachedHeaders[len(c.cachedHeaders)-1].Hash().Hex(), "last cached height", c.cachedHeaders[len(c.cachedHeaders)-1].Number) - c.reorgStartCh <- struct{}{} - // waiting here if there is fetcher running - c.mu.Lock() - index, ok, validHeaders := BackwardFindReorgBlock(c.ctx, c.cachedHeaders, c.client, header) - if !ok { - log.Error("Reorg happened too earlier than cached headers", "reorg height", header.Number) - num, getSafeErr := utils.GetSafeBlockNumber(c.ctx, c.client, c.config.Confirmation) - if getSafeErr != nil { - log.Crit("Can not get safe number during reorg, quit the process", "err", err) - } - // clear all our saved data, because no data is safe now - err = c.reorgHandling(c.ctx, num, c.db) - // if handling success then we can update the cachedHeaders - if err == nil { - c.cachedHeaders = c.cachedHeaders[:0] - } - c.mu.Unlock() - c.reorgEndCh <- struct{}{} - return - } - err = c.reorgHandling(c.ctx, c.cachedHeaders[index].Number.Uint64(), c.db) - // if handling success then we can update the cachedHeaders - if err == nil { - c.cachedHeaders = c.cachedHeaders[:index+1] - c.cachedHeaders = MergeAddIntoHeaderList(c.cachedHeaders, validHeaders, int(c.config.Confirmation)) - } - c.mu.Unlock() - c.reorgEndCh <- struct{}{} - } - } - -} diff --git a/bridge-history-api/crossmsg/fetch_missing_event.go b/bridge-history-api/crossmsg/fetch_missing_event.go deleted file mode 100644 index 95a1b68cb4..0000000000 --- a/bridge-history-api/crossmsg/fetch_missing_event.go +++ /dev/null @@ -1,213 +0,0 @@ -package crossmsg - -import ( - "context" - "math/big" - - geth "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" - "gorm.io/gorm" - - backendabi "bridge-history-api/abi" - "bridge-history-api/orm" - "bridge-history-api/utils" -) - -// Todo : read from config -var ( - // the number of blocks fetch per round - fetchLimit = uint64(3000) -) - -// FetchAndSave is a function type that fetches events from blockchain and saves them to database -type FetchAndSave func(ctx context.Context, client *ethclient.Client, database *gorm.DB, from int64, to int64, addressList []common.Address) error - -// GetLatestProcessed is a function type that gets the latest processed block height from database -type GetLatestProcessed func(ctx context.Context, db *gorm.DB) (uint64, error) - -// FetchEventWorker defines worker with fetch and save function, processed number getter, and name -type FetchEventWorker struct { - F FetchAndSave - G GetLatestProcessed - Name string -} - -// GetLatestL1ProcessedHeight get L1 the latest processed height -func GetLatestL1ProcessedHeight(ctx context.Context, db *gorm.DB) (uint64, error) { - l1CrossMsgOrm := orm.NewCrossMsg(db) - relayedOrm := orm.NewRelayedMsg(db) - crossHeight, err := l1CrossMsgOrm.GetLatestL1ProcessedHeight(ctx) - if err != nil { - log.Error("failed to get L1 cross message processed height: ", "err", err) - return 0, err - } - relayedHeight, err := relayedOrm.GetLatestRelayedHeightOnL1(ctx) - if err != nil { - log.Error("failed to get L1 relayed message processed height: ", "err", err) - return 0, err - } - if crossHeight > relayedHeight { - return crossHeight, nil - } - return relayedHeight, nil -} - -// GetLatestL2ProcessedHeight get L2 latest processed height -func GetLatestL2ProcessedHeight(ctx context.Context, db *gorm.DB) (uint64, error) { - l2CrossMsgOrm := orm.NewCrossMsg(db) - relayedOrm := orm.NewRelayedMsg(db) - l2SentMsgOrm := orm.NewL2SentMsg(db) - crossHeight, err := l2CrossMsgOrm.GetLatestL2ProcessedHeight(ctx) - if err != nil { - log.Error("failed to get L2 cross message processed height", "err", err) - return 0, err - } - relayedHeight, err := relayedOrm.GetLatestRelayedHeightOnL2(ctx) - if err != nil { - log.Error("failed to get L2 relayed message processed height", "err", err) - return 0, err - } - l2SentHeight, err := l2SentMsgOrm.GetLatestSentMsgHeightOnL2(ctx) - if err != nil { - log.Error("failed to get L2 sent message processed height", "err", err) - return 0, err - } - maxHeight := crossHeight - if maxHeight < relayedHeight { - maxHeight = relayedHeight - } - if maxHeight < l2SentHeight { - maxHeight = l2SentHeight - } - return maxHeight, nil -} - -// L1FetchAndSaveEvents fetch and save events on L1 -func L1FetchAndSaveEvents(ctx context.Context, client *ethclient.Client, db *gorm.DB, from int64, to int64, addrList []common.Address) error { - l1CrossMsgOrm := orm.NewCrossMsg(db) - relayedOrm := orm.NewRelayedMsg(db) - query := geth.FilterQuery{ - FromBlock: big.NewInt(from), // inclusive - ToBlock: big.NewInt(to), // inclusive - Addresses: addrList, - Topics: make([][]common.Hash, 1), - } - query.Topics[0] = make([]common.Hash, 7) - query.Topics[0][0] = backendabi.L1DepositETHSig - query.Topics[0][1] = backendabi.L1DepositERC20Sig - query.Topics[0][2] = backendabi.L1RelayedMessageEventSignature - query.Topics[0][3] = backendabi.L1SentMessageEventSignature - query.Topics[0][4] = backendabi.L1DepositERC721Sig - query.Topics[0][5] = backendabi.L1DepositERC1155Sig - query.Topics[0][6] = backendabi.L1DepositWETHSig - - logs, err := client.FilterLogs(ctx, query) - if err != nil { - log.Warn("Failed to get l1 event logs", "err", err) - return err - } - depositL1CrossMsgs, relayedMsg, err := utils.ParseBackendL1EventLogs(logs) - if err != nil { - log.Error("l1FetchAndSaveEvents: Failed to parse cross msg event logs", "err", err) - return err - } - err = db.Transaction(func(tx *gorm.DB) error { - if txErr := l1CrossMsgOrm.InsertL1CrossMsg(ctx, depositL1CrossMsgs, tx); txErr != nil { - log.Error("l1FetchAndSaveEvents: Failed to insert cross msg event logs", "err", txErr) - return txErr - } - if txErr := relayedOrm.InsertRelayedMsg(ctx, relayedMsg, tx); txErr != nil { - log.Error("l1FetchAndSaveEvents: Failed to insert relayed msg event logs", "err", txErr) - return txErr - } - return nil - }) - if err != nil { - log.Crit("l2FetchAndSaveEvents: Failed to finish transaction", "err", err) - } - return err -} - -// L2FetchAndSaveEvents fetche and save events on L2 -func L2FetchAndSaveEvents(ctx context.Context, client *ethclient.Client, db *gorm.DB, from int64, to int64, addrList []common.Address) error { - l2CrossMsgOrm := orm.NewCrossMsg(db) - relayedOrm := orm.NewRelayedMsg(db) - l2SentMsgOrm := orm.NewL2SentMsg(db) - query := geth.FilterQuery{ - FromBlock: big.NewInt(from), // inclusive - ToBlock: big.NewInt(to), // inclusive - Addresses: addrList, - Topics: make([][]common.Hash, 1), - } - query.Topics[0] = make([]common.Hash, 7) - query.Topics[0][0] = backendabi.L2WithdrawETHSig - query.Topics[0][1] = backendabi.L2WithdrawERC20Sig - query.Topics[0][2] = backendabi.L2RelayedMessageEventSignature - query.Topics[0][3] = backendabi.L2SentMessageEventSignature - query.Topics[0][4] = backendabi.L2WithdrawERC721Sig - query.Topics[0][5] = backendabi.L2WithdrawERC1155Sig - query.Topics[0][6] = backendabi.L2WithdrawWETHSig - - logs, err := client.FilterLogs(ctx, query) - if err != nil { - log.Warn("Failed to get l2 event logs", "err", err) - return err - } - depositL2CrossMsgs, relayedMsg, l2SentMsgs, err := utils.ParseBackendL2EventLogs(logs) - if err != nil { - log.Error("l2FetchAndSaveEvents: Failed to parse cross msg event logs", "err", err) - return err - } - - err = db.Transaction(func(tx *gorm.DB) error { - if txErr := l2CrossMsgOrm.InsertL2CrossMsg(ctx, depositL2CrossMsgs, tx); txErr != nil { - log.Error("l2FetchAndSaveEvents: Failed to insert cross msg event logs", "err", txErr) - return txErr - } - - if txErr := relayedOrm.InsertRelayedMsg(ctx, relayedMsg, tx); txErr != nil { - log.Error("l2FetchAndSaveEvents: Failed to insert relayed message event logs", "err", txErr) - return txErr - } - - if txErr := l2SentMsgOrm.InsertL2SentMsg(ctx, l2SentMsgs, tx); txErr != nil { - log.Error("l2FetchAndSaveEvents: Failed to insert l2 sent message", "err", txErr) - return txErr - } - return nil - }) - if err != nil { - log.Crit("l2FetchAndSaveEvents: Failed to begin db transaction", "err", err) - } - return err -} - -// FetchAndSaveBatchIndex fetche and save batch index -func FetchAndSaveBatchIndex(ctx context.Context, client *ethclient.Client, db *gorm.DB, from int64, to int64, scrollChainAddr common.Address) error { - rollupBatchOrm := orm.NewRollupBatch(db) - query := geth.FilterQuery{ - FromBlock: big.NewInt(from), // inclusive - ToBlock: big.NewInt(to), // inclusive - Addresses: []common.Address{scrollChainAddr}, - Topics: make([][]common.Hash, 1), - } - query.Topics[0] = make([]common.Hash, 1) - query.Topics[0][0] = backendabi.L1CommitBatchEventSignature - logs, err := client.FilterLogs(ctx, query) - if err != nil { - log.Warn("Failed to get batch commit event logs", "err", err) - return err - } - rollupBatches, err := utils.ParseBatchInfoFromScrollChain(ctx, client, logs) - if err != nil { - log.Error("FetchAndSaveBatchIndex: Failed to parse batch commit msg event logs", "err", err) - return err - } - if txErr := rollupBatchOrm.InsertRollupBatch(ctx, rollupBatches); txErr != nil { - log.Crit("FetchAndSaveBatchIndex: Failed to insert batch commit msg event logs", "err", txErr) - return txErr - } - return nil -} diff --git a/bridge-history-api/crossmsg/messageproof/msg_proof_updater.go b/bridge-history-api/crossmsg/messageproof/msg_proof_updater.go deleted file mode 100644 index 2ccaf8828b..0000000000 --- a/bridge-history-api/crossmsg/messageproof/msg_proof_updater.go +++ /dev/null @@ -1,249 +0,0 @@ -package messageproof - -import ( - "context" - "fmt" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" - "gorm.io/gorm" - - "bridge-history-api/orm" -) - -// MsgProofUpdater is used to update message proof in db -type MsgProofUpdater struct { - ctx context.Context - db *gorm.DB - l2SentMsgOrm *orm.L2SentMsg - rollupOrm *orm.RollupBatch - withdrawTrie *WithdrawTrie -} - -// NewMsgProofUpdater new MsgProofUpdater instance -func NewMsgProofUpdater(ctx context.Context, confirmations uint64, startBlock uint64, db *gorm.DB) *MsgProofUpdater { - return &MsgProofUpdater{ - ctx: ctx, - db: db, - l2SentMsgOrm: orm.NewL2SentMsg(db), - rollupOrm: orm.NewRollupBatch(db), - withdrawTrie: NewWithdrawTrie(), - } -} - -// Start the MsgProofUpdater -func (m *MsgProofUpdater) Start() { - log.Info("MsgProofUpdater Start") - m.initialize(m.ctx) - go func() { - tick := time.NewTicker(10 * time.Second) - for { - select { - case <-m.ctx.Done(): - tick.Stop() - return - case <-tick.C: - latestBatch, err := m.rollupOrm.GetLatestRollupBatch(m.ctx) - if err != nil { - log.Warn("MsgProofUpdater: Can not get latest RollupBatch: ", "err", err) - continue - } - if latestBatch == nil { - continue - } - latestBatchIndexWithProof, err := m.l2SentMsgOrm.GetLatestL2SentMsgBatchIndex(m.ctx) - if err != nil { - log.Error("MsgProofUpdater: Can not get latest L2SentMsgBatchIndex: ", "err", err) - continue - } - log.Info("latest batch with proof", "batch_index", latestBatchIndexWithProof) - var start uint64 - if latestBatchIndexWithProof < 0 { - start = 1 - } else { - start = uint64(latestBatchIndexWithProof) + 1 - } - for i := start; i <= latestBatch.BatchIndex; i++ { - batch, err := m.rollupOrm.GetRollupBatchByIndex(m.ctx, i) - if err != nil { - log.Error("MsgProofUpdater: Can not get RollupBatch: ", "err", err, "index", i) - break - } - // get all l2 messages in this batch - msgs, proofs, err := m.appendL2Messages(batch.StartBlockNumber, batch.EndBlockNumber) - if err != nil { - log.Error("MsgProofUpdater: can not append l2messages", "startBlockNumber", batch.StartBlockNumber, "endBlockNumber", batch.EndBlockNumber, "err", err) - break - } - // here we update batch withdraw root - err = m.rollupOrm.UpdateRollupBatchWithdrawRoot(m.ctx, batch.BatchIndex, m.withdrawTrie.MessageRoot().Hex()) - if err != nil { - // if failed better restart the binary - log.Error("MsgProofUpdater: can not update batch withdraw root", "err", err) - break - } - err = m.updateMsgProof(msgs, proofs, batch.BatchIndex) - if err != nil { - // if failed better restart the binary - log.Error("MsgProofUpdater: can not update msg proof", "err", err) - break - } - } - - } - } - }() - -} - -// Stop the MsgProofUpdater -func (m *MsgProofUpdater) Stop() { - log.Info("MsgProofUpdater Stop") -} - -func (m *MsgProofUpdater) initialize(ctx context.Context) { - for { - select { - case <-ctx.Done(): - return - default: - err := m.initializeWithdrawTrie() - if err != nil { - log.Error("can not initialize withdraw trie", "err", err) - // give it some time to retry - time.Sleep(10 * time.Second) - continue - } - return - } - } -} - -func (m *MsgProofUpdater) initializeWithdrawTrie() error { - var batch *orm.RollupBatch - firstMsg, err := m.l2SentMsgOrm.GetL2SentMessageByNonce(m.ctx, 0) - if err != nil { - return fmt.Errorf("failed to get first l2 message: %v", err) - } - // no l2 message - // TO DO: check if we really dont have l2 sent message with nonce 0 - if firstMsg == nil { - log.Info("No first l2sentmsg in db") - return nil - } - - // if no batch, return and wait for next try round - batch, err = m.rollupOrm.GetLatestRollupBatch(m.ctx) - if err != nil { - return fmt.Errorf("failed to get latest batch: %v", err) - } - if batch == nil { - return fmt.Errorf("no batch found") - } - - var batches []*orm.RollupBatch - batchIndex := batch.BatchIndex - for { - var msg *orm.L2SentMsg - msg, err = m.l2SentMsgOrm.GetLatestL2SentMsgLEHeight(m.ctx, batch.EndBlockNumber) - if err != nil { - log.Warn("failed to get l2 sent message less than height", "endBlocknum", batch.EndBlockNumber, "err", err) - } - if msg != nil && msg.MsgProof != "" { - log.Info("Found latest l2 sent msg with proof: ", "msg_proof", msg.MsgProof, "height", msg.Height, "msg_hash", msg.MsgHash) - // initialize withdrawTrie - proofBytes := common.Hex2Bytes(msg.MsgProof) - m.withdrawTrie.Initialize(msg.Nonce, common.HexToHash(msg.MsgHash), proofBytes) - break - } - - // append unprocessed batch - batches = append(batches, batch) - - if batchIndex == 1 { - // otherwise overflow - // and batchIndex 0 is not in DB - // To Do: check if we dont have batch with index 0 in future - break - } - // iterate for next batch - batchIndex-- - - batch, err = m.rollupOrm.GetRollupBatchByIndex(m.ctx, batchIndex) - if err != nil || batch == nil { - return fmt.Errorf("failed to get block batch %v: %v", batchIndex, err) - } - } - - log.Info("Build withdraw trie with pending messages") - for i := len(batches) - 1; i >= 0; i-- { - b := batches[i] - msgs, proofs, err := m.appendL2Messages(b.StartBlockNumber, b.EndBlockNumber) - if err != nil { - return err - } - err = m.rollupOrm.UpdateRollupBatchWithdrawRoot(m.ctx, b.BatchIndex, m.withdrawTrie.MessageRoot().Hex()) - if err != nil { - return err - } - err = m.updateMsgProof(msgs, proofs, b.BatchIndex) - if err != nil { - return err - } - } - log.Info("Build withdraw trie finished") - - return nil -} - -func (m *MsgProofUpdater) updateMsgProof(msgs []*orm.L2SentMsg, proofs [][]byte, batchIndex uint64) error { - if len(msgs) == 0 { - return nil - } - // this should not happen, but double check - if len(msgs) != len(proofs) { - return fmt.Errorf("illegal state: len(msgs) != len(proofs)") - } - err := m.db.Transaction(func(tx *gorm.DB) error { - for i, msg := range msgs { - proofHex := common.Bytes2Hex(proofs[i]) - log.Debug("updateMsgProof", "msgHash", msg.MsgHash, "batchIndex", batchIndex, "proof", proofHex) - if err := m.l2SentMsgOrm.UpdateL2MessageProof(m.ctx, msg.MsgHash, proofHex, batchIndex, tx); err != nil { - return err - } - } - return nil - }) - if err != nil { - return err - } - return nil -} - -// appendL2Messages will append all messages between firstBlock and lastBlock (both inclusive) to withdrawTrie and compute corresponding merkle proof of each message. -func (m *MsgProofUpdater) appendL2Messages(firstBlock, lastBlock uint64) ([]*orm.L2SentMsg, [][]byte, error) { - var msgProofs [][]byte - messages, err := m.l2SentMsgOrm.GetL2SentMsgMsgHashByHeightRange(m.ctx, firstBlock, lastBlock) - if err != nil { - log.Error("GetL2SentMsgMsgHashByHeightRange failed", "error", err, "firstBlock", firstBlock, "lastBlock", lastBlock) - return messages, msgProofs, err - } - if len(messages) == 0 { - return messages, msgProofs, nil - } - - // double check whether nonce is matched - if messages[0].Nonce != m.withdrawTrie.NextMessageNonce { - log.Error("L2 message nonce mismatch", "expected", m.withdrawTrie.NextMessageNonce, "found", messages[0].Nonce) - return messages, msgProofs, fmt.Errorf("l2 message nonce mismatch, expected: %v, found: %v", m.withdrawTrie.NextMessageNonce, messages[0].Nonce) - } - - var hashes []common.Hash - for _, msg := range messages { - hashes = append(hashes, common.HexToHash(msg.MsgHash)) - } - msgProofs = m.withdrawTrie.AppendMessages(hashes) - - return messages, msgProofs, nil -} diff --git a/bridge-history-api/crossmsg/msg_fetcher_test.go b/bridge-history-api/crossmsg/msg_fetcher_test.go deleted file mode 100644 index 3a20bca7c9..0000000000 --- a/bridge-history-api/crossmsg/msg_fetcher_test.go +++ /dev/null @@ -1,65 +0,0 @@ -package crossmsg_test - -import ( - "crypto/rand" - "math/big" - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/stretchr/testify/assert" - - "bridge-history-api/crossmsg" -) - -func TestMergeIntoList(t *testing.T) { - headers, err := generateHeaders(64) - assert.NoError(t, err) - assert.Equal(t, headers[0].Hash(), headers[1].ParentHash) - headers2, err := generateHeaders(18) - assert.NoError(t, err) - result := crossmsg.MergeAddIntoHeaderList(headers, headers2, 64) - assert.Equal(t, 64, len(result)) - assert.Equal(t, headers2[len(headers2)-1], result[len(result)-1]) - assert.NotEqual(t, headers[0], result[0]) -} - -func generateHeaders(amount int) ([]*types.Header, error) { - headers := make([]*types.Header, amount) - - for i := 0; i < amount; i++ { - var parentHash common.Hash - if i > 0 { - parentHash = headers[i-1].Hash() - } - nonce, err := rand.Int(rand.Reader, big.NewInt(1<<63-1)) - if err != nil { - return nil, err - } - difficulty := big.NewInt(131072) - - header := &types.Header{ - ParentHash: parentHash, - UncleHash: types.EmptyUncleHash, - Coinbase: common.Address{}, - Root: common.Hash{}, - TxHash: types.EmptyRootHash, - ReceiptHash: types.EmptyRootHash, - Bloom: types.Bloom{}, - Difficulty: difficulty, - Number: big.NewInt(int64(i)), - GasLimit: 5000000, - GasUsed: 0, - Time: uint64(i * 15), - Extra: []byte{}, - MixDigest: common.Hash{}, - Nonce: types.EncodeNonce(nonce.Uint64()), - } - headers[i] = header - } - - return headers, nil -} - -// TODO: add more test cases -// func TestReorg(t *testing.T) diff --git a/bridge-history-api/crossmsg/reorg_handle.go b/bridge-history-api/crossmsg/reorg_handle.go deleted file mode 100644 index 5bcc22c02c..0000000000 --- a/bridge-history-api/crossmsg/reorg_handle.go +++ /dev/null @@ -1,108 +0,0 @@ -package crossmsg - -import ( - "context" - - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" - "gorm.io/gorm" - - "bridge-history-api/orm" -) - -// ReorgHandling handles reorg function type -type ReorgHandling func(ctx context.Context, reorgHeight uint64, db *gorm.DB) error - -func reverseArray(arr []*types.Header) []*types.Header { - for i := 0; i < len(arr)/2; i++ { - j := len(arr) - i - 1 - arr[i], arr[j] = arr[j], arr[i] - } - return arr -} - -// IsParentAndChild match the child header ParentHash with parent header Hash -func IsParentAndChild(parentHeader *types.Header, header *types.Header) bool { - return header.ParentHash == parentHeader.Hash() -} - -// MergeAddIntoHeaderList merges two header lists, if exceed the max length then drop the oldest entries -func MergeAddIntoHeaderList(baseArr, extraArr []*types.Header, maxLength int) []*types.Header { - mergedArr := append(baseArr, extraArr...) - if len(mergedArr) <= maxLength { - return mergedArr - } - - startIndex := len(mergedArr) - maxLength - return mergedArr[startIndex:] -} - -// BackwardFindReorgBlock finds the reorg block by backward search -func BackwardFindReorgBlock(ctx context.Context, headers []*types.Header, client *ethclient.Client, lastHeader *types.Header) (int, bool, []*types.Header) { - maxStep := len(headers) - backwardHeaderList := []*types.Header{lastHeader} - for iterRound := 0; iterRound < maxStep; iterRound++ { - header, err := client.HeaderByHash(ctx, lastHeader.ParentHash) - if err != nil { - log.Error("BackwardFindReorgBlock failed", "error", err) - return -1, false, nil - } - backwardHeaderList = append(backwardHeaderList, header) - for j := len(headers) - 1; j >= 0; j-- { - if IsParentAndChild(headers[j], header) { - backwardHeaderList = reverseArray(backwardHeaderList) - return j, true, backwardHeaderList - } - } - lastHeader = header - } - return -1, false, nil -} - -// L1ReorgHandling handles l1 reorg -func L1ReorgHandling(ctx context.Context, reorgHeight uint64, db *gorm.DB) error { - l1CrossMsgOrm := orm.NewCrossMsg(db) - relayedOrm := orm.NewRelayedMsg(db) - err := db.Transaction(func(tx *gorm.DB) error { - if err := l1CrossMsgOrm.DeleteL1CrossMsgAfterHeight(ctx, reorgHeight, tx); err != nil { - log.Error("delete l1 cross msg from height", "height", reorgHeight, "err", err) - return err - } - if err := relayedOrm.DeleteL1RelayedHashAfterHeight(ctx, reorgHeight, tx); err != nil { - log.Error("delete l1 relayed msg from height", "height", reorgHeight, "err", err) - return err - } - return nil - }) - if err != nil { - log.Crit("l1 reorg handling failed", "err", err) - } - return err -} - -// L2ReorgHandling handles l2 reorg -func L2ReorgHandling(ctx context.Context, reorgHeight uint64, db *gorm.DB) error { - l2CrossMsgOrm := orm.NewCrossMsg(db) - relayedOrm := orm.NewRelayedMsg(db) - l2SentMsgOrm := orm.NewL2SentMsg(db) - err := db.Transaction(func(tx *gorm.DB) error { - if err := l2CrossMsgOrm.DeleteL2CrossMsgFromHeight(ctx, reorgHeight, tx); err != nil { - log.Error("delete l2 cross msg from height", "height", reorgHeight, "err", err) - return err - } - if err := relayedOrm.DeleteL2RelayedHashAfterHeight(ctx, reorgHeight, tx); err != nil { - log.Error("delete l2 relayed msg from height", "height", reorgHeight, "err", err) - return err - } - if err := l2SentMsgOrm.DeleteL2SentMsgAfterHeight(ctx, reorgHeight, tx); err != nil { - log.Error("delete l2 sent msg from height", "height", reorgHeight, "err", err) - return err - } - return nil - }) - if err != nil { - log.Crit("l2 reorg handling failed", "err", err) - } - return err -} diff --git a/bridge-history-api/go.mod b/bridge-history-api/go.mod index 43173f1bf5..b026dd2f1f 100644 --- a/bridge-history-api/go.mod +++ b/bridge-history-api/go.mod @@ -1,98 +1,92 @@ -module bridge-history-api +module scroll-tech/bridge-history-api go 1.20 require ( - github.com/bits-and-blooms/bitset v1.12.0 - github.com/ethereum/go-ethereum v1.13.5 - github.com/gin-contrib/cors v1.4.0 - github.com/gin-contrib/pprof v1.4.0 + github.com/gin-contrib/cors v1.5.0 github.com/gin-gonic/gin v1.9.1 - github.com/mattn/go-colorable v0.1.13 - github.com/mattn/go-isatty v0.0.19 - github.com/modern-go/reflect2 v1.0.2 - github.com/patrickmn/go-cache v2.1.0+incompatible - github.com/pressly/goose/v3 v3.7.0 + github.com/go-redis/redis/v8 v8.11.5 + github.com/google/uuid v1.4.0 + github.com/pressly/goose/v3 v3.16.0 github.com/prometheus/client_golang v1.14.0 + github.com/scroll-tech/go-ethereum v1.10.14-0.20231130005111-38a3a9c9198c github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.25.7 golang.org/x/sync v0.5.0 - gorm.io/driver/postgres v1.5.0 - gorm.io/gorm v1.25.2 + gorm.io/gorm v1.25.5 ) require ( - github.com/DataDog/zstd v1.5.2 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd v0.20.1-beta // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/bytedance/sonic v1.9.2 // indirect + github.com/bytedance/sonic v1.10.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/cockroachdb/errors v1.9.1 // indirect - github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect + github.com/chenzhuoyu/iasm v0.9.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect - github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/deckarep/golang-set/v2 v2.1.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/deckarep/golang-set v1.8.0 // indirect + github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.14.1 // indirect + github.com/go-playground/validator/v10 v10.15.5 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/holiman/uint256 v1.2.4 // indirect - github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/pgx/v5 v5.3.1 // indirect + github.com/huin/goupnp v1.3.0 // indirect + github.com/iden3/go-iden3-crypto v0.0.15 // indirect + github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.16.0 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/leodido/go-urn v1.2.4 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/onsi/gomega v1.27.1 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.39.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect + github.com/rjeczalik/notify v0.9.1 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/scroll-tech/zktrie v0.7.1 // indirect + github.com/sethvargo/go-retry v0.2.4 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/supranational/blst v0.3.11 // indirect + github.com/status-im/keycard-go v0.2.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/arch v0.4.0 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/arch v0.5.0 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/net v0.18.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/time v0.3.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect google.golang.org/protobuf v1.31.0 // indirect + gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - rsc.io/tmplfunc v0.0.3 // indirect - ) diff --git a/bridge-history-api/go.sum b/bridge-history-api/go.sum index 77ba88e479..8c1325c8c6 100644 --- a/bridge-history-api/go.sum +++ b/bridge-history-api/go.sum @@ -1,27 +1,17 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= +github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= -github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= @@ -30,343 +20,214 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.2 h1:GDaNjuWSGu09guE9Oql0MSTNhNCLlWwO8y/xM5BzcbM= -github.com/bytedance/sonic v1.9.2/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiaysc= +github.com/bytedance/sonic v1.10.1/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= -github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= -github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= -github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= -github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= -github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.5 h1:U6TCRciCqZRe4FPXmy1sMGxTfuk8P7u2UoinF3VbaFk= -github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= +github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= +github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= -github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g= -github.com/gin-contrib/cors v1.4.0/go.mod h1:bs9pNM0x/UsmHPBWT2xZz9ROh8xYjYkiURUfmBoMlcs= -github.com/gin-contrib/pprof v1.4.0 h1:XxiBSf5jWZ5i16lNOPbMTVdgHBdhfGRD5PZ1LWazzvg= -github.com/gin-contrib/pprof v1.4.0/go.mod h1:RrehPJasUVBPK6yTUwOl8/NP6i0vbUgmxtis+Z5KE90= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= +github.com/gin-contrib/cors v1.5.0 h1:DgGKV7DDoOn36DFkNtbHrjoRiT5ExCe+PC9/xp7aKvk= +github.com/gin-contrib/cors v1.5.0/go.mod h1:TvU7MAZ3EwrPLI2ztzTt3tqgvBCq+wn8WpZmfADjupI= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= +github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= -github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= -github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= +github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= +github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/iden3/go-iden3-crypto v0.0.15 h1:4MJYlrot1l31Fzlo2sF56u7EVFeHHJkxGXXZCtESgK4= +github.com/iden3/go-iden3-crypto v0.0.15/go.mod h1:dLpM4vEPJ3nDHzhWFXDjzkn1qHoBeOT/3UEhXsEsP3E= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= -github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= -github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.3.0/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= -github.com/jackc/pgx/v5 v5.3.1 h1:Fcr8QJ1ZeLi5zsPZqQeUZhNhxfkkKBOgJuYkJHoBOtU= -github.com/jackc/pgx/v5 v5.3.1/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= -github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jackc/pgx/v5 v5.5.0 h1:NxstgwndsTRy7eq9/kqYc/BZh5w2hHJV86wjvO+1xPw= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= -github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= -github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= -github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754= +github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/runc v1.1.10 h1:EaL5WeO9lv9wmS6SASjszOeQdSctvpbu0DdBQBizE40= +github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= +github.com/paulmach/orb v0.10.0 h1:guVYVqzxHE/CQ1KpfGO077TR0ATHSNjp4s6XGLn3W9s= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pressly/goose/v3 v3.7.0 h1:jblaZul15uCIEKHRu5KUdA+5wDA7E60JC0TOthdrtf8= -github.com/pressly/goose/v3 v3.7.0/go.mod h1:N5gqPdIzdxf3BiPWdmoPreIwHStkxsvKWE5xjUvfYNk= +github.com/pressly/goose/v3 v3.16.0 h1:xMJUsZdHLqSnCqESyKSqEfcYVYsUuup1nrOhaEFftQg= +github.com/pressly/goose/v3 v3.16.0/go.mod h1:JwdKVnmCRhnF6XLQs2mHEQtucFD49cQBdRM4UiwkxsM= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/scroll-tech/go-ethereum v1.10.14-0.20231130005111-38a3a9c9198c h1:MnAdt80steCDli4SAD0J0spBGNY+gQvbdptNjWztHcw= +github.com/scroll-tech/go-ethereum v1.10.14-0.20231130005111-38a3a9c9198c/go.mod h1:4HrFcoStbViFVy/9l/rvKl1XmizVAaPdgqI8v0U8hOc= +github.com/scroll-tech/zktrie v0.7.1 h1:NrmZNjuBzsbrKePqdHDG+t2cXnimbtezPAFS0+L9ElE= +github.com/scroll-tech/zktrie v0.7.1/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk= +github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= +github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= +github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= -github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= @@ -375,127 +236,47 @@ github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9f github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/vertica/vertica-sql-go v1.3.3 h1:fL+FKEAEy5ONmsvya2WH5T8bhkvY27y/Ik3ReR2T+Qw= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dzWP1Lu+A40W883dK/Mr3xyDSM/2MggS8GtHT0qgAnE= +github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2 h1:E0yUuuX7UmPxXm92+yQCjMveLFO3zfvYFIJVuAqsVRA= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.5.0 h1:jpGode6huXQxcskEIpOCvrU+tzo81b6+oFLUYXWtH/Y= +golang.org/x/arch v0.5.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -504,107 +285,45 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/postgres v1.5.0 h1:u2FXTy14l45qc3UeCJ7QaAXZmZfDDv0YrthvmRq1l0U= -gorm.io/driver/postgres v1.5.0/go.mod h1:FUZXzO+5Uqg5zzwzv4KK49R8lvGIyscBOqYrtI1Ce9A= -gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho= -gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= -modernc.org/cc/v3 v3.36.1 h1:CICrjwr/1M4+6OQ4HJZ/AHxjcwe67r5vPUF518MkO8A= -modernc.org/ccgo/v3 v3.16.8 h1:G0QNlTqI5uVgczBWfGKs7B++EPwCfXPWGD2MdeKloDs= -modernc.org/libc v1.16.19 h1:S8flPn5ZeXx6iw/8yNa986hwTQDrY8RXU7tObZuAozo= -modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= -modernc.org/memory v1.1.1 h1:bDOL0DIDLQv7bWhP3gMvIrnoFw+Eo6F7a2QK9HPDiFU= +gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= +gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= +lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo= +modernc.org/cc/v3 v3.41.0 h1:QoR1Sn3YWlmA1T4vLaKZfawdVtSiGx8H+cEojbC7v1Q= +modernc.org/ccgo/v3 v3.16.15 h1:KbDR3ZAVU+wiLyMESPtbtE/Add4elztFyfsWoNTgxS0= +modernc.org/libc v1.32.0 h1:yXatHTrACp3WaKNRCoZwUK7qj5V8ep1XyY0ka4oYcNc= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/sqlite v1.18.1 h1:ko32eKt3jf7eqIkCgPAeHMBXw3riNSLhl2f3loEF7o8= -modernc.org/strutil v1.1.2 h1:iFBDH6j1Z0bN/Q9udJnnFoFpENA4252qe/7/5woE5MI= -modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= +modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8= +modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/bridge-history-api/internal/config/config.go b/bridge-history-api/internal/config/config.go new file mode 100644 index 0000000000..1c135dbd6c --- /dev/null +++ b/bridge-history-api/internal/config/config.go @@ -0,0 +1,62 @@ +package config + +import ( + "encoding/json" + "os" + "path/filepath" + + "scroll-tech/common/database" +) + +// LayerConfig is the configuration of Layer1/Layer2 +type LayerConfig struct { + Confirmation uint64 `json:"confirmation"` + Endpoint string `json:"endpoint"` + StartHeight uint64 `json:"startHeight"` // Can only be configured to contract deployment height, otherwise in the current implementation, the message proof could not be successfully updated. + BlockTime int64 `json:"blockTime"` + FetchLimit uint64 `json:"fetchLimit"` + MessengerAddr string `json:"MessengerAddr"` + ETHGatewayAddr string `json:"ETHGatewayAddr"` + StandardERC20GatewayAddr string `json:"StandardERC20GatewayAddr"` + CustomERC20GatewayAddr string `json:"CustomERC20GatewayAddr"` + WETHGatewayAddr string `json:"WETHGatewayAddr"` + DAIGatewayAddr string `json:"DAIGatewayAddr"` + USDCGatewayAddr string `json:"USDCGatewayAddr"` + LIDOGatewayAddr string `json:"LIDOGatewayAddr"` + ERC721GatewayAddr string `json:"ERC721GatewayAddr"` + ERC1155GatewayAddr string `json:"ERC1155GatewayAddr"` + ScrollChainAddr string `json:"ScrollChainAddr"` + GatewayRouterAddr string `json:"GatewayRouterAddr"` + MessageQueueAddr string `json:"MessageQueueAddr"` +} + +// RedisConfig redis config +type RedisConfig struct { + Address string `json:"address"` + Password string `json:"password"` + DB int `json:"db"` +} + +// Config is the configuration of the bridge history backend +type Config struct { + L1 *LayerConfig `json:"L1"` + L2 *LayerConfig `json:"L2"` + DB *database.Config `json:"db"` + Redis *RedisConfig `json:"redis"` +} + +// NewConfig returns a new instance of Config. +func NewConfig(file string) (*Config, error) { + buf, err := os.ReadFile(filepath.Clean(file)) + if err != nil { + return nil, err + } + + cfg := &Config{} + err = json.Unmarshal(buf, cfg) + if err != nil { + return nil, err + } + + return cfg, nil +} diff --git a/bridge-history-api/internal/controller/controller.go b/bridge-history-api/internal/controller/api/controller.go similarity index 53% rename from bridge-history-api/internal/controller/controller.go rename to bridge-history-api/internal/controller/api/controller.go index d63cb35ee5..26a68d5a01 100644 --- a/bridge-history-api/internal/controller/controller.go +++ b/bridge-history-api/internal/controller/api/controller.go @@ -1,24 +1,22 @@ -package controller +package api import ( "sync" + "github.com/go-redis/redis/v8" "gorm.io/gorm" ) var ( // HistoryCtrler is controller instance HistoryCtrler *HistoryController - // BatchCtrler is controller instance - BatchCtrler *BatchController initControllerOnce sync.Once ) // InitController inits Controller with database -func InitController(db *gorm.DB) { +func InitController(db *gorm.DB, redis *redis.Client) { initControllerOnce.Do(func() { - HistoryCtrler = NewHistoryController(db) - BatchCtrler = NewBatchController(db) + HistoryCtrler = NewHistoryController(db, redis) }) } diff --git a/bridge-history-api/internal/controller/api/history_controller.go b/bridge-history-api/internal/controller/api/history_controller.go new file mode 100644 index 0000000000..b00223d761 --- /dev/null +++ b/bridge-history-api/internal/controller/api/history_controller.go @@ -0,0 +1,94 @@ +package api + +import ( + "github.com/gin-gonic/gin" + "github.com/go-redis/redis/v8" + "gorm.io/gorm" + + "scroll-tech/bridge-history-api/internal/logic" + "scroll-tech/bridge-history-api/internal/types" +) + +// HistoryController contains the query claimable txs service +type HistoryController struct { + historyLogic *logic.HistoryLogic +} + +// NewHistoryController return HistoryController instance +func NewHistoryController(db *gorm.DB, redis *redis.Client) *HistoryController { + return &HistoryController{ + historyLogic: logic.NewHistoryLogic(db, redis), + } +} + +// GetL2UnclaimedWithdrawalsByAddress defines the http get method behavior +func (c *HistoryController) GetL2UnclaimedWithdrawalsByAddress(ctx *gin.Context) { + var req types.QueryByAddressRequest + if err := ctx.ShouldBind(&req); err != nil { + types.RenderFailure(ctx, types.ErrParameterInvalidNo, err) + return + } + + pagedTxs, total, err := c.historyLogic.GetL2UnclaimedWithdrawalsByAddress(ctx, req.Address, req.Page, req.PageSize) + if err != nil { + types.RenderFailure(ctx, types.ErrGetL2ClaimableWithdrawalsError, err) + return + } + + resultData := &types.ResultData{Result: pagedTxs, Total: total} + types.RenderSuccess(ctx, resultData) +} + +// GetL2WithdrawalsByAddress defines the http get method behavior +func (c *HistoryController) GetL2WithdrawalsByAddress(ctx *gin.Context) { + var req types.QueryByAddressRequest + if err := ctx.ShouldBind(&req); err != nil { + types.RenderFailure(ctx, types.ErrParameterInvalidNo, err) + return + } + + pagedTxs, total, err := c.historyLogic.GetL2WithdrawalsByAddress(ctx, req.Address, req.Page, req.PageSize) + if err != nil { + types.RenderFailure(ctx, types.ErrGetL2WithdrawalsError, err) + return + } + + resultData := &types.ResultData{Result: pagedTxs, Total: total} + types.RenderSuccess(ctx, resultData) +} + +// GetTxsByAddress defines the http get method behavior +func (c *HistoryController) GetTxsByAddress(ctx *gin.Context) { + var req types.QueryByAddressRequest + if err := ctx.ShouldBind(&req); err != nil { + types.RenderFailure(ctx, types.ErrParameterInvalidNo, err) + return + } + + pagedTxs, total, err := c.historyLogic.GetTxsByAddress(ctx, req.Address, req.Page, req.PageSize) + if err != nil { + types.RenderFailure(ctx, types.ErrGetTxsError, err) + return + } + + resultData := &types.ResultData{Result: pagedTxs, Total: total} + types.RenderSuccess(ctx, resultData) +} + +// PostQueryTxsByHashes defines the http post method behavior +func (c *HistoryController) PostQueryTxsByHashes(ctx *gin.Context) { + var req types.QueryByHashRequest + if err := ctx.ShouldBindJSON(&req); err != nil { + types.RenderFailure(ctx, types.ErrParameterInvalidNo, err) + return + } + + results, err := c.historyLogic.GetTxsByHashes(ctx, req.Txs) + if err != nil { + types.RenderFailure(ctx, types.ErrGetTxsByHashError, err) + return + } + + resultData := &types.ResultData{Result: results, Total: uint64(len(results))} + types.RenderSuccess(ctx, resultData) +} diff --git a/bridge-history-api/internal/controller/batch_controller.go b/bridge-history-api/internal/controller/batch_controller.go deleted file mode 100644 index 03620f13f9..0000000000 --- a/bridge-history-api/internal/controller/batch_controller.go +++ /dev/null @@ -1,37 +0,0 @@ -package controller - -import ( - "github.com/gin-gonic/gin" - "gorm.io/gorm" - - "bridge-history-api/internal/logic" - "bridge-history-api/internal/types" -) - -// BatchController contains the query claimable txs service -type BatchController struct { - batchLogic *logic.BatchLogic -} - -// NewBatchController return NewBatchController instance -func NewBatchController(db *gorm.DB) *BatchController { - return &BatchController{ - batchLogic: logic.NewBatchLogic(db), - } -} - -// GetWithdrawRootByBatchIndex defines the http get method behavior -func (b *BatchController) GetWithdrawRootByBatchIndex(ctx *gin.Context) { - var req types.QueryByBatchIndexRequest - if err := ctx.ShouldBind(&req); err != nil { - types.RenderFailure(ctx, types.ErrParameterInvalidNo, err) - return - } - result, err := b.batchLogic.GetWithdrawRootByBatchIndex(ctx, req.BatchIndex) - if err != nil { - types.RenderFailure(ctx, types.ErrGetWithdrawRootByBatchIndexFailure, err) - return - } - - types.RenderSuccess(ctx, result) -} diff --git a/bridge-history-api/internal/controller/fetcher/l1_fetcher.go b/bridge-history-api/internal/controller/fetcher/l1_fetcher.go new file mode 100644 index 0000000000..9d1125270a --- /dev/null +++ b/bridge-history-api/internal/controller/fetcher/l1_fetcher.go @@ -0,0 +1,153 @@ +package fetcher + +import ( + "context" + "math/big" + "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/scroll-tech/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/ethclient" + "github.com/scroll-tech/go-ethereum/log" + "gorm.io/gorm" + + "scroll-tech/bridge-history-api/internal/config" + "scroll-tech/bridge-history-api/internal/logic" + "scroll-tech/bridge-history-api/internal/utils" +) + +// L1MessageFetcher fetches cross message events from L1 and saves them to database. +type L1MessageFetcher struct { + ctx context.Context + cfg *config.LayerConfig + client *ethclient.Client + + l1SyncHeight uint64 + l1LastSyncBlockHash common.Hash + + eventUpdateLogic *logic.EventUpdateLogic + l1FetcherLogic *logic.L1FetcherLogic + + l1MessageFetcherRunningTotal prometheus.Counter + l1MessageFetcherReorgTotal prometheus.Counter + l1MessageFetcherSyncHeight prometheus.Gauge +} + +// NewL1MessageFetcher creates a new L1MessageFetcher instance. +func NewL1MessageFetcher(ctx context.Context, cfg *config.LayerConfig, db *gorm.DB, client *ethclient.Client) *L1MessageFetcher { + c := &L1MessageFetcher{ + ctx: ctx, + cfg: cfg, + client: client, + eventUpdateLogic: logic.NewEventUpdateLogic(db, true), + l1FetcherLogic: logic.NewL1FetcherLogic(cfg, db, client), + } + + reg := prometheus.DefaultRegisterer + c.l1MessageFetcherRunningTotal = promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "L1_message_fetcher_running_total", + Help: "Current count of running L1 message fetcher instances.", + }) + c.l1MessageFetcherReorgTotal = promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "L1_message_fetcher_reorg_total", + Help: "Total count of blockchain reorgs encountered by the L1 message fetcher.", + }) + c.l1MessageFetcherSyncHeight = promauto.With(reg).NewGauge(prometheus.GaugeOpts{ + Name: "L1_message_fetcher_sync_height", + Help: "Latest blockchain height the L1 message fetcher has synced with.", + }) + + return c +} + +// Start starts the L1 message fetching process. +func (c *L1MessageFetcher) Start() { + messageSyncedHeight, batchSyncedHeight, dbErr := c.eventUpdateLogic.GetL1SyncHeight(c.ctx) + if dbErr != nil { + log.Crit("L1MessageFetcher start failed", "err", dbErr) + } + + l1SyncHeight := messageSyncedHeight + if batchSyncedHeight > l1SyncHeight { + l1SyncHeight = batchSyncedHeight + } + if c.cfg.StartHeight > l1SyncHeight { + l1SyncHeight = c.cfg.StartHeight - 1 + } + + // Sync from an older block to prevent reorg during restart. + if l1SyncHeight < logic.L1ReorgSafeDepth { + l1SyncHeight = 0 + } else { + l1SyncHeight -= logic.L1ReorgSafeDepth + } + + header, err := c.client.HeaderByNumber(c.ctx, new(big.Int).SetUint64(l1SyncHeight)) + if err != nil { + log.Crit("failed to get L1 header by number", "block number", l1SyncHeight, "err", err) + return + } + + c.updateL1SyncHeight(l1SyncHeight, header.Hash()) + + log.Info("Start L1 message fetcher", "message synced height", messageSyncedHeight, "batch synced height", batchSyncedHeight, "config start height", c.cfg.StartHeight, "sync start height", c.l1SyncHeight+1) + + tick := time.NewTicker(time.Duration(c.cfg.BlockTime) * time.Second) + go func() { + for { + select { + case <-c.ctx.Done(): + tick.Stop() + return + case <-tick.C: + c.fetchAndSaveEvents(c.cfg.Confirmation) + } + } + }() +} + +func (c *L1MessageFetcher) fetchAndSaveEvents(confirmation uint64) { + c.l1MessageFetcherRunningTotal.Inc() + startHeight := c.l1SyncHeight + 1 + endHeight, rpcErr := utils.GetBlockNumber(c.ctx, c.client, confirmation) + if rpcErr != nil { + log.Error("failed to get L1 block number", "confirmation", confirmation, "err", rpcErr) + return + } + + log.Info("fetch and save missing L1 events", "start height", startHeight, "end height", endHeight, "confirmation", confirmation) + + for from := startHeight; from <= endHeight; from += c.cfg.FetchLimit { + to := from + c.cfg.FetchLimit - 1 + if to > endHeight { + to = endHeight + } + + isReorg, resyncHeight, lastBlockHash, l1FetcherResult, fetcherErr := c.l1FetcherLogic.L1Fetcher(c.ctx, from, to, c.l1LastSyncBlockHash) + if fetcherErr != nil { + log.Error("failed to fetch L1 events", "from", from, "to", to, "err", fetcherErr) + return + } + + if isReorg { + c.l1MessageFetcherReorgTotal.Inc() + log.Warn("L1 reorg happened, exit and re-enter fetchAndSaveEvents", "re-sync height", resyncHeight) + c.updateL1SyncHeight(resyncHeight, lastBlockHash) + return + } + + if insertUpdateErr := c.eventUpdateLogic.L1InsertOrUpdate(c.ctx, l1FetcherResult); insertUpdateErr != nil { + log.Error("failed to save L1 events", "from", from, "to", to, "err", insertUpdateErr) + return + } + + c.updateL1SyncHeight(to, lastBlockHash) + } +} + +func (c *L1MessageFetcher) updateL1SyncHeight(height uint64, blockHash common.Hash) { + c.l1MessageFetcherSyncHeight.Set(float64(height)) + c.l1LastSyncBlockHash = blockHash + c.l1SyncHeight = height +} diff --git a/bridge-history-api/internal/controller/fetcher/l2_fetcher.go b/bridge-history-api/internal/controller/fetcher/l2_fetcher.go new file mode 100644 index 0000000000..9a488f131f --- /dev/null +++ b/bridge-history-api/internal/controller/fetcher/l2_fetcher.go @@ -0,0 +1,152 @@ +package fetcher + +import ( + "context" + "math/big" + "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/scroll-tech/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/ethclient" + "github.com/scroll-tech/go-ethereum/log" + "gorm.io/gorm" + + "scroll-tech/bridge-history-api/internal/config" + "scroll-tech/bridge-history-api/internal/logic" + "scroll-tech/bridge-history-api/internal/utils" +) + +// L2MessageFetcher fetches cross message events from L2 and saves them to database. +type L2MessageFetcher struct { + ctx context.Context + cfg *config.LayerConfig + db *gorm.DB + client *ethclient.Client + l2SyncHeight uint64 + l2LastSyncBlockHash common.Hash + + eventUpdateLogic *logic.EventUpdateLogic + l2FetcherLogic *logic.L2FetcherLogic + + l2MessageFetcherRunningTotal prometheus.Counter + l2MessageFetcherReorgTotal prometheus.Counter + l2MessageFetcherSyncHeight prometheus.Gauge +} + +// NewL2MessageFetcher creates a new L2MessageFetcher instance. +func NewL2MessageFetcher(ctx context.Context, cfg *config.LayerConfig, db *gorm.DB, client *ethclient.Client) *L2MessageFetcher { + c := &L2MessageFetcher{ + ctx: ctx, + cfg: cfg, + db: db, + client: client, + eventUpdateLogic: logic.NewEventUpdateLogic(db, false), + l2FetcherLogic: logic.NewL2FetcherLogic(cfg, db, client), + } + + reg := prometheus.DefaultRegisterer + c.l2MessageFetcherRunningTotal = promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "L2_message_fetcher_running_total", + Help: "Current count of running L2 message fetcher instances.", + }) + c.l2MessageFetcherReorgTotal = promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "L2_message_fetcher_reorg_total", + Help: "Total count of blockchain reorgs encountered by the L2 message fetcher.", + }) + c.l2MessageFetcherSyncHeight = promauto.With(reg).NewGauge(prometheus.GaugeOpts{ + Name: "L2_message_fetcher_sync_height", + Help: "Latest blockchain height the L2 message fetcher has synced with.", + }) + + return c +} + +// Start starts the L2 message fetching process. +func (c *L2MessageFetcher) Start() { + l2SentMessageSyncedHeight, dbErr := c.eventUpdateLogic.GetL2MessageSyncedHeightInDB(c.ctx) + if dbErr != nil { + log.Crit("failed to get L2 cross message processed height", "err", dbErr) + return + } + + l2SyncHeight := l2SentMessageSyncedHeight + // Sync from an older block to prevent reorg during restart. + if l2SyncHeight < logic.L2ReorgSafeDepth { + l2SyncHeight = 0 + } else { + l2SyncHeight -= logic.L2ReorgSafeDepth + } + + header, err := c.client.HeaderByNumber(c.ctx, new(big.Int).SetUint64(l2SyncHeight)) + if err != nil { + log.Crit("failed to get L2 header by number", "block number", l2SyncHeight, "err", err) + return + } + + c.updateL2SyncHeight(l2SyncHeight, header.Hash()) + + log.Info("Start L2 message fetcher", "message synced height", l2SentMessageSyncedHeight, "sync start height", l2SyncHeight+1) + + tick := time.NewTicker(time.Duration(c.cfg.BlockTime) * time.Second) + go func() { + for { + select { + case <-c.ctx.Done(): + tick.Stop() + return + case <-tick.C: + c.fetchAndSaveEvents(c.cfg.Confirmation) + } + } + }() +} + +func (c *L2MessageFetcher) fetchAndSaveEvents(confirmation uint64) { + startHeight := c.l2SyncHeight + 1 + endHeight, rpcErr := utils.GetBlockNumber(c.ctx, c.client, confirmation) + if rpcErr != nil { + log.Error("failed to get L2 block number", "confirmation", confirmation, "err", rpcErr) + return + } + log.Info("fetch and save missing L2 events", "start height", startHeight, "end height", endHeight, "confirmation", confirmation) + c.l2MessageFetcherRunningTotal.Inc() + + for from := startHeight; from <= endHeight; from += c.cfg.FetchLimit { + to := from + c.cfg.FetchLimit - 1 + if to > endHeight { + to = endHeight + } + + isReorg, resyncHeight, lastBlockHash, l2FetcherResult, fetcherErr := c.l2FetcherLogic.L2Fetcher(c.ctx, from, to, c.l2LastSyncBlockHash) + if fetcherErr != nil { + log.Error("failed to fetch L2 events", "from", from, "to", to, "err", fetcherErr) + return + } + + if isReorg { + c.l2MessageFetcherReorgTotal.Inc() + log.Warn("L2 reorg happened, exit and re-enter fetchAndSaveEvents", "re-sync height", resyncHeight) + c.updateL2SyncHeight(resyncHeight, lastBlockHash) + return + } + + if insertUpdateErr := c.eventUpdateLogic.L2InsertOrUpdate(c.ctx, l2FetcherResult); insertUpdateErr != nil { + log.Error("failed to save L2 events", "from", from, "to", to, "err", insertUpdateErr) + return + } + + if updateErr := c.eventUpdateLogic.UpdateL1BatchIndexAndStatus(c.ctx, c.l2SyncHeight); updateErr != nil { + log.Error("failed to update L1 batch index and status", "from", from, "to", to, "err", updateErr) + return + } + + c.updateL2SyncHeight(to, lastBlockHash) + } +} + +func (c *L2MessageFetcher) updateL2SyncHeight(height uint64, blockHash common.Hash) { + c.l2MessageFetcherSyncHeight.Set(float64(height)) + c.l2LastSyncBlockHash = blockHash + c.l2SyncHeight = height +} diff --git a/bridge-history-api/internal/controller/history_controller.go b/bridge-history-api/internal/controller/history_controller.go deleted file mode 100644 index 6e3932e9ae..0000000000 --- a/bridge-history-api/internal/controller/history_controller.go +++ /dev/null @@ -1,161 +0,0 @@ -package controller - -import ( - "errors" - "reflect" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" - "github.com/gin-gonic/gin" - "github.com/patrickmn/go-cache" - "golang.org/x/sync/singleflight" - "gorm.io/gorm" - - "bridge-history-api/internal/logic" - "bridge-history-api/internal/types" -) - -const ( - cacheKeyPrefixClaimableTxsByAddr = "claimableTxsByAddr:" - cacheKeyPrefixQueryTxsByHash = "queryTxsByHash:" -) - -// HistoryController contains the query claimable txs service -type HistoryController struct { - historyLogic *logic.HistoryLogic - cache *cache.Cache - singleFlight singleflight.Group - cacheMetrics *cacheMetrics -} - -// NewHistoryController return HistoryController instance -func NewHistoryController(db *gorm.DB) *HistoryController { - return &HistoryController{ - historyLogic: logic.NewHistoryLogic(db), - cache: cache.New(30*time.Second, 10*time.Minute), - cacheMetrics: initCacheMetrics(), - } -} - -// GetAllClaimableTxsByAddr defines the http get method behavior -func (c *HistoryController) GetAllClaimableTxsByAddr(ctx *gin.Context) { - var req types.QueryByAddressRequest - if err := ctx.ShouldBind(&req); err != nil { - types.RenderFailure(ctx, types.ErrParameterInvalidNo, err) - return - } - - cacheKey := cacheKeyPrefixClaimableTxsByAddr + req.Address - if cachedData, found := c.cache.Get(cacheKey); found { - c.cacheMetrics.cacheHits.WithLabelValues("GetAllClaimableTxsByAddr").Inc() - // Log cache hit along with request param. - log.Info("cache hit", "request", req) - if cachedData == nil { - types.RenderSuccess(ctx, &types.ResultData{}) - return - } else if resultData, ok := cachedData.(*types.ResultData); ok { - types.RenderSuccess(ctx, resultData) - return - } - // Log error for unexpected type, then fetch data from the database. - log.Error("unexpected type in cache", "expected", "*types.ResultData", "got", reflect.TypeOf(cachedData)) - } else { - c.cacheMetrics.cacheMisses.WithLabelValues("GetAllClaimableTxsByAddr").Inc() - // Log cache miss along with request param. - log.Info("cache miss", "request", req) - } - - result, err, _ := c.singleFlight.Do(cacheKey, func() (interface{}, error) { - txs, total, err := c.historyLogic.GetClaimableTxsByAddress(ctx, common.HexToAddress(req.Address)) - if err != nil { - return nil, err - } - resultData := &types.ResultData{Result: txs, Total: total} - c.cache.Set(cacheKey, resultData, cache.DefaultExpiration) - return resultData, nil - }) - - if err != nil { - types.RenderFailure(ctx, types.ErrGetClaimablesFailure, err) - return - } - - if resultData, ok := result.(*types.ResultData); ok { - types.RenderSuccess(ctx, resultData) - } else { - log.Error("unexpected type from singleflight", "expected", "*types.ResultData", "got", reflect.TypeOf(result)) - types.RenderFailure(ctx, types.ErrGetClaimablesFailure, errors.New("unexpected error")) - } -} - -// PostQueryTxsByHash defines the http post method behavior -func (c *HistoryController) PostQueryTxsByHash(ctx *gin.Context) { - var req types.QueryByHashRequest - if err := ctx.ShouldBindJSON(&req); err != nil { - types.RenderFailure(ctx, types.ErrParameterInvalidNo, err) - return - } - - if len(req.Txs) > 10 { - types.RenderFailure(ctx, types.ErrParameterInvalidNo, errors.New("the number of hashes in the request exceeds the allowed maximum of 10")) - return - } - hashesMap := make(map[string]struct{}, len(req.Txs)) - results := make([]*types.TxHistoryInfo, 0, len(req.Txs)) - uncachedHashes := make([]string, 0, len(req.Txs)) - for _, hash := range req.Txs { - if _, exists := hashesMap[hash]; exists { - // Skip duplicate tx hash values. - continue - } - hashesMap[hash] = struct{}{} - - cacheKey := cacheKeyPrefixQueryTxsByHash + hash - if cachedData, found := c.cache.Get(cacheKey); found { - c.cacheMetrics.cacheHits.WithLabelValues("PostQueryTxsByHash").Inc() - // Log cache hit along with tx hash. - log.Info("cache hit", "tx hash", hash) - if cachedData == nil { - continue - } else if txInfo, ok := cachedData.(*types.TxHistoryInfo); ok { - results = append(results, txInfo) - } else { - log.Error("unexpected type in cache", "expected", "*types.TxHistoryInfo", "got", reflect.TypeOf(cachedData)) - uncachedHashes = append(uncachedHashes, hash) - } - } else { - c.cacheMetrics.cacheMisses.WithLabelValues("PostQueryTxsByHash").Inc() - // Log cache miss along with tx hash. - log.Info("cache miss", "tx hash", hash) - uncachedHashes = append(uncachedHashes, hash) - } - } - - if len(uncachedHashes) > 0 { - dbResults, err := c.historyLogic.GetTxsByHashes(ctx, uncachedHashes) - if err != nil { - types.RenderFailure(ctx, types.ErrGetTxsByHashFailure, err) - return - } - - resultMap := make(map[string]*types.TxHistoryInfo) - for _, result := range dbResults { - results = append(results, result) - resultMap[result.Hash] = result - } - - for _, hash := range uncachedHashes { - cacheKey := cacheKeyPrefixQueryTxsByHash + hash - result, found := resultMap[hash] - if found { - c.cache.Set(cacheKey, result, cache.DefaultExpiration) - } else { - c.cache.Set(cacheKey, nil, cache.DefaultExpiration) - } - } - } - - resultData := &types.ResultData{Result: results, Total: uint64(len(results))} - types.RenderSuccess(ctx, resultData) -} diff --git a/bridge-history-api/internal/logic/batch_logic.go b/bridge-history-api/internal/logic/batch_logic.go deleted file mode 100644 index c61ba5aa9f..0000000000 --- a/bridge-history-api/internal/logic/batch_logic.go +++ /dev/null @@ -1,35 +0,0 @@ -package logic - -import ( - "context" - - "github.com/ethereum/go-ethereum/log" - "gorm.io/gorm" - - "bridge-history-api/orm" -) - -// BatchLogic example service. -type BatchLogic struct { - rollupOrm *orm.RollupBatch -} - -// NewBatchLogic returns services backed with a "db" -func NewBatchLogic(db *gorm.DB) *BatchLogic { - logic := &BatchLogic{rollupOrm: orm.NewRollupBatch(db)} - return logic -} - -// GetWithdrawRootByBatchIndex get withdraw root by batch index from db -func (b *BatchLogic) GetWithdrawRootByBatchIndex(ctx context.Context, batchIndex uint64) (string, error) { - batch, err := b.rollupOrm.GetRollupBatchByIndex(ctx, batchIndex) - if err != nil { - log.Debug("getWithdrawRootByBatchIndex failed", "error", err) - return "", err - } - if batch == nil { - log.Debug("getWithdrawRootByBatchIndex failed", "error", "batch not found") - return "", nil - } - return batch.WithdrawRoot, nil -} diff --git a/bridge-history-api/internal/logic/event_update.go b/bridge-history-api/internal/logic/event_update.go new file mode 100644 index 0000000000..2ec430a938 --- /dev/null +++ b/bridge-history-api/internal/logic/event_update.go @@ -0,0 +1,210 @@ +package logic + +import ( + "context" + "fmt" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/scroll-tech/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/log" + "gorm.io/gorm" + + "scroll-tech/bridge-history-api/internal/orm" + "scroll-tech/bridge-history-api/internal/utils" +) + +// EventUpdateLogic the logic of insert/update the database +type EventUpdateLogic struct { + db *gorm.DB + crossMessageOrm *orm.CrossMessage + batchEventOrm *orm.BatchEvent + + eventUpdateLogicL1FinalizeBatchEventL2BlockUpdateHeight prometheus.Gauge + eventUpdateLogicL2MessageNonceUpdateHeight prometheus.Gauge +} + +// NewEventUpdateLogic creates a EventUpdateLogic instance +func NewEventUpdateLogic(db *gorm.DB, isL1 bool) *EventUpdateLogic { + b := &EventUpdateLogic{ + db: db, + crossMessageOrm: orm.NewCrossMessage(db), + batchEventOrm: orm.NewBatchEvent(db), + } + + if !isL1 { + reg := prometheus.DefaultRegisterer + b.eventUpdateLogicL1FinalizeBatchEventL2BlockUpdateHeight = promauto.With(reg).NewGauge(prometheus.GaugeOpts{ + Name: "event_update_logic_L1_finalize_batch_event_L2_block_update_height", + Help: "L2 block height of the latest L1 batch event that has been finalized and updated in the message_table.", + }) + b.eventUpdateLogicL2MessageNonceUpdateHeight = promauto.With(reg).NewGauge(prometheus.GaugeOpts{ + Name: "event_update_logic_L2_message_nonce_update_height", + Help: "L2 message nonce height in the latest L1 batch event that has been finalized and updated in the message_table.", + }) + } + + return b +} + +// GetL1SyncHeight gets the l1 sync height from db +func (b *EventUpdateLogic) GetL1SyncHeight(ctx context.Context) (uint64, uint64, error) { + messageSyncedHeight, err := b.crossMessageOrm.GetMessageSyncedHeightInDB(ctx, orm.MessageTypeL1SentMessage) + if err != nil { + log.Error("failed to get L1 cross message synced height", "error", err) + return 0, 0, err + } + + batchSyncedHeight, err := b.batchEventOrm.GetBatchEventSyncedHeightInDB(ctx) + if err != nil { + log.Error("failed to get L1 batch event synced height", "error", err) + return 0, 0, err + } + + return messageSyncedHeight, batchSyncedHeight, nil +} + +// GetL2MessageSyncedHeightInDB gets L2 messages synced height +func (b *EventUpdateLogic) GetL2MessageSyncedHeightInDB(ctx context.Context) (uint64, error) { + l2SentMessageSyncedHeight, err := b.crossMessageOrm.GetMessageSyncedHeightInDB(ctx, orm.MessageTypeL2SentMessage) + if err != nil { + log.Error("failed to get L2 cross message processed height", "err", err) + return 0, err + } + return l2SentMessageSyncedHeight, nil +} + +// L1InsertOrUpdate inserts or updates l1 messages +func (b *EventUpdateLogic) L1InsertOrUpdate(ctx context.Context, l1FetcherResult *L1FilterResult) error { + err := b.db.Transaction(func(tx *gorm.DB) error { + if txErr := b.crossMessageOrm.InsertOrUpdateL1Messages(ctx, l1FetcherResult.DepositMessages, tx); txErr != nil { + log.Error("failed to insert L1 deposit messages", "err", txErr) + return txErr + } + + if txErr := b.crossMessageOrm.InsertOrUpdateL1RelayedMessagesOfL2Withdrawals(ctx, l1FetcherResult.RelayedMessages, tx); txErr != nil { + log.Error("failed to update L1 relayed messages of L2 withdrawals", "err", txErr) + return txErr + } + + if txErr := b.batchEventOrm.InsertOrUpdateBatchEvents(ctx, l1FetcherResult.BatchEvents, tx); txErr != nil { + log.Error("failed to insert or update batch events", "err", txErr) + return txErr + } + + if txErr := b.crossMessageOrm.UpdateL1MessageQueueEventsInfo(ctx, l1FetcherResult.MessageQueueEvents, tx); txErr != nil { + log.Error("failed to insert L1 message queue events", "err", txErr) + return txErr + } + + if txErr := b.crossMessageOrm.InsertFailedGatewayRouterTxs(ctx, l1FetcherResult.RevertedTxs, tx); txErr != nil { + log.Error("failed to insert L1 failed gateway router transactions", "err", txErr) + return txErr + } + return nil + }) + + if err != nil { + log.Error("failed to update db of L1 events", "err", err) + return err + } + + return nil +} + +func (b *EventUpdateLogic) updateL2WithdrawMessageInfos(ctx context.Context, batchIndex, startBlock, endBlock uint64) error { + l2WithdrawMessages, err := b.crossMessageOrm.GetL2WithdrawalsByBlockRange(ctx, startBlock, endBlock) + if err != nil { + log.Error("failed to get L2 withdrawals by batch index", "batch index", batchIndex, "err", err) + return err + } + + if len(l2WithdrawMessages) == 0 { + return nil + } + + withdrawTrie := utils.NewWithdrawTrie() + lastMessage, err := b.crossMessageOrm.GetL2LatestFinalizedWithdrawal(ctx) + if err != nil { + log.Error("failed to get latest L2 finalized sent message event", "err", err) + return err + } + + if lastMessage != nil { + withdrawTrie.Initialize(lastMessage.MessageNonce, common.HexToHash(lastMessage.MessageHash), lastMessage.MerkleProof) + } + + if withdrawTrie.NextMessageNonce != l2WithdrawMessages[0].MessageNonce { + log.Error("nonce mismatch", "expected next message nonce", withdrawTrie.NextMessageNonce, "actuall next message nonce", l2WithdrawMessages[0].MessageNonce) + return fmt.Errorf("nonce mismatch") + } + + messageHashes := make([]common.Hash, len(l2WithdrawMessages)) + for i, message := range l2WithdrawMessages { + messageHashes[i] = common.HexToHash(message.MessageHash) + } + + proofs := withdrawTrie.AppendMessages(messageHashes) + + for i, message := range l2WithdrawMessages { + message.MerkleProof = proofs[i] + message.RollupStatus = int(orm.RollupStatusTypeFinalized) + message.BatchIndex = batchIndex + } + + if dbErr := b.crossMessageOrm.UpdateBatchIndexRollupStatusMerkleProofOfL2Messages(ctx, l2WithdrawMessages); dbErr != nil { + log.Error("failed to update batch index and rollup status and merkle proof of L2 messages", "err", dbErr) + return dbErr + } + + b.eventUpdateLogicL2MessageNonceUpdateHeight.Set(float64(withdrawTrie.NextMessageNonce - 1)) + return nil +} + +// UpdateL1BatchIndexAndStatus updates L1 finalized batch index and status +func (b *EventUpdateLogic) UpdateL1BatchIndexAndStatus(ctx context.Context, height uint64) error { + finalizedBatches, err := b.batchEventOrm.GetFinalizedBatchesLEBlockHeight(ctx, height) + if err != nil { + log.Error("failed to get batches >= block height", "error", err) + return err + } + + for _, finalizedBatch := range finalizedBatches { + log.Info("update finalized batch info of L2 withdrawals", "index", finalizedBatch.BatchIndex, "start", finalizedBatch.StartBlockNumber, "end", finalizedBatch.EndBlockNumber) + if updateErr := b.updateL2WithdrawMessageInfos(ctx, finalizedBatch.BatchIndex, finalizedBatch.StartBlockNumber, finalizedBatch.EndBlockNumber); updateErr != nil { + log.Error("failed to update L2 withdraw message infos", "index", finalizedBatch.BatchIndex, "start", finalizedBatch.StartBlockNumber, "end", finalizedBatch.EndBlockNumber, "error", updateErr) + return updateErr + } + if dbErr := b.batchEventOrm.UpdateBatchEventStatus(ctx, finalizedBatch.BatchIndex); dbErr != nil { + log.Error("failed to update batch event status as updated", "index", finalizedBatch.BatchIndex, "start", finalizedBatch.StartBlockNumber, "end", finalizedBatch.EndBlockNumber, "error", dbErr) + return dbErr + } + b.eventUpdateLogicL1FinalizeBatchEventL2BlockUpdateHeight.Set(float64(finalizedBatch.EndBlockNumber)) + } + return nil +} + +// L2InsertOrUpdate inserts or updates L2 messages +func (b *EventUpdateLogic) L2InsertOrUpdate(ctx context.Context, l2FetcherResult *L2FilterResult) error { + err := b.db.Transaction(func(tx *gorm.DB) error { + if txErr := b.crossMessageOrm.InsertOrUpdateL2Messages(ctx, l2FetcherResult.WithdrawMessages, tx); txErr != nil { + log.Error("failed to insert L2 withdrawal messages", "err", txErr) + return txErr + } + if txErr := b.crossMessageOrm.InsertOrUpdateL2RelayedMessagesOfL1Deposits(ctx, l2FetcherResult.RelayedMessages, tx); txErr != nil { + log.Error("failed to update L2 relayed messages of L1 deposits", "err", txErr) + return txErr + } + if txErr := b.crossMessageOrm.InsertFailedGatewayRouterTxs(ctx, l2FetcherResult.OtherRevertedTxs, tx); txErr != nil { + log.Error("failed to insert L2 failed gateway router transactions", "err", txErr) + return txErr + } + return nil + }) + + if err != nil { + log.Error("failed to update db of L2 events", "err", err) + return err + } + return nil +} diff --git a/bridge-history-api/internal/logic/history_logic.go b/bridge-history-api/internal/logic/history_logic.go index 6bbf48ab34..5765dcda1a 100644 --- a/bridge-history-api/internal/logic/history_logic.go +++ b/bridge-history-api/internal/logic/history_logic.go @@ -2,186 +2,395 @@ package logic import ( "context" + "encoding/json" + "errors" + "reflect" "strconv" + "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" + "github.com/go-redis/redis/v8" + "github.com/scroll-tech/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/log" + "golang.org/x/sync/singleflight" "gorm.io/gorm" - "bridge-history-api/internal/types" - "bridge-history-api/orm" + "scroll-tech/bridge-history-api/internal/orm" + "scroll-tech/bridge-history-api/internal/types" ) -// HistoryLogic example service. +const ( + cacheKeyPrefixL2ClaimableWithdrawalsByAddr = "l2ClaimableWithdrawalsByAddr:" + cacheKeyPrefixL2WithdrawalsByAddr = "l2WithdrawalsByAddr:" + cacheKeyPrefixTxsByAddr = "txsByAddr:" + cacheKeyPrefixQueryTxsByHashes = "queryTxsByHashes:" + cacheKeyExpiredTime = 1 * time.Minute +) + +// HistoryLogic services. type HistoryLogic struct { - db *gorm.DB + crossMessageOrm *orm.CrossMessage + batchEventOrm *orm.BatchEvent + redis *redis.Client + singleFlight singleflight.Group + cacheMetrics *cacheMetrics } -// NewHistoryLogic returns services backed with a "db" -func NewHistoryLogic(db *gorm.DB) *HistoryLogic { - logic := &HistoryLogic{db: db} +// NewHistoryLogic returns bridge history services. +func NewHistoryLogic(db *gorm.DB, redis *redis.Client) *HistoryLogic { + logic := &HistoryLogic{ + crossMessageOrm: orm.NewCrossMessage(db), + batchEventOrm: orm.NewBatchEvent(db), + redis: redis, + cacheMetrics: initCacheMetrics(), + } return logic } -// updateL2TxClaimInfo updates UserClaimInfos for each transaction history. -func updateL2TxClaimInfo(ctx context.Context, txHistories []*types.TxHistoryInfo, db *gorm.DB) { - l2SentMsgOrm := orm.NewL2SentMsg(db) - rollupOrm := orm.NewRollupBatch(db) +// GetL2UnclaimedWithdrawalsByAddress gets all unclaimed withdrawal txs under given address. +func (h *HistoryLogic) GetL2UnclaimedWithdrawalsByAddress(ctx context.Context, address string, page, pageSize uint64) ([]*types.TxHistoryInfo, uint64, error) { + cacheKey := cacheKeyPrefixL2ClaimableWithdrawalsByAddr + address + pagedTxs, total, isHit, err := h.getCachedTxsInfo(ctx, cacheKey, page, pageSize) + if err != nil { + log.Error("failed to get cached tx info", "cached key", cacheKey, "page", page, "page size", pageSize, "error", err) + return nil, 0, err + } + + if isHit { + h.cacheMetrics.cacheHits.WithLabelValues("GetL2UnclaimedWithdrawalsByAddress").Inc() + log.Info("cache hit", "cache key", cacheKey) + return pagedTxs, total, nil + } + + h.cacheMetrics.cacheMisses.WithLabelValues("GetL2UnclaimedWithdrawalsByAddress").Inc() + log.Info("cache miss", "cache key", cacheKey) + + result, err, _ := h.singleFlight.Do(cacheKey, func() (interface{}, error) { + var messages []*orm.CrossMessage + messages, err = h.crossMessageOrm.GetL2UnclaimedWithdrawalsByAddress(ctx, address) + if err != nil { + return nil, err + } + return messages, nil + }) + if err != nil { + log.Error("failed to get L2 claimable withdrawals by address", "address", address, "error", err) + return nil, 0, err + } + + messages, ok := result.([]*orm.CrossMessage) + if !ok { + log.Error("unexpected type", "expected", "[]*types.TxHistoryInfo", "got", reflect.TypeOf(result), "address", address) + return nil, 0, errors.New("unexpected error") + } + + return h.processAndCacheTxHistoryInfo(ctx, cacheKey, messages, page, pageSize) +} + +// GetL2WithdrawalsByAddress gets all withdrawal txs under given address. +func (h *HistoryLogic) GetL2WithdrawalsByAddress(ctx context.Context, address string, page, pageSize uint64) ([]*types.TxHistoryInfo, uint64, error) { + cacheKey := cacheKeyPrefixL2WithdrawalsByAddr + address + pagedTxs, total, isHit, err := h.getCachedTxsInfo(ctx, cacheKey, page, pageSize) + if err != nil { + log.Error("failed to get cached tx info", "cached key", cacheKey, "page", page, "page size", pageSize, "error", err) + return nil, 0, err + } + + if isHit { + h.cacheMetrics.cacheHits.WithLabelValues("GetL2WithdrawalsByAddress").Inc() + log.Info("cache hit", "cache key", cacheKey) + return pagedTxs, total, nil + } + + h.cacheMetrics.cacheMisses.WithLabelValues("GetL2WithdrawalsByAddress").Inc() + log.Info("cache miss", "cache key", cacheKey) - var l2MsgHashes []string - for _, txHistory := range txHistories { - if !txHistory.IsL1 { - l2MsgHashes = append(l2MsgHashes, txHistory.MsgHash) + result, err, _ := h.singleFlight.Do(cacheKey, func() (interface{}, error) { + var messages []*orm.CrossMessage + messages, err = h.crossMessageOrm.GetL2WithdrawalsByAddress(ctx, address) + if err != nil { + return nil, err } + return messages, nil + }) + if err != nil { + log.Error("failed to get L2 withdrawals by address", "address", address, "error", err) + return nil, 0, err } - l2sentMsgs, err := l2SentMsgOrm.GetL2SentMsgsByHashes(ctx, l2MsgHashes) - if err != nil || len(l2sentMsgs) == 0 { - log.Debug("GetL2SentMsgsByHashes failed", "l2 sent msgs", l2sentMsgs, "error", err) - return + messages, ok := result.([]*orm.CrossMessage) + if !ok { + log.Error("unexpected type", "expected", "[]*types.TxHistoryInfo", "got", reflect.TypeOf(result), "address", address) + return nil, 0, errors.New("unexpected error") } - l2MsgMap := make(map[string]*orm.L2SentMsg, len(l2sentMsgs)) - var batchIndexes []uint64 - for _, l2sentMsg := range l2sentMsgs { - l2MsgMap[l2sentMsg.MsgHash] = l2sentMsg - batchIndexes = append(batchIndexes, l2sentMsg.BatchIndex) + return h.processAndCacheTxHistoryInfo(ctx, cacheKey, messages, page, pageSize) +} + +// GetTxsByAddress gets tx infos under given address. +func (h *HistoryLogic) GetTxsByAddress(ctx context.Context, address string, page, pageSize uint64) ([]*types.TxHistoryInfo, uint64, error) { + cacheKey := cacheKeyPrefixTxsByAddr + address + pagedTxs, total, isHit, err := h.getCachedTxsInfo(ctx, cacheKey, page, pageSize) + if err != nil { + log.Error("failed to get cached tx info", "cached key", cacheKey, "page", page, "page size", pageSize, "error", err) + return nil, 0, err } - batches, err := rollupOrm.GetRollupBatchesByIndexes(ctx, batchIndexes) + if isHit { + h.cacheMetrics.cacheHits.WithLabelValues("GetTxsByAddress").Inc() + log.Info("cache hit", "cache key", cacheKey) + return pagedTxs, total, nil + } + + h.cacheMetrics.cacheMisses.WithLabelValues("GetTxsByAddress").Inc() + log.Info("cache miss", "cache key", cacheKey) + + result, err, _ := h.singleFlight.Do(cacheKey, func() (interface{}, error) { + var messages []*orm.CrossMessage + messages, err = h.crossMessageOrm.GetTxsByAddress(ctx, address) + if err != nil { + return nil, err + } + return messages, nil + }) if err != nil { - log.Debug("GetRollupBatchesByIndexes failed", "error", err) - return + log.Error("failed to get txs by address", "address", address, "error", err) + return nil, 0, err } - batchMap := make(map[uint64]*orm.RollupBatch, len(batches)) - for _, batch := range batches { - batchMap[batch.BatchIndex] = batch + messages, ok := result.([]*orm.CrossMessage) + if !ok { + log.Error("unexpected type", "expected", "[]*types.TxHistoryInfo", "got", reflect.TypeOf(result), "address", address) + return nil, 0, errors.New("unexpected error") } - for _, txHistory := range txHistories { - if txHistory.IsL1 { + return h.processAndCacheTxHistoryInfo(ctx, cacheKey, messages, page, pageSize) +} + +// GetTxsByHashes gets tx infos under given tx hashes. +func (h *HistoryLogic) GetTxsByHashes(ctx context.Context, txHashes []string) ([]*types.TxHistoryInfo, error) { + hashesMap := make(map[string]struct{}, len(txHashes)) + results := make([]*types.TxHistoryInfo, 0, len(txHashes)) + uncachedHashes := make([]string, 0, len(txHashes)) + + for _, hash := range txHashes { + if _, exists := hashesMap[hash]; exists { + // Skip duplicate tx hash values. + continue + } + hashesMap[hash] = struct{}{} + + cacheKey := cacheKeyPrefixQueryTxsByHashes + hash + cachedData, err := h.redis.Get(ctx, cacheKey).Bytes() + if err != nil && errors.Is(err, redis.Nil) { + h.cacheMetrics.cacheMisses.WithLabelValues("PostQueryTxsByHashes").Inc() + log.Info("cache miss", "cache key", cacheKey) + uncachedHashes = append(uncachedHashes, hash) + continue + } + + if err != nil { + log.Error("failed to get data from Redis", "error", err) + uncachedHashes = append(uncachedHashes, hash) + continue + } + + h.cacheMetrics.cacheHits.WithLabelValues("PostQueryTxsByHashes").Inc() + log.Info("cache hit", "cache key", cacheKey) + + if len(cachedData) == 0 { + continue + } + + var txInfo types.TxHistoryInfo + if unmarshalErr := json.Unmarshal(cachedData, &txInfo); unmarshalErr != nil { + log.Error("failed to unmarshal cached data", "error", unmarshalErr) + uncachedHashes = append(uncachedHashes, hash) continue } + results = append(results, &txInfo) + } + + if len(uncachedHashes) > 0 { + messages, err := h.crossMessageOrm.GetMessagesByTxHashes(ctx, uncachedHashes) + if err != nil { + log.Error("failed to get messages by tx hashes", "hashes", uncachedHashes) + return nil, err + } + + var txHistories []*types.TxHistoryInfo + for _, message := range messages { + txHistories = append(txHistories, getTxHistoryInfo(message)) + } + + resultMap := make(map[string]*types.TxHistoryInfo) + for _, result := range txHistories { + results = append(results, result) + resultMap[result.Hash] = result + } - l2sentMsg, foundL2SentMsg := l2MsgMap[txHistory.MsgHash] - batch, foundBatch := batchMap[l2sentMsg.BatchIndex] - if foundL2SentMsg && foundBatch { + for _, hash := range uncachedHashes { + cacheKey := cacheKeyPrefixQueryTxsByHashes + hash + result, found := resultMap[hash] + if !found { + // tx hash not found, which is also a valid result, cache empty string. + if cacheErr := h.redis.Set(ctx, cacheKey, "", cacheKeyExpiredTime).Err(); cacheErr != nil { + log.Error("failed to set data to Redis", "error", cacheErr) + } + continue + } + + jsonData, unmarshalErr := json.Marshal(result) + if unmarshalErr != nil { + log.Error("failed to marshal data", "error", unmarshalErr) + continue + } + + if cacheErr := h.redis.Set(ctx, cacheKey, jsonData, cacheKeyExpiredTime).Err(); cacheErr != nil { + log.Error("failed to set data to Redis", "error", cacheErr) + } + } + } + return results, nil +} + +func getTxHistoryInfo(message *orm.CrossMessage) *types.TxHistoryInfo { + txHistory := &types.TxHistoryInfo{ + MsgHash: message.MessageHash, + Amount: message.TokenAmounts, + L1Token: message.L1TokenAddress, + L2Token: message.L2TokenAddress, + IsL1: orm.MessageType(message.MessageType) == orm.MessageTypeL1SentMessage, + TxStatus: message.TxStatus, + BlockTimestamp: message.BlockTimestamp, + } + if txHistory.IsL1 { + txHistory.Hash = message.L1TxHash + txHistory.ReplayTxHash = message.L1ReplayTxHash + txHistory.RefundTxHash = message.L1RefundTxHash + txHistory.BlockNumber = message.L1BlockNumber + txHistory.FinalizeTx = &types.Finalized{ + Hash: message.L2TxHash, + BlockNumber: message.L2BlockNumber, + } + } else { + txHistory.Hash = message.L2TxHash + txHistory.BlockNumber = message.L2BlockNumber + txHistory.FinalizeTx = &types.Finalized{ + Hash: message.L1TxHash, + BlockNumber: message.L1BlockNumber, + } + if orm.RollupStatusType(message.RollupStatus) == orm.RollupStatusTypeFinalized { txHistory.ClaimInfo = &types.UserClaimInfo{ - From: l2sentMsg.Sender, - To: l2sentMsg.Target, - Value: l2sentMsg.Value, - Nonce: strconv.FormatUint(l2sentMsg.Nonce, 10), - Message: l2sentMsg.MsgData, - Proof: "0x" + l2sentMsg.MsgProof, - BatchHash: batch.BatchHash, - BatchIndex: strconv.FormatUint(l2sentMsg.BatchIndex, 10), + From: message.MessageFrom, + To: message.MessageTo, + Value: message.MessageValue, + Nonce: strconv.FormatUint(message.MessageNonce, 10), + Message: message.MessageData, + Proof: "0x" + common.Bytes2Hex(message.MerkleProof), + BatchIndex: strconv.FormatUint(message.BatchIndex, 10), + Claimable: true, } } } + return txHistory } -func updateCrossTxHashes(ctx context.Context, txHistories []*types.TxHistoryInfo, db *gorm.DB) { - msgHashes := make([]string, len(txHistories)) - for i, txHistory := range txHistories { - msgHashes[i] = txHistory.MsgHash +func (h *HistoryLogic) getCachedTxsInfo(ctx context.Context, cacheKey string, pageNum, pageSize uint64) ([]*types.TxHistoryInfo, uint64, bool, error) { + start := int64((pageNum - 1) * pageSize) + end := start + int64(pageSize) - 1 + + total, err := h.redis.ZCard(ctx, cacheKey).Result() + if err != nil { + log.Error("failed to get zcard result", "error", err) + return nil, 0, false, err } - relayed := orm.NewRelayedMsg(db) - relayedMsgs, err := relayed.GetRelayedMsgsByHashes(ctx, msgHashes) - if err != nil || len(relayedMsgs) == 0 { - log.Debug("GetRelayedMsgsByHashes failed", "msg hashes", msgHashes, "relayed msgs", relayedMsgs, "error", err) - return + if total == 0 { + return nil, 0, false, nil } - relayedMsgMap := make(map[string]*orm.RelayedMsg, len(relayedMsgs)) - for _, relayedMsg := range relayedMsgs { - relayedMsgMap[relayedMsg.MsgHash] = relayedMsg + values, err := h.redis.ZRange(ctx, cacheKey, start, end).Result() + if err != nil { + log.Error("failed to get zrange result", "error", err) + return nil, 0, false, err } - for _, txHistory := range txHistories { - if relayedMsg, found := relayedMsgMap[txHistory.MsgHash]; found { - txHistory.FinalizeTx.Hash = relayedMsg.Layer1Hash + relayedMsg.Layer2Hash - txHistory.FinalizeTx.BlockNumber = relayedMsg.Height + if len(values) == 0 { + return nil, 0, false, nil + } + + // check if it's empty placeholder. + if len(values) == 1 && values[0] == "empty_page" { + return nil, 0, true, nil + } + + var pagedTxs []*types.TxHistoryInfo + for _, v := range values { + var tx types.TxHistoryInfo + if unmarshalErr := json.Unmarshal([]byte(v), &tx); unmarshalErr != nil { + log.Error("failed to unmarshal transaction data", "error", unmarshalErr) + return nil, 0, false, unmarshalErr } + pagedTxs = append(pagedTxs, &tx) } + return pagedTxs, uint64(total), true, nil } -func updateCrossTxHashesAndL2TxClaimInfo(ctx context.Context, txHistories []*types.TxHistoryInfo, db *gorm.DB) { - updateCrossTxHashes(ctx, txHistories, db) - updateL2TxClaimInfo(ctx, txHistories, db) +func (h *HistoryLogic) cacheTxsInfo(ctx context.Context, cacheKey string, txs []*types.TxHistoryInfo) error { + _, err := h.redis.TxPipelined(ctx, func(pipe redis.Pipeliner) error { + if len(txs) == 0 { + if err := pipe.ZAdd(ctx, cacheKey, &redis.Z{Score: 0, Member: "empty_page"}).Err(); err != nil { + log.Error("failed to add empty page indicator to sorted set", "error", err) + return err + } + } else { + // The transactions are sorted, thus we set the score as their indices. + for i, tx := range txs { + txBytes, err := json.Marshal(tx) + if err != nil { + log.Error("failed to marshal transaction to json", "error", err) + return err + } + if err := pipe.ZAdd(ctx, cacheKey, &redis.Z{Score: float64(i), Member: txBytes}).Err(); err != nil { + log.Error("failed to add transaction to sorted set", "error", err) + return err + } + } + } + if err := pipe.Expire(ctx, cacheKey, cacheKeyExpiredTime).Err(); err != nil { + log.Error("failed to set expiry time", "error", err) + return err + } + return nil + }) + if err != nil { + log.Error("failed to execute transaction", "error", err) + return err + } + return nil } -// GetClaimableTxsByAddress get all claimable txs under given address -func (h *HistoryLogic) GetClaimableTxsByAddress(ctx context.Context, address common.Address) ([]*types.TxHistoryInfo, uint64, error) { +func (h *HistoryLogic) processAndCacheTxHistoryInfo(ctx context.Context, cacheKey string, messages []*orm.CrossMessage, page, pageSize uint64) ([]*types.TxHistoryInfo, uint64, error) { var txHistories []*types.TxHistoryInfo - l2SentMsgOrm := orm.NewL2SentMsg(h.db) - l2CrossMsgOrm := orm.NewCrossMsg(h.db) - results, err := l2SentMsgOrm.GetClaimableL2SentMsgByAddress(ctx, address.Hex()) - if err != nil || len(results) == 0 { - return txHistories, 0, err - } - var msgHashList []string - for _, result := range results { - msgHashList = append(msgHashList, result.MsgHash) - } - crossMsgs, err := l2CrossMsgOrm.GetL2CrossMsgByMsgHashList(ctx, msgHashList) - // crossMsgs can be empty, because they can be emitted by user directly call contract + for _, message := range messages { + txHistories = append(txHistories, getTxHistoryInfo(message)) + } + + err := h.cacheTxsInfo(ctx, cacheKey, txHistories) if err != nil { - return txHistories, 0, err - } - crossMsgMap := make(map[string]*orm.CrossMsg) - for _, crossMsg := range crossMsgs { - crossMsgMap[crossMsg.MsgHash] = crossMsg - } - for _, result := range results { - txInfo := &types.TxHistoryInfo{ - Hash: result.TxHash, - MsgHash: result.MsgHash, - IsL1: false, - BlockNumber: result.Height, - FinalizeTx: &types.Finalized{}, - } - if crossMsg, exist := crossMsgMap[result.MsgHash]; exist { - txInfo.Amount = crossMsg.Amount - txInfo.To = crossMsg.Target - txInfo.BlockTimestamp = crossMsg.Timestamp - txInfo.CreatedAt = crossMsg.CreatedAt - txInfo.L1Token = crossMsg.Layer1Token - txInfo.L2Token = crossMsg.Layer2Token - } - txHistories = append(txHistories, txInfo) - } - updateL2TxClaimInfo(ctx, txHistories, h.db) - return txHistories, uint64(len(results)), err -} + log.Error("failed to cache txs info", "key", cacheKey, "err", err) + return nil, 0, err + } -// GetTxsByHashes get tx infos under given tx hashes -func (h *HistoryLogic) GetTxsByHashes(ctx context.Context, hashes []string) ([]*types.TxHistoryInfo, error) { - CrossMsgOrm := orm.NewCrossMsg(h.db) - results, err := CrossMsgOrm.GetCrossMsgsByHashes(ctx, hashes) + pagedTxs, total, isHit, err := h.getCachedTxsInfo(ctx, cacheKey, page, pageSize) if err != nil { - return nil, err + log.Error("failed to get cached tx info", "cached key", cacheKey, "page", page, "page size", pageSize, "error", err) + return nil, 0, err } - var txHistories []*types.TxHistoryInfo - for _, result := range results { - txHistory := &types.TxHistoryInfo{ - Hash: result.Layer1Hash + result.Layer2Hash, - MsgHash: result.MsgHash, - Amount: result.Amount, - To: result.Target, - L1Token: result.Layer1Token, - L2Token: result.Layer2Token, - IsL1: orm.MsgType(result.MsgType) == orm.Layer1Msg, - BlockNumber: result.Height, - BlockTimestamp: result.Timestamp, - CreatedAt: result.CreatedAt, - FinalizeTx: &types.Finalized{Hash: ""}, - } - txHistories = append(txHistories, txHistory) - } - - updateCrossTxHashesAndL2TxClaimInfo(ctx, txHistories, h.db) - return txHistories, nil + if !isHit { + log.Error("cache miss after write, expect hit", "cached key", cacheKey, "page", page, "page size", pageSize, "error", err) + return nil, 0, err + } + return pagedTxs, total, nil } diff --git a/bridge-history-api/internal/controller/metrics.go b/bridge-history-api/internal/logic/history_logic_metrics.go similarity index 97% rename from bridge-history-api/internal/controller/metrics.go rename to bridge-history-api/internal/logic/history_logic_metrics.go index 9036c5a8ac..c454fe2465 100644 --- a/bridge-history-api/internal/controller/metrics.go +++ b/bridge-history-api/internal/logic/history_logic_metrics.go @@ -1,4 +1,4 @@ -package controller +package logic import ( "sync" diff --git a/bridge-history-api/internal/logic/l1_event_parser.go b/bridge-history-api/internal/logic/l1_event_parser.go new file mode 100644 index 0000000000..bf5dd1779c --- /dev/null +++ b/bridge-history-api/internal/logic/l1_event_parser.go @@ -0,0 +1,272 @@ +package logic + +import ( + "context" + + "github.com/scroll-tech/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/core/types" + "github.com/scroll-tech/go-ethereum/crypto" + "github.com/scroll-tech/go-ethereum/ethclient" + "github.com/scroll-tech/go-ethereum/log" + + backendabi "scroll-tech/bridge-history-api/abi" + "scroll-tech/bridge-history-api/internal/orm" + "scroll-tech/bridge-history-api/internal/utils" +) + +// L1EventParser the l1 event parser +type L1EventParser struct { +} + +// NewL1EventParser creates l1 event parser +func NewL1EventParser() *L1EventParser { + return &L1EventParser{} +} + +// ParseL1CrossChainEventLogs parses L1 watched cross chain events. +func (e *L1EventParser) ParseL1CrossChainEventLogs(logs []types.Log, blockTimestampsMap map[uint64]uint64) ([]*orm.CrossMessage, []*orm.CrossMessage, error) { + var l1DepositMessages []*orm.CrossMessage + var l1RelayedMessages []*orm.CrossMessage + for _, vlog := range logs { + switch vlog.Topics[0] { + case backendabi.L1DepositETHSig: + event := backendabi.ETHMessageEvent{} + if err := utils.UnpackLog(backendabi.IL1ETHGatewayABI, &event, "DepositETH", vlog); err != nil { + log.Warn("Failed to unpack DepositETH event", "err", err) + return nil, nil, err + } + lastMessage := l1DepositMessages[len(l1DepositMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeETH) + lastMessage.TokenAmounts = event.Amount.String() + case backendabi.L1DepositERC20Sig: + event := backendabi.ERC20MessageEvent{} + err := utils.UnpackLog(backendabi.IL1ERC20GatewayABI, &event, "DepositERC20", vlog) + if err != nil { + log.Warn("Failed to unpack DepositERC20 event", "err", err) + return nil, nil, err + } + lastMessage := l1DepositMessages[len(l1DepositMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC20) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenAmounts = event.Amount.String() + case backendabi.L1DepositERC721Sig: + event := backendabi.ERC721MessageEvent{} + if err := utils.UnpackLog(backendabi.IL1ERC721GatewayABI, &event, "DepositERC721", vlog); err != nil { + log.Warn("Failed to unpack DepositERC721 event", "err", err) + return nil, nil, err + } + lastMessage := l1DepositMessages[len(l1DepositMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC721) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenIDs = event.TokenID.String() + case backendabi.L1BatchDepositERC721Sig: + event := backendabi.BatchERC721MessageEvent{} + if err := utils.UnpackLog(backendabi.IL1ERC721GatewayABI, &event, "BatchDepositERC721", vlog); err != nil { + log.Warn("Failed to unpack BatchDepositERC721 event", "err", err) + return nil, nil, err + } + lastMessage := l1DepositMessages[len(l1DepositMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC721) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenIDs = utils.ConvertBigIntArrayToString(event.TokenIDs) + case backendabi.L1DepositERC1155Sig: + event := backendabi.ERC1155MessageEvent{} + if err := utils.UnpackLog(backendabi.IL1ERC1155GatewayABI, &event, "DepositERC1155", vlog); err != nil { + log.Warn("Failed to unpack DepositERC1155 event", "err", err) + return nil, nil, err + } + lastMessage := l1DepositMessages[len(l1DepositMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC1155) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenIDs = event.TokenID.String() + lastMessage.TokenAmounts = event.Amount.String() + case backendabi.L1BatchDepositERC1155Sig: + event := backendabi.BatchERC1155MessageEvent{} + if err := utils.UnpackLog(backendabi.IL1ERC1155GatewayABI, &event, "BatchDepositERC1155", vlog); err != nil { + log.Warn("Failed to unpack BatchDepositERC1155 event", "err", err) + return nil, nil, err + } + lastMessage := l1DepositMessages[len(l1DepositMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC1155) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenIDs = utils.ConvertBigIntArrayToString(event.TokenIDs) + lastMessage.TokenAmounts = utils.ConvertBigIntArrayToString(event.TokenAmounts) + case backendabi.L1SentMessageEventSig: + event := backendabi.L1SentMessageEvent{} + if err := utils.UnpackLog(backendabi.IL1ScrollMessengerABI, &event, "SentMessage", vlog); err != nil { + log.Warn("Failed to unpack SentMessage event", "err", err) + return nil, nil, err + } + l1DepositMessages = append(l1DepositMessages, &orm.CrossMessage{ + L1BlockNumber: vlog.BlockNumber, + Sender: event.Sender.String(), + Receiver: event.Target.String(), + TokenType: int(orm.TokenTypeETH), + L1TxHash: vlog.TxHash.String(), + TokenAmounts: event.Value.String(), + MessageNonce: event.MessageNonce.Uint64(), + MessageType: int(orm.MessageTypeL1SentMessage), + TxStatus: int(orm.TxStatusTypeSent), + BlockTimestamp: blockTimestampsMap[vlog.BlockNumber], + MessageHash: utils.ComputeMessageHash(event.Sender, event.Target, event.Value, event.MessageNonce, event.Message).String(), + }) + case backendabi.L1RelayedMessageEventSig: + event := backendabi.L1RelayedMessageEvent{} + if err := utils.UnpackLog(backendabi.IL1ScrollMessengerABI, &event, "RelayedMessage", vlog); err != nil { + log.Warn("Failed to unpack RelayedMessage event", "err", err) + return nil, nil, err + } + l1RelayedMessages = append(l1RelayedMessages, &orm.CrossMessage{ + MessageHash: event.MessageHash.String(), + L1BlockNumber: vlog.BlockNumber, + L1TxHash: vlog.TxHash.String(), + TxStatus: int(orm.TxStatusTypeRelayed), + MessageType: int(orm.MessageTypeL2SentMessage), + }) + case backendabi.L1FailedRelayedMessageEventSig: + event := backendabi.L1FailedRelayedMessageEvent{} + if err := utils.UnpackLog(backendabi.IL1ScrollMessengerABI, &event, "FailedRelayedMessage", vlog); err != nil { + log.Warn("Failed to unpack FailedRelayedMessage event", "err", err) + return nil, nil, err + } + l1RelayedMessages = append(l1RelayedMessages, &orm.CrossMessage{ + MessageHash: event.MessageHash.String(), + L1BlockNumber: vlog.BlockNumber, + L1TxHash: vlog.TxHash.String(), + TxStatus: int(orm.TxStatusTypeFailedRelayed), + MessageType: int(orm.MessageTypeL2SentMessage), + }) + } + } + return l1DepositMessages, l1RelayedMessages, nil +} + +// ParseL1BatchEventLogs parses L1 watched batch events. +func (e *L1EventParser) ParseL1BatchEventLogs(ctx context.Context, logs []types.Log, client *ethclient.Client) ([]*orm.BatchEvent, error) { + var l1BatchEvents []*orm.BatchEvent + for _, vlog := range logs { + switch vlog.Topics[0] { + case backendabi.L1CommitBatchEventSig: + event := backendabi.L1CommitBatchEvent{} + if err := utils.UnpackLog(backendabi.IScrollChainABI, &event, "CommitBatch", vlog); err != nil { + log.Warn("Failed to unpack CommitBatch event", "err", err) + return nil, err + } + commitTx, isPending, err := client.TransactionByHash(ctx, vlog.TxHash) + if err != nil || isPending { + log.Warn("Failed to get commit Batch tx receipt or the tx is still pending", "err", err) + return nil, err + } + startBlock, endBlock, err := utils.GetBatchRangeFromCalldata(commitTx.Data()) + if err != nil { + log.Warn("Failed to get batch range from calldata", "hash", commitTx.Hash().String(), "height", vlog.BlockNumber) + return nil, err + } + l1BatchEvents = append(l1BatchEvents, &orm.BatchEvent{ + BatchStatus: int(orm.BatchStatusTypeCommitted), + BatchIndex: event.BatchIndex.Uint64(), + BatchHash: event.BatchHash.String(), + StartBlockNumber: startBlock, + EndBlockNumber: endBlock, + L1BlockNumber: vlog.BlockNumber, + }) + case backendabi.L1RevertBatchEventSig: + event := backendabi.L1RevertBatchEvent{} + if err := utils.UnpackLog(backendabi.IScrollChainABI, &event, "RevertBatch", vlog); err != nil { + log.Warn("Failed to unpack RevertBatch event", "err", err) + return nil, err + } + l1BatchEvents = append(l1BatchEvents, &orm.BatchEvent{ + BatchStatus: int(orm.BatchStatusTypeReverted), + BatchIndex: event.BatchIndex.Uint64(), + BatchHash: event.BatchHash.String(), + L1BlockNumber: vlog.BlockNumber, + }) + case backendabi.L1FinalizeBatchEventSig: + event := backendabi.L1FinalizeBatchEvent{} + if err := utils.UnpackLog(backendabi.IScrollChainABI, &event, "FinalizeBatch", vlog); err != nil { + log.Warn("Failed to unpack FinalizeBatch event", "err", err) + return nil, err + } + l1BatchEvents = append(l1BatchEvents, &orm.BatchEvent{ + BatchStatus: int(orm.BatchStatusTypeFinalized), + BatchIndex: event.BatchIndex.Uint64(), + BatchHash: event.BatchHash.String(), + L1BlockNumber: vlog.BlockNumber, + }) + } + } + return l1BatchEvents, nil +} + +// ParseL1MessageQueueEventLogs parses L1 watched message queue events. +func (e *L1EventParser) ParseL1MessageQueueEventLogs(logs []types.Log, l1DepositMessages []*orm.CrossMessage) ([]*orm.MessageQueueEvent, error) { + messageHashes := make(map[common.Hash]struct{}) + for _, msg := range l1DepositMessages { + messageHashes[common.HexToHash(msg.MessageHash)] = struct{}{} + } + + var l1MessageQueueEvents []*orm.MessageQueueEvent + for _, vlog := range logs { + switch vlog.Topics[0] { + case backendabi.L1QueueTransactionEventSig: + event := backendabi.L1QueueTransactionEvent{} + if err := utils.UnpackLog(backendabi.IL1MessageQueueABI, &event, "QueueTransaction", vlog); err != nil { + log.Warn("Failed to unpack QueueTransaction event", "err", err) + return nil, err + } + messageHash := common.BytesToHash(crypto.Keccak256(event.Data)) + // If the message hash is not found in the map, it's not a replayMessage or enforced tx (omitted); add it to the events. + if _, exists := messageHashes[messageHash]; !exists { + l1MessageQueueEvents = append(l1MessageQueueEvents, &orm.MessageQueueEvent{ + EventType: orm.MessageQueueEventTypeQueueTransaction, + QueueIndex: event.QueueIndex, + MessageHash: messageHash, + TxHash: vlog.TxHash, + }) + } + case backendabi.L1DequeueTransactionEventSig: + event := backendabi.L1DequeueTransactionEvent{} + if err := utils.UnpackLog(backendabi.IL1MessageQueueABI, &event, "DequeueTransaction", vlog); err != nil { + log.Warn("Failed to unpack DequeueTransaction event", "err", err) + return nil, err + } + skippedIndices := utils.GetSkippedQueueIndices(event.StartIndex.Uint64(), event.SkippedBitmap) + for _, index := range skippedIndices { + l1MessageQueueEvents = append(l1MessageQueueEvents, &orm.MessageQueueEvent{ + EventType: orm.MessageQueueEventTypeDequeueTransaction, + QueueIndex: index, + }) + } + case backendabi.L1DropTransactionEventSig: + event := backendabi.L1DropTransactionEvent{} + if err := utils.UnpackLog(backendabi.IL1MessageQueueABI, &event, "DropTransaction", vlog); err != nil { + log.Warn("Failed to unpack DropTransaction event", "err", err) + return nil, err + } + l1MessageQueueEvents = append(l1MessageQueueEvents, &orm.MessageQueueEvent{ + EventType: orm.MessageQueueEventTypeDropTransaction, + QueueIndex: event.Index.Uint64(), + TxHash: vlog.TxHash, + }) + } + } + return l1MessageQueueEvents, nil +} diff --git a/bridge-history-api/internal/logic/l1_fetcher.go b/bridge-history-api/internal/logic/l1_fetcher.go new file mode 100644 index 0000000000..97550d219d --- /dev/null +++ b/bridge-history-api/internal/logic/l1_fetcher.go @@ -0,0 +1,314 @@ +package logic + +import ( + "context" + "math/big" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/scroll-tech/go-ethereum" + "github.com/scroll-tech/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/core/types" + "github.com/scroll-tech/go-ethereum/ethclient" + "github.com/scroll-tech/go-ethereum/log" + "gorm.io/gorm" + + backendabi "scroll-tech/bridge-history-api/abi" + "scroll-tech/bridge-history-api/internal/config" + "scroll-tech/bridge-history-api/internal/orm" + "scroll-tech/bridge-history-api/internal/utils" +) + +// L1ReorgSafeDepth represents the number of block confirmations considered safe against L1 chain reorganizations. +// Reorganizations at this depth under normal cases are extremely unlikely. +const L1ReorgSafeDepth = 64 + +// L1FilterResult L1 fetcher result +type L1FilterResult struct { + DepositMessages []*orm.CrossMessage + RelayedMessages []*orm.CrossMessage + BatchEvents []*orm.BatchEvent + MessageQueueEvents []*orm.MessageQueueEvent + RevertedTxs []*orm.CrossMessage +} + +// L1FetcherLogic the L1 fetcher logic +type L1FetcherLogic struct { + cfg *config.LayerConfig + client *ethclient.Client + addressList []common.Address + parser *L1EventParser + db *gorm.DB + crossMessageOrm *orm.CrossMessage + batchEventOrm *orm.BatchEvent + + l1FetcherLogicFetchedTotal *prometheus.CounterVec +} + +// NewL1FetcherLogic creates L1 fetcher logic +func NewL1FetcherLogic(cfg *config.LayerConfig, db *gorm.DB, client *ethclient.Client) *L1FetcherLogic { + addressList := []common.Address{ + common.HexToAddress(cfg.ETHGatewayAddr), + + common.HexToAddress(cfg.StandardERC20GatewayAddr), + common.HexToAddress(cfg.CustomERC20GatewayAddr), + common.HexToAddress(cfg.WETHGatewayAddr), + common.HexToAddress(cfg.DAIGatewayAddr), + + common.HexToAddress(cfg.ERC721GatewayAddr), + common.HexToAddress(cfg.ERC1155GatewayAddr), + + common.HexToAddress(cfg.MessengerAddr), + + common.HexToAddress(cfg.ScrollChainAddr), + + common.HexToAddress(cfg.MessageQueueAddr), + } + + // Optional erc20 gateways. + if cfg.USDCGatewayAddr != "" { + addressList = append(addressList, common.HexToAddress(cfg.USDCGatewayAddr)) + } + + if cfg.LIDOGatewayAddr != "" { + addressList = append(addressList, common.HexToAddress(cfg.LIDOGatewayAddr)) + } + + f := &L1FetcherLogic{ + db: db, + crossMessageOrm: orm.NewCrossMessage(db), + batchEventOrm: orm.NewBatchEvent(db), + cfg: cfg, + client: client, + addressList: addressList, + parser: NewL1EventParser(), + } + + reg := prometheus.DefaultRegisterer + f.l1FetcherLogicFetchedTotal = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ + Name: "L1_fetcher_logic_fetched_total", + Help: "The total number of events or failed txs fetched in L1 fetcher logic.", + }, []string{"type"}) + + return f +} + +func (f *L1FetcherLogic) getBlocksAndDetectReorg(ctx context.Context, from, to uint64, lastBlockHash common.Hash) (bool, uint64, common.Hash, []*types.Block, error) { + blocks, err := utils.GetL1BlocksInRange(ctx, f.client, from, to) + if err != nil { + log.Error("failed to get L1 blocks in range", "from", from, "to", to, "err", err) + return false, 0, common.Hash{}, nil, err + } + + for _, block := range blocks { + if block.ParentHash() != lastBlockHash { + log.Warn("L1 reorg detected", "reorg height", block.NumberU64()-1, "expected hash", block.ParentHash().String(), "local hash", lastBlockHash.String()) + var resyncHeight uint64 + if block.NumberU64() > L1ReorgSafeDepth+1 { + resyncHeight = block.NumberU64() - L1ReorgSafeDepth - 1 + } + header, err := f.client.HeaderByNumber(ctx, new(big.Int).SetUint64(resyncHeight)) + if err != nil { + log.Error("failed to get L1 header by number", "block number", resyncHeight, "err", err) + return false, 0, common.Hash{}, nil, err + } + return true, resyncHeight, header.Hash(), nil, nil + } + lastBlockHash = block.Hash() + } + + return false, 0, lastBlockHash, blocks, nil +} + +func (f *L1FetcherLogic) getRevertedTxs(ctx context.Context, from, to uint64, blocks []*types.Block) (map[uint64]uint64, []*orm.CrossMessage, error) { + var l1RevertedTxs []*orm.CrossMessage + blockTimestampsMap := make(map[uint64]uint64) + + for i := from; i <= to; i++ { + block := blocks[i-from] + blockTimestampsMap[block.NumberU64()] = block.Time() + + for _, tx := range block.Transactions() { + txTo := tx.To() + if txTo == nil { + continue + } + toAddress := txTo.String() + + // GatewayRouter: L1 deposit. + // Messenger: L1 deposit retry (replayMessage), L1 deposit refund (dropMessage), L2 withdrawal's claim (relayMessageWithProof). + if toAddress != f.cfg.GatewayRouterAddr && toAddress != f.cfg.MessengerAddr { + continue + } + + var receipt *types.Receipt + receipt, receiptErr := f.client.TransactionReceipt(ctx, tx.Hash()) + if receiptErr != nil { + log.Error("Failed to get transaction receipt", "txHash", tx.Hash().String(), "err", receiptErr) + return nil, nil, receiptErr + } + + // Check if the transaction is failed + if receipt.Status != types.ReceiptStatusFailed { + continue + } + + signer := types.LatestSignerForChainID(new(big.Int).SetUint64(tx.ChainId().Uint64())) + sender, senderErr := signer.Sender(tx) + if senderErr != nil { + log.Error("get sender failed", "chain id", tx.ChainId().Uint64(), "tx hash", tx.Hash().String(), "err", senderErr) + return nil, nil, senderErr + } + + l1RevertedTxs = append(l1RevertedTxs, &orm.CrossMessage{ + L1TxHash: tx.Hash().String(), + MessageType: int(orm.MessageTypeL1SentMessage), + Sender: sender.String(), + Receiver: (*tx.To()).String(), + L1BlockNumber: receipt.BlockNumber.Uint64(), + BlockTimestamp: block.Time(), + TxStatus: int(orm.TxStatusTypeSentTxReverted), + }) + } + } + return blockTimestampsMap, l1RevertedTxs, nil +} + +func (f *L1FetcherLogic) l1FetcherLogs(ctx context.Context, from, to uint64) ([]types.Log, error) { + query := ethereum.FilterQuery{ + FromBlock: new(big.Int).SetUint64(from), // inclusive + ToBlock: new(big.Int).SetUint64(to), // inclusive + Addresses: f.addressList, + Topics: make([][]common.Hash, 1), + } + + query.Topics[0] = make([]common.Hash, 13) + query.Topics[0][0] = backendabi.L1DepositETHSig + query.Topics[0][1] = backendabi.L1DepositERC20Sig + query.Topics[0][2] = backendabi.L1DepositERC721Sig + query.Topics[0][3] = backendabi.L1DepositERC1155Sig + query.Topics[0][4] = backendabi.L1SentMessageEventSig + query.Topics[0][5] = backendabi.L1RelayedMessageEventSig + query.Topics[0][6] = backendabi.L1FailedRelayedMessageEventSig + query.Topics[0][7] = backendabi.L1CommitBatchEventSig + query.Topics[0][8] = backendabi.L1RevertBatchEventSig + query.Topics[0][9] = backendabi.L1FinalizeBatchEventSig + query.Topics[0][10] = backendabi.L1QueueTransactionEventSig + query.Topics[0][11] = backendabi.L1DequeueTransactionEventSig + query.Topics[0][12] = backendabi.L1DropTransactionEventSig + + eventLogs, err := f.client.FilterLogs(ctx, query) + if err != nil { + log.Error("failed to filter L1 event logs", "from", from, "to", to, "err", err) + return nil, err + } + return eventLogs, nil +} + +// L1Fetcher L1 fetcher +func (f *L1FetcherLogic) L1Fetcher(ctx context.Context, from, to uint64, lastBlockHash common.Hash) (bool, uint64, common.Hash, *L1FilterResult, error) { + log.Info("fetch and save L1 events", "from", from, "to", to) + + isReorg, reorgHeight, blockHash, blocks, getErr := f.getBlocksAndDetectReorg(ctx, from, to, lastBlockHash) + if getErr != nil { + log.Error("L1Fetcher getBlocksAndDetectReorg failed", "from", from, "to", to, "error", getErr) + return false, 0, common.Hash{}, nil, getErr + } + + if isReorg { + return isReorg, reorgHeight, blockHash, nil, nil + } + + blockTimestampsMap, l1RevertedTxs, err := f.getRevertedTxs(ctx, from, to, blocks) + if err != nil { + log.Error("L1Fetcher getRevertedTxs failed", "from", from, "to", to, "error", err) + return false, 0, common.Hash{}, nil, err + } + + eventLogs, err := f.l1FetcherLogs(ctx, from, to) + if err != nil { + log.Error("L1Fetcher l1FetcherLogs failed", "from", from, "to", to, "error", err) + return false, 0, common.Hash{}, nil, err + } + + l1DepositMessages, l1RelayedMessages, err := f.parser.ParseL1CrossChainEventLogs(eventLogs, blockTimestampsMap) + if err != nil { + log.Error("failed to parse L1 cross chain event logs", "from", from, "to", to, "err", err) + return false, 0, common.Hash{}, nil, err + } + + l1BatchEvents, err := f.parser.ParseL1BatchEventLogs(ctx, eventLogs, f.client) + if err != nil { + log.Error("failed to parse L1 batch event logs", "from", from, "to", to, "err", err) + return false, 0, common.Hash{}, nil, err + } + + l1MessageQueueEvents, err := f.parser.ParseL1MessageQueueEventLogs(eventLogs, l1DepositMessages) + if err != nil { + log.Error("failed to parse L1 message queue event logs", "from", from, "to", to, "err", err) + return false, 0, common.Hash{}, nil, err + } + + res := L1FilterResult{ + DepositMessages: l1DepositMessages, + RelayedMessages: l1RelayedMessages, + BatchEvents: l1BatchEvents, + MessageQueueEvents: l1MessageQueueEvents, + RevertedTxs: l1RevertedTxs, + } + + f.updateMetrics(res) + + return false, 0, blockHash, &res, nil +} + +func (f *L1FetcherLogic) updateMetrics(res L1FilterResult) { + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_failed_gateway_router_transaction").Add(float64(len(res.RevertedTxs))) + + for _, depositMessage := range res.DepositMessages { + switch orm.TokenType(depositMessage.TokenType) { + case orm.TokenTypeETH: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_deposit_eth").Add(1) + case orm.TokenTypeERC20: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_deposit_erc20").Add(1) + case orm.TokenTypeERC721: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_deposit_erc721").Add(1) + case orm.TokenTypeERC1155: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_deposit_erc1155").Add(1) + } + } + + for _, relayedMessage := range res.RelayedMessages { + switch orm.TxStatusType(relayedMessage.TxStatus) { + case orm.TxStatusTypeRelayed: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_relayed_message").Add(1) + case orm.TxStatusTypeFailedRelayed: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_failed_relayed_message").Add(1) + } + // Have not tracked L1 relayed message reverted transaction yet. + // 1. need to parse calldata of tx. + // 2. hard to track internal tx. + } + + for _, batchEvent := range res.BatchEvents { + switch orm.BatchStatusType(batchEvent.BatchStatus) { + case orm.BatchStatusTypeCommitted: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_commit_batch_event").Add(1) + case orm.BatchStatusTypeReverted: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_revert_batch_event").Add(1) + case orm.BatchStatusTypeFinalized: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_finalize_batch_event").Add(1) + } + } + + for _, messageQueueEvent := range res.MessageQueueEvents { + switch messageQueueEvent.EventType { + case orm.MessageQueueEventTypeQueueTransaction: // sendMessage is filtered out, only leaving replayMessage or appendEnforcedTransaction. + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_replay_message_or_enforced_transaction").Add(1) + case orm.MessageQueueEventTypeDequeueTransaction: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_skip_message").Add(1) + case orm.MessageQueueEventTypeDropTransaction: + f.l1FetcherLogicFetchedTotal.WithLabelValues("L1_drop_message").Add(1) + } + } +} diff --git a/bridge-history-api/internal/logic/l2_event_parser.go b/bridge-history-api/internal/logic/l2_event_parser.go new file mode 100644 index 0000000000..20df49d13c --- /dev/null +++ b/bridge-history-api/internal/logic/l2_event_parser.go @@ -0,0 +1,167 @@ +package logic + +import ( + "github.com/scroll-tech/go-ethereum/common/hexutil" + "github.com/scroll-tech/go-ethereum/core/types" + "github.com/scroll-tech/go-ethereum/log" + + backendabi "scroll-tech/bridge-history-api/abi" + "scroll-tech/bridge-history-api/internal/orm" + "scroll-tech/bridge-history-api/internal/utils" +) + +// L2EventParser the L2 event parser +type L2EventParser struct { +} + +// NewL2EventParser creates the L2 event parser +func NewL2EventParser() *L2EventParser { + return &L2EventParser{} +} + +// ParseL2EventLogs parses L2 watched events +func (e *L2EventParser) ParseL2EventLogs(logs []types.Log, blockTimestampsMap map[uint64]uint64) ([]*orm.CrossMessage, []*orm.CrossMessage, error) { + var l2WithdrawMessages []*orm.CrossMessage + var l2RelayedMessages []*orm.CrossMessage + for _, vlog := range logs { + switch vlog.Topics[0] { + case backendabi.L2WithdrawETHSig: + event := backendabi.ETHMessageEvent{} + err := utils.UnpackLog(backendabi.IL2ETHGatewayABI, &event, "WithdrawETH", vlog) + if err != nil { + log.Warn("Failed to unpack WithdrawETH event", "err", err) + return nil, nil, err + } + lastMessage := l2WithdrawMessages[len(l2WithdrawMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeETH) + lastMessage.TokenAmounts = event.Amount.String() + case backendabi.L2WithdrawERC20Sig: + event := backendabi.ERC20MessageEvent{} + err := utils.UnpackLog(backendabi.IL2ERC20GatewayABI, &event, "WithdrawERC20", vlog) + if err != nil { + log.Warn("Failed to unpack WithdrawERC20 event", "err", err) + return nil, nil, err + } + lastMessage := l2WithdrawMessages[len(l2WithdrawMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC20) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenAmounts = event.Amount.String() + case backendabi.L2WithdrawERC721Sig: + event := backendabi.ERC721MessageEvent{} + err := utils.UnpackLog(backendabi.IL2ERC721GatewayABI, &event, "WithdrawERC721", vlog) + if err != nil { + log.Warn("Failed to unpack WithdrawERC721 event", "err", err) + return nil, nil, err + } + lastMessage := l2WithdrawMessages[len(l2WithdrawMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC721) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenIDs = event.TokenID.String() + case backendabi.L2BatchWithdrawERC721Sig: + event := backendabi.BatchERC721MessageEvent{} + err := utils.UnpackLog(backendabi.IL2ERC721GatewayABI, &event, "BatchWithdrawERC721", vlog) + if err != nil { + log.Warn("Failed to unpack BatchWithdrawERC721 event", "err", err) + return nil, nil, err + } + lastMessage := l2WithdrawMessages[len(l2WithdrawMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC721) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenIDs = utils.ConvertBigIntArrayToString(event.TokenIDs) + case backendabi.L2WithdrawERC1155Sig: + event := backendabi.ERC1155MessageEvent{} + err := utils.UnpackLog(backendabi.IL2ERC1155GatewayABI, &event, "WithdrawERC1155", vlog) + if err != nil { + log.Warn("Failed to unpack WithdrawERC1155 event", "err", err) + return nil, nil, err + } + lastMessage := l2WithdrawMessages[len(l2WithdrawMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC1155) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenIDs = event.TokenID.String() + lastMessage.TokenAmounts = event.Amount.String() + case backendabi.L2BatchWithdrawERC1155Sig: + event := backendabi.BatchERC1155MessageEvent{} + err := utils.UnpackLog(backendabi.IL2ERC1155GatewayABI, &event, "BatchWithdrawERC1155", vlog) + if err != nil { + log.Warn("Failed to unpack BatchWithdrawERC1155 event", "err", err) + return nil, nil, err + } + lastMessage := l2WithdrawMessages[len(l2WithdrawMessages)-1] + lastMessage.Sender = event.From.String() + lastMessage.Receiver = event.To.String() + lastMessage.TokenType = int(orm.TokenTypeERC1155) + lastMessage.L1TokenAddress = event.L1Token.String() + lastMessage.L2TokenAddress = event.L2Token.String() + lastMessage.TokenIDs = utils.ConvertBigIntArrayToString(event.TokenIDs) + lastMessage.TokenAmounts = utils.ConvertBigIntArrayToString(event.TokenAmounts) + case backendabi.L2SentMessageEventSig: + event := backendabi.L2SentMessageEvent{} + err := utils.UnpackLog(backendabi.IL2ScrollMessengerABI, &event, "SentMessage", vlog) + if err != nil { + log.Warn("Failed to unpack SentMessage event", "err", err) + return nil, nil, err + } + l2WithdrawMessages = append(l2WithdrawMessages, &orm.CrossMessage{ + MessageHash: utils.ComputeMessageHash(event.Sender, event.Target, event.Value, event.MessageNonce, event.Message).String(), + Sender: event.Sender.String(), + Receiver: event.Target.String(), + TokenType: int(orm.TokenTypeETH), + L2TxHash: vlog.TxHash.String(), + TokenAmounts: event.Value.String(), + MessageFrom: event.Sender.String(), + MessageTo: event.Target.String(), + MessageValue: event.Value.String(), + MessageNonce: event.MessageNonce.Uint64(), + MessageData: hexutil.Encode(event.Message), + MessageType: int(orm.MessageTypeL2SentMessage), + TxStatus: int(orm.TxStatusTypeSent), + BlockTimestamp: blockTimestampsMap[vlog.BlockNumber], + L2BlockNumber: vlog.BlockNumber, + }) + case backendabi.L2RelayedMessageEventSig: + event := backendabi.L2RelayedMessageEvent{} + err := utils.UnpackLog(backendabi.IL2ScrollMessengerABI, &event, "RelayedMessage", vlog) + if err != nil { + log.Warn("Failed to unpack RelayedMessage event", "err", err) + return nil, nil, err + } + l2RelayedMessages = append(l2RelayedMessages, &orm.CrossMessage{ + MessageHash: event.MessageHash.String(), + L2BlockNumber: vlog.BlockNumber, + L2TxHash: vlog.TxHash.String(), + TxStatus: int(orm.TxStatusTypeRelayed), + MessageType: int(orm.MessageTypeL1SentMessage), + }) + case backendabi.L2FailedRelayedMessageEventSig: + event := backendabi.L2RelayedMessageEvent{} + err := utils.UnpackLog(backendabi.IL2ScrollMessengerABI, &event, "FailedRelayedMessage", vlog) + if err != nil { + log.Warn("Failed to unpack FailedRelayedMessage event", "err", err) + return nil, nil, err + } + l2RelayedMessages = append(l2RelayedMessages, &orm.CrossMessage{ + MessageHash: event.MessageHash.String(), + L2BlockNumber: vlog.BlockNumber, + L2TxHash: vlog.TxHash.String(), + TxStatus: int(orm.TxStatusTypeFailedRelayed), + MessageType: int(orm.MessageTypeL1SentMessage), + }) + } + } + return l2WithdrawMessages, l2RelayedMessages, nil +} diff --git a/bridge-history-api/internal/logic/l2_fetcher.go b/bridge-history-api/internal/logic/l2_fetcher.go new file mode 100644 index 0000000000..457df0448e --- /dev/null +++ b/bridge-history-api/internal/logic/l2_fetcher.go @@ -0,0 +1,279 @@ +package logic + +import ( + "context" + "math/big" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/scroll-tech/go-ethereum" + "github.com/scroll-tech/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/core/types" + "github.com/scroll-tech/go-ethereum/crypto" + "github.com/scroll-tech/go-ethereum/ethclient" + "github.com/scroll-tech/go-ethereum/log" + "gorm.io/gorm" + + backendabi "scroll-tech/bridge-history-api/abi" + "scroll-tech/bridge-history-api/internal/config" + "scroll-tech/bridge-history-api/internal/orm" + "scroll-tech/bridge-history-api/internal/utils" +) + +// L2ReorgSafeDepth represents the number of block confirmations considered safe against L2 chain reorganizations. +// Reorganizations at this depth under normal cases are extremely unlikely. +const L2ReorgSafeDepth = 256 + +// L2FilterResult the L2 filter result +type L2FilterResult struct { + WithdrawMessages []*orm.CrossMessage + RelayedMessages []*orm.CrossMessage // relayed, failed relayed, relay tx reverted. + OtherRevertedTxs []*orm.CrossMessage // reverted txs except relay tx reverted. +} + +// L2FetcherLogic the L2 fetcher logic +type L2FetcherLogic struct { + cfg *config.LayerConfig + client *ethclient.Client + addressList []common.Address + parser *L2EventParser + db *gorm.DB + crossMessageOrm *orm.CrossMessage + batchEventOrm *orm.BatchEvent + + l2FetcherLogicFetchedTotal *prometheus.CounterVec +} + +// NewL2FetcherLogic create L2 fetcher logic +func NewL2FetcherLogic(cfg *config.LayerConfig, db *gorm.DB, client *ethclient.Client) *L2FetcherLogic { + addressList := []common.Address{ + common.HexToAddress(cfg.ETHGatewayAddr), + + common.HexToAddress(cfg.StandardERC20GatewayAddr), + common.HexToAddress(cfg.CustomERC20GatewayAddr), + common.HexToAddress(cfg.WETHGatewayAddr), + common.HexToAddress(cfg.DAIGatewayAddr), + + common.HexToAddress(cfg.ERC721GatewayAddr), + common.HexToAddress(cfg.ERC1155GatewayAddr), + + common.HexToAddress(cfg.MessengerAddr), + } + + // Optional erc20 gateways. + if cfg.USDCGatewayAddr != "" { + addressList = append(addressList, common.HexToAddress(cfg.USDCGatewayAddr)) + } + + if cfg.LIDOGatewayAddr != "" { + addressList = append(addressList, common.HexToAddress(cfg.LIDOGatewayAddr)) + } + + f := &L2FetcherLogic{ + db: db, + crossMessageOrm: orm.NewCrossMessage(db), + batchEventOrm: orm.NewBatchEvent(db), + cfg: cfg, + client: client, + addressList: addressList, + parser: NewL2EventParser(), + } + + reg := prometheus.DefaultRegisterer + f.l2FetcherLogicFetchedTotal = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ + Name: "L2_fetcher_logic_fetched_total", + Help: "The total number of events or failed txs fetched in L2 fetcher logic.", + }, []string{"type"}) + + return f +} + +func (f *L2FetcherLogic) getBlocksAndDetectReorg(ctx context.Context, from, to uint64, lastBlockHash common.Hash) (bool, uint64, common.Hash, []*types.BlockWithRowConsumption, error) { + blocks, err := utils.GetL2BlocksInRange(ctx, f.client, from, to) + if err != nil { + log.Error("failed to get L2 blocks in range", "from", from, "to", to, "err", err) + return false, 0, common.Hash{}, nil, err + } + + for _, block := range blocks { + if block.ParentHash() != lastBlockHash { + log.Warn("L2 reorg detected", "reorg height", block.NumberU64()-1, "expected hash", block.ParentHash().String(), "local hash", lastBlockHash.String()) + var resyncHeight uint64 + if block.NumberU64() > L2ReorgSafeDepth+1 { + resyncHeight = block.NumberU64() - L2ReorgSafeDepth - 1 + } + header, err := f.client.HeaderByNumber(ctx, new(big.Int).SetUint64(resyncHeight)) + if err != nil { + log.Error("failed to get L2 header by number", "block number", resyncHeight, "err", err) + return false, 0, common.Hash{}, nil, err + } + return true, resyncHeight, header.Hash(), nil, nil + } + lastBlockHash = block.Hash() + } + + return false, 0, lastBlockHash, blocks, nil +} + +func (f *L2FetcherLogic) getRevertedTxs(ctx context.Context, from, to uint64, blocks []*types.BlockWithRowConsumption) (map[uint64]uint64, []*orm.CrossMessage, []*orm.CrossMessage, error) { + var l2RevertedUserTxs []*orm.CrossMessage + var l2RevertedRelayedMessageTxs []*orm.CrossMessage + blockTimestampsMap := make(map[uint64]uint64) + + for i := from; i <= to; i++ { + block := blocks[i-from] + blockTimestampsMap[block.NumberU64()] = block.Time() + + for _, tx := range block.Transactions() { + txTo := tx.To() + if txTo == nil { + continue + } + toAddress := txTo.String() + + // GatewayRouter: L2 withdrawal. + if toAddress == f.cfg.GatewayRouterAddr { + receipt, receiptErr := f.client.TransactionReceipt(ctx, tx.Hash()) + if receiptErr != nil { + log.Error("Failed to get transaction receipt", "txHash", tx.Hash().String(), "err", receiptErr) + return nil, nil, nil, receiptErr + } + + // Check if the transaction is failed + if receipt.Status == types.ReceiptStatusFailed { + signer := types.LatestSignerForChainID(new(big.Int).SetUint64(tx.ChainId().Uint64())) + sender, signerErr := signer.Sender(tx) + if signerErr != nil { + log.Error("get sender failed", "chain id", tx.ChainId().Uint64(), "tx hash", tx.Hash().String(), "err", signerErr) + return nil, nil, nil, signerErr + } + + l2RevertedUserTxs = append(l2RevertedUserTxs, &orm.CrossMessage{ + L2TxHash: tx.Hash().String(), + MessageType: int(orm.MessageTypeL2SentMessage), + Sender: sender.String(), + Receiver: (*tx.To()).String(), + L2BlockNumber: receipt.BlockNumber.Uint64(), + BlockTimestamp: block.Time(), + TxStatus: int(orm.TxStatusTypeSentTxReverted), + }) + } + } + + if tx.Type() == types.L1MessageTxType { + receipt, receiptErr := f.client.TransactionReceipt(ctx, tx.Hash()) + if receiptErr != nil { + log.Error("Failed to get transaction receipt", "txHash", tx.Hash().String(), "err", receiptErr) + return nil, nil, nil, receiptErr + } + + // Check if the transaction is failed + if receipt.Status == types.ReceiptStatusFailed { + l2RevertedRelayedMessageTxs = append(l2RevertedRelayedMessageTxs, &orm.CrossMessage{ + MessageHash: common.BytesToHash(crypto.Keccak256(tx.AsL1MessageTx().Data)).String(), + L2TxHash: tx.Hash().String(), + TxStatus: int(orm.TxStatusTypeRelayTxReverted), + L2BlockNumber: receipt.BlockNumber.Uint64(), + MessageType: int(orm.MessageTypeL1SentMessage), + }) + } + } + } + } + return blockTimestampsMap, l2RevertedUserTxs, l2RevertedRelayedMessageTxs, nil +} + +func (f *L2FetcherLogic) l2FetcherLogs(ctx context.Context, from, to uint64) ([]types.Log, error) { + query := ethereum.FilterQuery{ + FromBlock: new(big.Int).SetUint64(from), // inclusive + ToBlock: new(big.Int).SetUint64(to), // inclusive + Addresses: f.addressList, + Topics: make([][]common.Hash, 1), + } + query.Topics[0] = make([]common.Hash, 7) + query.Topics[0][0] = backendabi.L2WithdrawETHSig + query.Topics[0][1] = backendabi.L2WithdrawERC20Sig + query.Topics[0][2] = backendabi.L2WithdrawERC721Sig + query.Topics[0][3] = backendabi.L2WithdrawERC1155Sig + query.Topics[0][4] = backendabi.L2SentMessageEventSig + query.Topics[0][5] = backendabi.L2RelayedMessageEventSig + query.Topics[0][6] = backendabi.L2FailedRelayedMessageEventSig + + eventLogs, err := f.client.FilterLogs(ctx, query) + if err != nil { + log.Error("Failed to filter L2 event logs", "from", from, "to", to, "err", err) + return nil, err + } + return eventLogs, nil +} + +// L2Fetcher L2 fetcher +func (f *L2FetcherLogic) L2Fetcher(ctx context.Context, from, to uint64, lastBlockHash common.Hash) (bool, uint64, common.Hash, *L2FilterResult, error) { + log.Info("fetch and save L2 events", "from", from, "to", to) + + isReorg, reorgHeight, blockHash, blocks, getErr := f.getBlocksAndDetectReorg(ctx, from, to, lastBlockHash) + if getErr != nil { + log.Error("L2Fetcher getBlocksAndDetectReorg failed", "from", from, "to", to, "error", getErr) + return false, 0, common.Hash{}, nil, getErr + } + + if isReorg { + return isReorg, reorgHeight, blockHash, nil, nil + } + + blockTimestampsMap, revertedUserTxs, revertedRelayMsgs, routerErr := f.getRevertedTxs(ctx, from, to, blocks) + if routerErr != nil { + log.Error("L2Fetcher getRevertedTxs failed", "from", from, "to", to, "error", routerErr) + return false, 0, common.Hash{}, nil, routerErr + } + + eventLogs, err := f.l2FetcherLogs(ctx, from, to) + if err != nil { + log.Error("L2Fetcher l2FetcherLogs failed", "from", from, "to", to, "error", err) + return false, 0, common.Hash{}, nil, err + } + + l2WithdrawMessages, l2RelayedMessages, err := f.parser.ParseL2EventLogs(eventLogs, blockTimestampsMap) + if err != nil { + log.Error("failed to parse L2 event logs", "from", from, "to", to, "err", err) + return false, 0, common.Hash{}, nil, err + } + + res := L2FilterResult{ + WithdrawMessages: l2WithdrawMessages, + RelayedMessages: append(l2RelayedMessages, revertedRelayMsgs...), + OtherRevertedTxs: revertedUserTxs, + } + + f.updateMetrics(res) + + return false, 0, blockHash, &res, nil +} + +func (f *L2FetcherLogic) updateMetrics(res L2FilterResult) { + f.l2FetcherLogicFetchedTotal.WithLabelValues("L2_failed_gateway_router_transaction").Add(float64(len(res.OtherRevertedTxs))) + + for _, withdrawMessage := range res.WithdrawMessages { + switch orm.TokenType(withdrawMessage.TokenType) { + case orm.TokenTypeETH: + f.l2FetcherLogicFetchedTotal.WithLabelValues("L2_withdraw_eth").Add(1) + case orm.TokenTypeERC20: + f.l2FetcherLogicFetchedTotal.WithLabelValues("L2_withdraw_erc20").Add(1) + case orm.TokenTypeERC721: + f.l2FetcherLogicFetchedTotal.WithLabelValues("L2_withdraw_erc721").Add(1) + case orm.TokenTypeERC1155: + f.l2FetcherLogicFetchedTotal.WithLabelValues("L2_withdraw_erc1155").Add(1) + } + } + + for _, relayedMessage := range res.RelayedMessages { + switch orm.TxStatusType(relayedMessage.TxStatus) { + case orm.TxStatusTypeRelayed: + f.l2FetcherLogicFetchedTotal.WithLabelValues("L2_relayed_message").Add(1) + case orm.TxStatusTypeFailedRelayed: + f.l2FetcherLogicFetchedTotal.WithLabelValues("L2_failed_relayed_message").Add(1) + case orm.TxStatusTypeRelayTxReverted: + f.l2FetcherLogicFetchedTotal.WithLabelValues("L2_reverted_relayed_message_transaction").Add(1) + } + } +} diff --git a/bridge-history-api/internal/orm/batch_event.go b/bridge-history-api/internal/orm/batch_event.go new file mode 100644 index 0000000000..931a5ad718 --- /dev/null +++ b/bridge-history-api/internal/orm/batch_event.go @@ -0,0 +1,141 @@ +package orm + +import ( + "context" + "fmt" + "time" + + "gorm.io/gorm" +) + +// BatchStatusType represents the type of batch status. +type BatchStatusType int + +// Constants for BatchStatusType. +const ( + BatchStatusTypeUnknown BatchStatusType = iota + BatchStatusTypeCommitted + BatchStatusTypeReverted + BatchStatusTypeFinalized +) + +// UpdateStatusType represents the whether batch info is updated in message table. +type UpdateStatusType int + +// Constants for UpdateStatusType. +const ( + UpdateStatusTypeUnupdated UpdateStatusType = iota + UpdateStatusTypeUpdated +) + +// BatchEvent represents a batch event. +type BatchEvent struct { + db *gorm.DB `gorm:"column:-"` + + ID uint64 `json:"id" gorm:"column:id;primary_key"` + L1BlockNumber uint64 `json:"l1_block_number" gorm:"column:l1_block_number"` + BatchStatus int `json:"batch_status" gorm:"column:batch_status"` + BatchIndex uint64 `json:"batch_index" gorm:"column:batch_index"` + BatchHash string `json:"batch_hash" gorm:"column:batch_hash"` + StartBlockNumber uint64 `json:"start_block_number" gorm:"column:start_block_number"` + EndBlockNumber uint64 `json:"end_block_number" gorm:"column:end_block_number"` + UpdateStatus int `json:"update_status" gorm:"column:update_status"` + CreatedAt time.Time `json:"created_at" gorm:"column:created_at"` + UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"` + DeletedAt *time.Time `json:"deleted_at" gorm:"column:deleted_at"` +} + +// TableName returns the table name for the BatchEvent model. +func (*BatchEvent) TableName() string { + return "batch_event" +} + +// NewBatchEvent returns a new instance of BatchEvent. +func NewBatchEvent(db *gorm.DB) *BatchEvent { + return &BatchEvent{db: db} +} + +// GetBatchEventSyncedHeightInDB returns the maximum l1_block_number from the batch_event table. +func (c *BatchEvent) GetBatchEventSyncedHeightInDB(ctx context.Context) (uint64, error) { + var batch BatchEvent + db := c.db.WithContext(ctx) + db = db.Model(&BatchEvent{}) + db = db.Order("l1_block_number desc") + if err := db.First(&batch).Error; err != nil { + if err == gorm.ErrRecordNotFound { + return 0, nil + } + return 0, fmt.Errorf("failed to get batch synced height in db, error: %w", err) + } + return batch.L1BlockNumber, nil +} + +// GetFinalizedBatchesLEBlockHeight returns the finalized batches with end block <= given block height in db. +func (c *BatchEvent) GetFinalizedBatchesLEBlockHeight(ctx context.Context, blockHeight uint64) ([]*BatchEvent, error) { + var batches []*BatchEvent + db := c.db.WithContext(ctx) + db = db.Model(&BatchEvent{}) + db = db.Where("end_block_number <= ?", blockHeight) + db = db.Where("batch_status = ?", BatchStatusTypeFinalized) + db = db.Where("update_status = ?", UpdateStatusTypeUnupdated) + db = db.Order("batch_index asc") + if err := db.Find(&batches).Error; err != nil { + if err == gorm.ErrRecordNotFound { + return nil, nil + } + return nil, fmt.Errorf("failed to get batches >= block height, error: %w", err) + } + return batches, nil +} + +// InsertOrUpdateBatchEvents inserts a new batch event or updates an existing one based on the BatchStatusType. +func (c *BatchEvent) InsertOrUpdateBatchEvents(ctx context.Context, l1BatchEvents []*BatchEvent, dbTX ...*gorm.DB) error { + for _, l1BatchEvent := range l1BatchEvents { + db := c.db + if len(dbTX) > 0 && dbTX[0] != nil { + db = dbTX[0] + } + db = db.WithContext(ctx) + db = db.Model(&BatchEvent{}) + updateFields := make(map[string]interface{}) + switch BatchStatusType(l1BatchEvent.BatchStatus) { + case BatchStatusTypeCommitted: + if err := db.Create(l1BatchEvent).Error; err != nil { + return fmt.Errorf("failed to insert batch event, error: %w", err) + } + case BatchStatusTypeFinalized: + db = db.Where("batch_index = ?", l1BatchEvent.BatchIndex) + db = db.Where("batch_hash = ?", l1BatchEvent.BatchHash) + updateFields["batch_status"] = BatchStatusTypeFinalized + if err := db.Updates(updateFields).Error; err != nil { + return fmt.Errorf("failed to update batch event, error: %w", err) + } + case BatchStatusTypeReverted: + db = db.Where("batch_index = ?", l1BatchEvent.BatchIndex) + db = db.Where("batch_hash = ?", l1BatchEvent.BatchHash) + updateFields["batch_status"] = BatchStatusTypeReverted + if err := db.Updates(updateFields).Error; err != nil { + return fmt.Errorf("failed to update batch event, error: %w", err) + } + // Soft delete the batch event. + if err := db.Delete(l1BatchEvent).Error; err != nil { + return fmt.Errorf("failed to soft delete batch event, error: %w", err) + } + } + } + return nil +} + +// UpdateBatchEventStatus updates the UpdateStatusType of a BatchEvent given its batch index. +func (c *BatchEvent) UpdateBatchEventStatus(ctx context.Context, batchIndex uint64) error { + db := c.db.WithContext(ctx) + db = db.Model(&BatchEvent{}) + db = db.Where("batch_index = ?", batchIndex) + updateFields := map[string]interface{}{ + "update_status": UpdateStatusTypeUpdated, + } + if err := db.Updates(updateFields).Error; err != nil { + return fmt.Errorf("failed to update batch event status, batchIndex: %d, error: %w", batchIndex, err) + } + return nil +} diff --git a/bridge-history-api/internal/orm/cross_message.go b/bridge-history-api/internal/orm/cross_message.go new file mode 100644 index 0000000000..493279e6e9 --- /dev/null +++ b/bridge-history-api/internal/orm/cross_message.go @@ -0,0 +1,545 @@ +package orm + +import ( + "context" + "fmt" + "time" + + "github.com/google/uuid" + "github.com/scroll-tech/go-ethereum/common" + "gorm.io/gorm" + "gorm.io/gorm/clause" +) + +// TokenType represents the type of token. +type TokenType int + +// Constants for TokenType. +const ( + TokenTypeUnknown TokenType = iota + TokenTypeETH + TokenTypeERC20 + TokenTypeERC721 + TokenTypeERC1155 +) + +// MessageType represents the type of message. +type MessageType int + +// Constants for MessageType. +const ( + MessageTypeUnknown MessageType = iota + MessageTypeL1SentMessage + MessageTypeL2SentMessage +) + +// TxStatusType represents the status of a transaction. +type TxStatusType int + +// Constants for TxStatusType. +const ( + // TxStatusTypeSent is one of the initial statuses for cross-chain messages. + // It is used as the default value to prevent overwriting the transaction status in scenarios where the message status might change + // from a later status (e.g., relayed) back to "sent". + // Example flow (L1 -> L2 message, and L1 fetcher is slower than L2 fetcher): + // 1. The relayed message is first tracked and processed, setting tx_status to TxStatusTypeRelayed. + // 2. The sent message is later processed (same cross-chain message), the tx_status should not over-write TxStatusTypeRelayed. + TxStatusTypeSent TxStatusType = iota + TxStatusTypeSentTxReverted // Not track message hash, thus will not be processed again anymore. + TxStatusTypeRelayed // Terminal status. + // FailedRelayedMessage event: encoded tx failed, cannot retry. e.g., https://sepolia.scrollscan.com/tx/0xfc7d3ea5ec8dc9b664a5a886c3b33d21e665355057601033481a439498efb79a + TxStatusTypeFailedRelayed // Terminal status. + // In some cases, user can retry with a larger gas limit. e.g., https://sepolia.scrollscan.com/tx/0x7323a7ba29492cb47d92206411be99b27896f2823cee0633a596b646b73f1b5b + TxStatusTypeRelayTxReverted + TxStatusTypeSkipped + TxStatusTypeDropped // Terminal status. +) + +// RollupStatusType represents the status of a rollup. +type RollupStatusType int + +// Constants for RollupStatusType. +const ( + RollupStatusTypeUnknown RollupStatusType = iota + RollupStatusTypeFinalized // only batch finalized status is used. +) + +// MessageQueueEventType represents the type of message queue event. +type MessageQueueEventType int + +// Constants for MessageQueueEventType. +const ( + MessageQueueEventTypeUnknown MessageQueueEventType = iota + MessageQueueEventTypeQueueTransaction + MessageQueueEventTypeDequeueTransaction + MessageQueueEventTypeDropTransaction +) + +// MessageQueueEvent struct represents the details of a batch event. +type MessageQueueEvent struct { + EventType MessageQueueEventType + QueueIndex uint64 + + // Track replay tx hash and refund tx hash. + TxHash common.Hash + + // QueueTransaction only in replayMessage, to track which message is replayed. + MessageHash common.Hash +} + +// CrossMessage represents a cross message. +type CrossMessage struct { + db *gorm.DB `gorm:"column:-"` + + ID uint64 `json:"id" gorm:"column:id;primary_key"` + MessageType int `json:"message_type" gorm:"column:message_type"` + RollupStatus int `json:"rollup_status" gorm:"column:rollup_status"` + TxStatus int `json:"tx_status" gorm:"column:tx_status"` + TokenType int `json:"token_type" gorm:"column:token_type"` + Sender string `json:"sender" gorm:"column:sender"` + Receiver string `json:"receiver" gorm:"column:receiver"` + MessageHash string `json:"message_hash" gorm:"column:message_hash"` + L1TxHash string `json:"l1_tx_hash" gorm:"column:l1_tx_hash"` // initial tx hash, if MessageType is MessageTypeL1SentMessage. + L1ReplayTxHash string `json:"l1_replay_tx_hash" gorm:"column:l1_replay_tx_hash"` + L1RefundTxHash string `json:"l1_refund_tx_hash" gorm:"column:l1_refund_tx_hash"` + L2TxHash string `json:"l2_tx_hash" gorm:"column:l2_tx_hash"` // initial tx hash, if MessageType is MessageTypeL2SentMessage. + L1BlockNumber uint64 `json:"l1_block_number" gorm:"column:l1_block_number"` + L2BlockNumber uint64 `json:"l2_block_number" gorm:"column:l2_block_number"` + L1TokenAddress string `json:"l1_token_address" gorm:"column:l1_token_address"` + L2TokenAddress string `json:"l2_token_address" gorm:"column:l2_token_address"` + TokenIDs string `json:"token_ids" gorm:"column:token_ids"` + TokenAmounts string `json:"token_amounts" gorm:"column:token_amounts"` + BlockTimestamp uint64 `json:"block_timestamp" gorm:"column:block_timestamp"` + MessageFrom string `json:"message_from" gorm:"column:message_from"` + MessageTo string `json:"message_to" gorm:"column:message_to"` + MessageValue string `json:"message_value" gorm:"column:message_value"` + MessageNonce uint64 `json:"message_nonce" gorm:"column:message_nonce"` + MessageData string `json:"message_data" gorm:"column:message_data"` + MerkleProof []byte `json:"merkle_proof" gorm:"column:merkle_proof"` + BatchIndex uint64 `json:"batch_index" gorm:"column:batch_index"` + CreatedAt time.Time `json:"created_at" gorm:"column:created_at"` + UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at"` + DeletedAt *time.Time `json:"deleted_at" gorm:"column:deleted_at"` +} + +// TableName returns the table name for the CrossMessage model. +func (*CrossMessage) TableName() string { + return "cross_message" +} + +// NewCrossMessage returns a new instance of CrossMessage. +func NewCrossMessage(db *gorm.DB) *CrossMessage { + return &CrossMessage{db: db} +} + +// GetMessageSyncedHeightInDB returns the latest synced cross message height from the database for a given message type. +func (c *CrossMessage) GetMessageSyncedHeightInDB(ctx context.Context, messageType MessageType) (uint64, error) { + var message CrossMessage + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Where("message_type = ?", messageType) + switch { + case messageType == MessageTypeL1SentMessage: + db = db.Order("l1_block_number desc") + case messageType == MessageTypeL2SentMessage: + db = db.Order("l2_block_number desc") + } + if err := db.First(&message).Error; err != nil { + if err == gorm.ErrRecordNotFound { + return 0, nil + } + return 0, fmt.Errorf("failed to get latest processed height, type: %v, error: %w", messageType, err) + } + switch { + case messageType == MessageTypeL1SentMessage: + return message.L1BlockNumber, nil + case messageType == MessageTypeL2SentMessage: + return message.L2BlockNumber, nil + default: + return 0, fmt.Errorf("invalid message type: %v", messageType) + } +} + +// GetL2LatestFinalizedWithdrawal returns the latest finalized L2 withdrawal from the database. +func (c *CrossMessage) GetL2LatestFinalizedWithdrawal(ctx context.Context) (*CrossMessage, error) { + var message CrossMessage + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Where("message_type = ?", MessageTypeL2SentMessage) + db = db.Where("rollup_status = ?", RollupStatusTypeFinalized) + db = db.Order("message_nonce desc") + if err := db.First(&message).Error; err != nil { + if err == gorm.ErrRecordNotFound { + return nil, nil + } + return nil, fmt.Errorf("failed to get latest L2 finalized sent message event, error: %w", err) + } + return &message, nil +} + +// GetL2WithdrawalsByBlockRange returns the L2 withdrawals by block range from the database. +func (c *CrossMessage) GetL2WithdrawalsByBlockRange(ctx context.Context, startBlock, endBlock uint64) ([]*CrossMessage, error) { + var messages []*CrossMessage + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Where("l2_block_number >= ?", startBlock) + db = db.Where("l2_block_number <= ?", endBlock) + db = db.Where("tx_status != ?", TxStatusTypeSentTxReverted) + db = db.Where("message_type = ?", MessageTypeL2SentMessage) + db = db.Order("message_nonce asc") + if err := db.Find(&messages).Error; err != nil { + if err == gorm.ErrRecordNotFound { + return nil, nil + } + return nil, fmt.Errorf("failed to get latest L2 finalized sent message event, error: %w", err) + } + return messages, nil +} + +// GetMessagesByTxHashes retrieves all cross messages from the database that match the provided transaction hashes. +func (c *CrossMessage) GetMessagesByTxHashes(ctx context.Context, txHashes []string) ([]*CrossMessage, error) { + var messages []*CrossMessage + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Where("l1_tx_hash in (?) or l2_tx_hash in (?)", txHashes, txHashes) + if err := db.Find(&messages).Error; err != nil { + return nil, fmt.Errorf("failed to get L2 messages by tx hashes, tx hashes: %v, error: %w", txHashes, err) + } + return messages, nil +} + +// GetL2UnclaimedWithdrawalsByAddress retrieves all L2 unclaimed withdrawal messages for a given sender address. +func (c *CrossMessage) GetL2UnclaimedWithdrawalsByAddress(ctx context.Context, sender string) ([]*CrossMessage, error) { + var messages []*CrossMessage + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Where("message_type = ?", MessageTypeL2SentMessage) + db = db.Where("tx_status = ?", TxStatusTypeSent) + db = db.Where("sender = ?", sender) + db = db.Order("block_timestamp desc") + db = db.Limit(500) + if err := db.Find(&messages).Error; err != nil { + return nil, fmt.Errorf("failed to get L2 claimable withdrawal messages by sender address, sender: %v, error: %w", sender, err) + } + return messages, nil +} + +// GetL2WithdrawalsByAddress retrieves all L2 claimable withdrawal messages for a given sender address. +func (c *CrossMessage) GetL2WithdrawalsByAddress(ctx context.Context, sender string) ([]*CrossMessage, error) { + var messages []*CrossMessage + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Where("message_type = ?", MessageTypeL2SentMessage) + db = db.Where("sender = ?", sender) + db = db.Order("block_timestamp desc") + db = db.Limit(500) + if err := db.Find(&messages).Error; err != nil { + return nil, fmt.Errorf("failed to get L2 withdrawal messages by sender address, sender: %v, error: %w", sender, err) + } + return messages, nil +} + +// GetTxsByAddress retrieves all txs for a given sender address. +func (c *CrossMessage) GetTxsByAddress(ctx context.Context, sender string) ([]*CrossMessage, error) { + var messages []*CrossMessage + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Where("sender = ?", sender) + db = db.Order("block_timestamp desc") + db = db.Limit(500) + if err := db.Find(&messages).Error; err != nil { + return nil, fmt.Errorf("failed to get all txs by sender address, sender: %v, error: %w", sender, err) + } + return messages, nil +} + +// UpdateL1MessageQueueEventsInfo updates the information about L1 message queue events in the database. +func (c *CrossMessage) UpdateL1MessageQueueEventsInfo(ctx context.Context, l1MessageQueueEvents []*MessageQueueEvent, dbTX ...*gorm.DB) error { + // update tx statuses. + for _, l1MessageQueueEvent := range l1MessageQueueEvents { + db := c.db + if len(dbTX) > 0 && dbTX[0] != nil { + db = dbTX[0] + } + db = db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + // do not over-write terminal statuses. + db = db.Where("tx_status != ?", TxStatusTypeRelayed) + db = db.Where("tx_status != ?", TxStatusTypeFailedRelayed) + db = db.Where("tx_status != ?", TxStatusTypeDropped) + txStatusUpdateFields := make(map[string]interface{}) + switch l1MessageQueueEvent.EventType { + case MessageQueueEventTypeQueueTransaction: + // only replayMessages or enforced txs (whose message hashes would not be found), sentMessages have been filtered out. + // replayMessage case: + // First SentMessage in L1: https://sepolia.etherscan.io/tx/0xbee4b631312448fcc2caac86e4dccf0a2ae0a88acd6c5fd8764d39d746e472eb + // Transaction reverted in L2: https://sepolia.scrollscan.com/tx/0xde6ef307a7da255888aad7a4c40a6b8c886e46a8a05883070bbf18b736cbfb8c + // replayMessage: https://sepolia.etherscan.io/tx/0xa5392891232bb32d98fcdbaca0d91b4d22ef2755380d07d982eebd47b147ce28 + // + // Note: update l1_tx_hash if the user calls replayMessage, cannot use queue index here, + // because in replayMessage, queue index != message nonce. + // Ref: https://github.com/scroll-tech/scroll/blob/v4.3.44/contracts/src/L1/L1ScrollMessenger.sol#L187-L190 + db = db.Where("message_hash = ?", l1MessageQueueEvent.MessageHash.String()) + txStatusUpdateFields["tx_status"] = TxStatusTypeSent // reset status to "sent". + case MessageQueueEventTypeDequeueTransaction: + db = db.Where("message_nonce = ?", l1MessageQueueEvent.QueueIndex) + db = db.Where("message_type = ?", MessageTypeL1SentMessage) + txStatusUpdateFields["tx_status"] = TxStatusTypeSkipped + case MessageQueueEventTypeDropTransaction: + db = db.Where("message_nonce = ?", l1MessageQueueEvent.QueueIndex) + db = db.Where("message_type = ?", MessageTypeL1SentMessage) + txStatusUpdateFields["tx_status"] = TxStatusTypeDropped + } + if err := db.Updates(txStatusUpdateFields).Error; err != nil { + return fmt.Errorf("failed to update tx statuses of L1 message queue events, update fields: %v, error: %w", txStatusUpdateFields, err) + } + } + + // update tx hashes of replay and refund. + for _, l1MessageQueueEvent := range l1MessageQueueEvents { + db := c.db + if len(dbTX) > 0 && dbTX[0] != nil { + db = dbTX[0] + } + db = db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + txHashUpdateFields := make(map[string]interface{}) + switch l1MessageQueueEvent.EventType { + case MessageQueueEventTypeQueueTransaction: + // only replayMessages or enforced txs (whose message hashes would not be found), sentMessages have been filtered out. + db = db.Where("message_hash = ?", l1MessageQueueEvent.MessageHash.String()) + txHashUpdateFields["l1_replay_tx_hash"] = l1MessageQueueEvent.TxHash.String() + case MessageQueueEventTypeDropTransaction: + db = db.Where("message_nonce = ?", l1MessageQueueEvent.QueueIndex) + db = db.Where("message_type = ?", MessageTypeL1SentMessage) + txHashUpdateFields["l1_refund_tx_hash"] = l1MessageQueueEvent.TxHash.String() + } + // Check if there are fields to update to avoid empty update operation (skip message). + if len(txHashUpdateFields) > 0 { + if err := db.Updates(txHashUpdateFields).Error; err != nil { + return fmt.Errorf("failed to update tx hashes of replay and refund in L1 message queue events info, update fields: %v, error: %w", txHashUpdateFields, err) + } + } + } + return nil +} + +// UpdateBatchStatusOfL2Withdrawals updates batch status of L2 withdrawals. +func (c *CrossMessage) UpdateBatchStatusOfL2Withdrawals(ctx context.Context, startBlockNumber, endBlockNumber, batchIndex uint64) error { + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Where("message_type = ?", MessageTypeL2SentMessage) + db = db.Where("l2_block_number >= ?", startBlockNumber) + db = db.Where("l2_block_number <= ?", endBlockNumber) + updateFields := make(map[string]interface{}) + updateFields["batch_index"] = batchIndex + updateFields["rollup_status"] = RollupStatusTypeFinalized + if err := db.Updates(updateFields).Error; err != nil { + return fmt.Errorf("failed to update batch status of L2 sent messages, start: %v, end: %v, index: %v, error: %w", startBlockNumber, endBlockNumber, batchIndex, err) + } + return nil +} + +// UpdateBatchIndexRollupStatusMerkleProofOfL2Messages updates the batch_index, rollup_status, and merkle_proof fields for a list of L2 cross messages. +func (c *CrossMessage) UpdateBatchIndexRollupStatusMerkleProofOfL2Messages(ctx context.Context, messages []*CrossMessage) error { + if len(messages) == 0 { + return nil + } + for _, message := range messages { + updateFields := map[string]interface{}{ + "batch_index": message.BatchIndex, + "rollup_status": message.RollupStatus, + "merkle_proof": message.MerkleProof, + } + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Where("message_hash = ?", message.MessageHash) + if err := db.Updates(updateFields).Error; err != nil { + return fmt.Errorf("failed to update L2 message with message_hash %s, error: %w", message.MessageHash, err) + } + } + return nil +} + +// InsertOrUpdateL1Messages inserts or updates a list of L1 cross messages into the database. +func (c *CrossMessage) InsertOrUpdateL1Messages(ctx context.Context, messages []*CrossMessage, dbTX ...*gorm.DB) error { + if len(messages) == 0 { + return nil + } + db := c.db + if len(dbTX) > 0 && dbTX[0] != nil { + db = dbTX[0] + } + db = db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + // 'tx_status' column is not explicitly assigned during the update to prevent a later status from being overwritten back to "sent". + db = db.Clauses(clause.OnConflict{ + Columns: []clause.Column{{Name: "message_hash"}}, + DoUpdates: clause.AssignmentColumns([]string{"sender", "receiver", "token_type", "l1_block_number", "l1_tx_hash", "l1_token_address", "l2_token_address", "token_ids", "token_amounts", "message_type", "block_timestamp", "message_nonce"}), + }) + if err := db.Create(messages).Error; err != nil { + return fmt.Errorf("failed to insert message, error: %w", err) + } + return nil +} + +// InsertOrUpdateL2Messages inserts or updates a list of L2 cross messages into the database. +func (c *CrossMessage) InsertOrUpdateL2Messages(ctx context.Context, messages []*CrossMessage, dbTX ...*gorm.DB) error { + if len(messages) == 0 { + return nil + } + db := c.db + if len(dbTX) > 0 && dbTX[0] != nil { + db = dbTX[0] + } + db = db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + // 'tx_status' column is not explicitly assigned during the update to prevent a later status from being overwritten back to "sent". + // The merkle_proof is updated separately in batch status updates and hence is not included here. + db = db.Clauses(clause.OnConflict{ + Columns: []clause.Column{{Name: "message_hash"}}, + DoUpdates: clause.AssignmentColumns([]string{"sender", "receiver", "token_type", "l2_block_number", "l2_tx_hash", "l1_token_address", "l2_token_address", "token_ids", "token_amounts", "message_type", "block_timestamp", "message_from", "message_to", "message_value", "message_data", "message_nonce"}), + }) + if err := db.Create(messages).Error; err != nil { + return fmt.Errorf("failed to insert message, error: %w", err) + } + return nil +} + +// InsertFailedGatewayRouterTxs inserts a list of transactions that failed to interact with the gateway router into the database. +// These failed transactions are only fetched once, so they are inserted without checking for duplicates. +// To resolve unique index confliction, a random UUID will be generated and used as the MessageHash. +func (c *CrossMessage) InsertFailedGatewayRouterTxs(ctx context.Context, messages []*CrossMessage, dbTX ...*gorm.DB) error { + if len(messages) == 0 { + return nil + } + db := c.db + if len(dbTX) > 0 && dbTX[0] != nil { + db = dbTX[0] + } + + db = db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + for _, message := range messages { + message.MessageHash = uuid.New().String() + } + if err := db.Create(messages).Error; err != nil { + return fmt.Errorf("failed to insert failed gateway router txs, error: %w", err) + } + return nil +} + +// InsertOrUpdateL2RelayedMessagesOfL1Deposits inserts or updates the database with a list of L2 relayed messages related to L1 deposits. +func (c *CrossMessage) InsertOrUpdateL2RelayedMessagesOfL1Deposits(ctx context.Context, l2RelayedMessages []*CrossMessage, dbTX ...*gorm.DB) error { + if len(l2RelayedMessages) == 0 { + return nil + } + // Deduplicate messages, for each message_hash, retaining message with the highest block number. + // This is necessary as a single message, like a FailedRelayedMessage or a reverted relayed transaction, + // may be relayed multiple times within certain block ranges, potentially leading to the error: + // "ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time (SQLSTATE 21000)". + // This happens if we attempt to insert multiple records with the same message_hash in a single db.Create operation. + // For example, see these transactions where the same message was relayed twice within certain block ranges: + // Reverted tx 1: https://sepolia.scrollscan.com/tx/0xcd6979277c3bc747445273a5e58ef1e9692fbe101d88cfefbbb69d3aef3193c0 + // Reverted tx 2: https://sepolia.scrollscan.com/tx/0x43e28ed7cb71107c18c5d8ebbdb4a1d9cac73e60391d14d41e92985028faa337 + // Another example: + // FailedRelayedMessage 1: https://sepolia.scrollscan.com/tx/0xfadb147fb211e5096446c5cac3ae0a8a705d2ece6c47c65135c8874f84638f17 + // FailedRelayedMessage 2: https://sepolia.scrollscan.com/tx/0x6cb149b61afd07bf2e17561a59ebebde41e343b6610290c97515b2f862160b42 + mergedL2RelayedMessages := make(map[string]*CrossMessage) + for _, message := range l2RelayedMessages { + if existing, found := mergedL2RelayedMessages[message.MessageHash]; found { + if TxStatusType(message.TxStatus) == TxStatusTypeRelayed || message.L2BlockNumber > existing.L2BlockNumber { + mergedL2RelayedMessages[message.MessageHash] = message + } + } else { + mergedL2RelayedMessages[message.MessageHash] = message + } + } + uniqueL2RelayedMessages := make([]*CrossMessage, 0, len(mergedL2RelayedMessages)) + for _, msg := range mergedL2RelayedMessages { + uniqueL2RelayedMessages = append(uniqueL2RelayedMessages, msg) + } + // Do not update tx status of successfully or failed relayed messages, + // because if a message is handled, the later relayed message tx would be reverted. + // ref: https://github.com/scroll-tech/scroll/blob/v4.3.44/contracts/src/L2/L2ScrollMessenger.sol#L102 + // e.g., + // Successfully relayed: https://sepolia.scrollscan.com/tx/0x4eb7cb07ba76956259c0079819a34a146f8a93dd891dc94812e9b3d66b056ec7#eventlog + // Reverted tx 1 (Reason: Message was already successfully executed): https://sepolia.scrollscan.com/tx/0x1973cafa14eb40734df30da7bfd4d9aceb53f8f26e09d96198c16d0e2e4a95fd + // Reverted tx 2 (Reason: Message was already successfully executed): https://sepolia.scrollscan.com/tx/0x02fc3a28684a590aead2482022f56281539085bd3d273ac8dedc1ceccb2bc554 + db := c.db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Clauses(clause.OnConflict{ + Columns: []clause.Column{{Name: "message_hash"}}, + DoUpdates: clause.AssignmentColumns([]string{"message_type", "l2_block_number", "l2_tx_hash", "tx_status"}), + Where: clause.Where{ + Exprs: []clause.Expression{ + clause.And( + // do not over-write terminal statuses. + clause.Neq{Column: "cross_message.tx_status", Value: TxStatusTypeRelayed}, + clause.Neq{Column: "cross_message.tx_status", Value: TxStatusTypeFailedRelayed}, + clause.Neq{Column: "cross_message.tx_status", Value: TxStatusTypeDropped}, + ), + }, + }, + }) + if err := db.Create(uniqueL2RelayedMessages).Error; err != nil { + return fmt.Errorf("failed to update L2 reverted relayed message of L1 deposit, error: %w", err) + } + return nil +} + +// InsertOrUpdateL1RelayedMessagesOfL2Withdrawals inserts or updates the database with a list of L1 relayed messages related to L2 withdrawals. +func (c *CrossMessage) InsertOrUpdateL1RelayedMessagesOfL2Withdrawals(ctx context.Context, l1RelayedMessages []*CrossMessage, dbTX ...*gorm.DB) error { + if len(l1RelayedMessages) == 0 { + return nil + } + // Deduplicate messages, for each message_hash, retaining message with the highest block number. + // This is necessary as a single message, like a FailedRelayedMessage or a reverted relayed transaction, + // may be relayed multiple times within certain block ranges, potentially leading to the error: + // "ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time (SQLSTATE 21000)". + // This happens if we attempt to insert multiple records with the same message_hash in a single db.Create operation. + // For example, see these transactions where the same message was relayed twice within certain block ranges: + // FailedRelayedMessage 1: https://sepolia.etherscan.io/tx/0x28b3212cda6ca0f3790f362a780257bbe2b37417ccf75a4eca6c3a08294c8f1b#eventlog + // FailedRelayedMessage 2: https://sepolia.etherscan.io/tx/0xc8a8254825dd2cab5caef58cfd8d88c077ceadadc78f2340214a86cf8ab88543#eventlog + // Another example (relayed success, then relayed again): + // Relay Message, and success: https://sepolia.etherscan.io/tx/0xcfdf2f5446719e3e123a8aa06e4d6b3809c3850a13adf875755c8b1e423aa448#eventlog + // Relay Message again, and reverted: https://sepolia.etherscan.io/tx/0xb1fcae7546f3de4cfd0b4d679f4075adb4eb69578b12e2b5673f5f24b1836578 + mergedL1RelayedMessages := make(map[string]*CrossMessage) + for _, message := range l1RelayedMessages { + if existing, found := mergedL1RelayedMessages[message.MessageHash]; found { + if TxStatusType(message.TxStatus) == TxStatusTypeRelayed || message.L1BlockNumber > existing.L1BlockNumber { + mergedL1RelayedMessages[message.MessageHash] = message + } + } else { + mergedL1RelayedMessages[message.MessageHash] = message + } + } + uniqueL1RelayedMessages := make([]*CrossMessage, 0, len(mergedL1RelayedMessages)) + for _, msg := range mergedL1RelayedMessages { + uniqueL1RelayedMessages = append(uniqueL1RelayedMessages, msg) + } + db := c.db + if len(dbTX) > 0 && dbTX[0] != nil { + db = dbTX[0] + } + db = db.WithContext(ctx) + db = db.Model(&CrossMessage{}) + db = db.Clauses(clause.OnConflict{ + Columns: []clause.Column{{Name: "message_hash"}}, + DoUpdates: clause.AssignmentColumns([]string{"message_type", "l1_block_number", "l1_tx_hash", "tx_status"}), + Where: clause.Where{ + Exprs: []clause.Expression{ + clause.And( + // do not over-write terminal statuses. + clause.Neq{Column: "cross_message.tx_status", Value: TxStatusTypeRelayed}, + clause.Neq{Column: "cross_message.tx_status", Value: TxStatusTypeFailedRelayed}, + clause.Neq{Column: "cross_message.tx_status", Value: TxStatusTypeDropped}, + ), + }, + }, + }) + if err := db.Create(uniqueL1RelayedMessages).Error; err != nil { + return fmt.Errorf("failed to update L1 relayed message of L2 withdrawal, error: %w", err) + } + return nil +} diff --git a/bridge-history-api/orm/migrate/migrate.go b/bridge-history-api/internal/orm/migrate/migrate.go similarity index 100% rename from bridge-history-api/orm/migrate/migrate.go rename to bridge-history-api/internal/orm/migrate/migrate.go diff --git a/bridge-history-api/internal/orm/migrate/migrations/00001_cross_message.sql b/bridge-history-api/internal/orm/migrate/migrations/00001_cross_message.sql new file mode 100644 index 0000000000..477138babb --- /dev/null +++ b/bridge-history-api/internal/orm/migrate/migrations/00001_cross_message.sql @@ -0,0 +1,57 @@ +-- +goose Up +-- +goose StatementBegin +CREATE TABLE cross_message +( + id BIGSERIAL PRIMARY KEY, + message_type SMALLINT NOT NULL, + tx_status SMALLINT NOT NULL, + rollup_status SMALLINT NOT NULL, + token_type SMALLINT NOT NULL, + sender VARCHAR NOT NULL, + receiver VARCHAR NOT NULL, + + message_hash VARCHAR DEFAULT NULL, -- NULL for failed txs + l1_tx_hash VARCHAR DEFAULT NULL, + l1_replay_tx_hash VARCHAR DEFAULT NULL, + l1_refund_tx_hash VARCHAR DEFAULT NULL, + l2_tx_hash VARCHAR DEFAULT NULL, + l1_block_number BIGINT DEFAULT NULL, + l2_block_number BIGINT DEFAULT NULL, + l1_token_address VARCHAR DEFAULT NULL, + l2_token_address VARCHAR DEFAULT NULL, + token_ids VARCHAR DEFAULT NULL, + token_amounts VARCHAR NOT NULL, + block_timestamp BIGINT NOT NULL, -- timestamp to sort L1 Deposit & L2 Withdraw events altogether + +--- claim info + message_from VARCHAR DEFAULT NULL, + message_to VARCHAR DEFAULT NULL, + message_value VARCHAR DEFAULT NULL, + message_nonce BIGINT DEFAULT NULL, + message_data VARCHAR DEFAULT NULL, + merkle_proof BYTEA DEFAULT NULL, + batch_index BIGINT DEFAULT NULL, + +-- metadata + created_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted_at TIMESTAMP(0) DEFAULT NULL +); + +CREATE UNIQUE INDEX IF NOT EXISTS idx_cm_message_hash ON cross_message (message_hash); +CREATE INDEX IF NOT EXISTS idx_cm_message_type_l1_block_number ON cross_message (message_type, l1_block_number DESC); +CREATE INDEX IF NOT EXISTS idx_cm_message_type_l2_block_number ON cross_message (message_type, l2_block_number DESC); +CREATE INDEX IF NOT EXISTS idx_cm_message_type_rollup_status_message_nonce ON cross_message (message_type, rollup_status, message_nonce DESC); +CREATE INDEX IF NOT EXISTS idx_cm_message_type_message_nonce_tx_status_l2_block_number ON cross_message (message_type, message_nonce, tx_status, l2_block_number); +CREATE INDEX IF NOT EXISTS idx_cm_l1_tx_hash ON cross_message (l1_tx_hash); +CREATE INDEX IF NOT EXISTS idx_cm_l2_tx_hash ON cross_message (l2_tx_hash); +CREATE INDEX IF NOT EXISTS idx_cm_message_type_tx_status_sender_block_timestamp ON cross_message (message_type, tx_status, sender, block_timestamp DESC); +CREATE INDEX IF NOT EXISTS idx_cm_message_type_sender_block_timestamp ON cross_message (message_type, sender, block_timestamp DESC); +CREATE INDEX IF NOT EXISTS idx_cm_sender_block_timestamp ON cross_message (sender, block_timestamp DESC); + +-- +goose StatementEnd + +-- +goose Down +-- +goose StatementBegin +DROP TABLE IF EXISTS cross_message; +-- +goose StatementEnd diff --git a/bridge-history-api/internal/orm/migrate/migrations/00002_batch_event.sql b/bridge-history-api/internal/orm/migrate/migrations/00002_batch_event.sql new file mode 100644 index 0000000000..1f56d55cd1 --- /dev/null +++ b/bridge-history-api/internal/orm/migrate/migrations/00002_batch_event.sql @@ -0,0 +1,28 @@ +-- +goose Up +-- +goose StatementBegin +CREATE TABLE batch_event +( + id BIGSERIAL PRIMARY KEY, + l1_block_number BIGINT NOT NULL, + batch_status SMALLINT NOT NULL, + batch_index BIGINT NOT NULL, + batch_hash VARCHAR NOT NULL, + start_block_number BIGINT NOT NULL, + end_block_number BIGINT NOT NULL, + update_status SMALLINT NOT NULL, + created_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, + deleted_at TIMESTAMP(0) DEFAULT NULL +); + +CREATE INDEX IF NOT EXISTS idx_be_l1_block_number ON batch_event (l1_block_number); +CREATE INDEX IF NOT EXISTS idx_be_batch_index ON batch_event (batch_index); +CREATE INDEX IF NOT EXISTS idx_be_batch_index_batch_hash ON batch_event (batch_index, batch_hash); +CREATE INDEX IF NOT EXISTS idx_be_end_block_number_update_status_batch_status_batch_index ON batch_event (end_block_number, update_status, batch_status, batch_index); + +-- +goose StatementEnd + +-- +goose Down +-- +goose StatementBegin +DROP TABLE IF EXISTS batch_event; +-- +goose StatementEnd \ No newline at end of file diff --git a/bridge-history-api/internal/route/route.go b/bridge-history-api/internal/route/route.go index e8dae24175..9123d6ca48 100644 --- a/bridge-history-api/internal/route/route.go +++ b/bridge-history-api/internal/route/route.go @@ -7,16 +7,17 @@ import ( "github.com/gin-gonic/gin" "github.com/prometheus/client_golang/prometheus" - "bridge-history-api/config" - "bridge-history-api/internal/controller" - "bridge-history-api/observability" + "scroll-tech/common/observability" + + "scroll-tech/bridge-history-api/internal/config" + "scroll-tech/bridge-history-api/internal/controller/api" ) // Route routes the APIs func Route(router *gin.Engine, conf *config.Config, reg prometheus.Registerer) { router.Use(cors.New(cors.Config{ AllowOrigins: []string{"*"}, - AllowMethods: []string{"GET", "POST", "PUT", "DELETE"}, + AllowMethods: []string{"GET", "POST"}, AllowHeaders: []string{"Origin", "Content-Type", "Authorization"}, AllowCredentials: true, MaxAge: 12 * time.Hour, @@ -25,6 +26,10 @@ func Route(router *gin.Engine, conf *config.Config, reg prometheus.Registerer) { observability.Use(router, "bridge_history_api", reg) r := router.Group("api/") - r.POST("/txsbyhashes", controller.HistoryCtrler.PostQueryTxsByHash) - r.GET("/claimable", controller.HistoryCtrler.GetAllClaimableTxsByAddr) + + r.GET("/txs", api.HistoryCtrler.GetTxsByAddress) + r.GET("/l2/withdrawals", api.HistoryCtrler.GetL2WithdrawalsByAddress) + r.GET("/l2/unclaimed/withdrawals", api.HistoryCtrler.GetL2UnclaimedWithdrawalsByAddress) + + r.POST("/txsbyhashes", api.HistoryCtrler.PostQueryTxsByHashes) } diff --git a/bridge-history-api/internal/types/history_types.go b/bridge-history-api/internal/types/types.go similarity index 64% rename from bridge-history-api/internal/types/history_types.go rename to bridge-history-api/internal/types/types.go index cde7b79b68..1c79906409 100644 --- a/bridge-history-api/internal/types/history_types.go +++ b/bridge-history-api/internal/types/types.go @@ -2,42 +2,37 @@ package types import ( "net/http" - "time" "github.com/gin-gonic/gin" ) const ( - // Success shows OK. + // Success indicates that the operation was successful. Success = 0 - // InternalServerError shows a fatal error in the server + // InternalServerError represents a fatal error occurring on the server. InternalServerError = 500 - // ErrParameterInvalidNo is invalid params error + // ErrParameterInvalidNo represents an error when the parameters are invalid. ErrParameterInvalidNo = 40001 - // ErrGetClaimablesFailure is getting all claimables txs error - ErrGetClaimablesFailure = 40002 - // ErrGetTxsByHashFailure is getting txs by hash list error - ErrGetTxsByHashFailure = 40003 - // ErrGetTxsByAddrFailure is getting txs by address error - ErrGetTxsByAddrFailure = 40004 - // ErrGetWithdrawRootByBatchIndexFailure is getting withdraw root by batch index error - ErrGetWithdrawRootByBatchIndexFailure = 40005 + // ErrGetL2ClaimableWithdrawalsError represents an error when trying to get L2 claimable withdrawal transactions. + ErrGetL2ClaimableWithdrawalsError = 40002 + // ErrGetL2WithdrawalsError represents an error when trying to get L2 withdrawal transactions by address. + ErrGetL2WithdrawalsError = 40003 + // ErrGetTxsError represents an error when trying to get transactions by address. + ErrGetTxsError = 40004 + // ErrGetTxsByHashError represents an error when trying to get transactions by hash list. + ErrGetTxsByHashError = 40005 ) // QueryByAddressRequest the request parameter of address api type QueryByAddressRequest struct { - Address string `form:"address" binding:"required"` + Address string `form:"address" binding:"required"` + Page uint64 `form:"page" binding:"required,min=1"` + PageSize uint64 `form:"page_size" binding:"required,min=1,max=100"` } // QueryByHashRequest the request parameter of hash api type QueryByHashRequest struct { - Txs []string `raw:"txs" binding:"required"` -} - -// QueryByBatchIndexRequest the request parameter of batch index api -type QueryByBatchIndexRequest struct { - // BatchIndex can not be 0, because we dont decode the genesis block - BatchIndex uint64 `form:"batch_index" binding:"required"` + Txs []string `json:"txs" binding:"required,min=1,max=100"` } // ResultData contains return txs and total @@ -55,12 +50,8 @@ type Response struct { // Finalized the schema of tx finalized infos type Finalized struct { - Hash string `json:"hash"` - Amount string `json:"amount"` - To string `json:"to"` // useless - IsL1 bool `json:"isL1"` - BlockNumber uint64 `json:"blockNumber"` - BlockTimestamp *time.Time `json:"blockTimestamp"` // uselesss + Hash string `json:"hash"` + BlockNumber uint64 `json:"blockNumber"` } // UserClaimInfo the schema of tx claim infos @@ -69,26 +60,27 @@ type UserClaimInfo struct { To string `json:"to"` Value string `json:"value"` Nonce string `json:"nonce"` - BatchHash string `json:"batch_hash"` Message string `json:"message"` Proof string `json:"proof"` BatchIndex string `json:"batch_index"` + Claimable bool `json:"claimable"` } // TxHistoryInfo the schema of tx history infos type TxHistoryInfo struct { Hash string `json:"hash"` + ReplayTxHash string `json:"replayTxHash"` + RefundTxHash string `json:"refundTxHash"` MsgHash string `json:"msgHash"` Amount string `json:"amount"` - To string `json:"to"` // useless IsL1 bool `json:"isL1"` L1Token string `json:"l1Token"` L2Token string `json:"l2Token"` BlockNumber uint64 `json:"blockNumber"` - BlockTimestamp *time.Time `json:"blockTimestamp"` // useless + TxStatus int `json:"txStatus"` FinalizeTx *Finalized `json:"finalizeTx"` ClaimInfo *UserClaimInfo `json:"claimInfo"` - CreatedAt *time.Time `json:"createdTime"` + BlockTimestamp uint64 `json:"blockTimestamp"` } // RenderJSON renders response with json diff --git a/bridge-history-api/internal/utils/utils.go b/bridge-history-api/internal/utils/utils.go new file mode 100644 index 0000000000..3f24c19d56 --- /dev/null +++ b/bridge-history-api/internal/utils/utils.go @@ -0,0 +1,206 @@ +package utils + +import ( + "context" + "encoding/binary" + "errors" + "fmt" + "math/big" + "strings" + + "github.com/scroll-tech/go-ethereum/accounts/abi" + "github.com/scroll-tech/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/core/types" + "github.com/scroll-tech/go-ethereum/crypto" + "github.com/scroll-tech/go-ethereum/ethclient" + "github.com/scroll-tech/go-ethereum/log" + "github.com/scroll-tech/go-ethereum/rpc" + "golang.org/x/sync/errgroup" + + backendabi "scroll-tech/bridge-history-api/abi" +) + +// Keccak2 compute the keccack256 of two concatenations of bytes32 +func Keccak2(a common.Hash, b common.Hash) common.Hash { + return common.BytesToHash(crypto.Keccak256(append(a.Bytes()[:], b.Bytes()[:]...))) +} + +// GetBlockNumber get the current block number minus the confirmations +func GetBlockNumber(ctx context.Context, client *ethclient.Client, confirmations uint64) (uint64, error) { + number, err := client.BlockNumber(ctx) + if err != nil || number <= confirmations { + return 0, err + } + number = number - confirmations + return number, nil +} + +// UnpackLog unpacks a retrieved log into the provided output structure. +// @todo: add unit test. +func UnpackLog(c *abi.ABI, out interface{}, event string, log types.Log) error { + if log.Topics[0] != c.Events[event].ID { + return fmt.Errorf("event signature mismatch") + } + if len(log.Data) > 0 { + if err := c.UnpackIntoInterface(out, event, log.Data); err != nil { + return err + } + } + var indexed abi.Arguments + for _, arg := range c.Events[event].Inputs { + if arg.Indexed { + indexed = append(indexed, arg) + } + } + return abi.ParseTopics(out, indexed, log.Topics[1:]) +} + +// ComputeMessageHash compute the message hash +func ComputeMessageHash( + sender common.Address, + target common.Address, + value *big.Int, + messageNonce *big.Int, + message []byte, +) common.Hash { + data, _ := backendabi.IL2ScrollMessengerABI.Pack("relayMessage", sender, target, value, messageNonce, message) + return common.BytesToHash(crypto.Keccak256(data)) +} + +type commitBatchArgs struct { + Version uint8 + ParentBatchHeader []byte + Chunks [][]byte + SkippedL1MessageBitmap []byte +} + +// GetBatchRangeFromCalldata find the block range from calldata, both inclusive. +func GetBatchRangeFromCalldata(calldata []byte) (uint64, uint64, error) { + method := backendabi.IScrollChainABI.Methods["commitBatch"] + values, err := method.Inputs.Unpack(calldata[4:]) + if err != nil { + // special case: import genesis batch + method = backendabi.IScrollChainABI.Methods["importGenesisBatch"] + _, err2 := method.Inputs.Unpack(calldata[4:]) + if err2 == nil { + // genesis batch + return 0, 0, nil + } + // none of "commitBatch" and "importGenesisBatch" match, give up + return 0, 0, err + } + args := commitBatchArgs{} + err = method.Inputs.Copy(&args, values) + if err != nil { + return 0, 0, err + } + + var startBlock uint64 + var finishBlock uint64 + + // decode blocks from chunk and assume that there's no empty chunk + // | 1 byte | 60 bytes | ... | 60 bytes | + // | num blocks | block 1 | ... | block n | + if len(args.Chunks) == 0 { + return 0, 0, errors.New("invalid chunks") + } + chunk := args.Chunks[0] + block := chunk[1:61] // first block in chunk + startBlock = binary.BigEndian.Uint64(block[0:8]) + + chunk = args.Chunks[len(args.Chunks)-1] + lastBlockIndex := int(chunk[0]) - 1 + block = chunk[1+lastBlockIndex*60 : 1+lastBlockIndex*60+60] // last block in chunk + finishBlock = binary.BigEndian.Uint64(block[0:8]) + + return startBlock, finishBlock, err +} + +// GetL1BlocksInRange gets a batch of blocks for a block range [start, end] inclusive. +func GetL1BlocksInRange(ctx context.Context, cli *ethclient.Client, start, end uint64) ([]*types.Block, error) { + var ( + eg errgroup.Group + blocks = make([]*types.Block, end-start+1) + concurrency = 32 + sem = make(chan struct{}, concurrency) + ) + + for i := start; i <= end; i++ { + sem <- struct{}{} // Acquire a slot in the semaphore + blockNum := int64(i) + index := i - start + eg.Go(func() error { + defer func() { <-sem }() // Release the slot when done + block, err := cli.BlockByNumber(ctx, big.NewInt(blockNum)) + if err != nil { + log.Error("Failed to fetch block number", "number", blockNum, "error", err) + return err + } + blocks[index] = block + return nil + }) + } + + if err := eg.Wait(); err != nil { + log.Error("Error waiting for block fetching routines", "error", err) + return nil, err + } + return blocks, nil +} + +// GetL2BlocksInRange gets a batch of blocks for a block range [start, end] inclusive. +func GetL2BlocksInRange(ctx context.Context, cli *ethclient.Client, start, end uint64) ([]*types.BlockWithRowConsumption, error) { + var ( + eg errgroup.Group + blocks = make([]*types.BlockWithRowConsumption, end-start+1) + concurrency = 32 + sem = make(chan struct{}, concurrency) + ) + + for i := start; i <= end; i++ { + sem <- struct{}{} // Acquire a slot in the semaphore + blockNum := rpc.BlockNumberOrHashWithNumber(rpc.BlockNumber(i)) + index := i - start + eg.Go(func() error { + defer func() { <-sem }() // Release the slot when done + block, err := cli.GetBlockByNumberOrHash(ctx, blockNum) + if err != nil { + log.Error("Failed to fetch block number", "number", blockNum, "error", err) + return err + } + blocks[index] = block + return nil + }) + } + + if err := eg.Wait(); err != nil { + log.Error("Error waiting for block fetching routines", "error", err) + return nil, err + } + return blocks, nil +} + +// ConvertBigIntArrayToString convert the big int array to string +func ConvertBigIntArrayToString(array []*big.Int) string { + stringArray := make([]string, len(array)) + for i, num := range array { + stringArray[i] = num.String() + } + + result := strings.Join(stringArray, ", ") + return result +} + +// GetSkippedQueueIndices get the skipped queue indices +func GetSkippedQueueIndices(startIndex uint64, skippedBitmap *big.Int) []uint64 { + var indices []uint64 + for i := 0; i < 256; i++ { + index := startIndex + uint64(i) + bit := new(big.Int).Rsh(skippedBitmap, uint(i)) + if bit.Bit(0) == 0 { + continue + } + indices = append(indices, index) + } + return indices +} diff --git a/bridge-history-api/internal/utils/utils_test.go b/bridge-history-api/internal/utils/utils_test.go new file mode 100644 index 0000000000..e12413463c --- /dev/null +++ b/bridge-history-api/internal/utils/utils_test.go @@ -0,0 +1,38 @@ +package utils + +import ( + "testing" + + "github.com/scroll-tech/go-ethereum/common" + "github.com/stretchr/testify/assert" +) + +func TestKeccak2(t *testing.T) { + a := common.HexToHash("0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0") + b := common.HexToHash("0x222ff5e0b5877792c2bc1670e2ccd0c2c97cd7bb1672a57d598db05092d3d72c") + c := Keccak2(a, b) + assert.NotEmpty(t, c) + assert.NotEqual(t, a, c) + assert.NotEqual(t, b, c) + assert.Equal(t, "0xc0ffbd7f501bd3d49721b0724b2bff657cb2378f15d5a9b97cd7ea5bf630d512", c.Hex()) +} + +func TestGetBatchRangeFromCalldata(t *testing.T) { + // single chunk + start, finish, err := GetBatchRangeFromCalldata(common.Hex2Bytes("1325aca000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000005900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003d0100000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000")) + assert.NoError(t, err) + assert.Equal(t, start, uint64(1)) + assert.Equal(t, finish, uint64(1)) + + // multiple chunk + start, finish, err = GetBatchRangeFromCalldata(common.Hex2Bytes("1325aca000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000007900000000000000000100000000000000010000000000000001038433daac85a0b03cd443ed50bc85e832c883061651ae2182b2984751e0b340119b828c2a2798d2c957228ebeaff7e10bb099ae0d4e224f3eeb779ff61cba610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004c01000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000010000000001000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b403000000000000000b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000300000000000000000b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00050000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012c01000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa800000000000000000000000000000000000000000000000000000000000000aa")) + assert.NoError(t, err) + assert.Equal(t, start, uint64(10)) + assert.Equal(t, finish, uint64(20)) + + // genesis batch + start, finish, err = GetBatchRangeFromCalldata(common.Hex2Bytes("3fdeecb200000000000000000000000000000000000000000000000000000000000000402dcb5308098d24a37fc1487a229fcedb09fa4343ede39cbad365bc925535bb09000000000000000000000000000000000000000000000000000000000000005900000000000000000000000000000000000000000000000000c252bc9780c4d83cf11f14b8cd03c92c4d18ce07710ba836d31d12da216c8330000000000000000000000000000000000000000000000000000000000000000000000000000000")) + assert.NoError(t, err) + assert.Equal(t, start, uint64(0)) + assert.Equal(t, finish, uint64(0)) +} diff --git a/bridge-history-api/crossmsg/messageproof/withdraw_trie.go b/bridge-history-api/internal/utils/withdraw_trie.go similarity index 78% rename from bridge-history-api/crossmsg/messageproof/withdraw_trie.go rename to bridge-history-api/internal/utils/withdraw_trie.go index 8e2ff1d9ac..d9fbc9cd70 100644 --- a/bridge-history-api/crossmsg/messageproof/withdraw_trie.go +++ b/bridge-history-api/internal/utils/withdraw_trie.go @@ -1,9 +1,7 @@ -package messageproof +package utils import ( - "github.com/ethereum/go-ethereum/common" - - "bridge-history-api/utils" + "github.com/scroll-tech/go-ethereum/common" ) // MaxHeight is the maximum possible height of withdrawal trie @@ -27,7 +25,7 @@ func NewWithdrawTrie() *WithdrawTrie { zeroes[0] = common.Hash{} for i := 1; i < MaxHeight; i++ { - zeroes[i] = utils.Keccak2(zeroes[i-1], zeroes[i-1]) + zeroes[i] = Keccak2(zeroes[i-1], zeroes[i-1]) } return &WithdrawTrie{ @@ -40,14 +38,15 @@ func NewWithdrawTrie() *WithdrawTrie { // Initialize will initialize the merkle trie with rightest leaf node func (w *WithdrawTrie) Initialize(currentMessageNonce uint64, msgHash common.Hash, proofBytes []byte) { - proof := DecodeBytesToMerkleProof(proofBytes) - branches := RecoverBranchFromProof(proof, currentMessageNonce, msgHash) + proof := decodeBytesToMerkleProof(proofBytes) + branches := recoverBranchFromProof(proof, currentMessageNonce, msgHash) w.height = len(proof) w.branches = branches w.NextMessageNonce = currentMessageNonce + 1 } // AppendMessages appends a list of new messages as leaf nodes to the rightest of the tree and returns the proofs for all messages. +// The function correctly returns the proofs for the entire tree after all messages have been inserted, not the individual proofs after each insertion. func (w *WithdrawTrie) AppendMessages(hashes []common.Hash) [][]byte { length := len(hashes) if length == 0 { @@ -87,7 +86,7 @@ func (w *WithdrawTrie) AppendMessages(hashes []common.Hash) [][]byte { cache[h][maxIndex^1] = w.zeroes[h] } for i := minIndex; i <= maxIndex; i += 2 { - cache[h+1][i>>1] = utils.Keccak2(cache[h][i], cache[h][i^1]) + cache[h+1][i>>1] = Keccak2(cache[h][i], cache[h][i^1]) } minIndex >>= 1 maxIndex >>= 1 @@ -95,7 +94,7 @@ func (w *WithdrawTrie) AppendMessages(hashes []common.Hash) [][]byte { // update branches using hashes one by one for i := 0; i < length; i++ { - proof := UpdateBranchWithNewMessage(w.zeroes, w.branches, w.NextMessageNonce, hashes[i]) + proof := updateBranchWithNewMessage(w.zeroes, w.branches, w.NextMessageNonce, hashes[i]) w.NextMessageNonce++ w.height = len(proof) } @@ -109,7 +108,7 @@ func (w *WithdrawTrie) AppendMessages(hashes []common.Hash) [][]byte { merkleProof = append(merkleProof, cache[h][index^1]) index >>= 1 } - proofs[i] = EncodeMerkleProofToBytes(merkleProof) + proofs[i] = encodeMerkleProofToBytes(merkleProof) } return proofs @@ -123,8 +122,8 @@ func (w *WithdrawTrie) MessageRoot() common.Hash { return w.branches[w.height] } -// DecodeBytesToMerkleProof transfer byte array to bytes32 array. The caller should make sure the length is matched. -func DecodeBytesToMerkleProof(proofBytes []byte) []common.Hash { +// decodeBytesToMerkleProof transfer byte array to bytes32 array. The caller should make sure the length is matched. +func decodeBytesToMerkleProof(proofBytes []byte) []common.Hash { proof := make([]common.Hash, len(proofBytes)/32) for i := 0; i < len(proofBytes); i += 32 { proof[i/32] = common.BytesToHash(proofBytes[i : i+32]) @@ -132,8 +131,8 @@ func DecodeBytesToMerkleProof(proofBytes []byte) []common.Hash { return proof } -// EncodeMerkleProofToBytes transfer byte32 array to byte array by concatenation. -func EncodeMerkleProofToBytes(proof []common.Hash) []byte { +// encodeMerkleProofToBytes transfer byte32 array to byte array by concatenation. +func encodeMerkleProofToBytes(proof []common.Hash) []byte { var proofBytes []byte for i := 0; i < len(proof); i++ { proofBytes = append(proofBytes, proof[i][:]...) @@ -141,8 +140,8 @@ func EncodeMerkleProofToBytes(proof []common.Hash) []byte { return proofBytes } -// UpdateBranchWithNewMessage update the branches to latest with new message and return the merkle proof for the message. -func UpdateBranchWithNewMessage(zeroes []common.Hash, branches []common.Hash, index uint64, msgHash common.Hash) []common.Hash { +// updateBranchWithNewMessage update the branches to latest with new message and return the merkle proof for the message. +func updateBranchWithNewMessage(zeroes []common.Hash, branches []common.Hash, index uint64, msgHash common.Hash) []common.Hash { root := msgHash var merkleProof []common.Hash var height uint64 @@ -152,10 +151,10 @@ func UpdateBranchWithNewMessage(zeroes []common.Hash, branches []common.Hash, in branches[height] = root merkleProof = append(merkleProof, zeroes[height]) // it's a left child, the right child must be null - root = utils.Keccak2(root, zeroes[height]) + root = Keccak2(root, zeroes[height]) } else { // it's a right child, use previously computed hash - root = utils.Keccak2(branches[height], root) + root = Keccak2(branches[height], root) merkleProof = append(merkleProof, branches[height]) } index >>= 1 @@ -164,8 +163,8 @@ func UpdateBranchWithNewMessage(zeroes []common.Hash, branches []common.Hash, in return merkleProof } -// RecoverBranchFromProof will recover latest branches from merkle proof and message hash -func RecoverBranchFromProof(proof []common.Hash, index uint64, msgHash common.Hash) []common.Hash { +// recoverBranchFromProof will recover latest branches from merkle proof and message hash +func recoverBranchFromProof(proof []common.Hash, index uint64, msgHash common.Hash) []common.Hash { branches := make([]common.Hash, 64) root := msgHash var height uint64 @@ -173,11 +172,11 @@ func RecoverBranchFromProof(proof []common.Hash, index uint64, msgHash common.Ha if index%2 == 0 { branches[height] = root // it's a left child, the right child must be null - root = utils.Keccak2(root, proof[height]) + root = Keccak2(root, proof[height]) } else { // it's a right child, use previously computed hash branches[height] = proof[height] - root = utils.Keccak2(proof[height], root) + root = Keccak2(proof[height], root) } index >>= 1 } diff --git a/bridge-history-api/crossmsg/messageproof/withdraw_trie_test.go b/bridge-history-api/internal/utils/withdraw_trie_test.go similarity index 87% rename from bridge-history-api/crossmsg/messageproof/withdraw_trie_test.go rename to bridge-history-api/internal/utils/withdraw_trie_test.go index 08900a10f4..6aacbfef67 100644 --- a/bridge-history-api/crossmsg/messageproof/withdraw_trie_test.go +++ b/bridge-history-api/internal/utils/withdraw_trie_test.go @@ -1,13 +1,11 @@ -package messageproof +package utils import ( "math/big" "testing" - "github.com/ethereum/go-ethereum/common" + "github.com/scroll-tech/go-ethereum/common" "github.com/stretchr/testify/assert" - - "bridge-history-api/utils" ) func TestUpdateBranchWithNewMessage(t *testing.T) { @@ -15,32 +13,32 @@ func TestUpdateBranchWithNewMessage(t *testing.T) { branches := make([]common.Hash, 64) zeroes[0] = common.Hash{} for i := 1; i < 64; i++ { - zeroes[i] = utils.Keccak2(zeroes[i-1], zeroes[i-1]) + zeroes[i] = Keccak2(zeroes[i-1], zeroes[i-1]) } - UpdateBranchWithNewMessage(zeroes, branches, 0, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001")) + updateBranchWithNewMessage(zeroes, branches, 0, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001")) if branches[0] != common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001") { t.Fatalf("Invalid root, want %s, got %s", "0x0000000000000000000000000000000000000000000000000000000000000001", branches[0].Hex()) } - UpdateBranchWithNewMessage(zeroes, branches, 1, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000002")) + updateBranchWithNewMessage(zeroes, branches, 1, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000002")) if branches[1] != common.HexToHash("0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0") { t.Fatalf("Invalid root, want %s, got %s", "0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0", branches[1].Hex()) } - UpdateBranchWithNewMessage(zeroes, branches, 2, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000003")) + updateBranchWithNewMessage(zeroes, branches, 2, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000003")) if branches[2] != common.HexToHash("0x222ff5e0b5877792c2bc1670e2ccd0c2c97cd7bb1672a57d598db05092d3d72c") { t.Fatalf("Invalid root, want %s, got %s", "0x222ff5e0b5877792c2bc1670e2ccd0c2c97cd7bb1672a57d598db05092d3d72c", branches[2].Hex()) } - UpdateBranchWithNewMessage(zeroes, branches, 3, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000004")) + updateBranchWithNewMessage(zeroes, branches, 3, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000004")) if branches[2] != common.HexToHash("0xa9bb8c3f1f12e9aa903a50c47f314b57610a3ab32f2d463293f58836def38d36") { t.Fatalf("Invalid root, want %s, got %s", "0xa9bb8c3f1f12e9aa903a50c47f314b57610a3ab32f2d463293f58836def38d36", branches[2].Hex()) } } func TestDecodeEncodeMerkleProof(t *testing.T) { - proof := DecodeBytesToMerkleProof(common.Hex2Bytes("2ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d49012ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d49022ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d49032ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d4904")) + proof := decodeBytesToMerkleProof(common.Hex2Bytes("2ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d49012ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d49022ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d49032ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d4904")) if len(proof) != 4 { t.Fatalf("proof length mismatch, want %d, got %d", 4, len(proof)) } @@ -57,7 +55,7 @@ func TestDecodeEncodeMerkleProof(t *testing.T) { t.Fatalf("proof[3] mismatch, want %s, got %s", "0x2ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d4904", proof[0].Hex()) } - bytes := EncodeMerkleProofToBytes(proof) + bytes := encodeMerkleProofToBytes(proof) if common.Bytes2Hex(bytes) != "2ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d49012ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d49022ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d49032ebffc1a6671c51e30777a680904b103992630ec995b6e6ff76a04d5259d4904" { t.Fatalf("wrong encoded bytes") } @@ -68,35 +66,35 @@ func TestRecoverBranchFromProof(t *testing.T) { branches := make([]common.Hash, 64) zeroes[0] = common.Hash{} for i := 1; i < 64; i++ { - zeroes[i] = utils.Keccak2(zeroes[i-1], zeroes[i-1]) + zeroes[i] = Keccak2(zeroes[i-1], zeroes[i-1]) } - proof := UpdateBranchWithNewMessage(zeroes, branches, 0, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001")) - tmpBranches := RecoverBranchFromProof(proof, 0, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001")) + proof := updateBranchWithNewMessage(zeroes, branches, 0, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001")) + tmpBranches := recoverBranchFromProof(proof, 0, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000001")) for i := 0; i < 64; i++ { if tmpBranches[i] != branches[i] { t.Fatalf("Invalid branch, want %s, got %s", branches[i].Hex(), tmpBranches[i].Hex()) } } - proof = UpdateBranchWithNewMessage(zeroes, branches, 1, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000002")) - tmpBranches = RecoverBranchFromProof(proof, 1, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000002")) + proof = updateBranchWithNewMessage(zeroes, branches, 1, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000002")) + tmpBranches = recoverBranchFromProof(proof, 1, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000002")) for i := 0; i < 64; i++ { if tmpBranches[i] != branches[i] { t.Fatalf("Invalid branch, want %s, got %s", branches[i].Hex(), tmpBranches[i].Hex()) } } - proof = UpdateBranchWithNewMessage(zeroes, branches, 2, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000003")) - tmpBranches = RecoverBranchFromProof(proof, 2, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000003")) + proof = updateBranchWithNewMessage(zeroes, branches, 2, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000003")) + tmpBranches = recoverBranchFromProof(proof, 2, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000003")) for i := 0; i < 64; i++ { if tmpBranches[i] != branches[i] { t.Fatalf("Invalid branch, want %s, got %s", branches[i].Hex(), tmpBranches[i].Hex()) } } - proof = UpdateBranchWithNewMessage(zeroes, branches, 3, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000004")) - tmpBranches = RecoverBranchFromProof(proof, 3, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000004")) + proof = updateBranchWithNewMessage(zeroes, branches, 3, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000004")) + tmpBranches = recoverBranchFromProof(proof, 3, common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000004")) for i := 0; i < 64; i++ { if tmpBranches[i] != branches[i] { t.Fatalf("Invalid branch, want %s, got %s", branches[i].Hex(), tmpBranches[i].Hex()) @@ -125,7 +123,7 @@ func TestWithdrawTrieOneByOne(t *testing.T) { }) assert.Equal(t, withdrawTrie.NextMessageNonce, uint64(i+1)) assert.Equal(t, expectedRoot.String(), withdrawTrie.MessageRoot().String()) - proof := DecodeBytesToMerkleProof(proofBytes[0]) + proof := decodeBytesToMerkleProof(proofBytes[0]) verifiedRoot := verifyMerkleProof(uint64(i), hash, proof) assert.Equal(t, expectedRoot.String(), verifiedRoot.String()) } @@ -166,7 +164,7 @@ func TestWithdrawTrieMultiple(t *testing.T) { for i := initial; i <= finish; i++ { hash := common.BigToHash(big.NewInt(int64(i + 1))) - proof := DecodeBytesToMerkleProof(proofBytes[i-initial]) + proof := decodeBytesToMerkleProof(proofBytes[i-initial]) verifiedRoot := verifyMerkleProof(uint64(i), hash, proof) assert.Equal(t, expectedRoots[finish].String(), verifiedRoot.String()) } @@ -178,9 +176,9 @@ func verifyMerkleProof(index uint64, leaf common.Hash, proof []common.Hash) comm root := leaf for _, h := range proof { if index%2 == 0 { - root = utils.Keccak2(root, h) + root = Keccak2(root, h) } else { - root = utils.Keccak2(h, root) + root = Keccak2(h, root) } index >>= 1 } @@ -200,13 +198,13 @@ func computeMerkleRoot(hashes []common.Hash) common.Hash { var newHashes []common.Hash for i := 0; i < len(hashes); i += 2 { if i+1 < len(hashes) { - newHashes = append(newHashes, utils.Keccak2(hashes[i], hashes[i+1])) + newHashes = append(newHashes, Keccak2(hashes[i], hashes[i+1])) } else { - newHashes = append(newHashes, utils.Keccak2(hashes[i], zeroHash)) + newHashes = append(newHashes, Keccak2(hashes[i], zeroHash)) } } hashes = newHashes - zeroHash = utils.Keccak2(zeroHash, zeroHash) + zeroHash = Keccak2(zeroHash, zeroHash) } return hashes[0] } diff --git a/bridge-history-api/observability/ginmetrics/bloom.go b/bridge-history-api/observability/ginmetrics/bloom.go deleted file mode 100644 index 9851ac29a9..0000000000 --- a/bridge-history-api/observability/ginmetrics/bloom.go +++ /dev/null @@ -1,57 +0,0 @@ -package ginmetrics - -import ( - "github.com/bits-and-blooms/bitset" -) - -const defaultSize = 2 << 24 - -var seeds = []uint{7, 11, 13, 31, 37, 61} - -// BloomFilter a simple bloom filter -type BloomFilter struct { - Set *bitset.BitSet - Funcs [6]simpleHash -} - -// NewBloomFilter new a BloomFilter -func NewBloomFilter() *BloomFilter { - bf := new(BloomFilter) - for i := 0; i < len(bf.Funcs); i++ { - bf.Funcs[i] = simpleHash{defaultSize, seeds[i]} - } - bf.Set = bitset.New(defaultSize) - return bf -} - -// Add a value to BloomFilter -func (bf *BloomFilter) Add(value string) { - for _, f := range bf.Funcs { - bf.Set.Set(f.hash(value)) - } -} - -// Contains check the value is in bloom filter -func (bf *BloomFilter) Contains(value string) bool { - if value == "" { - return false - } - ret := true - for _, f := range bf.Funcs { - ret = ret && bf.Set.Test(f.hash(value)) - } - return ret -} - -type simpleHash struct { - Cap uint - Seed uint -} - -func (s *simpleHash) hash(value string) uint { - var result uint = 0 - for i := 0; i < len(value); i++ { - result = result*s.Seed + uint(value[i]) - } - return (s.Cap - 1) & result -} diff --git a/bridge-history-api/observability/ginmetrics/metric.go b/bridge-history-api/observability/ginmetrics/metric.go deleted file mode 100644 index 9720460076..0000000000 --- a/bridge-history-api/observability/ginmetrics/metric.go +++ /dev/null @@ -1,89 +0,0 @@ -package ginmetrics - -import ( - "fmt" - - "github.com/prometheus/client_golang/prometheus" -) - -// Metric defines a metric object. Users can use it to save -// metric data. Every metric should be globally unique by name. -type Metric struct { - Type MetricType - Name string - Description string - Labels []string - Buckets []float64 - Objectives map[float64]float64 - - vec prometheus.Collector -} - -// SetGaugeValue set data for Gauge type Metric. -func (m *Metric) SetGaugeValue(labelValues []string, value float64) error { - if m.Type == None { - return fmt.Errorf("metric %s not existed", m.Name) - } - - if m.Type != Gauge { - return fmt.Errorf("metric %s not Gauge type", m.Name) - } - m.vec.(*prometheus.GaugeVec).WithLabelValues(labelValues...).Set(value) - return nil -} - -// Inc increases value for Counter/Gauge type metric, increments -// the counter by 1 -func (m *Metric) Inc(labelValues []string) error { - if m.Type == None { - return fmt.Errorf("metric %s not existed", m.Name) - } - - if m.Type != Gauge && m.Type != Counter { - return fmt.Errorf("metric %s not Gauge or Counter type", m.Name) - } - switch m.Type { - case Counter: - m.vec.(*prometheus.CounterVec).WithLabelValues(labelValues...).Inc() - case Gauge: - m.vec.(*prometheus.GaugeVec).WithLabelValues(labelValues...).Inc() - } - return nil -} - -// Add adds the given value to the Metric object. Only -// for Counter/Gauge type metric. -func (m *Metric) Add(labelValues []string, value float64) error { - if m.Type == None { - return fmt.Errorf("metric %s not existed", m.Name) - } - - if m.Type != Gauge && m.Type != Counter { - return fmt.Errorf("metric %s not Gauge or Counter type", m.Name) - } - switch m.Type { - case Counter: - m.vec.(*prometheus.CounterVec).WithLabelValues(labelValues...).Add(value) - case Gauge: - m.vec.(*prometheus.GaugeVec).WithLabelValues(labelValues...).Add(value) - } - return nil -} - -// Observe is used by Histogram and Summary type metric to -// add observations. -func (m *Metric) Observe(labelValues []string, value float64) error { - if m.Type == 0 { - return fmt.Errorf("metric %s not existed", m.Name) - } - if m.Type != Histogram && m.Type != Summary { - return fmt.Errorf("metric %s not Histogram or Summary type", m.Name) - } - switch m.Type { - case Histogram: - m.vec.(*prometheus.HistogramVec).WithLabelValues(labelValues...).Observe(value) - case Summary: - m.vec.(*prometheus.SummaryVec).WithLabelValues(labelValues...).Observe(value) - } - return nil -} diff --git a/bridge-history-api/observability/ginmetrics/middleware.go b/bridge-history-api/observability/ginmetrics/middleware.go deleted file mode 100644 index 462ce7f38e..0000000000 --- a/bridge-history-api/observability/ginmetrics/middleware.go +++ /dev/null @@ -1,155 +0,0 @@ -package ginmetrics - -import ( - "fmt" - "strconv" - "time" - - "github.com/gin-gonic/gin" - "github.com/prometheus/client_golang/prometheus/promhttp" -) - -var ( - metricRequestTotal = "request_total" - metricRequestUVTotal = "request_uv_total" - metricURIRequestTotal = "uri_request_total" - metricRequestBody = "request_body_total" - metricResponseBody = "response_body_total" - metricRequestDuration = "request_duration" - metricSlowRequest = "slow_request_total" - - bloomFilter *BloomFilter -) - -// Use set gin metrics middleware -func (m *Monitor) Use(r gin.IRoutes) { - m.initGinMetrics() - - r.Use(m.monitorInterceptor) - r.GET(m.metricPath, func(ctx *gin.Context) { - promhttp.Handler().ServeHTTP(ctx.Writer, ctx.Request) - }) -} - -// UseWithoutExposingEndpoint is used to add monitor interceptor to gin router -// It can be called multiple times to intercept from multiple gin.IRoutes -// http path is not set, to do that use Expose function -func (m *Monitor) UseWithoutExposingEndpoint(r gin.IRoutes) { - m.initGinMetrics() - r.Use(m.monitorInterceptor) -} - -// Expose adds metric path to a given router. -// The router can be different from the one passed to UseWithoutExposingEndpoint. -// This allows to expose metrics on different port. -func (m *Monitor) Expose(r gin.IRoutes) { - r.GET(m.metricPath, func(ctx *gin.Context) { - promhttp.Handler().ServeHTTP(ctx.Writer, ctx.Request) - }) -} - -// initGinMetrics used to init gin metrics -func (m *Monitor) initGinMetrics() { - bloomFilter = NewBloomFilter() - - _ = monitor.AddMetric(&Metric{ - Type: Counter, - Name: metricRequestTotal, - Description: "all the server received request num.", - Labels: nil, - }) - _ = monitor.AddMetric(&Metric{ - Type: Counter, - Name: metricRequestUVTotal, - Description: "all the server received ip num.", - Labels: nil, - }) - _ = monitor.AddMetric(&Metric{ - Type: Counter, - Name: metricURIRequestTotal, - Description: "all the server received request num with every uri.", - Labels: []string{"uri", "method", "code"}, - }) - _ = monitor.AddMetric(&Metric{ - Type: Counter, - Name: metricRequestBody, - Description: "the server received request body size, unit byte", - Labels: nil, - }) - _ = monitor.AddMetric(&Metric{ - Type: Counter, - Name: metricResponseBody, - Description: "the server send response body size, unit byte", - Labels: nil, - }) - _ = monitor.AddMetric(&Metric{ - Type: Histogram, - Name: metricRequestDuration, - Description: "the time server took to handle the request.", - Labels: []string{"uri"}, - Buckets: m.reqDuration, - }) - _ = monitor.AddMetric(&Metric{ - Type: Counter, - Name: metricSlowRequest, - Description: fmt.Sprintf("the server handled slow requests counter, t=%d.", m.slowTime), - Labels: []string{"uri", "method", "code"}, - }) -} - -// monitorInterceptor as gin monitor middleware. -func (m *Monitor) monitorInterceptor(ctx *gin.Context) { - if ctx.Request.URL.Path == m.metricPath { - ctx.Next() - return - } - startTime := time.Now() - - // execute normal process. - ctx.Next() - - // after request - m.ginMetricHandle(ctx, startTime) -} - -func (m *Monitor) ginMetricHandle(ctx *gin.Context, start time.Time) { - r := ctx.Request - w := ctx.Writer - - //set request total - _ = m.GetMetric(metricRequestTotal).Inc(nil) - - // set uv - if clientIP := ctx.ClientIP(); !bloomFilter.Contains(clientIP) { - bloomFilter.Add(clientIP) - _ = m.GetMetric(metricRequestUVTotal).Inc(nil) - } - - errCode := strconv.Itoa(ctx.GetInt("errcode")) - if len(errCode) == 0 { - errCode = strconv.Itoa(w.Status()) - } - - // set uri request total - _ = m.GetMetric(metricURIRequestTotal).Inc([]string{ctx.FullPath(), r.Method, errCode}) - - // set request body size - // since r.ContentLength can be negative (in some occasions) guard the operation - if r.ContentLength >= 0 { - _ = m.GetMetric(metricRequestBody).Add(nil, float64(r.ContentLength)) - } - - // set slow request - latency := time.Since(start) - if int32(latency.Seconds()) > m.slowTime { - _ = m.GetMetric(metricSlowRequest).Inc([]string{ctx.FullPath(), r.Method, strconv.Itoa(w.Status())}) - } - - // set request duration - _ = m.GetMetric(metricRequestDuration).Observe([]string{ctx.FullPath()}, latency.Seconds()) - - // set response size - if w.Size() > 0 { - _ = m.GetMetric(metricResponseBody).Add(nil, float64(w.Size())) - } -} diff --git a/bridge-history-api/observability/ginmetrics/types.go b/bridge-history-api/observability/ginmetrics/types.go deleted file mode 100644 index b54398e1b9..0000000000 --- a/bridge-history-api/observability/ginmetrics/types.go +++ /dev/null @@ -1,158 +0,0 @@ -package ginmetrics - -import ( - "errors" - "fmt" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -// MetricType define metric type -type MetricType int - -const ( - // None unknown metric type - None MetricType = iota - // Counter MetricType - Counter - // Gauge MetricType - Gauge - // Histogram MetricType - Histogram - // Summary MetricType - Summary - - defaultMetricPath = "/debug/metrics" - defaultSlowTime = int32(5) -) - -var ( - defaultDuration = []float64{0.1, 0.3, 1.2, 5, 10} - monitor *Monitor - - promTypeHandler = map[MetricType]func(metric *Metric, reg prometheus.Registerer){ - Counter: counterHandler, - Gauge: gaugeHandler, - Histogram: histogramHandler, - Summary: summaryHandler, - } -) - -// Monitor is an object that is used to set gin server monitor. -type Monitor struct { - slowTime int32 - metricPath string - reqDuration []float64 - metrics map[string]*Metric - register prometheus.Registerer -} - -// GetMonitor used to get global Monitor object, -// this function returns a singleton object. -func GetMonitor(reg prometheus.Registerer) *Monitor { - if monitor == nil { - monitor = &Monitor{ - metricPath: defaultMetricPath, - slowTime: defaultSlowTime, - reqDuration: defaultDuration, - metrics: make(map[string]*Metric), - register: reg, - } - } - return monitor -} - -// GetMetric is used to get metric object by metric_name. -func (m *Monitor) GetMetric(name string) *Metric { - if metric, ok := m.metrics[name]; ok { - return metric - } - return &Metric{} -} - -// SetMetricPath set metricPath property. metricPath is used for Prometheus -// to get gin server monitoring data. -func (m *Monitor) SetMetricPath(path string) { - m.metricPath = path -} - -// SetSlowTime set slowTime property. slowTime is used to determine whether -// the request is slow. For "gin_slow_request_total" metric. -func (m *Monitor) SetSlowTime(slowTime int32) { - m.slowTime = slowTime -} - -// SetDuration set reqDuration property. reqDuration is used to ginRequestDuration -// metric buckets. -func (m *Monitor) SetDuration(duration []float64) { - m.reqDuration = duration -} - -// SetMetricPrefix set the metric prefix -func (m *Monitor) SetMetricPrefix(prefix string) { - metricRequestTotal = prefix + metricRequestTotal - metricRequestUVTotal = prefix + metricRequestUVTotal - metricURIRequestTotal = prefix + metricURIRequestTotal - metricRequestBody = prefix + metricRequestBody - metricResponseBody = prefix + metricResponseBody - metricRequestDuration = prefix + metricRequestDuration - metricSlowRequest = prefix + metricSlowRequest -} - -// SetMetricSuffix set the metric suffix -func (m *Monitor) SetMetricSuffix(suffix string) { - metricRequestTotal += suffix - metricRequestUVTotal += suffix - metricURIRequestTotal += suffix - metricRequestBody += suffix - metricResponseBody += suffix - metricRequestDuration += suffix - metricSlowRequest += suffix -} - -// AddMetric add custom monitor metric. -func (m *Monitor) AddMetric(metric *Metric) error { - if _, ok := m.metrics[metric.Name]; ok { - return fmt.Errorf("metric %s is existed", metric.Name) - } - - if metric.Name == "" { - return errors.New("metric name cannot be empty") - } - - if f, ok := promTypeHandler[metric.Type]; ok { - f(metric, m.register) - m.metrics[metric.Name] = metric - } - - return nil -} - -func counterHandler(metric *Metric, register prometheus.Registerer) { - metric.vec = promauto.With(register).NewCounterVec( - prometheus.CounterOpts{Name: metric.Name, Help: metric.Description}, - metric.Labels, - ) -} - -func gaugeHandler(metric *Metric, register prometheus.Registerer) { - metric.vec = promauto.With(register).NewGaugeVec( - prometheus.GaugeOpts{Name: metric.Name, Help: metric.Description}, - metric.Labels, - ) -} - -func histogramHandler(metric *Metric, register prometheus.Registerer) { - metric.vec = promauto.With(register).NewHistogramVec( - prometheus.HistogramOpts{Name: metric.Name, Help: metric.Description, Buckets: metric.Buckets}, - metric.Labels, - ) -} - -func summaryHandler(metric *Metric, register prometheus.Registerer) { - promauto.With(register).NewSummaryVec( - prometheus.SummaryOpts{Name: metric.Name, Help: metric.Description, Objectives: metric.Objectives}, - metric.Labels, - ) -} diff --git a/bridge-history-api/observability/middleware.go b/bridge-history-api/observability/middleware.go deleted file mode 100644 index 03ff90e8a0..0000000000 --- a/bridge-history-api/observability/middleware.go +++ /dev/null @@ -1,18 +0,0 @@ -package observability - -import ( - "github.com/gin-gonic/gin" - "github.com/prometheus/client_golang/prometheus" - - "bridge-history-api/observability/ginmetrics" -) - -// Use register the gin metric -func Use(router *gin.Engine, metricsPrefix string, reg prometheus.Registerer) { - m := ginmetrics.GetMonitor(reg) - m.SetMetricPath("/metrics") - m.SetMetricPrefix(metricsPrefix + "_") - m.SetSlowTime(1) - m.SetDuration([]float64{0.025, .05, .1, .5, 1, 5, 10}) - m.UseWithoutExposingEndpoint(router) -} diff --git a/bridge-history-api/observability/probes.go b/bridge-history-api/observability/probes.go deleted file mode 100644 index 339c1b7422..0000000000 --- a/bridge-history-api/observability/probes.go +++ /dev/null @@ -1,35 +0,0 @@ -package observability - -import ( - "github.com/gin-gonic/gin" - "gorm.io/gorm" - - "bridge-history-api/internal/types" - "bridge-history-api/utils" -) - -// ProbesController probe check controller -type ProbesController struct { - db *gorm.DB -} - -// NewProbesController returns an ProbesController instance -func NewProbesController(db *gorm.DB) *ProbesController { - return &ProbesController{ - db: db, - } -} - -// HealthCheck the api controller for health check -func (a *ProbesController) HealthCheck(c *gin.Context) { - if _, err := utils.Ping(a.db); err != nil { - types.RenderFatal(c, err) - return - } - types.RenderSuccess(c, nil) -} - -// Ready the api controller for ready check -func (a *ProbesController) Ready(c *gin.Context) { - types.RenderSuccess(c, nil) -} diff --git a/bridge-history-api/observability/server.go b/bridge-history-api/observability/server.go deleted file mode 100644 index e51bd004b7..0000000000 --- a/bridge-history-api/observability/server.go +++ /dev/null @@ -1,53 +0,0 @@ -package observability - -import ( - "errors" - "fmt" - "net/http" - "time" - - // enable the pprof - _ "net/http/pprof" - - "github.com/ethereum/go-ethereum/log" - "github.com/gin-contrib/pprof" - "github.com/gin-gonic/gin" - "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/urfave/cli/v2" - "gorm.io/gorm" - - "bridge-history-api/utils" -) - -// Server starts the metrics server on the given address, which will be closed when the given -// context is canceled. -func Server(c *cli.Context, db *gorm.DB) { - if !c.Bool(utils.MetricsEnabled.Name) { - return - } - - r := gin.New() - r.Use(gin.Recovery()) - pprof.Register(r) - r.GET("/metrics", func(context *gin.Context) { - promhttp.Handler().ServeHTTP(context.Writer, context.Request) - }) - - probeController := NewProbesController(db) - r.GET("/health", probeController.HealthCheck) - r.GET("/ready", probeController.Ready) - - address := fmt.Sprintf(":%s", c.String(utils.MetricsPort.Name)) - server := &http.Server{ - Addr: address, - Handler: r, - ReadHeaderTimeout: time.Minute, - } - log.Info("Starting metrics server", "address", address) - - go func() { - if runServerErr := server.ListenAndServe(); runServerErr != nil && !errors.Is(runServerErr, http.ErrServerClosed) { - log.Crit("run metrics http server failure", "error", runServerErr) - } - }() -} diff --git a/bridge-history-api/orm/batch.go b/bridge-history-api/orm/batch.go deleted file mode 100644 index 4bee91db96..0000000000 --- a/bridge-history-api/orm/batch.go +++ /dev/null @@ -1,114 +0,0 @@ -package orm - -import ( - "context" - "fmt" - "time" - - "github.com/ethereum/go-ethereum/log" - "gorm.io/gorm" -) - -// RollupBatch is the struct for rollup_batch table -type RollupBatch struct { - db *gorm.DB `gorm:"column:-"` - - ID uint64 `json:"id" gorm:"column:id"` - BatchIndex uint64 `json:"batch_index" gorm:"column:batch_index"` - BatchHash string `json:"batch_hash" gorm:"column:batch_hash"` - CommitHeight uint64 `json:"commit_height" gorm:"column:commit_height"` - StartBlockNumber uint64 `json:"start_block_number" gorm:"column:start_block_number"` - EndBlockNumber uint64 `json:"end_block_number" gorm:"column:end_block_number"` - WithdrawRoot string `json:"withdraw_root" gorm:"column:withdraw_root;default:NULL"` - CreatedAt *time.Time `json:"created_at" gorm:"column:created_at"` - UpdatedAt *time.Time `json:"updated_at" gorm:"column:updated_at"` - DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"column:deleted_at;default:NULL"` -} - -// NewRollupBatch create an RollupBatch instance -func NewRollupBatch(db *gorm.DB) *RollupBatch { - return &RollupBatch{db: db} -} - -// TableName returns the table name for the Batch model. -func (*RollupBatch) TableName() string { - return "rollup_batch" -} - -// GetLatestRollupBatchProcessedHeight return latest processed height from rollup_batch table -func (r *RollupBatch) GetLatestRollupBatchProcessedHeight(ctx context.Context) (uint64, error) { - var result RollupBatch - err := r.db.WithContext(ctx).Unscoped().Select("commit_height").Order("id desc").First(&result).Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return 0, nil - } - return 0, fmt.Errorf("RollupBatch.GetLatestRollupBatchProcessedHeight error: %w", err) - } - return result.CommitHeight, nil -} - -// GetLatestRollupBatch return the latest rollup batch in db -func (r *RollupBatch) GetLatestRollupBatch(ctx context.Context) (*RollupBatch, error) { - var result RollupBatch - err := r.db.WithContext(ctx).Model(&RollupBatch{}).Where("batch_hash is not NULL").Order("batch_index desc").First(&result).Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return nil, nil - } - return nil, fmt.Errorf("RollupBatch.GetLatestRollupBatch error: %w", err) - } - return &result, nil -} - -// GetRollupBatchByIndex return the rollup batch by index -func (r *RollupBatch) GetRollupBatchByIndex(ctx context.Context, index uint64) (*RollupBatch, error) { - var result RollupBatch - err := r.db.WithContext(ctx).Model(&RollupBatch{}).Where("batch_index = ?", index).First(&result).Error - if err != nil { - return nil, fmt.Errorf("RollupBatch.GetRollupBatchByIndex error: %w", err) - } - return &result, nil -} - -// GetRollupBatchesByIndexes return the rollup batches by indexes -func (r *RollupBatch) GetRollupBatchesByIndexes(ctx context.Context, indexes []uint64) ([]*RollupBatch, error) { - var results []*RollupBatch - err := r.db.WithContext(ctx).Model(&RollupBatch{}).Where("batch_index IN (?)", indexes).Find(&results).Error - if err != nil { - return nil, fmt.Errorf("RollupBatch.GetRollupBatchesByIndexes error: %w", err) - } - return results, nil -} - -// InsertRollupBatch batch insert rollup batch into db and return the transaction -func (r *RollupBatch) InsertRollupBatch(ctx context.Context, batches []*RollupBatch, dbTx ...*gorm.DB) error { - if len(batches) == 0 { - return nil - } - db := r.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - err := db.WithContext(ctx).Model(&RollupBatch{}).Create(&batches).Error - if err != nil { - batchIndexes := make([]uint64, 0, len(batches)) - heights := make([]uint64, 0, len(batches)) - for _, batch := range batches { - batchIndexes = append(batchIndexes, batch.BatchIndex) - heights = append(heights, batch.CommitHeight) - } - log.Error("failed to insert rollup batch", "batchIndexes", batchIndexes, "heights", heights) - return fmt.Errorf("RollupBatch.InsertRollupBatch error: %w", err) - } - return nil -} - -// UpdateRollupBatchWithdrawRoot updates the withdraw_root column in rollup_batch table -func (r *RollupBatch) UpdateRollupBatchWithdrawRoot(ctx context.Context, batchIndex uint64, withdrawRoot string) error { - err := r.db.WithContext(ctx).Model(&RollupBatch{}).Where("batch_index = ?", batchIndex).Update("withdraw_root", withdrawRoot).Error - if err != nil { - return fmt.Errorf("RollupBatch.UpdateRuollupBatch error: %w", err) - } - return nil -} diff --git a/bridge-history-api/orm/cross_msg.go b/bridge-history-api/orm/cross_msg.go deleted file mode 100644 index b989720d51..0000000000 --- a/bridge-history-api/orm/cross_msg.go +++ /dev/null @@ -1,381 +0,0 @@ -package orm - -import ( - "context" - "errors" - "fmt" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/log" - "gorm.io/gorm" -) - -// AssetType can be ETH/ERC20/ERC1155/ERC721 -type AssetType int - -// MsgType can be layer1/layer2 msg -type MsgType int - -func (a AssetType) String() string { - switch a { - case ETH: - return "ETH" - case ERC20: - return "ERC20" - case ERC1155: - return "ERC1155" - case ERC721: - return "ERC721" - } - return "Unknown Asset Type" -} - -const ( - // ETH = 0 - ETH AssetType = iota - // ERC20 = 1 - ERC20 - // ERC721 = 2 - ERC721 - // ERC1155 = 3 - ERC1155 -) - -const ( - // UnknownMsg = 0 - UnknownMsg MsgType = iota - // Layer1Msg = 1 - Layer1Msg - // Layer2Msg = 2 - Layer2Msg -) - -// CrossMsg represents a cross message from layer 1 to layer 2 -type CrossMsg struct { - db *gorm.DB `gorm:"column:-"` - - ID uint64 `json:"id" gorm:"column:id"` - MsgHash string `json:"msg_hash" gorm:"column:msg_hash"` - Height uint64 `json:"height" gorm:"column:height"` - Sender string `json:"sender" gorm:"column:sender"` - Target string `json:"target" gorm:"column:target"` - Amount string `json:"amount" gorm:"column:amount"` - Layer1Hash string `json:"layer1_hash" gorm:"column:layer1_hash;default:''"` - Layer2Hash string `json:"layer2_hash" gorm:"column:layer2_hash;default:''"` - Layer1Token string `json:"layer1_token" gorm:"column:layer1_token;default:''"` - Layer2Token string `json:"layer2_token" gorm:"column:layer2_token;default:''"` - TokenIDs string `json:"token_ids" gorm:"column:token_ids;default:''"` - TokenAmounts string `json:"token_amounts" gorm:"column:token_amounts;default:''"` - Asset int `json:"asset" gorm:"column:asset"` - MsgType int `json:"msg_type" gorm:"column:msg_type"` - Timestamp *time.Time `json:"timestamp" gorm:"column:block_timestamp;default;NULL"` - CreatedAt *time.Time `json:"created_at" gorm:"column:created_at"` - UpdatedAt *time.Time `json:"updated_at" gorm:"column:updated_at"` - DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"column:deleted_at;default:NULL"` -} - -// TableName returns the table name for the CrossMsg model. -func (*CrossMsg) TableName() string { - return "cross_message" -} - -// NewCrossMsg returns a new instance of CrossMsg. -func NewCrossMsg(db *gorm.DB) *CrossMsg { - return &CrossMsg{db: db} -} - -// L1 Cross Msgs Operations - -// GetL1CrossMsgByHash returns layer1 cross message by given hash -func (c *CrossMsg) GetL1CrossMsgByHash(ctx context.Context, l1Hash common.Hash) (*CrossMsg, error) { - var result CrossMsg - err := c.db.WithContext(ctx).Model(&CrossMsg{}).Where("layer1_hash = ? AND msg_type = ?", l1Hash.String(), Layer1Msg).First(&result).Error - if err != nil { - if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, nil - } - return nil, fmt.Errorf("CrossMsg.GetL1CrossMsgByHash error: %w", err) - } - return &result, nil -} - -// GetLatestL1ProcessedHeight returns the latest processed height of layer1 cross messages -func (c *CrossMsg) GetLatestL1ProcessedHeight(ctx context.Context) (uint64, error) { - var result CrossMsg - err := c.db.WithContext(ctx).Model(&CrossMsg{}).Where("msg_type = ?", Layer1Msg). - Select("height"). - Order("id DESC"). - First(&result). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return 0, nil - } - return 0, fmt.Errorf("CrossMsg.GetLatestL1ProcessedHeight error: %w", err) - } - return result.Height, nil -} - -// GetL1EarliestNoBlockTimestampHeight returns the earliest layer1 cross message height which has no block timestamp -func (c *CrossMsg) GetL1EarliestNoBlockTimestampHeight(ctx context.Context) (uint64, error) { - var result CrossMsg - err := c.db.WithContext(ctx).Model(&CrossMsg{}). - Where("block_timestamp IS NULL AND msg_type = ?", Layer1Msg). - Select("height"). - Order("height ASC"). - First(&result). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return 0, nil - } - return 0, fmt.Errorf("CrossMsg.GetL1EarliestNoBlockTimestampHeight error: %w", err) - } - return result.Height, nil -} - -// InsertL1CrossMsg batch insert layer1 cross messages into db -func (c *CrossMsg) InsertL1CrossMsg(ctx context.Context, messages []*CrossMsg, dbTx ...*gorm.DB) error { - if len(messages) == 0 { - return nil - } - db := c.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Model(&CrossMsg{}).Create(&messages).Error - if err != nil { - l1hashes := make([]string, 0, len(messages)) - heights := make([]uint64, 0, len(messages)) - for _, msg := range messages { - l1hashes = append(l1hashes, msg.Layer1Hash) - heights = append(heights, msg.Height) - } - log.Error("failed to insert l1 cross messages", "l1hashes", l1hashes, "heights", heights, "err", err) - return fmt.Errorf("CrossMsg.InsertL1CrossMsg error: %w", err) - } - return nil -} - -// UpdateL1CrossMsgHash update l1 cross msg hash in db, no need to check msg_type since layer1_hash wont be empty if its layer1 msg -func (c *CrossMsg) UpdateL1CrossMsgHash(ctx context.Context, l1Hash, msgHash common.Hash, dbTx ...*gorm.DB) error { - db := c.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := c.db.Model(&CrossMsg{}).Where("layer1_hash = ?", l1Hash.Hex()).Update("msg_hash", msgHash.Hex()).Error - if err != nil { - return fmt.Errorf("CrossMsg.UpdateL1CrossMsgHash error: %w", err) - } - return nil - -} - -// UpdateL1BlockTimestamp update layer1 block timestamp -func (c *CrossMsg) UpdateL1BlockTimestamp(ctx context.Context, height uint64, timestamp time.Time) error { - err := c.db.WithContext(ctx).Model(&CrossMsg{}). - Where("height = ? AND msg_type = ?", height, Layer1Msg). - Update("block_timestamp", timestamp).Error - if err != nil { - return fmt.Errorf("CrossMsg.UpdateL1BlockTimestamp error: %w", err) - } - return err -} - -// DeleteL1CrossMsgAfterHeight soft delete layer1 cross messages after given height -func (c *CrossMsg) DeleteL1CrossMsgAfterHeight(ctx context.Context, height uint64, dbTx ...*gorm.DB) error { - db := c.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Delete(&CrossMsg{}, "height > ? AND msg_type = ?", height, Layer1Msg).Error - if err != nil { - return fmt.Errorf("CrossMsg.DeleteL1CrossMsgAfterHeight error: %w", err) - } - return nil -} - -// L2 Cross Msgs Operations - -// GetL2CrossMsgByHash returns layer2 cross message by given hash -func (c *CrossMsg) GetL2CrossMsgByHash(ctx context.Context, l2Hash common.Hash) (*CrossMsg, error) { - var result CrossMsg - err := c.db.WithContext(ctx).Model(&CrossMsg{}).Where("layer2_hash = ? AND msg_type = ?", l2Hash.String(), Layer2Msg).First(&result).Error - if err != nil { - if errors.Is(err, gorm.ErrRecordNotFound) { - return nil, nil - } - return nil, fmt.Errorf("CrossMsg.GetL2CrossMsgByHash error: %w", err) - } - return &result, nil -} - -// GetLatestL2ProcessedHeight returns the latest processed height of layer2 cross messages -func (c *CrossMsg) GetLatestL2ProcessedHeight(ctx context.Context) (uint64, error) { - var result CrossMsg - err := c.db.WithContext(ctx).Model(&CrossMsg{}). - Select("height"). - Where("msg_type = ?", Layer2Msg). - Order("id DESC"). - First(&result). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return 0, nil - } - return 0, fmt.Errorf("CrossMsg.GetLatestL2ProcessedHeight error: %w", err) - } - return result.Height, nil -} - -// GetL2CrossMsgByMsgHashList returns layer2 cross messages under given msg hashes -func (c *CrossMsg) GetL2CrossMsgByMsgHashList(ctx context.Context, msgHashList []string) ([]*CrossMsg, error) { - var results []*CrossMsg - err := c.db.WithContext(ctx).Model(&CrossMsg{}). - Where("msg_hash IN (?) AND msg_type = ?", msgHashList, Layer2Msg). - Find(&results). - Error - - if err != nil { - return nil, fmt.Errorf("CrossMsg.GetL2CrossMsgByMsgHashList error: %w", err) - } - if len(results) == 0 { - log.Debug("no CrossMsg under given msg hashes", "msg hash list", msgHashList) - } - return results, nil -} - -// GetL2EarliestNoBlockTimestampHeight returns the earliest layer2 cross message height which has no block timestamp -func (c *CrossMsg) GetL2EarliestNoBlockTimestampHeight(ctx context.Context) (uint64, error) { - var result CrossMsg - err := c.db.WithContext(ctx).Model(&CrossMsg{}). - Where("block_timestamp IS NULL AND msg_type = ?", Layer2Msg). - Select("height"). - Order("height ASC"). - First(&result). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return 0, nil - } - return 0, fmt.Errorf("CrossMsg.GetL2EarliestNoBlockTimestampHeight error: %w", err) - } - return result.Height, nil -} - -// InsertL2CrossMsg batch insert layer2 cross messages -func (c *CrossMsg) InsertL2CrossMsg(ctx context.Context, messages []*CrossMsg, dbTx ...*gorm.DB) error { - if len(messages) == 0 { - return nil - } - db := c.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Model(&CrossMsg{}).Create(&messages).Error - if err != nil { - l2hashes := make([]string, 0, len(messages)) - heights := make([]uint64, 0, len(messages)) - for _, msg := range messages { - l2hashes = append(l2hashes, msg.Layer2Hash) - heights = append(heights, msg.Height) - } - log.Error("failed to insert l2 cross messages", "l2hashes", l2hashes, "heights", heights, "err", err) - return fmt.Errorf("CrossMsg.InsertL2CrossMsg error: %w", err) - } - return nil -} - -// UpdateL2CrossMsgHash update layer2 cross message hash -func (c *CrossMsg) UpdateL2CrossMsgHash(ctx context.Context, l2Hash, msgHash common.Hash, dbTx ...*gorm.DB) error { - db := c.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Model(&CrossMsg{}). - Where("layer2_hash = ?", l2Hash.String()). - Update("msg_hash", msgHash.String()). - Error - if err != nil { - return fmt.Errorf("CrossMsg.UpdateL2CrossMsgHash error: %w", err) - } - return nil -} - -// UpdateL2BlockTimestamp update layer2 cross message block timestamp -func (c *CrossMsg) UpdateL2BlockTimestamp(ctx context.Context, height uint64, timestamp time.Time) error { - err := c.db.WithContext(ctx).Model(&CrossMsg{}). - Where("height = ? AND msg_type = ?", height, Layer2Msg). - Update("block_timestamp", timestamp).Error - if err != nil { - return fmt.Errorf("CrossMsg.UpdateL2BlockTimestamp error: %w", err) - } - return nil -} - -// DeleteL2CrossMsgFromHeight delete layer2 cross messages from given height -func (c *CrossMsg) DeleteL2CrossMsgFromHeight(ctx context.Context, height uint64, dbTx ...*gorm.DB) error { - db := c.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Model(&CrossMsg{}).Delete("height > ? AND msg_type = ?", height, Layer2Msg).Error - if err != nil { - return fmt.Errorf("CrossMsg.DeleteL2CrossMsgFromHeight error: %w", err) - - } - return nil -} - -// General Operations - -// GetTotalCrossMsgCountByAddress get total cross msg count by address -func (c *CrossMsg) GetTotalCrossMsgCountByAddress(ctx context.Context, sender string) (uint64, error) { - var count int64 - err := c.db.WithContext(ctx).Model(&CrossMsg{}). - Where("sender = ?", sender). - Count(&count). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return 0, nil - } - return 0, fmt.Errorf("CrossMsg.GetTotalCrossMsgCountByAddress error: %w", err) - - } - return uint64(count), nil -} - -// GetCrossMsgsByAddressWithOffset get cross msgs by address with offset -func (c *CrossMsg) GetCrossMsgsByAddressWithOffset(ctx context.Context, sender string, offset int, limit int) ([]CrossMsg, error) { - var messages []CrossMsg - err := c.db.WithContext(ctx).Model(&CrossMsg{}). - Where("sender = ?", sender). - Order("block_timestamp DESC NULLS FIRST, id DESC"). - Limit(limit). - Offset(offset). - Find(&messages). - Error - if err != nil { - return nil, fmt.Errorf("CrossMsg.GetCrossMsgsByAddressWithOffset error: %w", err) - } - return messages, nil -} - -// GetCrossMsgsByHashes retrieves a list of cross messages identified by their Layer 1 or Layer 2 hashes. -func (c *CrossMsg) GetCrossMsgsByHashes(ctx context.Context, hashes []string) ([]*CrossMsg, error) { - var results []*CrossMsg - err := c.db.WithContext(ctx).Model(&CrossMsg{}).Where("layer1_hash IN (?) OR layer2_hash IN (?)", hashes, hashes).Find(&results).Error - if err != nil { - return nil, fmt.Errorf("CrossMsg.GetCrossMsgsByHashes error: %w", err) - } - - return results, nil -} diff --git a/bridge-history-api/orm/l2_sent_msg.go b/bridge-history-api/orm/l2_sent_msg.go deleted file mode 100644 index 5717b67259..0000000000 --- a/bridge-history-api/orm/l2_sent_msg.go +++ /dev/null @@ -1,268 +0,0 @@ -package orm - -import ( - "context" - "errors" - "fmt" - "strings" - "time" - - "github.com/ethereum/go-ethereum/log" - "gorm.io/gorm" -) - -// L2SentMsg defines the struct for l2_sent_msg table record -type L2SentMsg struct { - db *gorm.DB `gorm:"column:-"` - - ID uint64 `json:"id" gorm:"column:id"` - OriginalSender string `json:"original_sender" gorm:"column:original_sender;default:''"` - TxHash string `json:"tx_hash" gorm:"column:tx_hash"` - MsgHash string `json:"msg_hash" gorm:"column:msg_hash"` - Sender string `json:"sender" gorm:"column:sender"` - Target string `json:"target" gorm:"column:target"` - Value string `json:"value" gorm:"column:value"` - Height uint64 `json:"height" gorm:"column:height"` - Nonce uint64 `json:"nonce" gorm:"column:nonce"` - BatchIndex uint64 `json:"batch_index" gorm:"column:batch_index;default:0"` - MsgProof string `json:"msg_proof" gorm:"column:msg_proof;default:''"` - MsgData string `json:"msg_data" gorm:"column:msg_data;default:''"` - CreatedAt *time.Time `json:"created_at" gorm:"column:created_at"` - UpdatedAt *time.Time `json:"updated_at" gorm:"column:updated_at"` - DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"column:deleted_at;default:NULL"` -} - -// NewL2SentMsg create an NewL2SentMsg instance -func NewL2SentMsg(db *gorm.DB) *L2SentMsg { - return &L2SentMsg{db: db} -} - -// TableName returns the table name for the L2SentMsg model. -func (*L2SentMsg) TableName() string { - return "l2_sent_msg" -} - -// GetL2SentMsgByHash get l2 sent msg by hash -func (l *L2SentMsg) GetL2SentMsgByHash(ctx context.Context, msgHash string) (*L2SentMsg, error) { - var result L2SentMsg - err := l.db.WithContext(ctx).Model(&L2SentMsg{}). - Where("msg_hash = ?", msgHash). - First(&result). - Error - if err != nil { - return nil, fmt.Errorf("L2SentMsg.GetL2SentMsgByHash error: %w", err) - } - return &result, nil -} - -// GetL2SentMsgsByHashes get l2 sent msgs by hashes -func (l *L2SentMsg) GetL2SentMsgsByHashes(ctx context.Context, msgHashes []string) ([]*L2SentMsg, error) { - var results []*L2SentMsg - err := l.db.WithContext(ctx).Model(&L2SentMsg{}). - Where("msg_hash IN (?)", msgHashes). - Find(&results). - Error - if err != nil { - return nil, fmt.Errorf("L2SentMsg.GetL2SentMsgsByHashes error: %w", err) - } - return results, nil -} - -// GetLatestSentMsgHeightOnL2 get latest sent msg height on l2 -func (l *L2SentMsg) GetLatestSentMsgHeightOnL2(ctx context.Context) (uint64, error) { - var result L2SentMsg - err := l.db.WithContext(ctx).Model(&L2SentMsg{}). - Select("height"). - Order("nonce DESC"). - First(&result).Error - - if err != nil { - if err == gorm.ErrRecordNotFound { - return 0, nil - } - return 0, fmt.Errorf("L2SentMsg.GetLatestSentMsgHeightOnL2 error: %w", err) - - } - return result.Height, nil -} - -// GetClaimableL2SentMsgByAddress returns both the total number of unclaimed messages and a paginated list of those messages. -// TODO: Add metrics about the result set sizes (total/claimed/unclaimed messages). -func (l *L2SentMsg) GetClaimableL2SentMsgByAddress(ctx context.Context, address string) ([]*L2SentMsg, error) { - var totalMsgs []*L2SentMsg - db := l.db.WithContext(ctx) - db = db.Table("l2_sent_msg") - db = db.Where("original_sender = ? OR sender = ?", address, address) - db = db.Where("msg_proof != ''") - db = db.Where("deleted_at IS NULL") - db = db.Order("id DESC") - tx := db.Find(&totalMsgs) - if tx.Error != nil || tx.RowsAffected == 0 { - return nil, tx.Error - } - - // Note on the use of IN vs VALUES in SQL Queries: - // ------------------------------------------------ - // When using the IN predicate with a large list (>100) of values, performance may suffer. - // An alternative approach is to use constant subqueries with the VALUES construct. - // For more details and optimization tips, visit: - // https://postgres.cz/wiki/PostgreSQL_SQL_Tricks_I#Predicate_IN_optimalization - // - // Example using IN: - // SELECT * FROM tab WHERE x IN (1,2,3,...,n); -- where n > 70 - // - // Optimized example using VALUES: - // SELECT * FROM tab WHERE x IN (VALUES(10), (20)); - // - var valuesStr string - for _, msg := range totalMsgs { - valuesStr += fmt.Sprintf("('%s'),", msg.MsgHash) - } - valuesStr = strings.TrimSuffix(valuesStr, ",") - - var claimedMsgHashes []string - db = l.db.WithContext(ctx) - db = db.Table("relayed_msg") - db = db.Where(fmt.Sprintf("msg_hash IN (VALUES %s)", valuesStr)) - db = db.Where("deleted_at IS NULL") - if err := db.Pluck("msg_hash", &claimedMsgHashes).Error; err != nil { - return nil, err - } - - claimedMsgHashSet := make(map[string]struct{}) - for _, hash := range claimedMsgHashes { - claimedMsgHashSet[hash] = struct{}{} - } - var unclaimedL2Msgs []*L2SentMsg - for _, msg := range totalMsgs { - if _, found := claimedMsgHashSet[msg.MsgHash]; !found { - unclaimedL2Msgs = append(unclaimedL2Msgs, msg) - } - } - - return unclaimedL2Msgs, nil -} - -// GetLatestL2SentMsgBatchIndex get latest l2 sent msg batch index -func (l *L2SentMsg) GetLatestL2SentMsgBatchIndex(ctx context.Context) (int64, error) { - var result L2SentMsg - err := l.db.WithContext(ctx).Model(&L2SentMsg{}). - Where("batch_index != 0"). - Order("batch_index DESC"). - Select("batch_index"). - First(&result). - Error - if err != nil && errors.Is(err, gorm.ErrRecordNotFound) { - return -1, nil - } - if err != nil { - return -1, fmt.Errorf("L2SentMsg.GetLatestL2SentMsgBatchIndex error: %w", err) - } - // Watch for overflow, tho its not likely to happen - return int64(result.BatchIndex), nil -} - -// GetL2SentMsgMsgHashByHeightRange get l2 sent msg msg hash by height range -func (l *L2SentMsg) GetL2SentMsgMsgHashByHeightRange(ctx context.Context, startHeight, endHeight uint64) ([]*L2SentMsg, error) { - var results []*L2SentMsg - err := l.db.WithContext(ctx).Model(&L2SentMsg{}). - Where("height >= ? AND height <= ?", startHeight, endHeight). - Order("nonce ASC"). - Find(&results). - Error - if err != nil { - return nil, fmt.Errorf("L2SentMsg.GetL2SentMsgMsgHashByHeightRange error: %w", err) - } - return results, nil -} - -// GetL2SentMessageByNonce get l2 sent message by nonce -func (l *L2SentMsg) GetL2SentMessageByNonce(ctx context.Context, nonce uint64) (*L2SentMsg, error) { - var result L2SentMsg - err := l.db.WithContext(ctx).Model(&L2SentMsg{}). - Where("nonce = ?", nonce). - First(&result). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return nil, nil - } - return nil, fmt.Errorf("L2SentMsg.GetL2SentMessageByNonce error: %w", err) - - } - return &result, nil -} - -// GetLatestL2SentMsgLEHeight get latest l2 sent msg less than or equal to end block number -func (l *L2SentMsg) GetLatestL2SentMsgLEHeight(ctx context.Context, endBlockNumber uint64) (*L2SentMsg, error) { - var result L2SentMsg - err := l.db.WithContext(ctx).Model(&L2SentMsg{}). - Where("height <= ?", endBlockNumber). - Order("nonce DESC"). - First(&result). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return nil, nil - } - return nil, fmt.Errorf("L2SentMsg.GetLatestL2SentMsgLEHeight error: %w", err) - - } - return &result, nil -} - -// InsertL2SentMsg batch insert l2 sent msg -func (l *L2SentMsg) InsertL2SentMsg(ctx context.Context, messages []*L2SentMsg, dbTx ...*gorm.DB) error { - if len(messages) == 0 { - return nil - } - db := l.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Model(&L2SentMsg{}).Create(&messages).Error - if err != nil { - l2hashes := make([]string, 0, len(messages)) - heights := make([]uint64, 0, len(messages)) - for _, msg := range messages { - l2hashes = append(l2hashes, msg.TxHash) - heights = append(heights, msg.Height) - } - log.Error("failed to insert l2 sent messages", "l2hashes", l2hashes, "heights", heights, "err", err) - return fmt.Errorf("L2SentMsg.InsertL2SentMsg error: %w", err) - } - return nil -} - -// UpdateL2MessageProof update l2 message proof in db tx -func (l *L2SentMsg) UpdateL2MessageProof(ctx context.Context, msgHash string, proof string, batchIndex uint64, dbTx ...*gorm.DB) error { - db := l.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Model(&L2SentMsg{}). - Where("msg_hash = ?", msgHash). - Updates(map[string]interface{}{ - "msg_proof": proof, - "batch_index": batchIndex, - }).Error - if err != nil { - return fmt.Errorf("L2SentMsg.UpdateL2MessageProof error: %w", err) - } - return nil -} - -// DeleteL2SentMsgAfterHeight delete l2 sent msg after height -func (l *L2SentMsg) DeleteL2SentMsgAfterHeight(ctx context.Context, height uint64, dbTx ...*gorm.DB) error { - db := l.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - err := db.WithContext(ctx).Model(&L2SentMsg{}).Delete("height > ?", height).Error - if err != nil { - return fmt.Errorf("L2SentMsg.DeleteL2SentMsgAfterHeight error: %w", err) - } - return nil -} diff --git a/bridge-history-api/orm/l2_sent_msg_test.go b/bridge-history-api/orm/l2_sent_msg_test.go deleted file mode 100644 index 8cf1c67a36..0000000000 --- a/bridge-history-api/orm/l2_sent_msg_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package orm - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - - "bridge-history-api/orm/migrate" - - "scroll-tech/common/database" - "scroll-tech/common/docker" -) - -func TestGetClaimableL2SentMsgByAddress(t *testing.T) { - base := docker.NewDockerApp() - base.RunDBImage(t) - - db, err := database.InitDB( - &database.Config{ - DSN: base.DBConfig.DSN, - DriverName: base.DBConfig.DriverName, - MaxOpenNum: base.DBConfig.MaxOpenNum, - MaxIdleNum: base.DBConfig.MaxIdleNum, - }, - ) - assert.NoError(t, err) - - sqlDB, err := db.DB() - assert.NoError(t, err) - assert.NoError(t, migrate.ResetDB(sqlDB)) - - l2SentMsgOrm := NewL2SentMsg(db) - relayedMsgOrm := NewRelayedMsg(db) - - msgs, err := l2SentMsgOrm.GetClaimableL2SentMsgByAddress(context.Background(), "sender1") - assert.NoError(t, err) - assert.Len(t, msgs, 0) - - l2SentMsgs := []*L2SentMsg{ - { - Sender: "sender1", - MsgHash: "hash1", - MsgProof: "proof1", - Nonce: 0, - }, - { - OriginalSender: "sender1", - MsgHash: "hash2", - MsgProof: "proof2", - Nonce: 1, - }, - { - OriginalSender: "sender1", - MsgHash: "hash3", - MsgProof: "", - Nonce: 2, - }, - } - relayedMsgs := []*RelayedMsg{ - { - MsgHash: "hash2", - }, - { - MsgHash: "hash3", - }, - } - err = l2SentMsgOrm.InsertL2SentMsg(context.Background(), l2SentMsgs) - assert.NoError(t, err) - err = relayedMsgOrm.InsertRelayedMsg(context.Background(), relayedMsgs) - assert.NoError(t, err) - - msgs, err = l2SentMsgOrm.GetClaimableL2SentMsgByAddress(context.Background(), "sender1") - assert.NoError(t, err) - assert.Len(t, msgs, 1) - assert.Equal(t, "hash1", msgs[0].MsgHash) -} diff --git a/bridge-history-api/orm/migrate/migrations/00001_cross_msg.sql b/bridge-history-api/orm/migrate/migrations/00001_cross_msg.sql deleted file mode 100644 index b22859634d..0000000000 --- a/bridge-history-api/orm/migrate/migrations/00001_cross_msg.sql +++ /dev/null @@ -1,57 +0,0 @@ --- +goose Up --- +goose StatementBegin -create table cross_message -( - id BIGSERIAL PRIMARY KEY, - msg_hash VARCHAR NOT NULL, - height BIGINT NOT NULL, - sender VARCHAR NOT NULL, - target VARCHAR NOT NULL, - amount VARCHAR NOT NULL, - layer1_hash VARCHAR NOT NULL DEFAULT '', - layer2_hash VARCHAR NOT NULL DEFAULT '', - layer1_token VARCHAR NOT NULL DEFAULT '', - layer2_token VARCHAR NOT NULL DEFAULT '', - asset SMALLINT NOT NULL, - msg_type SMALLINT NOT NULL, - token_ids TEXT NOT NULL DEFAULT '', - token_amounts TEXT NOT NULL DEFAULT '', - block_timestamp TIMESTAMP(0) DEFAULT NULL, - created_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted_at TIMESTAMP(0) DEFAULT NULL -); - -create unique index uk_msg_hash_msg_type -on cross_message (msg_hash, msg_type) where deleted_at IS NULL; - -comment -on column cross_message.asset is 'ETH, ERC20, ERC721, ERC1155'; - -comment -on column cross_message.msg_type is 'unknown, l1msg, l2msg'; - -CREATE INDEX idx_l1_msg_index ON cross_message (layer1_hash, deleted_at); - -CREATE INDEX idx_l2_msg_index ON cross_message (layer2_hash, deleted_at); - -CREATE INDEX idx_height_msg_type_index ON cross_message (height, msg_type, deleted_at); - -CREATE OR REPLACE FUNCTION update_timestamp() -RETURNS TRIGGER AS $$ -BEGIN - NEW.updated_at = CURRENT_TIMESTAMP; - RETURN NEW; -END; -$$ language 'plpgsql'; - -CREATE TRIGGER update_timestamp BEFORE UPDATE -ON cross_message FOR EACH ROW EXECUTE PROCEDURE -update_timestamp(); - --- +goose StatementEnd - --- +goose Down --- +goose StatementBegin -drop table if exists cross_message; --- +goose StatementEnd diff --git a/bridge-history-api/orm/migrate/migrations/00002_relayed_msg.sql b/bridge-history-api/orm/migrate/migrations/00002_relayed_msg.sql deleted file mode 100644 index 27f6557d2d..0000000000 --- a/bridge-history-api/orm/migrate/migrations/00002_relayed_msg.sql +++ /dev/null @@ -1,41 +0,0 @@ --- +goose Up --- +goose StatementBegin -create table relayed_msg -( - id BIGSERIAL PRIMARY KEY, - msg_hash VARCHAR NOT NULL, - height BIGINT NOT NULL, - layer1_hash VARCHAR NOT NULL DEFAULT '', - layer2_hash VARCHAR NOT NULL DEFAULT '', - created_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted_at TIMESTAMP(0) DEFAULT NULL -); - -create unique index uk_msg_hash_l1_hash_l2_hash -on relayed_msg (msg_hash, layer1_hash, layer2_hash) where deleted_at IS NULL; - -CREATE INDEX idx_l1_msg_relayed_msg ON relayed_msg (layer1_hash, deleted_at); - -CREATE INDEX idx_l2_msg_relayed_msg ON relayed_msg (layer2_hash, deleted_at); - -CREATE INDEX idx_msg_hash_deleted_at_relayed_msg on relayed_msg (msg_hash, deleted_at); - -CREATE OR REPLACE FUNCTION update_timestamp() -RETURNS TRIGGER AS $$ -BEGIN - NEW.updated_at = CURRENT_TIMESTAMP; - RETURN NEW; -END; -$$ language 'plpgsql'; - -CREATE TRIGGER update_timestamp BEFORE UPDATE -ON relayed_msg FOR EACH ROW EXECUTE PROCEDURE -update_timestamp(); - --- +goose StatementEnd - --- +goose Down --- +goose StatementBegin -drop table if exists relayed_msg; --- +goose StatementEnd \ No newline at end of file diff --git a/bridge-history-api/orm/migrate/migrations/00003_l2_sent_msg.sql b/bridge-history-api/orm/migrate/migrations/00003_l2_sent_msg.sql deleted file mode 100644 index 9903e09a0b..0000000000 --- a/bridge-history-api/orm/migrate/migrations/00003_l2_sent_msg.sql +++ /dev/null @@ -1,47 +0,0 @@ --- +goose Up --- +goose StatementBegin -create table l2_sent_msg -( - id BIGSERIAL PRIMARY KEY, - original_sender VARCHAR NOT NULL DEFAULT '', - tx_hash VARCHAR NOT NULL, - sender VARCHAR NOT NULL, - target VARCHAR NOT NULL, - value VARCHAR NOT NULL, - msg_hash VARCHAR NOT NULL, - height BIGINT NOT NULL, - nonce BIGINT NOT NULL, - batch_index BIGINT NOT NULL DEFAULT 0, - msg_proof TEXT NOT NULL DEFAULT '', - msg_data TEXT NOT NULL DEFAULT '', - created_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted_at TIMESTAMP(0) DEFAULT NULL -); - -create unique index uk_msg_hash -on l2_sent_msg (msg_hash) where deleted_at IS NULL; - -create unique index uk_nonce -on l2_sent_msg (nonce) where deleted_at IS NULL; - -CREATE INDEX idx_msg_hash_deleted_at_l2_sent_msg on l2_sent_msg (msg_hash, deleted_at); - -CREATE OR REPLACE FUNCTION update_timestamp() -RETURNS TRIGGER AS $$ -BEGIN - NEW.updated_at = CURRENT_TIMESTAMP; - RETURN NEW; -END; -$$ language 'plpgsql'; - -CREATE TRIGGER update_timestamp BEFORE UPDATE -ON l2_sent_msg FOR EACH ROW EXECUTE PROCEDURE -update_timestamp(); - --- +goose StatementEnd - --- +goose Down --- +goose StatementBegin -drop table if exists l2_sent_msg; --- +goose StatementEnd \ No newline at end of file diff --git a/bridge-history-api/orm/migrate/migrations/00004_rollup_batch.sql b/bridge-history-api/orm/migrate/migrations/00004_rollup_batch.sql deleted file mode 100644 index ac3e344033..0000000000 --- a/bridge-history-api/orm/migrate/migrations/00004_rollup_batch.sql +++ /dev/null @@ -1,40 +0,0 @@ --- +goose Up --- +goose StatementBegin -create table rollup_batch -( - id BIGSERIAL PRIMARY KEY, - batch_index BIGINT NOT NULL, - commit_height BIGINT NOT NULL, - start_block_number BIGINT NOT NULL, - end_block_number BIGINT NOT NULL, - batch_hash VARCHAR NOT NULL, - withdraw_root TEXT DEFAULT NULL, - created_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, - deleted_at TIMESTAMP(0) DEFAULT NULL -); - -create unique index uk_batch_index -on rollup_batch (batch_index) where deleted_at IS NULL; - -create unique index uk_batch_hash -on rollup_batch (batch_hash) where deleted_at IS NULL; - -CREATE OR REPLACE FUNCTION update_timestamp() -RETURNS TRIGGER AS $$ -BEGIN - NEW.updated_at = CURRENT_TIMESTAMP; - RETURN NEW; -END; -$$ language 'plpgsql'; - -CREATE TRIGGER update_timestamp BEFORE UPDATE -ON rollup_batch FOR EACH ROW EXECUTE PROCEDURE -update_timestamp(); - --- +goose StatementEnd - --- +goose Down --- +goose StatementBegin -drop table if exists rollup_batch; --- +goose StatementEnd \ No newline at end of file diff --git a/bridge-history-api/orm/relayed_msg.go b/bridge-history-api/orm/relayed_msg.go deleted file mode 100644 index 43f2459d76..0000000000 --- a/bridge-history-api/orm/relayed_msg.go +++ /dev/null @@ -1,155 +0,0 @@ -package orm - -import ( - "context" - "fmt" - "time" - - "github.com/ethereum/go-ethereum/log" - "gorm.io/gorm" -) - -// RelayedMsg is the struct for relayed_msg table -type RelayedMsg struct { - db *gorm.DB `gorm:"column:-"` - - ID uint64 `json:"id" gorm:"column:id"` - MsgHash string `json:"msg_hash" gorm:"column:msg_hash"` - Height uint64 `json:"height" gorm:"column:height"` - Layer1Hash string `json:"layer1_hash" gorm:"column:layer1_hash;default:''"` - Layer2Hash string `json:"layer2_hash" gorm:"column:layer2_hash;default:''"` - CreatedAt *time.Time `json:"created_at" gorm:"column:created_at"` - UpdatedAt *time.Time `json:"updated_at" gorm:"column:updated_at"` - DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"column:deleted_at;default:NULL"` -} - -// NewRelayedMsg create an NewRelayedMsg instance -func NewRelayedMsg(db *gorm.DB) *RelayedMsg { - return &RelayedMsg{db: db} -} - -// TableName returns the table name for the RelayedMsg model. -func (*RelayedMsg) TableName() string { - return "relayed_msg" -} - -// GetRelayedMsgByHash get relayed msg by hash -func (r *RelayedMsg) GetRelayedMsgByHash(ctx context.Context, msgHash string) (*RelayedMsg, error) { - var result RelayedMsg - err := r.db.WithContext(ctx).Model(&RelayedMsg{}). - Where("msg_hash = ?", msgHash). - First(&result). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return nil, nil - } - return nil, fmt.Errorf("RelayedMsg.GetRelayedMsgByHash error: %w", err) - } - return &result, nil -} - -// GetRelayedMsgsByHashes get relayed msg by hash array -func (r *RelayedMsg) GetRelayedMsgsByHashes(ctx context.Context, msgHashes []string) ([]*RelayedMsg, error) { - var results []*RelayedMsg - err := r.db.WithContext(ctx).Model(&RelayedMsg{}). - Where("msg_hash IN (?)", msgHashes). - Find(&results). - Error - if err != nil { - return nil, fmt.Errorf("RelayedMsg.GetRelayedMsgsByHashes error: %w", err) - } - return results, nil -} - -// GetLatestRelayedHeightOnL1 get latest relayed height on l1 -func (r *RelayedMsg) GetLatestRelayedHeightOnL1(ctx context.Context) (uint64, error) { - var result RelayedMsg - err := r.db.WithContext(ctx).Model(&RelayedMsg{}). - Select("height"). - Where("layer1_hash != ''"). - Order("height DESC"). - First(&result). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return 0, nil - } - return 0, fmt.Errorf("RelayedMsg.GetLatestRelayedHeightOnL1 error: %w", err) - } - return result.Height, err -} - -// GetLatestRelayedHeightOnL2 get latest relayed height on l2 -func (r *RelayedMsg) GetLatestRelayedHeightOnL2(ctx context.Context) (uint64, error) { - var result RelayedMsg - err := r.db.WithContext(ctx).Model(&RelayedMsg{}). - Select("height"). - Where("layer2_hash != ''"). - Order("height DESC"). - First(&result). - Error - if err != nil { - if err == gorm.ErrRecordNotFound { - return 0, nil - } - return 0, fmt.Errorf("RelayedMsg.GetLatestRelayedHeightOnL2 error: %w", err) - } - return result.Height, nil -} - -// InsertRelayedMsg batch insert relayed msg into db and return the transaction -func (r *RelayedMsg) InsertRelayedMsg(ctx context.Context, messages []*RelayedMsg, dbTx ...*gorm.DB) error { - if len(messages) == 0 { - return nil - } - db := r.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Model(&RelayedMsg{}).Create(&messages).Error - if err != nil { - l2hashes := make([]string, 0, len(messages)) - l1hashes := make([]string, 0, len(messages)) - heights := make([]uint64, 0, len(messages)) - for _, msg := range messages { - l2hashes = append(l2hashes, msg.Layer2Hash) - l1hashes = append(l1hashes, msg.Layer1Hash) - heights = append(heights, msg.Height) - } - log.Error("failed to insert l2 sent messages", "l2hashes", l2hashes, "l1hashes", l1hashes, "heights", heights, "err", err) - return fmt.Errorf("RelayedMsg.InsertRelayedMsg error: %w", err) - } - return nil -} - -// DeleteL1RelayedHashAfterHeight delete l1 relayed hash after height -func (r *RelayedMsg) DeleteL1RelayedHashAfterHeight(ctx context.Context, height uint64, dbTx ...*gorm.DB) error { - db := r.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Model(&RelayedMsg{}). - Delete("height > ? AND layer1_hash != ''", height).Error - if err != nil { - return fmt.Errorf("RelayedMsg.DeleteL1RelayedHashAfterHeight error: %w", err) - } - return nil -} - -// DeleteL2RelayedHashAfterHeight delete l2 relayed hash after heights -func (r *RelayedMsg) DeleteL2RelayedHashAfterHeight(ctx context.Context, height uint64, dbTx ...*gorm.DB) error { - db := r.db - if len(dbTx) > 0 && dbTx[0] != nil { - db = dbTx[0] - } - db.WithContext(ctx) - err := db.Model(&RelayedMsg{}). - Delete("height > ? AND layer2_hash != ''", height).Error - if err != nil { - return fmt.Errorf("RelayedMsg.DeleteL2RelayedHashAfterHeight error: %w", err) - } - return nil -} diff --git a/bridge-history-api/testdata/commit-batches-0x3095e91db7ba4a6fbf4654d607db322e58ff5579c502219c8024acaea74cf311.txt b/bridge-history-api/testdata/commit-batches-0x3095e91db7ba4a6fbf4654d607db322e58ff5579c502219c8024acaea74cf311.txt deleted file mode 100644 index 53d526d942..0000000000 --- a/bridge-history-api/testdata/commit-batches-0x3095e91db7ba4a6fbf4654d607db322e58ff5579c502219c8024acaea74cf311.txt +++ /dev/null @@ -1 +0,0 @@ -cb9054990000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000009a000000000000000000000000000000000000000000000000000000000000013c00000000000000000000000000000000000000000000000000000000000001824000000000000000000000000000000000000000000000000000000000000184e000000000000000000000000000000000000000000000000000000000000000e010f873a64d3b6a6158f89ff72b969cea899c9bedc925524bc1d3cd365a44045527180fe7df79de88f2f90ea850e2b9240bdd33857de21552556b4a84b4025ac3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015ba2a6259d2fe40d3ab23f5c6e958e2ef834913795e6a4696d1248054263f1d50000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000551b28c5737f1dd384ae6affebb07bfa89e9852427d0575448f6ed57f37958efda4fc62b9b0643e345bdcebe457b3ae898bef59c7203c3db269200055e037afda00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000063f86a2b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f22f2cb861f3177d15fc39575f626ef2ff7730523f23f3b73d0aa5afa722fb8351b28c5737f1dd384ae6affebb07bfa89e9852427d0575448f6ed57f37958efd00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000063f86a60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fe1a1a964246c96c2dbd38cbfee7cc7e8c269af494dfd4b479791aa8b2b0ee02f22f2cb861f3177d15fc39575f626ef2ff7730523f23f3b73d0aa5afa722fb8300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000063f86a63000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077834f1f68d9d8e2be5fd63e32c27b7676e8b947fd234b14ef6cb79cd60329edfe1a1a964246c96c2dbd38cbfee7cc7e8c269af494dfd4b479791aa8b2b0ee0200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000063f86a97000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067758c6eae01e299f3a8daebd916cb128532b150bed3ce36d0d6dedf4baaaa4377834f1f68d9d8e2be5fd63e32c27b7676e8b947fd234b14ef6cb79cd60329ed00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000063f87227000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009339000007f5f907f28001830960be8080b907a1608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6107238061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b3660046104ed565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee366004610511565b610254565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f366004610560565b6102de565b34801561013057600080fd5b506100d161013f366004610511565b61036f565b34801561015057600080fd5b506100d161015f3660046104ed565b6103c7565b34801561017057600080fd5b506100a061017f3660046104ed565b610462565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d9190610636565b949350505050565b6000546001600160a01b031633146102485760405162461bcd60e51b815260040161023f90610653565b60405180910390fd5b6102526000610488565b565b6000546001600160a01b0316331461027e5760405162461bcd60e51b815260040161023f90610653565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b1580156102c257600080fd5b505af11580156102d6573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031633146103085760405162461bcd60e51b815260040161023f90610653565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906103389086908690600401610688565b6000604051808303818588803b15801561035157600080fd5b505af1158015610365573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b031633146103995760405162461bcd60e51b815260040161023f90610653565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe6906024016102a8565b6000546001600160a01b031633146103f15760405162461bcd60e51b815260040161023f90610653565b6001600160a01b0381166104565760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161023f565b61045f81610488565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461045f57600080fd5b6000602082840312156104ff57600080fd5b813561050a816104d8565b9392505050565b6000806040838503121561052457600080fd5b823561052f816104d8565b9150602083013561053f816104d8565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561057557600080fd5b8335610580816104d8565b92506020840135610590816104d8565b9150604084013567ffffffffffffffff808211156105ad57600080fd5b818601915086601f8301126105c157600080fd5b8135818111156105d3576105d361054a565b604051601f8201601f19908116603f011681019083821181831017156105fb576105fb61054a565b8160405282815289602084870101111561061457600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561064857600080fd5b815161050a816104d8565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60018060a01b038316815260006020604081840152835180604085015260005b818110156106c4578581018301518582016060015282016106a8565b818111156106d6576000606083870101525b50601f01601f19169290920160600194935050505056fea2646970667358221220ebed7a44095d7c5c9a2c2a6392cfbcd8c3dd7c4c5c4e2ee634396071ee50181464736f6c634300080a003383104ec6a08e3d88aab00a364cb802ebc54a85fa3c266d132afd086b5f3d97830a8a156c68a064769f5ec5766e2e049d1be9568d6988cb6a485776b80f9e786bf0cea3ab17ea00002499f92496010183274add8080b9244560e06040523480156200001157600080fd5b50604051620023e5380380620023e583398101604081905262000034916200006f565b6001600160a01b0392831660805290821660a0521660c052620000b9565b80516001600160a01b03811681146200006a57600080fd5b919050565b6000806000606084860312156200008557600080fd5b620000908462000052565b9250620000a06020850162000052565b9150620000b06040850162000052565b90509250925092565b60805160a05160c0516122d96200010c600039600081816101ef0152818161104101526111690152600081816102fa0152610eac0152600081816103c7015281816108090152610d0101526122d96000f3fe60806040526004361061016a5760003560e01c8063715018a6116100d15780638da5cb5b1161008a5780639a362e75116100645780639a362e751461048c578063b0d0643a146104ac578063b2267a7b146104d9578063f2fde38b146104ec57600080fd5b80638da5cb5b1461042e5780638ef1332e1461044c57806393e59dc11461046c57600080fd5b8063715018a614610360578063797594b0146103755780637cf2e9ea1461039557806380953acd146103b55780638456cb59146103e957806384a7d81f146103fe57600080fd5b8063478222c211610123578063478222c214610289578063485cc955146102a95780635c975abb146102c95780635d62a8dd146102e85780636d2ab1831461031c5780636e296e451461034057600080fd5b806302345b50146101765780632a6cccb2146101bb5780633b70c18a146101dd5780633bf99aa6146102295780633d0f963e146102495780633e8ff0761461026957600080fd5b3661017157005b600080fd5b34801561018257600080fd5b506101a6610191366004611d0b565b609b6020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156101c757600080fd5b506101db6101d6366004611d40565b61050c565b005b3480156101e957600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101b2565b34801561023557600080fd5b506101db610244366004611e05565b6105a5565b34801561025557600080fd5b506101db610264366004611d40565b610762565b34801561027557600080fd5b506101a6610284366004611ea3565b6107e6565b34801561029557600080fd5b50606854610211906001600160a01b031681565b3480156102b557600080fd5b506101db6102c4366004611f23565b61093f565b3480156102d557600080fd5b50606854600160a01b900460ff166101a6565b3480156102f457600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561032857600080fd5b50610332609d5481565b6040519081526020016101b2565b34801561034c57600080fd5b50606554610211906001600160a01b031681565b34801561036c57600080fd5b506101db610a24565b34801561038157600080fd5b50606754610211906001600160a01b031681565b3480156103a157600080fd5b506101db6103b0366004611d0b565b610a5a565b3480156103c157600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b3480156103f557600080fd5b506101db610abf565b34801561040a57600080fd5b506101a6610419366004611d0b565b609a6020526000908152604090205460ff1681565b34801561043a57600080fd5b506033546001600160a01b0316610211565b34801561045857600080fd5b506101db610467366004611f56565b610af1565b34801561047857600080fd5b50606654610211906001600160a01b031681565b34801561049857600080fd5b506101a66104a7366004611ea3565b610cde565b3480156104b857600080fd5b506103326104c7366004611d0b565b609c6020526000908152604090205481565b6101db6104e7366004611fc8565b610e24565b3480156104f857600080fd5b506101db610507366004611d40565b611231565b6033546001600160a01b0316331461053f5760405162461bcd60e51b815260040161053690612027565b60405180910390fd5b606654606880546001600160a01b0319166001600160a01b0384811691821790925560408051929093168083526020830191909152917f4aadc32827849f797733838c61302f7f56d2b6db28caa175eb3f7f8e5aba25f591015b60405180910390a15050565b606854600160a01b900460ff16156105cf5760405162461bcd60e51b81526004016105369061205c565b6065546001600160a01b03166001146106215760405162461bcd60e51b815260206004820152601460248201527320b63932b0b23c9034b71032bc32b1baba34b7b760611b6044820152606401610536565b600061063087878787876112cc565b80516020918201206000818152609b90925260409091205490915060ff161561069b5760405162461bcd60e51b815260206004820152601d60248201527f4d657373616765207375636365737366756c6c792065786563757465640000006044820152606401610536565b6000818152609c60205260409020546106f65760405162461bcd60e51b815260206004820152601a60248201527f4d657373616765206e6f742072656c61796564206265666f72650000000000006044820152606401610536565b6107098235826102846020860186612086565b61074c5760405162461bcd60e51b815260206004820152601460248201527313595cdcd859d9481b9bdd081a5b98db1d59195960621b6044820152606401610536565b610759878787868561131c565b50505050505050565b6033546001600160a01b0316331461078c5760405162461bcd60e51b815260040161053690612027565b606680546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f22d1c35fe072d2e42c3c8f9bd4a0d34aa84a0101d020a62517b33fdb3174e5f79101610599565b604051630596b06f60e31b81526004810185905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632cb5837890602401602060405180830381865afa158015610850573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087491906120cd565b9050806108bb5760405162461bcd60e51b8152602060048201526015602482015274109b1bd8dac81a5cc81b9bdd081a5b5c1bdc9d1959605a1b6044820152606401610536565b600085815260696020526040812060675490919081906108e6906001600160a01b03168489896114f7565b915091508382146109305760405162461bcd60e51b81526020600482015260146024820152730a6e8c2e8ca40e4dedee8e640dad2e6dac2e8c6d60631b6044820152606401610536565b60011498975050505050505050565b600054610100900460ff1661095a5760005460ff161561095e565b303b155b6109c15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610536565b600054610100900460ff161580156109e3576000805461ffff19166101011790555b6109eb611b36565b6109f58383611b65565b6003609d55606580546001600160a01b03191660011790558015610a1f576000805461ff00191690555b505050565b6033546001600160a01b03163314610a4e5760405162461bcd60e51b815260040161053690612027565b610a586000611ba7565b565b6033546001600160a01b03163314610a845760405162461bcd60e51b815260040161053690612027565b609d8190556040518181527f012747345e9e2d3604e46c67be8d427fe303fbf6894d4847f5792d0fa97a4aad9060200160405180910390a150565b6033546001600160a01b03163314610ae95760405162461bcd60e51b815260040161053690612027565b610a58611bf9565b606854600160a01b900460ff1615610b1b5760405162461bcd60e51b81526004016105369061205c565b60665433906001600160a01b0316801580610b9b575060405163efc7840160e01b81526001600160a01b03838116600483015282169063efc7840190602401602060405180830381865afa158015610b77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9b91906120e6565b610be05760405162461bcd60e51b81526020600482015260166024820152751cd95b99195c881b9bdd081dda1a5d195b1a5cdd195960521b6044820152606401610536565b6065546001600160a01b0316600114610c3b5760405162461bcd60e51b815260206004820152601f60248201527f4d65737361676520697320616c726561647920696e20657865637574696f6e006044820152606401610536565b6000610c4a88888888886112cc565b80516020918201206000818152609b90925260409091205490915060ff1615610cc75760405162461bcd60e51b815260206004820152602960248201527f4d6573736167652077617320616c7265616479207375636365737366756c6c7960448201526808195e1958dd5d195960ba1b6064820152608401610536565b610cd4888888878561131c565b5050505050505050565b604051630596b06f60e31b81526004810185905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632cb5837890602401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c91906120cd565b905080610db05760405162461bcd60e51b8152602060048201526012602482015271109b1bd8dac81b9bdd081a5b5c1bdc9d195960721b6044820152606401610536565b6000858152606a602052604081206067549091908190610ddb906001600160a01b03168489896114f7565b915091508382146109305760405162461bcd60e51b81526020600482015260136024820152720a6e8c2e8ca40e4dedee840dad2e6dac2e8c6d606b1b6044820152606401610536565b606854600160a01b900460ff1615610e4e5760405162461bcd60e51b81526004016105369061205c565b6068546001600160a01b03163314610ea857615208811015610ea85760405162461bcd60e51b815260206004820152601360248201527219d85cc81b1a5b5a5d081d1bdbc81cdb585b1b606a1b6044820152606401610536565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663519b4bd36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2c91906120cd565b610f36908361211e565b9050610f42818561213d565b341015610f8a5760405162461bcd60e51b8152602060048201526016602482015275496e73756666696369656e74206d73672e76616c756560501b6044820152606401610536565b801561103d576068546000906001600160a01b0316610fa98634612155565b604051600081818185875af1925050503d8060008114610fe5576040519150601f19603f3d011682016040523d82523d6000602084013e610fea565b606091505b505090508061103b5760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f20646564756374207468652066656500000000000000006044820152606401610536565b505b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166326aad7b76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561109d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c191906120cd565b905060006110d233888885896112cc565b80516020918201206000818152609a90925260409091205490915060ff16156111325760405162461bcd60e51b81526020600482015260126024820152714475706c696361746564206d65737361676560701b6044820152606401610536565b6000818152609a602052604090819020805460ff191660011790555163600a2e7760e01b8152600481018290526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063600a2e77906024016020604051808303816000875af11580156111b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d691906120cd565b50866001600160a01b0316336001600160a01b03167f104371f3b442861a2a7b82a070afbbaab748bb13757bf47769e170e37809ec1e8885888a60405161122094939291906121c8565b60405180910390a350505050505050565b6033546001600160a01b0316331461125b5760405162461bcd60e51b815260040161053690612027565b6001600160a01b0381166112c05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610536565b6112c981611ba7565b50565b606085858585856040516024016112e79594939291906121f7565b60408051601f198184030181529190526020810180516001600160e01b0316634778999760e11b179052905095945050505050565b6065546001600160a01b03868116911614156113735760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b21036b2b9b9b0b3b29039b2b73232b960511b6044820152606401610536565b606580546001600160a01b0319166001600160a01b038781169190911790915560405160009186169085906113a990869061223c565b60006040518083038185875af1925050503d80600081146113e6576040519150601f19603f3d011682016040523d82523d6000602084013e6113eb565b606091505b5050606580546001600160a01b03191660011790559050801561144d576000828152609b6020526040808220805460ff191660011790555183917f4641df4a962071e12719d8c8c8e5ac7fc4d97b927346a3d7a335b1f7517e133c91a26114ef565b6000828152609c6020526040902054609d546001909101908111156114b45760405162461bcd60e51b815260206004820152601c60248201527f457863656564206d6178696d756d206661696c7572652074696d6573000000006044820152606401610536565b6000838152609c602052604080822092909255905183917f99d0e048484baa1b1540b1367cb128acd7ab2946d1ed91ec10e3c85e4bf51b8f91a25b505050505050565b600080611904565b6308c379a060e01b60005260206004528060445260005b811561152b5760089190911b90600101611516565b60245260646000fd5b8061154257611542826114ff565b5050565b80608081101561155557611571565b602083111561156357611571565b60ff60071960088502011b19165b92915050565b600080823560001a60f78111156115b95760f78103602081111561159757fe5b60018581013560088302610100031c8201810196919095019094019392505050565b60bf8111156115d35760be19019360019390930192915050565b506115e867139bdd081b1a5cdd60c21b6114ff565b915091565b6000806000833560001a608081101561160d576001925084915050611680565b60b881101561162657607f190191505060018301611680565b60c081101561165c5760b78103600481111561163e57fe5b60018681013560088302610100031c94509086010191506116809050565b6001935060f881101561167457505060018301611680565b60f61901915050600183015b9193909250565b604051819060008061169884611577565b8186863781852090959092500184845b828710156116db576116b9876115ed565b93508381019850816116d457838160801b1783526020830192505b50506116a8565b8287146116e457fe5b60208682030494505050509193509193565b6000196004830290811c82169060206001851615611712575060035b610100919091031b1792915050565b60008260200282015162ffffff81168160801c9150601f82111561174c5701601f1901359050611571565b356020919091036008021c905092915050565b6000808360200283015162ffffff81168160801c9250601f83111561178e578201601f190135925061179c9050565b3560208390036008021c9250505b9250929050565b80600080808080806117b487611687565b98509250925096508881146117e2576117e27209cdec8ca40d2e8cadae640dad2e6dac2e8c6d606b1b6114ff565b506117ed898261175f565b925093506117fb8a8261175f565b9250925050945094509450945094565b600080600080859350833560001a600185019450600060015b828110156118ec57600080600061183a8a611687565b9350935093509950836001811461186c576118676c090c2e6d040dad2e6dac2e8c6d609b1b8a8414611534565b611870565b8199505b505080600281146118a057601181146118be5761189b6b496e76616c6964206e6f646560a01b6114ff565b6118e1565b6118ab60018461175f565b50835190985060801c94909401936118e1565b6004850260fc038b901c600f166118d5818561175f565b50985050600194909401935b505050600101611824565b506118f781886116f6565b9250505092959194509250565b600080600080600088600061191e8d6000526014600c2090565b611928838261180b565b985093509a5092505060008061193d84611687565b98509250925093506119717f4163636f756e74206c6561662068617368206d69736d61746368000000000000848814611534565b61199e7f4163636f756e74206c656166206e6f6465206d69736d6174636800000000000060028314611534565b6119a9600083611721565b97506119d77f4163636f756e7420656e636f6465642070617468206d69736d61746368000000898914611534565b602082015162ffffff1692506119ec83611687565b9850925092509250611a217f4163636f756e74206c656166206974656d73206d69736d61746368000000000060048314611534565b50611a2d600282611721565b975050506000611a438c60009081526020902090565b611a4d838261180b565b985096509250925050611a65600160006002856117a3565b96509a50975094509150611a9b7f53746f7261676520656e636f6465642070617468206d69736d61746368000000878714611534565b808015611acb57611ac6740a6e8dee4c2ceca40e4dedee840dad2e6dac2e8c6d605b1b898414611534565b611aef565b611aef740a6e8dee4c2ceca40e4dedee840dad2e6dac2e8c6d605b1b898714611534565b5050611afb8288611546565b9650888a018114611b2757611b27740a0e4dedecc40d8cadccee8d040dad2e6dac2e8c6d605b1b6114ff565b50505050505094509492505050565b600054610100900460ff16611b5d5760405162461bcd60e51b815260040161053690612258565b610a58611c7b565b611b6d611cb1565b606580546001600160a01b0319908116600117909155606780546001600160a01b0394851690831617905560688054929093169116179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606854600160a01b900460ff1615611c235760405162461bcd60e51b81526004016105369061205c565b6068805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c5e3390565b6040516001600160a01b03909116815260200160405180910390a1565b600054610100900460ff16611ca25760405162461bcd60e51b815260040161053690612258565b6068805460ff60a01b19169055565b600054610100900460ff16611cd85760405162461bcd60e51b815260040161053690612258565b610a58600054610100900460ff16611d025760405162461bcd60e51b815260040161053690612258565b610a5833611ba7565b600060208284031215611d1d57600080fd5b5035919050565b80356001600160a01b0381168114611d3b57600080fd5b919050565b600060208284031215611d5257600080fd5b611d5b82611d24565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112611d8957600080fd5b813567ffffffffffffffff80821115611da457611da4611d62565b604051601f8301601f19908116603f01168101908282118183101715611dcc57611dcc611d62565b81604052838152866020858801011115611de557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c08789031215611e1e57600080fd5b611e2787611d24565b9550611e3560208801611d24565b94506040870135935060608701359250608087013567ffffffffffffffff80821115611e6057600080fd5b611e6c8a838b01611d78565b935060a0890135915080821115611e8257600080fd5b5087016040818a031215611e9557600080fd5b809150509295509295509295565b60008060008060608587031215611eb957600080fd5b8435935060208501359250604085013567ffffffffffffffff80821115611edf57600080fd5b818701915087601f830112611ef357600080fd5b813581811115611f0257600080fd5b886020828501011115611f1457600080fd5b95989497505060200194505050565b60008060408385031215611f3657600080fd5b611f3f83611d24565b9150611f4d60208401611d24565b90509250929050565b600080600080600060a08688031215611f6e57600080fd5b611f7786611d24565b9450611f8560208701611d24565b93506040860135925060608601359150608086013567ffffffffffffffff811115611faf57600080fd5b611fbb88828901611d78565b9150509295509295909350565b60008060008060808587031215611fde57600080fd5b611fe785611d24565b935060208501359250604085013567ffffffffffffffff81111561200a57600080fd5b61201687828801611d78565b949793965093946060013593505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6000808335601e1984360301811261209d57600080fd5b83018035915067ffffffffffffffff8211156120b857600080fd5b60200191503681900382131561179c57600080fd5b6000602082840312156120df57600080fd5b5051919050565b6000602082840312156120f857600080fd5b81518015158114611d5b57600080fd5b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561213857612138612108565b500290565b6000821982111561215057612150612108565b500190565b60008282101561216757612167612108565b500390565b60005b8381101561218757818101518382015260200161216f565b83811115612196576000848401525b50505050565b600081518084526121b481602086016020860161216c565b601f01601f19169290920160200192915050565b8481528360208201528260408201526080606082015260006121ed608083018461219c565b9695505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906122319083018461219c565b979650505050505050565b6000825161224e81846020870161216c565b9190910192915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220f45f9a43a6a230f9f6fce61e0c3100fbb1b5a146e6222f60a069450bce7ae59664736f6c634300080a003300000000000000000000000053000000000000000000000000000000000000010000000000000000000000005300000000000000000000000000000000000002000000000000000000000000530000000000000000000000000000000000000083104ec5a0e6de0bb04092b0f689188978fa7b8faffd753c13eb64555aad693e30f8464e0fa04d27de86a45472b08e51b622e68c8488e899e7f814e5fe4010bad0538a13acca0000103af910370201830bd4408080b90fe6608060405260405162000f6638038062000f66833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000f1f833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000eff83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002601760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f3f6027913962000381565b9392505050565b60006200021a60008051602062000eff83398151915260001b6200046760201b620002081760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000eff83398151915260001b6200046760201b620002081760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200028c1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000f1f83398151915260001b6200046760201b620002081760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61086780620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106f1565b610118565b61005b61009336600461070c565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106f1565b61020b565b3480156100f557600080fd5b506100ad610235565b61010661029b565b61011661011161033a565b610344565b565b610120610368565b6001600160a01b0316336001600160a01b03161415610157576101548160405180602001604052806000815250600061039b565b50565b6101546100fe565b610167610368565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061039b915050565b505050565b6101c36100fe565b60006101da610368565b6001600160a01b0316336001600160a01b03161415610200576101fb61033a565b905090565b6102086100fe565b90565b610213610368565b6001600160a01b0316336001600160a01b0316141561015757610154816103c6565b600061023f610368565b6001600160a01b0316336001600160a01b03161415610200576101fb610368565b6060610285838360405180606001604052806027815260200161080b6027913961041a565b9392505050565b6001600160a01b03163b151590565b6102a3610368565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb6104f7565b3660008037600080366000845af43d6000803e808015610363573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103a48361051f565b6000825111806103b15750805b156101c3576103c08383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103ef610368565b604080516001600160a01b03928316815291841660208301520160405180910390a16101548161055f565b60606001600160a01b0384163b6104825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610331565b600080856001600160a01b03168560405161049d91906107bb565b600060405180830381855af49150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b50915091506104ed828286610608565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61038c565b61052881610641565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105c45760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610331565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60608315610617575081610285565b8251156106275782518084602001fd5b8160405162461bcd60e51b815260040161033191906107d7565b6001600160a01b0381163b6106ae5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610331565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105e7565b80356001600160a01b03811681146106ec57600080fd5b919050565b60006020828403121561070357600080fd5b610285826106d5565b60008060006040848603121561072157600080fd5b61072a846106d5565b9250602084013567ffffffffffffffff8082111561074757600080fd5b818601915086601f83011261075b57600080fd5b81358181111561076a57600080fd5b87602082850101111561077c57600080fd5b6020830194508093505050509250925092565b60005b838110156107aa578181015183820152602001610792565b838111156103c05750506000910152565b600082516107cd81846020870161078f565b9190910192915050565b60208152600082518060208401526107f681604085016020870161078f565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220366737524a7ac8fa76e3b2cd04bb1e0b8aa75e165c32f59b0076ead59d529de564736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c656400000000000000000000000018e11f06fd9ff56eff73ad50837d3d0662fc687d000000000000000000000000cf16a0bebb13045c91127cdf7325d6d0d1ca6e750000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000083104ec5a0a51602f05bb15997263ad3f2a4e2c3a326b4c57b0b5f11a34c843159cc4956dba05f8430dfeb420a723c0ed1ee93416aeabc6c755070713926e7fafb2b6644f6a400000cdcf90cd90301830ea6688080b90c88608060405234801561001057600080fd5b50610c68806100206000396000f3fe60806040526004361061007b5760003560e01c8063797594b01161004e578063797594b0146100f7578063c0c53b8b1461011d578063c7cdea371461013d578063f887ea401461015057600080fd5b8063232e8748146100805780632fcc29fa146100955780633cb747bf146100a85780636dc24183146100e4575b600080fd5b61009361008e366004610809565b610170565b005b6100936100a33660046108a8565b610386565b3480156100b457600080fd5b506002546100c8906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6100936100f236600461094c565b6103c4565b34801561010357600080fd5b506000546100c8906201000090046001600160a01b031681565b34801561012957600080fd5b506100936101383660046109f0565b6103d6565b61009361014b366004610a3b565b6104e8565b34801561015c57600080fd5b506001546100c8906001600160a01b031681565b6002546001600160a01b03163381146101d05760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206d657373656e6765722063616e2063616c6c00000000000000000060448201526064015b60405180910390fd5b806001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561020e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610a5d565b6000546201000090046001600160a01b039081169116146102955760405162461bcd60e51b815260206004820152601760248201527f6f6e6c792063616c6c20627920636f6e7465727061727400000000000000000060448201526064016101c7565b6000856001600160a01b03168560405160006040518083038185875af1925050503d80600081146102e2576040519150601f19603f3d011682016040523d82523d6000602084013e6102e7565b606091505b505090508061032e5760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b60448201526064016101c7565b856001600160a01b0316876001600160a01b03167f9e86c356e14e24e26e3ce769bf8b87de38e0faa0ed0ca946fa09659aa606bd2d87878760405161037593929190610a81565b60405180910390a350505050505050565b6103bf838360005b6040519080825280601f01601f1916602001820160405280156103b8576020820181803683370190505b50846104f8565b505050565b6103d0848484846104f8565b50505050565b600054610100900460ff166103f15760005460ff16156103f5565b303b155b6104585760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101c7565b600054610100900460ff1615801561047a576000805461ffff19166101011790555b6001600160a01b0383166104c65760405162461bcd60e51b81526020600482015260136024820152727a65726f20726f75746572206164647265737360681b60448201526064016101c7565b6104d18484846106e1565b80156103d0576000805461ff001916905550505050565b6104f43383600061038e565b5050565b6002600354141561054b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101c7565b6002600355346105915760405162461bcd60e51b81526020600482015260116024820152700eed2e8d0c8e4c2ee40f4cae4de40cae8d607b1b60448201526064016101c7565b60015433906001600160a01b03168114156105bf57828060200190518101906105ba9190610ae3565b935090505b6000638eaac8a360e01b828787876040516024016105e09493929190610b9c565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600254600054925163b2267a7b60e01b81529193506001600160a01b039081169263b2267a7b9234926106559262010000900416908a9087908a90600401610bd9565b6000604051808303818588803b15801561066e57600080fd5b505af1158015610682573d6000803e3d6000fd5b5050505050856001600160a01b0316826001600160a01b03167fd8ed6eaa9a7a8980d7901e911fde6686810b989d3082182d1d3a3df6306ce20e87876040516106cc929190610c11565b60405180910390a35050600160035550505050565b6001600160a01b0383166107375760405162461bcd60e51b815260206004820152601860248201527f7a65726f20636f756e746572706172742061646472657373000000000000000060448201526064016101c7565b6001600160a01b0381166107865760405162461bcd60e51b81526020600482015260166024820152757a65726f206d657373656e676572206164647265737360501b60448201526064016101c7565b6000805462010000600160b01b031916620100006001600160a01b038681169190910291909117909155600280546001600160a01b0319168383161790558216156107e757600180546001600160a01b0319166001600160a01b0384161790555b5050600160035550565b6001600160a01b038116811461080657600080fd5b50565b60008060008060006080868803121561082157600080fd5b853561082c816107f1565b9450602086013561083c816107f1565b935060408601359250606086013567ffffffffffffffff8082111561086057600080fd5b818801915088601f83011261087457600080fd5b81358181111561088357600080fd5b89602082850101111561089557600080fd5b9699959850939650602001949392505050565b6000806000606084860312156108bd57600080fd5b83356108c8816107f1565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561091c5761091c6108dd565b604052919050565b600067ffffffffffffffff82111561093e5761093e6108dd565b50601f01601f191660200190565b6000806000806080858703121561096257600080fd5b843561096d816107f1565b935060208501359250604085013567ffffffffffffffff81111561099057600080fd5b8501601f810187136109a157600080fd5b80356109b46109af82610924565b6108f3565b8181528860208385010111156109c957600080fd5b81602084016020830137600091810160200191909152949793965093946060013593505050565b600080600060608486031215610a0557600080fd5b8335610a10816107f1565b92506020840135610a20816107f1565b91506040840135610a30816107f1565b809150509250925092565b60008060408385031215610a4e57600080fd5b50508035926020909101359150565b600060208284031215610a6f57600080fd5b8151610a7a816107f1565b9392505050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60005b83811015610ad2578181015183820152602001610aba565b838111156103d05750506000910152565b60008060408385031215610af657600080fd5b8251610b01816107f1565b602084015190925067ffffffffffffffff811115610b1e57600080fd5b8301601f81018513610b2f57600080fd5b8051610b3d6109af82610924565b818152866020838501011115610b5257600080fd5b610b63826020830160208601610ab7565b8093505050509250929050565b60008151808452610b88816020860160208601610ab7565b601f01601f19169290920160200192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090610bcf90830184610b70565b9695505050505050565b60018060a01b0385168152836020820152608060408201526000610c006080830185610b70565b905082606083015295945050505050565b828152604060208201526000610c2a6040830184610b70565b94935050505056fea2646970667358221220ff7f35e15a0fcf94118a66b89ca1bd6799b61efd4b05a5cc0d18ba0e0d1b460264736f6c634300080a003383104ec6a02a6db21fd4594ecf497fe76dae2bf9a42f2125501843d779023f62472acaadcea03eeded58939848b5fd92ad52cd55f9a56be5f5c4ee151ad7c9ff29232867277a0000103af910370401830bd4408080b90fe6608060405260405162000f6638038062000f66833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000f1f833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000eff83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002601760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f3f6027913962000381565b9392505050565b60006200021a60008051602062000eff83398151915260001b6200046760201b620002081760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000eff83398151915260001b6200046760201b620002081760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200028c1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000f1f83398151915260001b6200046760201b620002081760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61086780620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106f1565b610118565b61005b61009336600461070c565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106f1565b61020b565b3480156100f557600080fd5b506100ad610235565b61010661029b565b61011661011161033a565b610344565b565b610120610368565b6001600160a01b0316336001600160a01b03161415610157576101548160405180602001604052806000815250600061039b565b50565b6101546100fe565b610167610368565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061039b915050565b505050565b6101c36100fe565b60006101da610368565b6001600160a01b0316336001600160a01b03161415610200576101fb61033a565b905090565b6102086100fe565b90565b610213610368565b6001600160a01b0316336001600160a01b0316141561015757610154816103c6565b600061023f610368565b6001600160a01b0316336001600160a01b03161415610200576101fb610368565b6060610285838360405180606001604052806027815260200161080b6027913961041a565b9392505050565b6001600160a01b03163b151590565b6102a3610368565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb6104f7565b3660008037600080366000845af43d6000803e808015610363573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103a48361051f565b6000825111806103b15750805b156101c3576103c08383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103ef610368565b604080516001600160a01b03928316815291841660208301520160405180910390a16101548161055f565b60606001600160a01b0384163b6104825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610331565b600080856001600160a01b03168560405161049d91906107bb565b600060405180830381855af49150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b50915091506104ed828286610608565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61038c565b61052881610641565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105c45760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610331565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60608315610617575081610285565b8251156106275782518084602001fd5b8160405162461bcd60e51b815260040161033191906107d7565b6001600160a01b0381163b6106ae5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610331565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105e7565b80356001600160a01b03811681146106ec57600080fd5b919050565b60006020828403121561070357600080fd5b610285826106d5565b60008060006040848603121561072157600080fd5b61072a846106d5565b9250602084013567ffffffffffffffff8082111561074757600080fd5b818601915086601f83011261075b57600080fd5b81358181111561076a57600080fd5b87602082850101111561077c57600080fd5b6020830194508093505050509250925092565b60005b838110156107aa578181015183820152602001610792565b838111156103c05750506000910152565b600082516107cd81846020870161078f565b9190910192915050565b60208152600082518060208401526107f681604085016020870161078f565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220366737524a7ac8fa76e3b2cd04bb1e0b8aa75e165c32f59b0076ead59d529de564736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000d9b95e24533d89a18fcf2ee875e762a6797bccfd000000000000000000000000cf16a0bebb13045c91127cdf7325d6d0d1ca6e750000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000083104ec6a061577e4a717194fd60f62ab0bd06a8cf9aa3b6a5feb4804e9a585cb9df5bd047a061e2e5c9aad701d27bb13b8fd0437de6968f38e0f932b580b710304a89b0d10100001543f9154005018316be5d8080b914ef60c060405234801561001057600080fd5b506040516114af3803806114af83398101604081905261002f91610062565b6001600160a01b0391821660a05216608052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516113c56100ea6000396000818160bb01528181610220015281816102b401528181610518015261080c01526000818161017a01528181610254015281816104a3015261092201526113c56000f3fe6080604052600436106100ab5760003560e01c8063a93a4af911610064578063a93a4af9146101fb578063ad5c46481461020e578063b32d8c6514610242578063c0c53b8b14610276578063c676ad2914610296578063f887ea40146102d657600080fd5b80633cb747bf1461012057806354bbd59c1461015c578063575361b61461019c5780636c07ea43146101af578063797594b0146101c25780638431f5c1146101e857600080fd5b3661011b57336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101195760405162461bcd60e51b81526020600482015260096024820152680dedcd8f240ae8aa8960bb1b60448201526064015b60405180910390fd5b005b600080fd5b34801561012c57600080fd5b50600254610140906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b34801561016857600080fd5b50610140610177366004610e8c565b507f000000000000000000000000000000000000000000000000000000000000000090565b6101196101aa366004610ef2565b6102f6565b6101196101bd366004610f6d565b610342565b3480156101ce57600080fd5b50600054610140906201000090046001600160a01b031681565b6101196101f6366004610fa2565b610381565b61011961020936600461103a565b61069e565b34801561021a57600080fd5b506101407f000000000000000000000000000000000000000000000000000000000000000081565b34801561024e57600080fd5b506101407f000000000000000000000000000000000000000000000000000000000000000081565b34801561028257600080fd5b50610119610291366004611080565b6106b1565b3480156102a257600080fd5b506101406102b1366004610e8c565b507f000000000000000000000000000000000000000000000000000000000000000090565b3480156102e257600080fd5b50600154610140906001600160a01b031681565b61033a86868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892506107c3915050565b505050505050565b61037c83338460005b6040519080825280601f01601f191660200182016040528015610375576020820181803683370190505b50856107c3565b505050565b6002546001600160a01b03163381146103dc5760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206d657373656e6765722063616e2063616c6c0000000000000000006044820152606401610110565b806001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561041a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043e91906110e1565b6000546201000090046001600160a01b039081169116146104a15760405162461bcd60e51b815260206004820152601760248201527f6f6e6c792063616c6c20627920636f6e746572706172740000000000000000006044820152606401610110565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316886001600160a01b0316146105165760405162461bcd60e51b81526020600482015260116024820152700d86240e8ded6cadc40dcdee840ae8aa89607b1b6044820152606401610110565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b03161461058b5760405162461bcd60e51b81526020600482015260116024820152700d86440e8ded6cadc40dcdee840ae8aa89607b1b6044820152606401610110565b3484146105cf5760405162461bcd60e51b81526020600482015260126024820152710dae6ce5cecc2d8eaca40dad2e6dac2e8c6d60731b6044820152606401610110565b866001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561060a57600080fd5b505af115801561061e573d6000803e3d6000fd5b50610639935050506001600160a01b03891690508686610a74565b856001600160a01b0316876001600160a01b0316896001600160a01b03167f165ba69f6ab40c50cade6f65431801e5f9c7d7830b7545391920db039133ba348888888860405161068c94939291906110fe565b60405180910390a45050505050505050565b6106ab848484600061034b565b50505050565b600054610100900460ff166106cc5760005460ff16156106d0565b303b155b6107335760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610110565b600054610100900460ff16158015610755576000805461ffff19166101011790555b6001600160a01b0383166107a15760405162461bcd60e51b81526020600482015260136024820152727a65726f20726f75746572206164647265737360681b6044820152606401610110565b6107ac848484610ad7565b80156106ab576000805461ff001916905550505050565b6000831161080a5760405162461bcd60e51b81526020600482015260146024820152731dda5d1a191c985dc81e995c9bc8185b5bdd5b9d60621b6044820152606401610110565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b0316146108825760405162461bcd60e51b81526020600482015260146024820152731bdb9b1e4815d15512081a5cc8185b1b1bddd95960621b6044820152606401610110565b60015433906001600160a01b03168114156108b057828060200190518101906108ab9190611172565b935090505b6108c56001600160a01b038716823087610be7565b604051632e1a7d4d60e01b8152600481018590526001600160a01b03871690632e1a7d4d90602401600060405180830381600087803b15801561090757600080fd5b505af115801561091b573d6000803e3d6000fd5b50506040517f000000000000000000000000000000000000000000000000000000000000000092506000915063084bd13b60e41b906109689084908b9087908c908c908c90602401611261565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526002549091506001600160a01b031663b2267a7b6109b834896112b0565b60005460405160e084901b6001600160e01b03191681526109f1916201000090046001600160a01b0316908b9087908b906004016112d6565b6000604051808303818588803b158015610a0a57600080fd5b505af1158015610a1e573d6000803e3d6000fd5b5050505050826001600160a01b0316886001600160a01b0316836001600160a01b03167fd8d3a3f4ab95694bef40475997598bcf8acd3ed9617a4c1013795429414c27e88a8a8a60405161068c9392919061130e565b6040516001600160a01b03831660248201526044810182905261037c90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610c1f565b6001600160a01b038316610b2d5760405162461bcd60e51b815260206004820152601860248201527f7a65726f20636f756e74657270617274206164647265737300000000000000006044820152606401610110565b6001600160a01b038116610b7c5760405162461bcd60e51b81526020600482015260166024820152757a65726f206d657373656e676572206164647265737360501b6044820152606401610110565b6000805462010000600160b01b031916620100006001600160a01b038681169190910291909117909155600280546001600160a01b031916838316179055821615610bdd57600180546001600160a01b0319166001600160a01b0384161790555b5050600160035550565b6040516001600160a01b03808516602483015283166044820152606481018290526106ab9085906323b872dd60e01b90608401610aa0565b6000610c74826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610cf19092919063ffffffff16565b80519091501561037c5780806020019051810190610c92919061133e565b61037c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610110565b6060610d008484600085610d0a565b90505b9392505050565b606082471015610d6b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610110565b6001600160a01b0385163b610dc25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610110565b600080866001600160a01b03168587604051610dde9190611360565b60006040518083038185875af1925050503d8060008114610e1b576040519150601f19603f3d011682016040523d82523d6000602084013e610e20565b606091505b5091509150610e30828286610e3b565b979650505050505050565b60608315610e4a575081610d03565b825115610e5a5782518084602001fd5b8160405162461bcd60e51b8152600401610110919061137c565b6001600160a01b0381168114610e8957600080fd5b50565b600060208284031215610e9e57600080fd5b8135610d0381610e74565b60008083601f840112610ebb57600080fd5b50813567ffffffffffffffff811115610ed357600080fd5b602083019150836020828501011115610eeb57600080fd5b9250929050565b60008060008060008060a08789031215610f0b57600080fd5b8635610f1681610e74565b95506020870135610f2681610e74565b945060408701359350606087013567ffffffffffffffff811115610f4957600080fd5b610f5589828a01610ea9565b979a9699509497949695608090950135949350505050565b600080600060608486031215610f8257600080fd5b8335610f8d81610e74565b95602085013595506040909401359392505050565b600080600080600080600060c0888a031215610fbd57600080fd5b8735610fc881610e74565b96506020880135610fd881610e74565b95506040880135610fe881610e74565b94506060880135610ff881610e74565b93506080880135925060a088013567ffffffffffffffff81111561101b57600080fd5b6110278a828b01610ea9565b989b979a50959850939692959293505050565b6000806000806080858703121561105057600080fd5b843561105b81610e74565b9350602085013561106b81610e74565b93969395505050506040820135916060013590565b60008060006060848603121561109557600080fd5b83356110a081610e74565b925060208401356110b081610e74565b915060408401356110c081610e74565b809150509250925092565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156110f357600080fd5b8151610d0381610e74565b6001600160a01b0385168152602081018490526060604082018190528101829052818360808301376000818301608090810191909152601f909201601f191601019392505050565b60005b83811015611161578181015183820152602001611149565b838111156106ab5750506000910152565b6000806040838503121561118557600080fd5b825161119081610e74565b602084015190925067ffffffffffffffff808211156111ae57600080fd5b818501915085601f8301126111c257600080fd5b8151818111156111d4576111d46110cb565b604051601f8201601f19908116603f011681019083821181831017156111fc576111fc6110cb565b8160405282815288602084870101111561121557600080fd5b611226836020830160208801611146565b80955050505050509250929050565b6000815180845261124d816020860160208601611146565b601f01601f19169290920160200192915050565b6001600160a01b03878116825286811660208301528581166040830152841660608201526080810183905260c060a082018190526000906112a490830184611235565b98975050505050505050565b600082198211156112d157634e487b7160e01b600052601160045260246000fd5b500190565b60018060a01b03851681528360208201526080604082015260006112fd6080830185611235565b905082606083015295945050505050565b60018060a01b03841681528260208201526060604082015260006113356060830184611235565b95945050505050565b60006020828403121561135057600080fd5b81518015158114610d0357600080fd5b60008251611372818460208701611146565b9190910192915050565b602081526000610d03602083018461123556fea2646970667358221220105a40adda4e2447b99b728533ee1e8b50e1f0c377e18d67a099ecef07a0b44264736f6c634300080a00330000000000000000000000005300000000000000000000000000000000000004000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d683104ec5a07ab0a77c4b638d45f2ed4fd895293f779d9c4f6cab1bd8cca395983b9818bb18a06b414a31213185f68a49a1867194761597e61cb502f4f3275514c88ca62360ca0000103af910370601830bd4408080b90fe6608060405260405162000f6638038062000f66833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000f1f833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000eff83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002601760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f3f6027913962000381565b9392505050565b60006200021a60008051602062000eff83398151915260001b6200046760201b620002081760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000eff83398151915260001b6200046760201b620002081760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200028c1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000f1f83398151915260001b6200046760201b620002081760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61086780620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106f1565b610118565b61005b61009336600461070c565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106f1565b61020b565b3480156100f557600080fd5b506100ad610235565b61010661029b565b61011661011161033a565b610344565b565b610120610368565b6001600160a01b0316336001600160a01b03161415610157576101548160405180602001604052806000815250600061039b565b50565b6101546100fe565b610167610368565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061039b915050565b505050565b6101c36100fe565b60006101da610368565b6001600160a01b0316336001600160a01b03161415610200576101fb61033a565b905090565b6102086100fe565b90565b610213610368565b6001600160a01b0316336001600160a01b0316141561015757610154816103c6565b600061023f610368565b6001600160a01b0316336001600160a01b03161415610200576101fb610368565b6060610285838360405180606001604052806027815260200161080b6027913961041a565b9392505050565b6001600160a01b03163b151590565b6102a3610368565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb6104f7565b3660008037600080366000845af43d6000803e808015610363573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103a48361051f565b6000825111806103b15750805b156101c3576103c08383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103ef610368565b604080516001600160a01b03928316815291841660208301520160405180910390a16101548161055f565b60606001600160a01b0384163b6104825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610331565b600080856001600160a01b03168560405161049d91906107bb565b600060405180830381855af49150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b50915091506104ed828286610608565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61038c565b61052881610641565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105c45760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610331565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60608315610617575081610285565b8251156106275782518084602001fd5b8160405162461bcd60e51b815260040161033191906107d7565b6001600160a01b0381163b6106ae5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610331565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105e7565b80356001600160a01b03811681146106ec57600080fd5b919050565b60006020828403121561070357600080fd5b610285826106d5565b60008060006040848603121561072157600080fd5b61072a846106d5565b9250602084013567ffffffffffffffff8082111561074757600080fd5b818601915086601f83011261075b57600080fd5b81358181111561076a57600080fd5b87602082850101111561077c57600080fd5b6020830194508093505050509250925092565b60005b838110156107aa578181015183820152602001610792565b838111156103c05750506000910152565b600082516107cd81846020870161078f565b9190910192915050565b60208152600082518060208401526107f681604085016020870161078f565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220366737524a7ac8fa76e3b2cd04bb1e0b8aa75e165c32f59b0076ead59d529de564736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c656400000000000000000000000065907adabf1cabd299629c4cacc49d35e9b2bfda000000000000000000000000cf16a0bebb13045c91127cdf7325d6d0d1ca6e750000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000083104ec6a057af99450c7cd7ac36b2d9b51c456ebe2e06c1dc07eb95dd11386b6a3e116f77a03865254fcd68985873d6d7e2cbd961ace7d120b8f99720b1aec5c21abe24139b000013bef913bb0701831631af8080b9136a608060405234801561001057600080fd5b5061134a806100206000396000f3fe60806040526004361061009c5760003560e01c80638431f5c1116100645780638431f5c114610164578063a93a4af914610177578063c676ad291461018a578063e77772fe146101aa578063f887ea40146101ca578063f8c8765e146101ea57600080fd5b80633cb747bf146100a157806354bbd59c146100dd578063575361b6146101165780636c07ea431461012b578063797594b01461013e575b600080fd5b3480156100ad57600080fd5b506002546100c1906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b3480156100e957600080fd5b506100c16100f8366004610cef565b6001600160a01b039081166000908152600460205260409020541690565b610129610124366004610d5c565b61020a565b005b610129610139366004610dd7565b610256565b34801561014a57600080fd5b506000546100c1906201000090046001600160a01b031681565b610129610172366004610e0c565b610295565b610129610185366004610ea4565b61064a565b34801561019657600080fd5b506100c16101a5366004610cef565b61065d565b3480156101b657600080fd5b506005546100c1906001600160a01b031681565b3480156101d657600080fd5b506001546100c1906001600160a01b031681565b3480156101f657600080fd5b50610129610205366004610eea565b6106d8565b61024e86868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250889250610852915050565b505050505050565b61029083338460005b6040519080825280601f01601f191660200182016040528015610289576020820181803683370190505b5085610852565b505050565b6002546001600160a01b03163381146102f55760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206d657373656e6765722063616e2063616c6c00000000000000000060448201526064015b60405180910390fd5b806001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610333573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103579190610f5c565b6000546201000090046001600160a01b039081169116146103ba5760405162461bcd60e51b815260206004820152601760248201527f6f6e6c792063616c6c20627920636f6e7465727061727400000000000000000060448201526064016102ec565b34156103fc5760405162461bcd60e51b81526020600482015260116024820152706e6f6e7a65726f206d73672e76616c756560781b60448201526064016102ec565b6005546040516361e98ca160e01b81523060048201526001600160a01b038a8116602483015260009216906361e98ca190604401602060405180830381865afa15801561044d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104719190610f5c565b9050806001600160a01b0316886001600160a01b0316146104c85760405162461bcd60e51b81526020600482015260116024820152700d86440e8ded6cadc40dad2e6dac2e8c6d607b1b60448201526064016102ec565b506001600160a01b03878116600090815260046020526040902054606091829116610530576001600160a01b03898116600090815260046020526040902080546001600160a01b031916918c1691909117905561052785850186611028565b9250905061056a565b84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050505b6001600160a01b0389163b61058357610583828b610ac1565b6040516340c10f1960e01b81526001600160a01b038881166004830152602482018890528a16906340c10f1990604401600060405180830381600087803b1580156105cd57600080fd5b505af11580156105e1573d6000803e3d6000fd5b50505050876001600160a01b0316896001600160a01b03168b6001600160a01b03167f165ba69f6ab40c50cade6f65431801e5f9c7d7830b7545391920db039133ba348a8a86604051610636939291906110e4565b60405180910390a450505050505050505050565b610657848484600061025f565b50505050565b6005546040516361e98ca160e01b81523060048201526001600160a01b03838116602483015260009216906361e98ca190604401602060405180830381865afa1580156106ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d29190610f5c565b92915050565b600054610100900460ff166106f35760005460ff16156106f7565b303b155b61075a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ec565b600054610100900460ff1615801561077c576000805461ffff19166101011790555b6001600160a01b0384166107c85760405162461bcd60e51b81526020600482015260136024820152727a65726f20726f75746572206164647265737360681b60448201526064016102ec565b6107d3858585610bc7565b6001600160a01b03821661081e5760405162461bcd60e51b81526020600482015260126024820152717a65726f20746f6b656e20666163746f727960701b60448201526064016102ec565b600580546001600160a01b0319166001600160a01b038416179055801561084b576000805461ff00191690555b5050505050565b600083116108995760405162461bcd60e51b81526020600482015260146024820152731dda5d1a191c985dc81e995c9bc8185b5bdd5b9d60621b60448201526064016102ec565b60015433906001600160a01b03168114156108c757828060200190518101906108c29190611144565b935090505b6001600160a01b03808716600090815260046020526040902054168061092f5760405162461bcd60e51b815260206004820152601960248201527f6e6f20636f72726573706f6e64696e67206c3120746f6b656e0000000000000060448201526064016102ec565b604051632770a7eb60e21b81526001600160a01b03838116600483015260248201879052881690639dc29fac90604401600060405180830381600087803b15801561097957600080fd5b505af115801561098d573d6000803e3d6000fd5b5050505060006384bd13b060e01b8289858a8a8a6040516024016109b69695949392919061119f565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925260025460008054935163b2267a7b60e01b81529294506001600160a01b039182169363b2267a7b933493610a2c936201000090930416919087908b906004016111ee565b6000604051808303818588803b158015610a4557600080fd5b505af1158015610a59573d6000803e3d6000fd5b5050505050826001600160a01b0316886001600160a01b0316836001600160a01b03167fd8d3a3f4ab95694bef40475997598bcf8acd3ed9617a4c1013795429414c27e88a8a8a604051610aaf939291906110e4565b60405180910390a45050505050505050565b600554604051637bdbcbbf60e01b81523060048201526001600160a01b0383811660248301526000921690637bdbcbbf906044016020604051808303816000875af1158015610b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b389190610f5c565b9050600080600085806020019051810190610b539190611246565b925092509250836001600160a01b031663c820f146838584308a6040518663ffffffff1660e01b8152600401610b8d9594939291906112c4565b600060405180830381600087803b158015610ba757600080fd5b505af1158015610bbb573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b038316610c1d5760405162461bcd60e51b815260206004820152601860248201527f7a65726f20636f756e746572706172742061646472657373000000000000000060448201526064016102ec565b6001600160a01b038116610c6c5760405162461bcd60e51b81526020600482015260166024820152757a65726f206d657373656e676572206164647265737360501b60448201526064016102ec565b6000805462010000600160b01b031916620100006001600160a01b038681169190910291909117909155600280546001600160a01b031916838316179055821615610ccd57600180546001600160a01b0319166001600160a01b0384161790555b5050600160035550565b6001600160a01b0381168114610cec57600080fd5b50565b600060208284031215610d0157600080fd5b8135610d0c81610cd7565b9392505050565b60008083601f840112610d2557600080fd5b50813567ffffffffffffffff811115610d3d57600080fd5b602083019150836020828501011115610d5557600080fd5b9250929050565b60008060008060008060a08789031215610d7557600080fd5b8635610d8081610cd7565b95506020870135610d9081610cd7565b945060408701359350606087013567ffffffffffffffff811115610db357600080fd5b610dbf89828a01610d13565b979a9699509497949695608090950135949350505050565b600080600060608486031215610dec57600080fd5b8335610df781610cd7565b95602085013595506040909401359392505050565b600080600080600080600060c0888a031215610e2757600080fd5b8735610e3281610cd7565b96506020880135610e4281610cd7565b95506040880135610e5281610cd7565b94506060880135610e6281610cd7565b93506080880135925060a088013567ffffffffffffffff811115610e8557600080fd5b610e918a828b01610d13565b989b979a50959850939692959293505050565b60008060008060808587031215610eba57600080fd5b8435610ec581610cd7565b93506020850135610ed581610cd7565b93969395505050506040820135916060013590565b60008060008060808587031215610f0057600080fd5b8435610f0b81610cd7565b93506020850135610f1b81610cd7565b92506040850135610f2b81610cd7565b91506060850135610f3b81610cd7565b939692955090935050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610f6e57600080fd5b8151610d0c81610cd7565b604051601f8201601f1916810167ffffffffffffffff81118282101715610fa257610fa2610f46565b604052919050565b600067ffffffffffffffff821115610fc457610fc4610f46565b50601f01601f191660200190565b600082601f830112610fe357600080fd5b8135610ff6610ff182610faa565b610f79565b81815284602083860101111561100b57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561103b57600080fd5b823567ffffffffffffffff8082111561105357600080fd5b61105f86838701610fd2565b9350602085013591508082111561107557600080fd5b5061108285828601610fd2565b9150509250929050565b60005b838110156110a757818101518382015260200161108f565b838111156106575750506000910152565b600081518084526110d081602086016020860161108c565b601f01601f19169290920160200192915050565b60018060a01b038416815282602082015260606040820152600061110b60608301846110b8565b95945050505050565b6000611122610ff184610faa565b905082815283838301111561113657600080fd5b610d0c83602083018461108c565b6000806040838503121561115757600080fd5b825161116281610cd7565b602084015190925067ffffffffffffffff81111561117f57600080fd5b8301601f8101851361119057600080fd5b61108285825160208401611114565b6001600160a01b03878116825286811660208301528581166040830152841660608201526080810183905260c060a082018190526000906111e2908301846110b8565b98975050505050505050565b60018060a01b038516815283602082015260806040820152600061121560808301856110b8565b905082606083015295945050505050565b600082601f83011261123757600080fd5b610d0c83835160208501611114565b60008060006060848603121561125b57600080fd5b835167ffffffffffffffff8082111561127357600080fd5b61127f87838801611226565b9450602086015191508082111561129557600080fd5b506112a286828701611226565b925050604084015160ff811681146112b957600080fd5b809150509250925092565b60a0815260006112d760a08301886110b8565b82810360208401526112e981886110b8565b60ff96909616604084015250506001600160a01b03928316606082015291166080909101529291505056fea2646970667358221220427b9a9b5120c3c05d0eb7f2958eb539b0c4c9f5ea6ed6fddf859a9bee223d6f64736f6c634300080a003383104ec5a0b81b72ef3c165129d1d0373f99127beac5763a4e66d7ab699eb8b887d4e3cf02a075bfddec122eaa8b99d7ec255045e9c94c9709e68761f9bcfd5f93d48503b2760000000000000000000000000000000000000000000000000000000000000000000000000000e027180fe7df79de88f2f90ea850e2b9240bdd33857de21552556b4a84b4025ac32d9ce8e5269e364dcc4cff641032e7f79945f20826385a083976ef93af5eadd600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002efd7b7a8d410dadcd0487bbf2739012f8ffb3f974580559935ce38540954ad6100000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000001e3b568958b1eaa4e93f68204e8669e79933afdd9e5665ff6c99d9543ecf95b8f67758c6eae01e299f3a8daebd916cb128532b150bed3ce36d0d6dedf4baaaa4300000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000063f8722a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009fd90000103af910370801830bd4408080b90fe6608060405260405162000f6638038062000f66833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000f1f833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000eff83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002601760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f3f6027913962000381565b9392505050565b60006200021a60008051602062000eff83398151915260001b6200046760201b620002081760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000eff83398151915260001b6200046760201b620002081760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200028c1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000f1f83398151915260001b6200046760201b620002081760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61086780620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106f1565b610118565b61005b61009336600461070c565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106f1565b61020b565b3480156100f557600080fd5b506100ad610235565b61010661029b565b61011661011161033a565b610344565b565b610120610368565b6001600160a01b0316336001600160a01b03161415610157576101548160405180602001604052806000815250600061039b565b50565b6101546100fe565b610167610368565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061039b915050565b505050565b6101c36100fe565b60006101da610368565b6001600160a01b0316336001600160a01b03161415610200576101fb61033a565b905090565b6102086100fe565b90565b610213610368565b6001600160a01b0316336001600160a01b0316141561015757610154816103c6565b600061023f610368565b6001600160a01b0316336001600160a01b03161415610200576101fb610368565b6060610285838360405180606001604052806027815260200161080b6027913961041a565b9392505050565b6001600160a01b03163b151590565b6102a3610368565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb6104f7565b3660008037600080366000845af43d6000803e808015610363573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103a48361051f565b6000825111806103b15750805b156101c3576103c08383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103ef610368565b604080516001600160a01b03928316815291841660208301520160405180910390a16101548161055f565b60606001600160a01b0384163b6104825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610331565b600080856001600160a01b03168560405161049d91906107bb565b600060405180830381855af49150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b50915091506104ed828286610608565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61038c565b61052881610641565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105c45760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610331565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60608315610617575081610285565b8251156106275782518084602001fd5b8160405162461bcd60e51b815260040161033191906107d7565b6001600160a01b0381163b6106ae5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610331565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105e7565b80356001600160a01b03811681146106ec57600080fd5b919050565b60006020828403121561070357600080fd5b610285826106d5565b60008060006040848603121561072157600080fd5b61072a846106d5565b9250602084013567ffffffffffffffff8082111561074757600080fd5b818601915086601f83011261075b57600080fd5b81358181111561076a57600080fd5b87602082850101111561077c57600080fd5b6020830194508093505050509250925092565b60005b838110156107aa578181015183820152602001610792565b838111156103c05750506000910152565b600082516107cd81846020870161078f565b9190910192915050565b60208152600082518060208401526107f681604085016020870161078f565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220366737524a7ac8fa76e3b2cd04bb1e0b8aa75e165c32f59b0076ead59d529de564736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000e369674c74364f5df17d089b6458b196411a4499000000000000000000000000cf16a0bebb13045c91127cdf7325d6d0d1ca6e750000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000083104ec5a0588148cb4703c97f5af47f1a6ba0e8261bf285c24fb92e9c261ddc7b8178e0e3a0099da5c5ec27434719946405226902f144b156a5f95544d3c88fe80fd71c5dce000013bbf913b80901831631718080b91367608060405234801561001057600080fd5b50611347806100206000396000f3fe60806040526004361061012a5760003560e01c80636dc24183116100ab5780638da5cb5b1161006f5780638da5cb5b146102e5578063a93a4af914610303578063c676ad2914610316578063c7cdea3714610336578063ce8c3e0614610349578063f2fde38b1461036957600080fd5b80636dc2418314610259578063705b05b81461026c578063715018a6146102a25780638431f5c1146102b75780638c00ce73146102c557600080fd5b806354bbd59c116100f257806354bbd59c146101d3578063575361b6146101f35780635dfd5b9a14610206578063635c8637146102265780636c07ea431461024657600080fd5b8063232e87481461012f5780632fcc29fa146101445780633d1d31c71461015757806343c6674114610177578063485cc955146101b3575b600080fd5b61014261013d366004610cc8565b610389565b005b610142610152366004610d3b565b6103cf565b34801561016357600080fd5b50610142610172366004610d70565b61040d565b34801561018357600080fd5b50610197610192366004610d70565b610481565b6040516001600160a01b03909116815260200160405180910390f35b3480156101bf57600080fd5b506101426101ce366004610d8d565b6104b7565b3480156101df57600080fd5b506101976101ee366004610d70565b6105fb565b610142610201366004610e7d565b610691565b34801561021257600080fd5b50610142610221366004610d70565b610781565b34801561023257600080fd5b50610142610241366004610f7a565b6107f5565b610142610254366004610d3b565b61096e565b610142610267366004610fde565b6109a8565b34801561027857600080fd5b50610197610287366004610d70565b6067602052600090815260409020546001600160a01b031681565b3480156102ae57600080fd5b50610142610a8c565b61014261013d36600461103f565b3480156102d157600080fd5b50606554610197906001600160a01b031681565b3480156102f157600080fd5b506033546001600160a01b0316610197565b6101426103113660046110d7565b610ac2565b34801561032257600080fd5b50610197610331366004610d70565b610ad5565b61014261034436600461111d565b610b0e565b34801561035557600080fd5b50606654610197906001600160a01b031681565b34801561037557600080fd5b50610142610384366004610d70565b610b1e565b60405162461bcd60e51b81526020600482015260166024820152751cda1bdd5b19081b995d995c8818994818d85b1b195960521b60448201526064015b60405180910390fd5b610408838360005b6040519080825280601f01601f191660200182016040528015610401576020820181803683370190505b50846109a8565b505050565b6033546001600160a01b031633146104375760405162461bcd60e51b81526004016103c69061113f565b606580546001600160a01b0319166001600160a01b0383169081179091556040517fadf5b643c52781d8c742887e4a7a282a5bf2beb794ae3582fdf97e05df00301890600090a250565b6001600160a01b03808216600090815260676020526040812054909116806104b157506066546001600160a01b03165b92915050565b600054610100900460ff166104d25760005460ff16156104d6565b303b155b6105395760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103c6565b600054610100900460ff1615801561055b576000805461ffff19166101011790555b610563610bb9565b6001600160a01b0382161561058e57606680546001600160a01b0319166001600160a01b0384161790555b6001600160a01b038316156105e557606580546001600160a01b0319166001600160a01b0385169081179091556040517fadf5b643c52781d8c742887e4a7a282a5bf2beb794ae3582fdf97e05df00301890600090a25b8015610408576000805461ff0019169055505050565b60008061060783610481565b90506001600160a01b0381166106205750600092915050565b60405163152ef56760e21b81526001600160a01b0384811660048301528216906354bbd59c90602401602060405180830381865afa158015610666573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068a9190611174565b9392505050565b600061069c86610481565b90506001600160a01b0381166106eb5760405162461bcd60e51b81526020600482015260146024820152736e6f206761746577617920617661696c61626c6560601b60448201526064016103c6565b600033846040516020016107009291906111de565b60408051601f1981840301815290829052632ba9b0db60e11b825291506001600160a01b0383169063575361b6903490610746908b908b908b9088908b9060040161120a565b6000604051808303818588803b15801561075f57600080fd5b505af1158015610773573d6000803e3d6000fd5b505050505050505050505050565b6033546001600160a01b031633146107ab5760405162461bcd60e51b81526004016103c69061113f565b606680546001600160a01b0319166001600160a01b0383169081179091556040517f08338857eef8e29b906267c37965aff1fdcdb2c18d0f7b52de3b2eb71474d35c90600090a250565b6033546001600160a01b0316331461081f5760405162461bcd60e51b81526004016103c69061113f565b80518251146108625760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b60448201526064016103c6565b60005b8251811015610408578181815181106108805761088061124f565b60200260200101516067600085848151811061089e5761089e61124f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055508181815181106108fc576108fc61124f565b60200260200101516001600160a01b031683828151811061091f5761091f61124f565b60200260200101516001600160a01b03167f5b0c89ecf574aa07194121c4f4dd1cfbaaf37d303c22522c9498a0aaf678668d60405160405180910390a38061096681611265565b915050610865565b61040883338460005b6040519080825280601f01601f1916602001820160405280156109a1576020820181803683370190505b5085610691565b6065546001600160a01b0316806109f95760405162461bcd60e51b8152602060048201526015602482015274657468206761746577617920617661696c61626c6560581b60448201526064016103c6565b60003384604051602001610a0e9291906111de565b60408051601f1981840301815290829052636dc2418360e01b825291506001600160a01b03831690636dc24183903490610a52908a908a9087908a9060040161128e565b6000604051808303818588803b158015610a6b57600080fd5b505af1158015610a7f573d6000803e3d6000fd5b5050505050505050505050565b6033546001600160a01b03163314610ab65760405162461bcd60e51b81526004016103c69061113f565b610ac06000610be8565b565b610acf8484846000610977565b50505050565b60405162461bcd60e51b815260206004820152600b60248201526a1d5b9cdd5c1c1bdc9d195960aa1b60448201526000906064016103c6565b610b1a338360006103d7565b5050565b6033546001600160a01b03163314610b485760405162461bcd60e51b81526004016103c69061113f565b6001600160a01b038116610bad5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c6565b610bb681610be8565b50565b600054610100900460ff16610be05760405162461bcd60e51b81526004016103c6906112c6565b610ac0610c3a565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610c615760405162461bcd60e51b81526004016103c6906112c6565b610ac033610be8565b6001600160a01b0381168114610bb657600080fd5b60008083601f840112610c9157600080fd5b50813567ffffffffffffffff811115610ca957600080fd5b602083019150836020828501011115610cc157600080fd5b9250929050565b600080600080600060808688031215610ce057600080fd5b8535610ceb81610c6a565b94506020860135610cfb81610c6a565b935060408601359250606086013567ffffffffffffffff811115610d1e57600080fd5b610d2a88828901610c7f565b969995985093965092949392505050565b600080600060608486031215610d5057600080fd5b8335610d5b81610c6a565b95602085013595506040909401359392505050565b600060208284031215610d8257600080fd5b813561068a81610c6a565b60008060408385031215610da057600080fd5b8235610dab81610c6a565b91506020830135610dbb81610c6a565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610e0557610e05610dc6565b604052919050565b600082601f830112610e1e57600080fd5b813567ffffffffffffffff811115610e3857610e38610dc6565b610e4b601f8201601f1916602001610ddc565b818152846020838601011115610e6057600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215610e9557600080fd5b8535610ea081610c6a565b94506020860135610eb081610c6a565b935060408601359250606086013567ffffffffffffffff811115610ed357600080fd5b610edf88828901610e0d565b95989497509295608001359392505050565b600082601f830112610f0257600080fd5b8135602067ffffffffffffffff821115610f1e57610f1e610dc6565b8160051b610f2d828201610ddc565b9283528481018201928281019087851115610f4757600080fd5b83870192505b84831015610f6f578235610f6081610c6a565b82529183019190830190610f4d565b979650505050505050565b60008060408385031215610f8d57600080fd5b823567ffffffffffffffff80821115610fa557600080fd5b610fb186838701610ef1565b93506020850135915080821115610fc757600080fd5b50610fd485828601610ef1565b9150509250929050565b60008060008060808587031215610ff457600080fd5b8435610fff81610c6a565b935060208501359250604085013567ffffffffffffffff81111561102257600080fd5b61102e87828801610e0d565b949793965093946060013593505050565b600080600080600080600060c0888a03121561105a57600080fd5b873561106581610c6a565b9650602088013561107581610c6a565b9550604088013561108581610c6a565b9450606088013561109581610c6a565b93506080880135925060a088013567ffffffffffffffff8111156110b857600080fd5b6110c48a828b01610c7f565b989b979a50959850939692959293505050565b600080600080608085870312156110ed57600080fd5b84356110f881610c6a565b9350602085013561110881610c6a565b93969395505050506040820135916060013590565b6000806040838503121561113057600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561118657600080fd5b815161068a81610c6a565b6000815180845260005b818110156111b75760208185018101518683018201520161119b565b818111156111c9576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061120290830184611191565b949350505050565b6001600160a01b038681168252851660208201526040810184905260a06060820181905260009061123d90830185611191565b90508260808301529695505050505050565b634e487b7160e01b600052603260045260246000fd5b600060001982141561128757634e487b7160e01b600052601160045260246000fd5b5060010190565b60018060a01b03851681528360208201526080604082015260006112b56080830185611191565b905082606083015295945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212203347acf5da800d41c761438be0419fb6efef247b69734396f07c8748b797f08664736f6c634300080a003383104ec5a0647b9699fe9b89985608634a276f6436a8a28a4dda21180675443e6ad58ed5faa05ec6d2f37c23a22a28a5b8f26fa6d5c6409db3adb62eaf66680eb146233970a80000103af910370a01830bd4408080b90fe6608060405260405162000f6638038062000f66833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000f1f833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000eff83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002601760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f3f6027913962000381565b9392505050565b60006200021a60008051602062000eff83398151915260001b6200046760201b620002081760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000eff83398151915260001b6200046760201b620002081760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200028c1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000f1f83398151915260001b6200046760201b620002081760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61086780620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106f1565b610118565b61005b61009336600461070c565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106f1565b61020b565b3480156100f557600080fd5b506100ad610235565b61010661029b565b61011661011161033a565b610344565b565b610120610368565b6001600160a01b0316336001600160a01b03161415610157576101548160405180602001604052806000815250600061039b565b50565b6101546100fe565b610167610368565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061039b915050565b505050565b6101c36100fe565b60006101da610368565b6001600160a01b0316336001600160a01b03161415610200576101fb61033a565b905090565b6102086100fe565b90565b610213610368565b6001600160a01b0316336001600160a01b0316141561015757610154816103c6565b600061023f610368565b6001600160a01b0316336001600160a01b03161415610200576101fb610368565b6060610285838360405180606001604052806027815260200161080b6027913961041a565b9392505050565b6001600160a01b03163b151590565b6102a3610368565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb6104f7565b3660008037600080366000845af43d6000803e808015610363573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103a48361051f565b6000825111806103b15750805b156101c3576103c08383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103ef610368565b604080516001600160a01b03928316815291841660208301520160405180910390a16101548161055f565b60606001600160a01b0384163b6104825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610331565b600080856001600160a01b03168560405161049d91906107bb565b600060405180830381855af49150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b50915091506104ed828286610608565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61038c565b61052881610641565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105c45760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610331565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60608315610617575081610285565b8251156106275782518084602001fd5b8160405162461bcd60e51b815260040161033191906107d7565b6001600160a01b0381163b6106ae5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610331565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105e7565b80356001600160a01b03811681146106ec57600080fd5b919050565b60006020828403121561070357600080fd5b610285826106d5565b60008060006040848603121561072157600080fd5b61072a846106d5565b9250602084013567ffffffffffffffff8082111561074757600080fd5b818601915086601f83011261075b57600080fd5b81358181111561076a57600080fd5b87602082850101111561077c57600080fd5b6020830194508093505050509250925092565b60005b838110156107aa578181015183820152602001610792565b838111156103c05750506000910152565b600082516107cd81846020870161078f565b9190910192915050565b60208152600082518060208401526107f681604085016020870161078f565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220366737524a7ac8fa76e3b2cd04bb1e0b8aa75e165c32f59b0076ead59d529de564736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c656400000000000000000000000043695ef7bc361713e7c615659f826655434f7b88000000000000000000000000cf16a0bebb13045c91127cdf7325d6d0d1ca6e750000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000083104ec6a00263438d787304bd66a110c99882dcc551af3ee6736e74ab6cf81a87507bd7aca05566b38368c4bffc1bfc96229dbf6b94735eabe91ae91ea4fda37e423c94c3ba0000195ef9195b0b01831c609b8080b9190a608060405234801561001057600080fd5b506118ea806100206000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806370a08231116100ad578063a457c2d711610071578063a457c2d71461028e578063a9059cbb146102a1578063c820f146146102b4578063d505accf146102c7578063dd62ed3e146102da57600080fd5b806370a0823114610224578063797594b01461024d5780637ecebe001461026057806395d89b41146102735780639dc29fac1461027b57600080fd5b8063313ce567116100f4578063313ce567146101c25780633644e515146101e157806339509351146101e95780634000aea0146101fc57806340c10f191461020f57600080fd5b806306fdde0314610131578063095ea7b31461014f578063116191b61461017257806318160ddd1461019d57806323b872dd146101af575b600080fd5b610139610313565b6040516101469190611484565b60405180910390f35b61016261015d3660046114ba565b6103a5565b6040519015158152602001610146565b60cc54610185906001600160a01b031681565b6040516001600160a01b039091168152602001610146565b6035545b604051908152602001610146565b6101626101bd3660046114e4565b6103bd565b60cd54600160a01b900460ff1660405160ff9091168152602001610146565b6101a16103e1565b6101626101f73660046114ba565b6103f0565b61016261020a366004611520565b61042f565b61022261021d3660046114ba565b610484565b005b6101a16102323660046115a7565b6001600160a01b031660009081526033602052604090205490565b60cd54610185906001600160a01b031681565b6101a161026e3660046115a7565b6104e0565b610139610500565b6102226102893660046114ba565b61050f565b61016261029c3660046114ba565b610562565b6101626102af3660046114ba565b6105f4565b6102226102c2366004611676565b610602565b6102226102d536600461170c565b61071a565b6101a16102e8366004611776565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b606060368054610322906117a9565b80601f016020809104026020016040519081016040528092919081815260200182805461034e906117a9565b801561039b5780601f106103705761010080835404028352916020019161039b565b820191906000526020600020905b81548152906001019060200180831161037e57829003601f168201915b5050505050905090565b6000336103b3818585610860565b5060019392505050565b6000336103cb858285610985565b6103d6858585610a17565b506001949350505050565b60006103eb610be5565b905090565b3360008181526034602090815260408083206001600160a01b03871684529091528120549091906103b3908290869061042a9087906117f4565b610860565b600061043b85856105f4565b50843b156103d6576103d6858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610c6092505050565b60cc546001600160a01b031633146104d25760405162461bcd60e51b815260206004820152600c60248201526b4f6e6c79204761746577617960a01b60448201526064015b60405180910390fd5b6104dc8282610cca565b5050565b6001600160a01b0381166000908152609960205260408120545b92915050565b606060378054610322906117a9565b60cc546001600160a01b031633146105585760405162461bcd60e51b815260206004820152600c60248201526b4f6e6c79204761746577617960a01b60448201526064016104c9565b6104dc8282610da9565b3360008181526034602090815260408083206001600160a01b0387168452909152812054909190838110156105e75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016104c9565b6103d68286868403610860565b6000336103b3818585610a17565b600054610100900460ff1661061d5760005460ff1615610621565b303b155b6106845760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104c9565b600054610100900460ff161580156106a6576000805461ffff19166101011790555b6106af86610ef4565b6106b98686610f4a565b60cd805460cc80546001600160a01b038088166001600160a01b03199283161790925590851660ff8816600160a01b02919091166001600160a81b0319909216919091171790558015610712576000805461ff00191690555b505050505050565b8342111561076a5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016104c9565b6000609a5488888861077b8c610f7b565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006107d682610fa3565b905060006107e682878787610ff1565b9050896001600160a01b0316816001600160a01b0316146108495760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016104c9565b6108548a8a8a610860565b50505050505050505050565b6001600160a01b0383166108c25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104c9565b6001600160a01b0382166109235760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104c9565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038381166000908152603460209081526040808320938616835292905220546000198114610a115781811015610a045760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016104c9565b610a118484848403610860565b50505050565b6001600160a01b038316610a7b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104c9565b6001600160a01b038216610add5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104c9565b6001600160a01b03831660009081526033602052604090205481811015610b555760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016104c9565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290610b8c9084906117f4565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610bd891815260200190565b60405180910390a3610a11565b60006103eb7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f610c1460655490565b6066546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b604051635260769b60e11b815283906001600160a01b0382169063a4c0ed3690610c929033908790879060040161180c565b600060405180830381600087803b158015610cac57600080fd5b505af1158015610cc0573d6000803e3d6000fd5b5050505050505050565b6001600160a01b038216610d205760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104c9565b8060356000828254610d3291906117f4565b90915550506001600160a01b03821660009081526033602052604081208054839290610d5f9084906117f4565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610e095760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016104c9565b6001600160a01b03821660009081526033602052604090205481811015610e7d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016104c9565b6001600160a01b0383166000908152603360205260408120838303905560358054849290610eac90849061183c565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610978565b505050565b600054610100900460ff16610f1b5760405162461bcd60e51b81526004016104c990611853565b610f3e81604051806040016040528060018152602001603160f81b815250611019565b610f478161105a565b50565b600054610100900460ff16610f715760405162461bcd60e51b81526004016104c990611853565b6104dc82826110a8565b6001600160a01b03811660009081526099602052604090208054600181018255905b50919050565b60006104fa610fb0610be5565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611002878787876110f6565b9150915061100f816111e3565b5095945050505050565b600054610100900460ff166110405760405162461bcd60e51b81526004016104c990611853565b815160209283012081519190920120606591909155606655565b600054610100900460ff166110815760405162461bcd60e51b81526004016104c990611853565b507f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9609a55565b600054610100900460ff166110cf5760405162461bcd60e51b81526004016104c990611853565b81516110e290603690602085019061139e565b508051610eef90603790602084019061139e565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561112d57506000905060036111da565b8460ff16601b1415801561114557508460ff16601c14155b1561115657506000905060046111da565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156111aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166111d3576000600192509250506111da565b9150600090505b94509492505050565b60008160048111156111f7576111f761189e565b14156112005750565b60018160048111156112145761121461189e565b14156112625760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104c9565b60028160048111156112765761127661189e565b14156112c45760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104c9565b60038160048111156112d8576112d861189e565b14156113315760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104c9565b60048160048111156113455761134561189e565b1415610f475760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104c9565b8280546113aa906117a9565b90600052602060002090601f0160209004810192826113cc5760008555611412565b82601f106113e557805160ff1916838001178555611412565b82800160010185558215611412579182015b828111156114125782518255916020019190600101906113f7565b5061141e929150611422565b5090565b5b8082111561141e5760008155600101611423565b6000815180845260005b8181101561145d57602081850181015186830182015201611441565b8181111561146f576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006114976020830184611437565b9392505050565b80356001600160a01b03811681146114b557600080fd5b919050565b600080604083850312156114cd57600080fd5b6114d68361149e565b946020939093013593505050565b6000806000606084860312156114f957600080fd5b6115028461149e565b92506115106020850161149e565b9150604084013590509250925092565b6000806000806060858703121561153657600080fd5b61153f8561149e565b935060208501359250604085013567ffffffffffffffff8082111561156357600080fd5b818701915087601f83011261157757600080fd5b81358181111561158657600080fd5b88602082850101111561159857600080fd5b95989497505060200194505050565b6000602082840312156115b957600080fd5b6114978261149e565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126115e957600080fd5b813567ffffffffffffffff80821115611604576116046115c2565b604051601f8301601f19908116603f0116810190828211818310171561162c5761162c6115c2565b8160405283815286602085880101111561164557600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff811681146114b557600080fd5b600080600080600060a0868803121561168e57600080fd5b853567ffffffffffffffff808211156116a657600080fd5b6116b289838a016115d8565b965060208801359150808211156116c857600080fd5b506116d5888289016115d8565b9450506116e460408701611665565b92506116f26060870161149e565b91506117006080870161149e565b90509295509295909350565b600080600080600080600060e0888a03121561172757600080fd5b6117308861149e565b965061173e6020890161149e565b9550604088013594506060880135935061175a60808901611665565b925060a0880135915060c0880135905092959891949750929550565b6000806040838503121561178957600080fd5b6117928361149e565b91506117a06020840161149e565b90509250929050565b600181811c908216806117bd57607f821691505b60208210811415610f9d57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115611807576118076117de565b500190565b60018060a01b03841681528260208201526060604082015260006118336060830184611437565b95945050505050565b60008282101561184e5761184e6117de565b500390565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fdfea26469706673582212202b07f710c9cf1804584777652b1341e9dfb5fb6c87078d0ae916c80f07eec4b164736f6c634300080a003383104ec5a031ef9b29d7ea5286dc6a9790d031b76b14aae03fde4d19309468fd3551576be7a016ee0b1c15f6f776b57c307ab4b01c0db5053891d4f82af1d0e892b41960667b000006b6f906b30c01830788a08080b90662608060405234801561001057600080fd5b5060405161064238038061064283398101604081905261002f91610107565b610038336100b7565b6001600160a01b0381166100925760405162461bcd60e51b815260206004820152601b60248201527f7a65726f20696d706c656d656e746174696f6e20616464726573730000000000604482015260640160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055610137565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561011957600080fd5b81516001600160a01b038116811461013057600080fd5b9392505050565b6104fc806101466000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80635c60da1b1461006757806361e98ca114610096578063715018a6146100a95780637bdbcbbf146100b35780638da5cb5b146100c6578063f2fde38b146100d7575b600080fd5b60015461007a906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61007a6100a4366004610443565b6100ea565b6100b161011a565b005b61007a6100c1366004610443565b610159565b6000546001600160a01b031661007a565b6100b16100e5366004610476565b6101a9565b6000806100f78484610244565b600154909150610110906001600160a01b0316826102ca565b9150505b92915050565b6000546001600160a01b0316331461014d5760405162461bcd60e51b815260040161014490610491565b60405180910390fd5b6101576000610337565b565b600080546001600160a01b031633146101845760405162461bcd60e51b815260040161014490610491565b60006101908484610244565b600154909150610110906001600160a01b031682610387565b6000546001600160a01b031633146101d35760405162461bcd60e51b815260040161014490610491565b6001600160a01b0381166102385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610144565b61024181610337565b50565b6040516bffffffffffffffffffffffff19606083901b1660208201526000908390603401604051602081830303815290604052805190602001206040516020016102ac92919060609290921b6bffffffffffffffffffffffff19168252601482015260340190565b60405160208183030381529060405280519060200120905092915050565b6000610330838330604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b8152606093841b60148201526f5af43d82803e903d91602b57fd5bf3ff60801b6028820152921b6038830152604c8201526037808220606c830152605591012090565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528360601b60148201526e5af43d82803e903d91602b57fd5bf360881b6028820152826037826000f59150506001600160a01b0381166101145760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c65640000000000000000006044820152606401610144565b80356001600160a01b038116811461043e57600080fd5b919050565b6000806040838503121561045657600080fd5b61045f83610427565b915061046d60208401610427565b90509250929050565b60006020828403121561048857600080fd5b61033082610427565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea264697066735822122048e180d3bf138a23835ff5a47862fb56a14aa7622da00c39f5ed29ff33813fcb64736f6c634300080a00330000000000000000000000004afeda25e80d4292f2dbefce8215df4dde94db3a83104ec6a07f85f6072ad1ad801f029ad16b2db387194c56d6372054ccc6db68fbda66f244a0665e33a0b77a613098202095b504ff5d7d9e2dece7e6926a657e16d16f8372430000131df9131a0d018315836b8080b912c9608060405234801561001057600080fd5b506112a9806100206000396000f3fe6080604052600436106100e85760003560e01c80638da5cb5b1161008a578063c676ad2911610059578063c676ad2914610259578063f2fde38b14610279578063f887ea4014610299578063fac752eb146102b957600080fd5b80638da5cb5b146101d2578063a93a4af9146101f0578063ba27f50b14610203578063c0c53b8b1461023957600080fd5b80636c07ea43116100c65780636c07ea4314610177578063715018a61461018a578063797594b01461019f5780638431f5c1146101bf57600080fd5b80633cb747bf146100ed57806354bbd59c14610129578063575361b614610162575b600080fd5b3480156100f957600080fd5b5060675461010d906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b34801561013557600080fd5b5061010d610144366004610d27565b6001600160a01b039081166000908152606960205260409020541690565b610175610170366004610d94565b6102d9565b005b610175610185366004610e0f565b610325565b34801561019657600080fd5b50610175610364565b3480156101ab57600080fd5b5060655461010d906001600160a01b031681565b6101756101cd366004610e44565b6103a3565b3480156101de57600080fd5b506033546001600160a01b031661010d565b6101756101fe366004610edc565b610626565b34801561020f57600080fd5b5061010d61021e366004610d27565b6069602052600090815260409020546001600160a01b031681565b34801561024557600080fd5b50610175610254366004610f22565b610639565b34801561026557600080fd5b5061010d610274366004610d27565b610753565b34801561028557600080fd5b50610175610294366004610d27565b61078e565b3480156102a557600080fd5b5060665461010d906001600160a01b031681565b3480156102c557600080fd5b506101756102d4366004610f6d565b610829565b61031d86868686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525088925061090a915050565b505050505050565b61035f83338460005b6040519080825280601f01601f191660200182016040528015610358576020820181803683370190505b508561090a565b505050565b6033546001600160a01b031633146103975760405162461bcd60e51b815260040161038e90610fbc565b60405180910390fd5b6103a16000610b61565b565b6067546001600160a01b03163381146103fe5760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206d657373656e6765722063616e2063616c6c000000000000000000604482015260640161038e565b806001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561043c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104609190610ff1565b6065546001600160a01b039081169116146104bd5760405162461bcd60e51b815260206004820152601760248201527f6f6e6c792063616c6c20627920636f6e74657270617274000000000000000000604482015260640161038e565b34156104ff5760405162461bcd60e51b81526020600482015260116024820152706e6f6e7a65726f206d73672e76616c756560781b604482015260640161038e565b6001600160a01b0380881660009081526069602052604090205489821691161461055f5760405162461bcd60e51b81526020600482015260116024820152700d86240e8ded6cadc40dad2e6dac2e8c6d607b1b604482015260640161038e565b6040516340c10f1960e01b81526001600160a01b038681166004830152602482018690528816906340c10f1990604401600060405180830381600087803b1580156105a957600080fd5b505af11580156105bd573d6000803e3d6000fd5b50505050856001600160a01b0316876001600160a01b0316896001600160a01b03167f165ba69f6ab40c50cade6f65431801e5f9c7d7830b7545391920db039133ba3488888888604051610614949392919061100e565b60405180910390a45050505050505050565b610633848484600061032e565b50505050565b600054610100900460ff166106545760005460ff1615610658565b303b155b6106bb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161038e565b600054610100900460ff161580156106dd576000805461ffff19166101011790555b6001600160a01b0383166107295760405162461bcd60e51b81526020600482015260136024820152727a65726f20726f75746572206164647265737360681b604482015260640161038e565b610731610bb3565b61073c848484610be2565b8015610633576000805461ff001916905550505050565b60405162461bcd60e51b815260206004820152600d60248201526c1d5b9a5b5c1b195b595b9d1959609a1b604482015260009060640161038e565b6033546001600160a01b031633146107b85760405162461bcd60e51b815260040161038e90610fbc565b6001600160a01b03811661081d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161038e565b61082681610b61565b50565b6033546001600160a01b031633146108535760405162461bcd60e51b815260040161038e90610fbc565b6001600160a01b03811661089f5760405162461bcd60e51b81526020600482015260136024820152726d617020746f207a65726f206164647265737360681b604482015260640161038e565b6001600160a01b0382811660008181526069602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527fcb7d5959c6ea086e1e4326bb4745f80c494524693345a2ca0f1f1221d7cc77db910160405180910390a15050565b6001600160a01b0380861660009081526069602052604090205416806109725760405162461bcd60e51b815260206004820152601960248201527f6e6f20636f72726573706f6e64696e67206c3120746f6b656e00000000000000604482015260640161038e565b600084116109b95760405162461bcd60e51b81526020600482015260146024820152731dda5d1a191c985dc81e995c9bc8185b5bdd5b9d60621b604482015260640161038e565b60665433906001600160a01b03168114156109e757838060200190518101906109e29190611082565b945090505b604051632770a7eb60e21b81526001600160a01b03828116600483015260248201879052881690639dc29fac90604401600060405180830381600087803b158015610a3157600080fd5b505af1158015610a45573d6000803e3d6000fd5b5050505060006384bd13b060e01b8389848a8a8a604051602401610a6e96959493929190611171565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252606754606554925163b2267a7b60e01b81529193506001600160a01b039081169263b2267a7b923492610ade92169060009087908b906004016111c0565b6000604051808303818588803b158015610af757600080fd5b505af1158015610b0b573d6000803e3d6000fd5b5050505050816001600160a01b0316886001600160a01b0316846001600160a01b03167fd8d3a3f4ab95694bef40475997598bcf8acd3ed9617a4c1013795429414c27e88a8a8a604051610614939291906111f8565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610bda5760405162461bcd60e51b815260040161038e90611228565b6103a1610ce2565b6001600160a01b038316610c385760405162461bcd60e51b815260206004820152601860248201527f7a65726f20636f756e7465727061727420616464726573730000000000000000604482015260640161038e565b6001600160a01b038116610c875760405162461bcd60e51b81526020600482015260166024820152757a65726f206d657373656e676572206164647265737360501b604482015260640161038e565b606580546001600160a01b038086166001600160a01b031992831617909255606780548484169216919091179055821615610cd857606680546001600160a01b0319166001600160a01b0384161790555b5050600160685550565b600054610100900460ff16610d095760405162461bcd60e51b815260040161038e90611228565b6103a133610b61565b6001600160a01b038116811461082657600080fd5b600060208284031215610d3957600080fd5b8135610d4481610d12565b9392505050565b60008083601f840112610d5d57600080fd5b50813567ffffffffffffffff811115610d7557600080fd5b602083019150836020828501011115610d8d57600080fd5b9250929050565b60008060008060008060a08789031215610dad57600080fd5b8635610db881610d12565b95506020870135610dc881610d12565b945060408701359350606087013567ffffffffffffffff811115610deb57600080fd5b610df789828a01610d4b565b979a9699509497949695608090950135949350505050565b600080600060608486031215610e2457600080fd5b8335610e2f81610d12565b95602085013595506040909401359392505050565b600080600080600080600060c0888a031215610e5f57600080fd5b8735610e6a81610d12565b96506020880135610e7a81610d12565b95506040880135610e8a81610d12565b94506060880135610e9a81610d12565b93506080880135925060a088013567ffffffffffffffff811115610ebd57600080fd5b610ec98a828b01610d4b565b989b979a50959850939692959293505050565b60008060008060808587031215610ef257600080fd5b8435610efd81610d12565b93506020850135610f0d81610d12565b93969395505050506040820135916060013590565b600080600060608486031215610f3757600080fd5b8335610f4281610d12565b92506020840135610f5281610d12565b91506040840135610f6281610d12565b809150509250925092565b60008060408385031215610f8057600080fd5b8235610f8b81610d12565b91506020830135610f9b81610d12565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561100357600080fd5b8151610d4481610d12565b6001600160a01b0385168152602081018490526060604082018190528101829052818360808301376000818301608090810191909152601f909201601f191601019392505050565b60005b83811015611071578181015183820152602001611059565b838111156106335750506000910152565b6000806040838503121561109557600080fd5b82516110a081610d12565b602084015190925067ffffffffffffffff808211156110be57600080fd5b818501915085601f8301126110d257600080fd5b8151818111156110e4576110e4610fa6565b604051601f8201601f19908116603f0116810190838211818310171561110c5761110c610fa6565b8160405282815288602084870101111561112557600080fd5b611136836020830160208801611056565b80955050505050509250929050565b6000815180845261115d816020860160208601611056565b601f01601f19169290920160200192915050565b6001600160a01b03878116825286811660208301528581166040830152841660608201526080810183905260c060a082018190526000906111b490830184611145565b98975050505050505050565b60018060a01b03851681528360208201526080604082015260006111e76080830185611145565b905082606083015295945050505050565b60018060a01b038416815282602082015260606040820152600061121f6060830184611145565b95945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220e5b31147beb7149f943fd34ed82358681c86eefe32935965beeffd9511dca8cf64736f6c634300080a003383104ec6a075e3bea2bff92bcb4c53ac9abdc144dd8d1e610e65d76986de5cec433eee8289a001f1ac5ebf6c8fc7a182f76e0e8e3b19a91b199b5438d64d1338627fd5185ec50000103af910370e01830bd4408080b90fe6608060405260405162000f6638038062000f66833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000f1f833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000eff83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002601760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f3f6027913962000381565b9392505050565b60006200021a60008051602062000eff83398151915260001b6200046760201b620002081760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000eff83398151915260001b6200046760201b620002081760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200028c1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000f1f83398151915260001b6200046760201b620002081760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61086780620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106f1565b610118565b61005b61009336600461070c565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106f1565b61020b565b3480156100f557600080fd5b506100ad610235565b61010661029b565b61011661011161033a565b610344565b565b610120610368565b6001600160a01b0316336001600160a01b03161415610157576101548160405180602001604052806000815250600061039b565b50565b6101546100fe565b610167610368565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061039b915050565b505050565b6101c36100fe565b60006101da610368565b6001600160a01b0316336001600160a01b03161415610200576101fb61033a565b905090565b6102086100fe565b90565b610213610368565b6001600160a01b0316336001600160a01b0316141561015757610154816103c6565b600061023f610368565b6001600160a01b0316336001600160a01b03161415610200576101fb610368565b6060610285838360405180606001604052806027815260200161080b6027913961041a565b9392505050565b6001600160a01b03163b151590565b6102a3610368565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb6104f7565b3660008037600080366000845af43d6000803e808015610363573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103a48361051f565b6000825111806103b15750805b156101c3576103c08383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103ef610368565b604080516001600160a01b03928316815291841660208301520160405180910390a16101548161055f565b60606001600160a01b0384163b6104825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610331565b600080856001600160a01b03168560405161049d91906107bb565b600060405180830381855af49150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b50915091506104ed828286610608565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61038c565b61052881610641565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105c45760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610331565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60608315610617575081610285565b8251156106275782518084602001fd5b8160405162461bcd60e51b815260040161033191906107d7565b6001600160a01b0381163b6106ae5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610331565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105e7565b80356001600160a01b03811681146106ec57600080fd5b919050565b60006020828403121561070357600080fd5b610285826106d5565b60008060006040848603121561072157600080fd5b61072a846106d5565b9250602084013567ffffffffffffffff8082111561074757600080fd5b818601915086601f83011261075b57600080fd5b81358181111561076a57600080fd5b87602082850101111561077c57600080fd5b6020830194508093505050509250925092565b60005b838110156107aa578181015183820152602001610792565b838111156103c05750506000910152565b600082516107cd81846020870161078f565b9190910192915050565b60208152600082518060208401526107f681604085016020870161078f565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220366737524a7ac8fa76e3b2cd04bb1e0b8aa75e165c32f59b0076ead59d529de564736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c656400000000000000000000000074ccd92ba10c9dbc320e8801d9d488f6d157767d000000000000000000000000cf16a0bebb13045c91127cdf7325d6d0d1ca6e750000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000083104ec6a0fbbb5ddad530ae9b83f6f492739175927f38e4db5b31f2e1d6525c42d38cece9a00625deb6dfd651faf74061b127607abcf93cce73f24d6760dd2e1294adaf0a1e000017e1f917de0f01831abee58080b9178d608060405234801561001057600080fd5b5061176d806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063982b151f11610097578063f2fde38b11610066578063f2fde38b14610235578063f887ea4014610248578063f8c3cf251461025b578063fac752eb1461026e57600080fd5b8063982b151f146101d3578063aa4c1158146101e6578063ba27f50b146101f9578063ee5a8db21461022257600080fd5b8063485cc955116100d3578063485cc95514610194578063715018a6146101a7578063797594b0146101af5780638da5cb5b146101c257600080fd5b8063150b7a02146101055780632a491247146101415780633cb747bf1461015657806346aa341114610181575b600080fd5b610123610113366004611144565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020015b60405180910390f35b61015461014f366004611224565b610281565b005b609954610169906001600160a01b031681565b6040516001600160a01b039091168152602001610138565b61015461018f3660046112a5565b610292565b6101546101a2366004611301565b6102a5565b610154610378565b609754610169906001600160a01b031681565b6033546001600160a01b0316610169565b6101546101e136600461133a565b6103ae565b6101546101f43660046113c8565b6105f3565b610169610207366004611435565b609b602052600090815260409020546001600160a01b031681565b610154610230366004611459565b610607565b610154610243366004611435565b610613565b609854610169906001600160a01b031681565b61015461026936600461149f565b6106ae565b61015461027c366004611301565b6108a2565b61028d83338484610983565b505050565b61029f8433858585610c20565b50505050565b600054610100900460ff166102c05760005460ff16156102c4565b303b155b61032c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b600054610100900460ff1615801561034e576000805461ffff19166101011790555b610356610f68565b61036283600084610f97565b801561028d576000805461ff0019169055505050565b6033546001600160a01b031633146103a25760405162461bcd60e51b815260040161032390611503565b6103ac6000611097565b565b6002609a5414156103d15760405162461bcd60e51b815260040161032390611538565b6002609a556099546001600160a01b031633811461042b5760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e481b595cdcd95b99d95c8818d85b8818d85b1b604a1b6044820152606401610323565b806001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610469573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048d919061156f565b6097546001600160a01b039081169116146104e45760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e4818d85b1b08189e4818dbdb9d195c9c185c9d604a1b6044820152606401610323565b60005b8281101561058b57866001600160a01b03166340c10f19868686858181106105115761051161158c565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526020029190910135602483015250604401600060405180830381600087803b15801561056057600080fd5b505af1158015610574573d6000803e3d6000fd5b505050508080610583906115a2565b9150506104e7565b50846001600160a01b0316866001600160a01b0316886001600160a01b03167fafa88b850da44ca05b319e813873eac8d08e7c041d2d9b3072db0f087e3cd29e8787876040516105dd93929190611601565b60405180910390a450506001609a555050505050565b6106008585858585610c20565b5050505050565b61029f84848484610983565b6033546001600160a01b0316331461063d5760405162461bcd60e51b815260040161032390611503565b6001600160a01b0381166106a25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610323565b6106ab81611097565b50565b6002609a5414156106d15760405162461bcd60e51b815260040161032390611538565b6002609a556099546001600160a01b031633811461072b5760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e481b595cdcd95b99d95c8818d85b8818d85b1b604a1b6044820152606401610323565b806001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078d919061156f565b6097546001600160a01b039081169116146107e45760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e4818d85b1b08189e4818dbdb9d195c9c185c9d604a1b6044820152606401610323565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490528616906340c10f1990604401600060405180830381600087803b15801561082e57600080fd5b505af1158015610842573d6000803e3d6000fd5b5050604080516001600160a01b03878116825260208201879052808916945089811693508a16917fc655ec1de34d98630aa4572239414f926d6b3d07653dde093a6df97377e31b4191015b60405180910390a450506001609a5550505050565b6033546001600160a01b031633146108cc5760405162461bcd60e51b815260040161032390611503565b6001600160a01b0381166109185760405162461bcd60e51b81526020600482015260136024820152726d617020746f207a65726f206164647265737360681b6044820152606401610323565b6001600160a01b038281166000818152609b602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527fcb7d5959c6ea086e1e4326bb4745f80c494524693345a2ca0f1f1221d7cc77db910160405180910390a15050565b6002609a5414156109a65760405162461bcd60e51b815260040161032390611538565b6002609a556001600160a01b038085166000908152609b60205260409020541680610a095760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606401610323565b6040516331a9108f60e11b81526004810184905233906001600160a01b03871690636352211e90602401602060405180830381865afa158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a74919061156f565b6001600160a01b031614610abc5760405162461bcd60e51b815260206004820152600f60248201526e1d1bdad95b881b9bdd081bdddb9959608a1b6044820152606401610323565b604051630852cd8d60e31b8152600481018490526001600160a01b038616906342966c6890602401600060405180830381600087803b158015610afe57600080fd5b505af1158015610b12573d6000803e3d6000fd5b5050604080516001600160a01b0385811660248301528981166044830152336064830152888116608483015260a48083018990528351808403909101815260c490920183526020820180516001600160e01b0316633581ad3760e21b179052609954609754935163b2267a7b60e01b81529295508116935063b2267a7b92610ba59291169034908690899060040161162f565b600060405180830381600087803b158015610bbf57600080fd5b505af1158015610bd3573d6000803e3d6000fd5b5050604080516001600160a01b038981168252602082018990523394508a811693508616917fe9e85cf0c862dd491ecda3c9a230e12ada8956472028ebde4fdc4f8e2d77bcda910161088d565b6002609a541415610c435760405162461bcd60e51b815260040161032390611538565b6002609a5581610c8c5760405162461bcd60e51b81526020600482015260146024820152736e6f20746f6b656e20746f20776974686472617760601b6044820152606401610323565b6001600160a01b038086166000908152609b60205260409020541680610cea5760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606401610323565b60005b83811015610e5057336001600160a01b038816636352211e878785818110610d1757610d1761158c565b905060200201356040518263ffffffff1660e01b8152600401610d3c91815260200190565b602060405180830381865afa158015610d59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7d919061156f565b6001600160a01b031614610dc55760405162461bcd60e51b815260206004820152600f60248201526e1d1bdad95b881b9bdd081bdddb9959608a1b6044820152606401610323565b866001600160a01b03166342966c68868684818110610de657610de661158c565b905060200201356040518263ffffffff1660e01b8152600401610e0b91815260200190565b600060405180830381600087803b158015610e2557600080fd5b505af1158015610e39573d6000803e3d6000fd5b505050508080610e48906115a2565b915050610ced565b506000639f0a68b360e01b828833898989604051602401610e76969594939291906116a3565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252609954609754925163b2267a7b60e01b81529193506001600160a01b039081169263b2267a7b923492610ee5921690839087908a9060040161162f565b6000604051808303818588803b158015610efe57600080fd5b505af1158015610f12573d6000803e3d6000fd5b5050505050336001600160a01b0316876001600160a01b0316836001600160a01b03167fbdb7b5cec70093e3ce49b258071951d245c0871c006fd9327778c69d0e9f244d8989896040516105dd93929190611601565b600054610100900460ff16610f8f5760405162461bcd60e51b8152600401610323906116ec565b6103ac6110e9565b6001600160a01b038316610fed5760405162461bcd60e51b815260206004820152601860248201527f7a65726f20636f756e74657270617274206164647265737300000000000000006044820152606401610323565b6001600160a01b03811661103c5760405162461bcd60e51b81526020600482015260166024820152757a65726f206d657373656e676572206164647265737360501b6044820152606401610323565b609780546001600160a01b038086166001600160a01b03199283161790925560998054848416921691909117905582161561108d57609880546001600160a01b0319166001600160a01b0384161790555b50506001609a5550565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166111105760405162461bcd60e51b8152600401610323906116ec565b6103ac33611097565b6001600160a01b03811681146106ab57600080fd5b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561115a57600080fd5b843561116581611119565b9350602085013561117581611119565b925060408501359150606085013567ffffffffffffffff8082111561119957600080fd5b818701915087601f8301126111ad57600080fd5b8135818111156111bf576111bf61112e565b604051601f8201601f19908116603f011681019083821181831017156111e7576111e761112e565b816040528281528a602084870101111561120057600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060006060848603121561123957600080fd5b833561124481611119565b95602085013595506040909401359392505050565b60008083601f84011261126b57600080fd5b50813567ffffffffffffffff81111561128357600080fd5b6020830191508360208260051b850101111561129e57600080fd5b9250929050565b600080600080606085870312156112bb57600080fd5b84356112c681611119565b9350602085013567ffffffffffffffff8111156112e257600080fd5b6112ee87828801611259565b9598909750949560400135949350505050565b6000806040838503121561131457600080fd5b823561131f81611119565b9150602083013561132f81611119565b809150509250929050565b60008060008060008060a0878903121561135357600080fd5b863561135e81611119565b9550602087013561136e81611119565b9450604087013561137e81611119565b9350606087013561138e81611119565b9250608087013567ffffffffffffffff8111156113aa57600080fd5b6113b689828a01611259565b979a9699509497509295939492505050565b6000806000806000608086880312156113e057600080fd5b85356113eb81611119565b945060208601356113fb81611119565b9350604086013567ffffffffffffffff81111561141757600080fd5b61142388828901611259565b96999598509660600135949350505050565b60006020828403121561144757600080fd5b813561145281611119565b9392505050565b6000806000806080858703121561146f57600080fd5b843561147a81611119565b9350602085013561148a81611119565b93969395505050506040820135916060013590565b600080600080600060a086880312156114b757600080fd5b85356114c281611119565b945060208601356114d281611119565b935060408601356114e281611119565b925060608601356114f281611119565b949793965091946080013592915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020828403121561158157600080fd5b815161145281611119565b634e487b7160e01b600052603260045260246000fd5b60006000198214156115c457634e487b7160e01b600052601160045260246000fd5b5060010190565b81835260006001600160fb1b038311156115e457600080fd5b8260051b8083602087013760009401602001938452509192915050565b6001600160a01b038416815260406020820181905260009061162690830184866115cb565b95945050505050565b60018060a01b038516815260006020858184015260806040840152845180608085015260005b818110156116715786810183015185820160a001528201611655565b8181111561168357600060a083870101525b5060608401949094525050601f91909101601f19160160a0019392505050565b6001600160a01b038781168252868116602083015285811660408301528416606082015260a0608082018190526000906116e090830184866115cb565b98975050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220708f0ea5b7de8a003d2e40c40e2883d15dc5c244bb43c33e870b1671e7d65a0864736f6c634300080a003383104ec6a03103613ab5d4a517e73ef089156a8bfa276c2e3becd595bab2c95bd020d5342aa0543cccba0eea0612237f8c21f57ea0d24f2a04921526973f682ba5c55291f22c0000103af910371001830bd4408080b90fe6608060405260405162000f6638038062000f66833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000f1f833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000eff83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002601760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f3f6027913962000381565b9392505050565b60006200021a60008051602062000eff83398151915260001b6200046760201b620002081760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000eff83398151915260001b6200046760201b620002081760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200028c1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000f1f83398151915260001b6200046760201b620002081760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61086780620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106f1565b610118565b61005b61009336600461070c565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106f1565b61020b565b3480156100f557600080fd5b506100ad610235565b61010661029b565b61011661011161033a565b610344565b565b610120610368565b6001600160a01b0316336001600160a01b03161415610157576101548160405180602001604052806000815250600061039b565b50565b6101546100fe565b610167610368565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061039b915050565b505050565b6101c36100fe565b60006101da610368565b6001600160a01b0316336001600160a01b03161415610200576101fb61033a565b905090565b6102086100fe565b90565b610213610368565b6001600160a01b0316336001600160a01b0316141561015757610154816103c6565b600061023f610368565b6001600160a01b0316336001600160a01b03161415610200576101fb610368565b6060610285838360405180606001604052806027815260200161080b6027913961041a565b9392505050565b6001600160a01b03163b151590565b6102a3610368565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb6104f7565b3660008037600080366000845af43d6000803e808015610363573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103a48361051f565b6000825111806103b15750805b156101c3576103c08383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103ef610368565b604080516001600160a01b03928316815291841660208301520160405180910390a16101548161055f565b60606001600160a01b0384163b6104825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610331565b600080856001600160a01b03168560405161049d91906107bb565b600060405180830381855af49150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b50915091506104ed828286610608565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61038c565b61052881610641565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105c45760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610331565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60608315610617575081610285565b8251156106275782518084602001fd5b8160405162461bcd60e51b815260040161033191906107d7565b6001600160a01b0381163b6106ae5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610331565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105e7565b80356001600160a01b03811681146106ec57600080fd5b919050565b60006020828403121561070357600080fd5b610285826106d5565b60008060006040848603121561072157600080fd5b61072a846106d5565b9250602084013567ffffffffffffffff8082111561074757600080fd5b818601915086601f83011261075b57600080fd5b81358181111561076a57600080fd5b87602082850101111561077c57600080fd5b6020830194508093505050509250925092565b60005b838110156107aa578181015183820152602001610792565b838111156103c05750506000910152565b600082516107cd81846020870161078f565b9190910192915050565b60208152600082518060208401526107f681604085016020870161078f565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220366737524a7ac8fa76e3b2cd04bb1e0b8aa75e165c32f59b0076ead59d529de564736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000b305283ceacca11f19acbe8e49efee301f8a7aff000000000000000000000000cf16a0bebb13045c91127cdf7325d6d0d1ca6e750000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000083104ec5a0bdf1317fec5d1310f56e0f1d9b963e80044d99c7e5608840ada6ec818aad3dc9a024cf05e5f950048f8cc3576303ea15c5acc3a55baf82f0900442ac184cdf06130000000000000000000000000000000000000000000000000000000000000000000000000000e02d9ce8e5269e364dcc4cff641032e7f79945f20826385a083976ef93af5eadd620b46cbd5ef0ce4f1cae852ab16d07da35553daccce248320b996d602453adac000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030106f5e8c059d121eddcc3e412044c72344a57619ca31a4dbbdbf79ed10418d70000000000000000000000000000000000000000000000000000000000000d00000000000000000000000000000000000000000000000000000000000000000cad27a68b8d7068184224b453308ba539f59215a066a35c8ba9f0a1c0c6fe71ebe3b568958b1eaa4e93f68204e8669e79933afdd9e5665ff6c99d9543ecf95b8f00000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000063f8722d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000981cfe02291f1f900973a4fe7505b196635afcb25a60dcb6e5ebdc58226e8448ad27a68b8d7068184224b453308ba539f59215a066a35c8ba9f0a1c0c6fe71eb00000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000063f87230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dd7db02bf3c3a95dc8dd120e6ee384555c98f7656afa6e9e465a3420de8dc13b981cfe02291f1f900973a4fe7505b196635afcb25a60dcb6e5ebdc58226e844800000000000000000000000000000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000063f87338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000bb402abdc2e7f92a92a7dc17cf80608bfda0382cbd0515bd8cd0961b2eceb5ecdd7db02bf3c3a95dc8dd120e6ee384555c98f7656afa6e9e465a3420de8dc13b000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000063f8733b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000046d4345c29c2fa00d72cb23d2a32a7209b43d4374c4435260e4eb78c4a8ba70dbb402abdc2e7f92a92a7dc17cf80608bfda0382cbd0515bd8cd0961b2eceb5ec000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000000000063f8737d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000d7ee6d9485d5b7c9f935d0e858154e946c13631f51387d0bdeb5a9cd4464781c46d4345c29c2fa00d72cb23d2a32a7209b43d4374c4435260e4eb78c4a8ba70d000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000063f8738c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000c1d3ce3699fae6a0d828fd59f678fb04b3ad5386e0c9458682539ff41e522d7ee6d9485d5b7c9f935d0e858154e946c13631f51387d0bdeb5a9cd4464781c000000000000000000000000000000000000000000000000000000000000000d0000000000000000000000000000000000000000000000000000000063f87395000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000061137d5b560a9f139cb2117056867140da40ec11a16721cef1252c07cf13005f000c1d3ce3699fae6a0d828fd59f678fb04b3ad5386e0c9458682539ff41e522000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000063f87524000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000e697812777b5c89461c61187825daa85ca67f601d26f81acac81a675057ef0861137d5b560a9f139cb2117056867140da40ec11a16721cef1252c07cf13005f000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000063f87527000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bb956012ddb8a4b8146c27ab0f4e6a2a422f2e3b64bdc6b31d8558691c447c120e697812777b5c89461c61187825daa85ca67f601d26f81acac81a675057ef0800000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000063f8752d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000097a0b2fa947a127adf88ea0290b046e9db6462ba916ff8bb75f3f14cdfcd2fabbb956012ddb8a4b8146c27ab0f4e6a2a422f2e3b64bdc6b31d8558691c447c1200000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000000000000000000000000000000063f8753f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000009ef696aa281d59deca384d813ba416325e8c0e7d30cdbda968e8972a98a3822097a0b2fa947a127adf88ea0290b046e9db6462ba916ff8bb75f3f14cdfcd2fab00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000063f8754b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000391b00001a89f91a861101831da8758080b91a35608060405234801561001057600080fd5b50611a15806100206000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80638c23d5b2116100a2578063eaa72ad911610071578063eaa72ad91461026f578063f23a6e6114610282578063f2fde38b146102a1578063f887ea40146102b4578063fac752eb146102c757600080fd5b80638c23d5b2146101ea5780638da5cb5b146101fd578063ba27f50b1461020e578063bc197c811461023757600080fd5b80634764cc62116100e95780634764cc6214610196578063485cc955146101a957806348de03de146101bc578063715018a6146101cf578063797594b0146101d757600080fd5b806301ffc9a71461011b5780630f2da0801461014357806321fedfc9146101585780633cb747bf1461016b575b600080fd5b61012e610129366004611116565b6102da565b60405190151581526020015b60405180910390f35b61015661015136600461115c565b610311565b005b610156610166366004611197565b610324565b60fd5461017e906001600160a01b031681565b6040516001600160a01b03909116815260200161013a565b6101566101a43660046111e8565b610338565b6101566101b7366004611256565b610554565b6101566101ca3660046112db565b610623565b61015661063a565b60fb5461017e906001600160a01b031681565b6101566101f8366004611366565b610670565b6033546001600160a01b031661017e565b61017e61021c366004611404565b60ff602052600090815260409020546001600160a01b031681565b610256610245366004611558565b63bc197c8160e01b95945050505050565b6040516001600160e01b0319909116815260200161013a565b61015661027d366004611606565b610688565b6102566102903660046116c0565b63f23a6e6160e01b95945050505050565b6101566102af366004611404565b610891565b60fc5461017e906001600160a01b031681565b6101566102d5366004611256565b61092c565b60006001600160e01b03198216630271189760e51b148061030b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b61031e8433858585610a0d565b50505050565b6103318585858585610a0d565b5050505050565b600260fe5414156103645760405162461bcd60e51b815260040161035b90611729565b60405180910390fd5b600260fe5560fd546001600160a01b03163381146103be5760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e481b595cdcd95b99d95c8818d85b8818d85b1b604a1b604482015260640161035b565b806001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104209190611760565b60fb546001600160a01b039081169116146104775760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e4818d85b1b08189e4818dbdb9d195c9c185c9d604a1b604482015260640161035b565b60405163731133e960e01b81526001600160a01b0385811660048301526024820185905260448201849052608060648301526000608483015287169063731133e99060a401600060405180830381600087803b1580156104d657600080fd5b505af11580156104ea573d6000803e3d6000fd5b5050604080516001600160a01b0388811682526020820188905291810186905281891693508982169250908a16907f5399dc7b86d085e50a28946dbc213966bb7a7ac78d312aedd6018c791ad6cef9906060015b60405180910390a45050600160fe555050505050565b600054610100900460ff1661056f5760005460ff1615610573565b303b155b6105d65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161035b565b600054610100900460ff161580156105f8576000805461ffff19166101011790555b610600610c58565b61060c83600084610c87565b801561061e576000805461ff00191690555b505050565b61063286338787878787610d87565b505050505050565b6033546001600160a01b031633146106645760405162461bcd60e51b815260040161035b9061177d565b61066e6000611094565b565b61067f87878787878787610d87565b50505050505050565b600260fe5414156106ab5760405162461bcd60e51b815260040161035b90611729565b600260fe5560fd546001600160a01b03163381146107055760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e481b595cdcd95b99d95c8818d85b8818d85b1b604a1b604482015260640161035b565b806001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015610743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107679190611760565b60fb546001600160a01b039081169116146107be5760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e4818d85b1b08189e4818dbdb9d195c9c185c9d604a1b604482015260640161035b565b604051635a455c5b60e11b81526001600160a01b0389169063b48ab8b6906107f290899089908990899089906004016117e8565b600060405180830381600087803b15801561080c57600080fd5b505af1158015610820573d6000803e3d6000fd5b50505050866001600160a01b0316886001600160a01b03168a6001600160a01b03167ff07745bfeb45fb1184165136e9148689adf57ba578a5b90dde949f26066b7756898989898960405161087995949392919061183e565b60405180910390a45050600160fe5550505050505050565b6033546001600160a01b031633146108bb5760405162461bcd60e51b815260040161035b9061177d565b6001600160a01b0381166109205760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161035b565b61092981611094565b50565b6033546001600160a01b031633146109565760405162461bcd60e51b815260040161035b9061177d565b6001600160a01b0381166109a25760405162461bcd60e51b81526020600482015260136024820152726d617020746f207a65726f206164647265737360681b604482015260640161035b565b6001600160a01b03828116600081815260ff602090815260409182902080546001600160a01b031916948616948517905581519283528201929092527fcb7d5959c6ea086e1e4326bb4745f80c494524693345a2ca0f1f1221d7cc77db910160405180910390a15050565b600260fe541415610a305760405162461bcd60e51b815260040161035b90611729565b600260fe5581610a795760405162461bcd60e51b81526020600482015260146024820152731dda5d1a191c985dc81e995c9bc8185b5bdd5b9d60621b604482015260640161035b565b6001600160a01b03808616600090815260ff60205260409020541680610ad75760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b604482015260640161035b565b604051637a94c56560e11b815233600482015260248101859052604481018490526001600160a01b0387169063f5298aca90606401600060405180830381600087803b158015610b2657600080fd5b505af1158015610b3a573d6000803e3d6000fd5b5050604080516001600160a01b0385811660248301528a81166044830152336064830152898116608483015260a4820189905260c48083018990528351808403909101815260e490920183526020820180516001600160e01b031663730608b360e01b17905260fd5460fb54935163b2267a7b60e01b81529295508116935063b2267a7b92610bd492911690349086908990600401611882565b600060405180830381600087803b158015610bee57600080fd5b505af1158015610c02573d6000803e3d6000fd5b5050604080516001600160a01b038a81168252602082018a90529181018890523393508a82169250908516907f1f9dcda7fce6f73a13055f044ffecaed2032a7a844e0a37a3eb8bbb17488d01a9060600161053e565b600054610100900460ff16610c7f5760405162461bcd60e51b815260040161035b906118f6565b61066e6110e6565b6001600160a01b038316610cdd5760405162461bcd60e51b815260206004820152601860248201527f7a65726f20636f756e7465727061727420616464726573730000000000000000604482015260640161035b565b6001600160a01b038116610d2c5760405162461bcd60e51b81526020600482015260166024820152757a65726f206d657373656e676572206164647265737360501b604482015260640161035b565b60fb80546001600160a01b038086166001600160a01b03199283161790925560fd80548484169216919091179055821615610d7d5760fc80546001600160a01b0319166001600160a01b0384161790555b5050600160fe5550565b600260fe541415610daa5760405162461bcd60e51b815260040161035b90611729565b600260fe5583610df35760405162461bcd60e51b81526020600482015260146024820152736e6f20746f6b656e20746f20776974686472617760601b604482015260640161035b565b838214610e345760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b604482015260640161035b565b60005b82811015610eb0576000848483818110610e5357610e53611941565b9050602002013511610e9e5760405162461bcd60e51b81526020600482015260146024820152731dda5d1a191c985dc81e995c9bc8185b5bdd5b9d60621b604482015260640161035b565b80610ea881611957565b915050610e37565b506001600160a01b03808816600090815260ff60205260409020541680610f0f5760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881b9bdd081cdd5c1c1bdc9d1959606a1b604482015260640161035b565b604051637b75893d60e11b81526001600160a01b0389169063f6eb127a90610f439033908a908a908a908a9060040161183e565b600060405180830381600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b50505050600063f92748d360e01b828a338b8b8b8b8b604051602401610f9e989796959493929190611980565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925260fd5460fb54925163b2267a7b60e01b81529193506001600160a01b039081169263b2267a7b92349261100d921690839087908a90600401611882565b6000604051808303818588803b15801561102657600080fd5b505af115801561103a573d6000803e3d6000fd5b5050505050336001600160a01b0316896001600160a01b0316836001600160a01b03167f5d2d5d4cdbf7b115e43f0b9986644dd8b9514b10be6a019ab6a4a87f122909708b8b8b8b8b60405161087995949392919061183e565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661110d5760405162461bcd60e51b815260040161035b906118f6565b61066e33611094565b60006020828403121561112857600080fd5b81356001600160e01b03198116811461114057600080fd5b9392505050565b6001600160a01b038116811461092957600080fd5b6000806000806080858703121561117257600080fd5b843561117d81611147565b966020860135965060408601359560600135945092505050565b600080600080600060a086880312156111af57600080fd5b85356111ba81611147565b945060208601356111ca81611147565b94979496505050506040830135926060810135926080909101359150565b60008060008060008060c0878903121561120157600080fd5b863561120c81611147565b9550602087013561121c81611147565b9450604087013561122c81611147565b9350606087013561123c81611147565b9598949750929560808101359460a0909101359350915050565b6000806040838503121561126957600080fd5b823561127481611147565b9150602083013561128481611147565b809150509250929050565b60008083601f8401126112a157600080fd5b50813567ffffffffffffffff8111156112b957600080fd5b6020830191508360208260051b85010111156112d457600080fd5b9250929050565b600080600080600080608087890312156112f457600080fd5b86356112ff81611147565b9550602087013567ffffffffffffffff8082111561131c57600080fd5b6113288a838b0161128f565b9097509550604089013591508082111561134157600080fd5b5061134e89828a0161128f565b979a9699509497949695606090950135949350505050565b600080600080600080600060a0888a03121561138157600080fd5b873561138c81611147565b9650602088013561139c81611147565b9550604088013567ffffffffffffffff808211156113b957600080fd5b6113c58b838c0161128f565b909750955060608a01359150808211156113de57600080fd5b506113eb8a828b0161128f565b989b979a50959894979596608090950135949350505050565b60006020828403121561141657600080fd5b813561114081611147565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561146057611460611421565b604052919050565b600082601f83011261147957600080fd5b8135602067ffffffffffffffff82111561149557611495611421565b8160051b6114a4828201611437565b92835284810182019282810190878511156114be57600080fd5b83870192505b848310156114dd578235825291830191908301906114c4565b979650505050505050565b600082601f8301126114f957600080fd5b813567ffffffffffffffff81111561151357611513611421565b611526601f8201601f1916602001611437565b81815284602083860101111561153b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561157057600080fd5b853561157b81611147565b9450602086013561158b81611147565b9350604086013567ffffffffffffffff808211156115a857600080fd5b6115b489838a01611468565b945060608801359150808211156115ca57600080fd5b6115d689838a01611468565b935060808801359150808211156115ec57600080fd5b506115f9888289016114e8565b9150509295509295909350565b60008060008060008060008060c0898b03121561162257600080fd5b883561162d81611147565b9750602089013561163d81611147565b9650604089013561164d81611147565b9550606089013561165d81611147565b9450608089013567ffffffffffffffff8082111561167a57600080fd5b6116868c838d0161128f565b909650945060a08b013591508082111561169f57600080fd5b506116ac8b828c0161128f565b999c989b5096995094979396929594505050565b600080600080600060a086880312156116d857600080fd5b85356116e381611147565b945060208601356116f381611147565b93506040860135925060608601359150608086013567ffffffffffffffff81111561171d57600080fd5b6115f9888289016114e8565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020828403121561177257600080fd5b815161114081611147565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b81835260006001600160fb1b038311156117cb57600080fd5b8260051b8083602087013760009401602001938452509192915050565b6001600160a01b038616815260806020820181905260009061180d90830186886117b2565b82810360408401526118208185876117b2565b83810360609094019390935250506000815260200195945050505050565b6001600160a01b038616815260606020820181905260009061186390830186886117b2565b82810360408401526118768185876117b2565b98975050505050505050565b60018060a01b038516815260006020858184015260806040840152845180608085015260005b818110156118c45786810183015185820160a0015282016118a8565b818111156118d657600060a083870101525b5060608401949094525050601f91909101601f19160160a0019392505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561197957634e487b7160e01b600052601160045260246000fd5b5060010190565b6001600160a01b038981168252888116602083015287811660408301528616606082015260c0608082018190526000906119bd90830186886117b2565b82810360a08401526119d08185876117b2565b9b9a505050505050505050505056fea26469706673582212205332503f1a187cb7efe095e336d533a0f0789a5dad19022a2577ebbbc6cc9cff64736f6c634300080a003383104ec5a0ad653ff3edfa96ed61b776aa28a513086d6c6f3d092eed269ec2f87b58fbd40ba004bdccaa1102f4920d35c3cc9ef833347b73b1a51122bd7a7193d81a71f985030000103af910371201830bd4408080b90fe6608060405260405162000f6638038062000f66833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000f1f833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000eff83398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b620002601760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f3f6027913962000381565b9392505050565b60006200021a60008051602062000eff83398151915260001b6200046760201b620002081760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000eff83398151915260001b6200046760201b620002081760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200028c1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000f1f83398151915260001b6200046760201b620002081760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61086780620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106f1565b610118565b61005b61009336600461070c565b61015f565b3480156100a457600080fd5b506100ad6101d0565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106f1565b61020b565b3480156100f557600080fd5b506100ad610235565b61010661029b565b61011661011161033a565b610344565b565b610120610368565b6001600160a01b0316336001600160a01b03161415610157576101548160405180602001604052806000815250600061039b565b50565b6101546100fe565b610167610368565b6001600160a01b0316336001600160a01b031614156101c8576101c38383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061039b915050565b505050565b6101c36100fe565b60006101da610368565b6001600160a01b0316336001600160a01b03161415610200576101fb61033a565b905090565b6102086100fe565b90565b610213610368565b6001600160a01b0316336001600160a01b0316141561015757610154816103c6565b600061023f610368565b6001600160a01b0316336001600160a01b03161415610200576101fb610368565b6060610285838360405180606001604052806027815260200161080b6027913961041a565b9392505050565b6001600160a01b03163b151590565b6102a3610368565b6001600160a01b0316336001600160a01b031614156101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101fb6104f7565b3660008037600080366000845af43d6000803e808015610363573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b6103a48361051f565b6000825111806103b15750805b156101c3576103c08383610260565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103ef610368565b604080516001600160a01b03928316815291841660208301520160405180910390a16101548161055f565b60606001600160a01b0384163b6104825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610331565b600080856001600160a01b03168560405161049d91906107bb565b600060405180830381855af49150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b50915091506104ed828286610608565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61038c565b61052881610641565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105c45760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b6064820152608401610331565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60608315610617575081610285565b8251156106275782518084602001fd5b8160405162461bcd60e51b815260040161033191906107d7565b6001600160a01b0381163b6106ae5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610331565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105e7565b80356001600160a01b03811681146106ec57600080fd5b919050565b60006020828403121561070357600080fd5b610285826106d5565b60008060006040848603121561072157600080fd5b61072a846106d5565b9250602084013567ffffffffffffffff8082111561074757600080fd5b818601915086601f83011261075b57600080fd5b81358181111561076a57600080fd5b87602082850101111561077c57600080fd5b6020830194508093505050509250925092565b60005b838110156107aa578181015183820152602001610792565b838111156103c05750506000910152565b600082516107cd81846020870161078f565b9190910192915050565b60208152600082518060208401526107f681604085016020870161078f565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220366737524a7ac8fa76e3b2cd04bb1e0b8aa75e165c32f59b0076ead59d529de564736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c656400000000000000000000000029948f683be2702824346933a8408b515f42e232000000000000000000000000cf16a0bebb13045c91127cdf7325d6d0d1ca6e750000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000083104ec5a083f88930505c37de9dc88ac61048e628326492d3461aaaf3339e9855ac302ca0a057665cae3298318db248f754ee1acf48feef619d5db43b8eef6bbc35e149e88400000069f867130183132ce594530000000000000000000000000000000000000080848129fc1c83104ec6a0e42708ae312d832e6fec8c8f9507cfbd6078fcdf376d7f6d87d9d0037389a685a01e06416854e14b18966ebc0af5bd10b88e0f84431e40d1fdb39a24aed1c7383500000089f8871401830103e894530000000000000000000000000000000000000080a49e7adc79000000000000000000000000b75d7e84517e1504c151b270255b087fd746d34c83104ec5a04d1117fb534cbbd76b2cd80e5b1d5c3067a7fc0ae9f1ca5618b25f499a8af1b2a071fb827cc484eb9b1c7e472a7d801261807bf12ec73025227a018e60231b893600000088f8861501828d1994530000000000000000000000000000000000000580a49e7adc79000000000000000000000000b75d7e84517e1504c151b270255b087fd746d34c83104ec5a0744be6f310561603dc484353a25f15ad4996fd507158d792825f055e8fa8866da03ae0a9ec7489745ab327048e9df9263905aafc5e2e95324fa7de3d0c372d6f1700000088f886160182fe7994530000000000000000000000000000000000000180a43d0f963e000000000000000000000000530000000000000000000000000000000000000383104ec5a0fad76714d09ff2ac62dbc1212509674b958cd876fb37fde2d174f793608c9cc1a015c718cd6fb8c0952c19143b3ef4303a6fe57f588718ce9fbbeb2bae24c67ad100000089f887170183010d9294530000000000000000000000000000000000000280a43d0f963e000000000000000000000000530000000000000000000000000000000000000383104ec6a09b8049860389055b6800bdb15935ee035ebc637ab7de003f245f430c4a9f727da048d57148892a995cba441c942f55f92dc90cfca483fbda1dcf4ce7bd0690b10c000000aaf8a8180183037cf694b75d7e84517e1504c151b270255b087fd746d34c80b844485cc9550000000000000000000000005260e38080bfe97e6c4925d9209ecc5f964373b6000000000000000000000000530000000000000000000000000000000000000583104ec6a0ecef62ab2c30e1e4b925120d1fe68f64652a07d99075733ceaeb58d0dc0dd98ea029e0ec0a980a0c782e2faf7242e2ab833d58a3f17bfd21f7a23ee1dfbbec28ba00000089f88719018301380594b75d7e84517e1504c151b270255b087fd746d34c80a43d0f963e000000000000000000000000530000000000000000000000000000000000000383104ec5a063a7d16c9ddce03cb4e992765333c206f5861c05968f7bea393aa78fe497c906a06fa487ddfddf3ff8d2d57be16d1eb2a85435d2573d1216734313abef4bac9cc6000000aaf8a81a018302b8ee946d79aa2e4fbf80cf8543ad97e294861853fb064980b844485cc95500000000000000000000000032139b5c8838e94ffcd83e60dff95daa7f0ba14c000000000000000000000000b878f37bb278bf0e4974856ffe86f5e6f66bd72583104ec6a076bc8d7c7b869f5269497e554703eef89296c3ed68eafadb87cc99e0a2ccb35ba0351d991a9f9b9072c4800459f8264263bf35a8d045748ae40c5954b2cd2764bf000000caf8c81b0183037da694a07cb742657294c339fb4d5d6cdf3fdbee8c1c6880b864c0c53b8b000000000000000000000000920f906b814597cf5dc76f95100f09cbaf9c57480000000000000000000000006d79aa2e4fbf80cf8543ad97e294861853fb0649000000000000000000000000b75d7e84517e1504c151b270255b087fd746d34c83104ec5a0b91b8de785cff8699317ab0460938fb4396a39fd691116f99115836f1e762b75a0739211531492f4d50fdd0b7503ce891567524154b2d36917b93f646d06dce4a3000000aaf8a81c018303308c94fe5fc32777646bd123564c41f711ff708dd4836080b844485cc955000000000000000000000000d1be599aacbc21448fd6373bbc7c1b4c7806f135000000000000000000000000b75d7e84517e1504c151b270255b087fd746d34c83104ec6a014e5991eba47411be428e631f3db3be811639f1decd60172e53577359fd0ef26a03eba8a4d176114356f52b7492af4b901d97260b830ac69be54d619b84816beaa000000aaf8a81d018303030e948fee20e0c0ef16f2898a8073531a857d11b9c70080b844485cc9550000000000000000000000001c441dfc5c2ed7a2aa8636748a664e59cb029157000000000000000000000000b75d7e84517e1504c151b270255b087fd746d34c83104ec6a08e29df024a2d4f2669e07c818c75cfaf4eb1d557ab27d8164274100be5eaa192a027e5bdfb23c6825e87a88cdd0a27ac774f84d2016c647ef520c20424f983a20e000000caf8c81e01830285849432139b5c8838e94ffcd83e60dff95daa7f0ba14c80b864c0c53b8b000000000000000000000000429b73a21cf3bf1f3e696a21a95408161daf311f0000000000000000000000006d79aa2e4fbf80cf8543ad97e294861853fb0649000000000000000000000000b75d7e84517e1504c151b270255b087fd746d34c83104ec5a01a949aadc5ea461b7b135d694822603b6aa3fa869f0dbaa039dda394077eb2eea030be8135bfa5db7640d26ed995e91bcb46498ce586a6ee4341e7df0a07825394000000eaf8e81f0183032d6d94b878f37bb278bf0e4974856ffe86f5e6f66bd72580b884f8c8765e000000000000000000000000ef37207c1a1eff6d6a9d7bff3cf4270e406d319b0000000000000000000000006d79aa2e4fbf80cf8543ad97e294861853fb0649000000000000000000000000b75d7e84517e1504c151b270255b087fd746d34c0000000000000000000000004c79382bd84a1906de73ee9678f43f59724ad8b583104ec6a096d427d3fb4518275c74bb658210c674463c8ffcc675269d6c62c392be9609c3a029019768a3de66084252a542683dfbac22ae40b00b2db68bd2719465646e0dd7000000caf8c82001830285c194bb88bf582f2bba46702621dae5cb9271057bc85b80b864c0c53b8b0000000000000000000000008be69e499d8848dffb4cf9bac909f3e2cf2fefa00000000000000000000000006d79aa2e4fbf80cf8543ad97e294861853fb0649000000000000000000000000b75d7e84517e1504c151b270255b087fd746d34c83104ec6a082c6b4f496d315f642db905f2b05b8e2153d74248f631018ef41880abd79d431a00aa54aa317f4f39b46665b1a9a5cb641ec55e2dcdb4dd0dd61c82f4216747b5200000088f8862101829a77944c79382bd84a1906de73ee9678f43f59724ad8b580a4f2fde38b000000000000000000000000b878f37bb278bf0e4974856ffe86f5e6f66bd72583104ec6a0669d34b395e796feb08e7f2669805a132a7d168c5097121d2350b2357623633fa04231c536294ba7f2e6d2cb3d04d01c387c1132743dd44db6715bf2a8ca28e9cf000001acf901a922018302fc7a94530000000000000000000000000000000000000380b9014479586dd7000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000007000000000000000000000000d69c917c7f1c0a724a51c189b4a8f4f8c8e8ca0a00000000000000000000000077fccf9536b810a11771a70128d3c9cd32e8a21c00000000000000000000000056eaba08988960856e229af0dcd1924c48259457000000000000000000000000c7bd1b9e89e24c9783900679dc91f7e9dca25539000000000000000000000000831a53b05bc02b11038307996564753d8366cc9300000000000000000000000089e31727c42646b88d5f2d576bc2859434e011440000000000000000000000004075a6bcad6c3c5b941c2482fda716a56608106b83104ec6a0fe9f58afa5ec697c105e6fe4aa067f583149e7fb89bb2f48d9ac3cf82faecb68a06239cf14912f5b9a6d6922d5488d19a98c5ba7054884f2f8c8facb29cf60978a00000088f886230182b6cb94530000000000000000000000000000000000000280a43577afc500000000000000000000000000000000000000000000000000000000000017d483104ec6a0184f3a4fd266cce02fe6f153c9bab53d9084134b83fea7fc2380e41b46123944a0765e99abce926cdd0664b63c3ad05dc41198c840dee3bd9fb849a3924bc219b500000088f886240182b79f94530000000000000000000000000000000000000280a470465597000000000000000000000000000000000000000000000000000000004a42fc8083104ec5a0ae8625cfa555adf68f7e5d17cb42846d8122be76f5db28af8edcf6eae38a5a1da0068847d119ad6f7432e0ede9588ed2e6a07f9f2a476f2cd314844b241955d91d0000006cf86a250182520894d69c917c7f1c0a724a51c189b4a8f4f8c8e8ca0a8814d1120d7b1600008083104ec5a0a1013fe1d8f464021cc42b417e5afca54d62a7329ce2889f8bc848813f280f14a00ce51b91d1723ffbfca34ca9bccd91e8308747a8d0eb41d3583560d5e63a655b0000006cf86a26018252089477fccf9536b810a11771a70128d3c9cd32e8a21c8814d1120d7b1600008083104ec6a074414edde9a3b2d3c3b74732f008fec72e43595a166dc82f908e3add20acd82ba057d40600c8388ca17e29dc7cd029fc4ed6a54b4eba3ffdb696238ae0cfd7c93f0000006cf86a27018252089456eaba08988960856e229af0dcd1924c482594578814d1120d7b1600008083104ec6a0c97205749bd4e839f371b809d54daa95c41352f43966a9d29785d146f9ec2d31a03807fab8d9e0653b571ec89df9691bede60e84513524922d46acacce3e81a9630000006cf86a280182520894c7bd1b9e89e24c9783900679dc91f7e9dca255398814d1120d7b1600008083104ec6a0674a0b7ce8a55e2f4d9b69dba6c8de4963dcd635e356b206ecbd223ed52ed040a0684e307cdba4afa38fecfda771dab4ebb07befadcc7822620153e2f4fe24739e000000000000000000000000000000000000000000000000000000000000000000000000e020b46cbd5ef0ce4f1cae852ab16d07da35553daccce248320b996d602453adac0c7dacdd1a024e662983999fb69a4fe2b65d58382af42655a5b51eafa1e7f84500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004abe34931e037f8fcbb756ab34ef73afb8373b7cc5b31a8eedca750cf534199e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000001c51b90d3dcbf89b5d9def03a02660780bc99a60bb21a9fb323ea7111b8e923d49ef696aa281d59deca384d813ba416325e8c0e7d30cdbda968e8972a98a3822000000000000000000000000000000000000000000000000000000000000000130000000000000000000000000000000000000000000000000000000063f87554000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000006cf86a290182520894831a53b05bc02b11038307996564753d8366cc938814d1120d7b1600008083104ec6a0fc6288e0210c6fecc4f729d9571be16af518385f043f57f398cd4ee5c268adf6a00e0546c06491bb15f36a0494881ae2df151e9cbcfd250df3fc99b4bff847e2920000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00c7dacdd1a024e662983999fb69a4fe2b65d58382af42655a5b51eafa1e7f845144a76f790609800dfb6cd76ab2d45a4c323290d6ffcfaa2b9ca1d2405ad7b4c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000531a81b5e39eac3c048c1925583c11c24e1b0873292d9cf77a0519eb092ccfa840000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000109a333d7a3018ac688a4ea5001137b718bf8cdf7f5fcee8da945a08acb630b81c51b90d3dcbf89b5d9def03a02660780bc99a60bb21a9fb323ea7111b8e923d400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000063f8755d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000700000006cf86a2a018252089489e31727c42646b88d5f2d576bc2859434e011448814d1120d7b1600008083104ec5a094df3812e93780dc419edbbd19fe3284a768971525dec61e16514f001a8c4e41a07af73b29aec9c3fca97333aa6a69b44bf5766945b362476034d7198f067d7a4300000000000000000000000000000000 \ No newline at end of file diff --git a/bridge-history-api/utils/database.go b/bridge-history-api/utils/database.go deleted file mode 100644 index 5d7383c165..0000000000 --- a/bridge-history-api/utils/database.go +++ /dev/null @@ -1,117 +0,0 @@ -package utils - -import ( - "context" - "database/sql" - "fmt" - "time" - - "github.com/ethereum/go-ethereum/log" - "gorm.io/driver/postgres" - "gorm.io/gorm" - "gorm.io/gorm/logger" - "gorm.io/gorm/utils" - - "bridge-history-api/config" -) - -type gormLogger struct { - gethLogger log.Logger -} - -func (g *gormLogger) LogMode(level logger.LogLevel) logger.Interface { - return g -} - -func (g *gormLogger) Info(_ context.Context, msg string, data ...interface{}) { - infoMsg := fmt.Sprintf(msg, data...) - g.gethLogger.Info("gorm", "info message", infoMsg) -} - -func (g *gormLogger) Warn(_ context.Context, msg string, data ...interface{}) { - warnMsg := fmt.Sprintf(msg, data...) - g.gethLogger.Warn("gorm", "warn message", warnMsg) -} - -func (g *gormLogger) Error(_ context.Context, msg string, data ...interface{}) { - errMsg := fmt.Sprintf(msg, data...) - g.gethLogger.Error("gorm", "err message", errMsg) -} - -func (g *gormLogger) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error) { - elapsed := time.Since(begin) - sql, rowsAffected := fc() - g.gethLogger.Debug("gorm", "line", utils.FileWithLineNum(), "cost", elapsed, "sql", sql, "rowsAffected", rowsAffected, "err", err) -} - -// InitDB init the db handler -func InitDB(config *config.DBConfig) (*gorm.DB, error) { - tmpGormLogger := gormLogger{ - gethLogger: log.Root(), - } - - db, err := gorm.Open(postgres.Open(config.DSN), &gorm.Config{ - Logger: &tmpGormLogger, - NowFunc: func() time.Time { - // why set time to UTC. - // if now set this, the inserted data time will use local timezone. like 2023-07-18 18:24:00 CST+8 - // but when inserted, store to postgres is 2023-07-18 18:24:00 UTC+0 the timezone is incorrect. - // As mysql dsn user:pass@tcp(127.0.0.1:3306)/dbname?charset=utf8mb4&parseTime=True&loc=Local, we cant set - // the timezone by loc=Local. but postgres's dsn don't have loc option to set timezone, so just need set the gorm option like that. - t, err := nowUTC() - if err != nil { - log.Error("Can not get UTC time: ", "err", err) - } - return t - }, - }) - if err != nil { - return nil, err - } - - sqlDB, pingErr := Ping(db) - if pingErr != nil { - return nil, pingErr - } - - sqlDB.SetConnMaxLifetime(time.Minute * 10) - sqlDB.SetConnMaxIdleTime(time.Minute * 5) - sqlDB.SetMaxOpenConns(config.MaxOpenNum) - sqlDB.SetMaxIdleConns(config.MaxIdleNum) - - return db, nil -} - -// Ping check db status -func Ping(db *gorm.DB) (*sql.DB, error) { - sqlDB, err := db.DB() - if err != nil { - return nil, err - } - - if err = sqlDB.Ping(); err != nil { - return nil, err - } - return sqlDB, nil -} - -// CloseDB close the db handler. notice the db handler only can close when then program exit. -func CloseDB(db *gorm.DB) error { - sqlDB, err := db.DB() - if err != nil { - return err - } - if err := sqlDB.Close(); err != nil { - return err - } - return nil -} - -// nowUTC get the utc time.Now -func nowUTC() (time.Time, error) { - utc, err := time.LoadLocation("") - if err != nil { - return time.Time{}, err - } - return time.Now().In(utc), nil -} diff --git a/bridge-history-api/utils/flags.go b/bridge-history-api/utils/flags.go deleted file mode 100644 index 3e96c9e325..0000000000 --- a/bridge-history-api/utils/flags.go +++ /dev/null @@ -1,69 +0,0 @@ -package utils - -import ( - "github.com/urfave/cli/v2" -) - -var ( - // CommonFlags is used for app common flags in different modules - CommonFlags = []cli.Flag{ - &ConfigFileFlag, - &VerbosityFlag, - &LogFileFlag, - &LogJSONFormat, - &LogDebugFlag, - &MetricsEnabled, - &MetricsAddr, - &MetricsPort, - } - // ConfigFileFlag load json type config file. - ConfigFileFlag = cli.StringFlag{ - Name: "config", - Usage: "JSON configuration file", - Value: "./config.json", - } - // VerbosityFlag log level. - VerbosityFlag = cli.IntFlag{ - Name: "verbosity", - Usage: "Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail", - Value: 3, - } - // LogFileFlag decides where the logger output is sent. If this flag is left - // empty, it will log to stdout. - LogFileFlag = cli.StringFlag{ - Name: "log.file", - Usage: "Tells the module where to write log entries", - } - // LogJSONFormat decides the log format is json or not - LogJSONFormat = cli.BoolFlag{ - Name: "log.json", - Usage: "Tells the module whether log format is json or not", - Value: true, - } - // LogDebugFlag make log messages with call-site location - LogDebugFlag = cli.BoolFlag{ - Name: "log.debug", - Usage: "Prepends log messages with call-site location (file and line number)", - } - // MetricsEnabled enable metrics collection and reporting - MetricsEnabled = cli.BoolFlag{ - Name: "metrics", - Usage: "Enable metrics collection and reporting", - Category: "METRICS", - Value: false, - } - // MetricsAddr is listening address of Metrics reporting server - MetricsAddr = cli.StringFlag{ - Name: "metrics.addr", - Usage: "Metrics reporting server listening address", - Category: "METRICS", - Value: "127.0.0.1", - } - // MetricsPort is listening port of Metrics reporting server - MetricsPort = cli.IntFlag{ - Name: "metrics.port", - Usage: "Metrics reporting server listening port", - Category: "METRICS", - Value: 6060, - } -) diff --git a/bridge-history-api/utils/logger.go b/bridge-history-api/utils/logger.go deleted file mode 100644 index e43c46ba0c..0000000000 --- a/bridge-history-api/utils/logger.go +++ /dev/null @@ -1,42 +0,0 @@ -package utils - -import ( - "io" - "os" - "path/filepath" - - "github.com/ethereum/go-ethereum/log" - "github.com/mattn/go-colorable" - "github.com/mattn/go-isatty" - "github.com/urfave/cli/v2" -) - -// LogSetup is for setup logger -func LogSetup(ctx *cli.Context) error { - var ostream log.Handler - if logFile := ctx.String(LogFileFlag.Name); len(logFile) > 0 { - fp, err := os.OpenFile(filepath.Clean(logFile), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600) - if err != nil { - log.Crit("Failed to open log file", "err", err) - } - if ctx.Bool(LogJSONFormat.Name) { - ostream = log.StreamHandler(io.Writer(fp), log.JSONFormat()) - } else { - ostream = log.StreamHandler(io.Writer(fp), log.TerminalFormat(true)) - } - } else { - output := io.Writer(os.Stderr) - usecolor := (isatty.IsTerminal(os.Stderr.Fd()) || isatty.IsCygwinTerminal(os.Stderr.Fd())) && os.Getenv("TERM") != "dumb" - if usecolor { - output = colorable.NewColorableStderr() - } - ostream = log.StreamHandler(output, log.TerminalFormat(usecolor)) - } - // show the call file and line number - log.PrintOrigins(ctx.Bool(LogDebugFlag.Name)) - glogger := log.NewGlogHandler(ostream) - // Set log level - glogger.Verbosity(log.Lvl(ctx.Int(VerbosityFlag.Name))) - log.Root().SetHandler(glogger) - return nil -} diff --git a/bridge-history-api/utils/parse_event.go b/bridge-history-api/utils/parse_event.go deleted file mode 100644 index 08b518932d..0000000000 --- a/bridge-history-api/utils/parse_event.go +++ /dev/null @@ -1,383 +0,0 @@ -package utils - -import ( - "context" - "math/big" - "strings" - - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" - - backendabi "bridge-history-api/abi" - "bridge-history-api/orm" -) - -// ParseBackendL1EventLogs parses L1 watched events -func ParseBackendL1EventLogs(logs []types.Log) ([]*orm.CrossMsg, []*orm.RelayedMsg, error) { - // Need use contract abi to parse event Log - // Can only be tested after we have our contracts set up - - var l1CrossMsg []*orm.CrossMsg - var relayedMsgs []*orm.RelayedMsg - var msgHash string - for _, vlog := range logs { - switch vlog.Topics[0] { - case backendabi.L1DepositETHSig: - event := backendabi.DepositETH{} - err := UnpackLog(backendabi.L1ETHGatewayABI, &event, "DepositETH", vlog) - if err != nil { - log.Warn("Failed to unpack DepositETH event", "err", err) - return l1CrossMsg, relayedMsgs, err - } - l1CrossMsg = append(l1CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Amount: event.Amount.String(), - Asset: int(orm.ETH), - Layer1Hash: vlog.TxHash.Hex(), - MsgType: int(orm.Layer1Msg), - MsgHash: msgHash, - }) - case backendabi.L1DepositERC20Sig: - event := backendabi.ERC20MessageEvent{} - err := UnpackLog(backendabi.L1StandardERC20GatewayABI, &event, "DepositERC20", vlog) - if err != nil { - log.Warn("Failed to unpack DepositERC20 event", "err", err) - return l1CrossMsg, relayedMsgs, err - } - l1CrossMsg = append(l1CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Amount: event.Amount.String(), - Asset: int(orm.ERC20), - Layer1Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - MsgType: int(orm.Layer1Msg), - MsgHash: msgHash, - }) - case backendabi.L1DepositERC721Sig: - event := backendabi.ERC721MessageEvent{} - err := UnpackLog(backendabi.L1ERC721GatewayABI, &event, "DepositERC721", vlog) - if err != nil { - log.Warn("Failed to unpack DepositERC721 event", "err", err) - return l1CrossMsg, relayedMsgs, err - } - l1CrossMsg = append(l1CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Asset: int(orm.ERC721), - Layer1Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - TokenIDs: event.TokenID.String(), - MsgType: int(orm.Layer1Msg), - MsgHash: msgHash, - }) - case backendabi.L1DepositERC1155Sig: - event := backendabi.ERC1155MessageEvent{} - err := UnpackLog(backendabi.L1ERC1155GatewayABI, &event, "DepositERC1155", vlog) - if err != nil { - log.Warn("Failed to unpack DepositERC1155 event", "err", err) - return l1CrossMsg, relayedMsgs, err - } - l1CrossMsg = append(l1CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Asset: int(orm.ERC1155), - Layer1Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - TokenIDs: event.TokenID.String(), - Amount: event.Amount.String(), - MsgType: int(orm.Layer1Msg), - MsgHash: msgHash, - }) - case backendabi.L1SentMessageEventSignature: - event := backendabi.L1SentMessageEvent{} - err := UnpackLog(backendabi.L1ScrollMessengerABI, &event, "SentMessage", vlog) - if err != nil { - log.Warn("Failed to unpack SentMessage event", "err", err) - return l1CrossMsg, relayedMsgs, err - } - // since every deposit event will emit after a sent event, so can use this msg_hash as next withdraw event's msg_hash - msgHash = ComputeMessageHash(event.Sender, event.Target, event.Value, event.MessageNonce, event.Message).Hex() - case backendabi.L1BatchDepositERC721Sig: - event := backendabi.BatchERC721MessageEvent{} - err := UnpackLog(backendabi.L1ERC721GatewayABI, &event, "BatchDepositERC721", vlog) - if err != nil { - log.Warn("Failed to unpack BatchDepositERC721 event", "err", err) - return l1CrossMsg, relayedMsgs, err - } - l1CrossMsg = append(l1CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Asset: int(orm.ERC721), - Layer1Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - TokenIDs: convertBigIntArrayToString(event.TokenIDs), - MsgType: int(orm.Layer1Msg), - MsgHash: msgHash, - }) - case backendabi.L1BatchDepositERC1155Sig: - event := backendabi.BatchERC1155MessageEvent{} - err := UnpackLog(backendabi.L1ERC1155GatewayABI, &event, "BatchDepositERC1155", vlog) - if err != nil { - log.Warn("Failed to unpack BatchDepositERC1155 event", "err", err) - return l1CrossMsg, relayedMsgs, err - } - l1CrossMsg = append(l1CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Asset: int(orm.ERC1155), - Layer1Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - TokenIDs: convertBigIntArrayToString(event.TokenIDs), - TokenAmounts: convertBigIntArrayToString(event.TokenAmounts), - MsgType: int(orm.Layer1Msg), - MsgHash: msgHash, - }) - case backendabi.L1RelayedMessageEventSignature: - event := backendabi.L1RelayedMessageEvent{} - err := UnpackLog(backendabi.L1ScrollMessengerABI, &event, "RelayedMessage", vlog) - if err != nil { - log.Warn("Failed to unpack RelayedMessage event", "err", err) - return l1CrossMsg, relayedMsgs, err - } - relayedMsgs = append(relayedMsgs, &orm.RelayedMsg{ - MsgHash: event.MessageHash.String(), - Height: vlog.BlockNumber, - Layer1Hash: vlog.TxHash.Hex(), - }) - - } - - } - return l1CrossMsg, relayedMsgs, nil -} - -// ParseBackendL2EventLogs parses L2 watched events -func ParseBackendL2EventLogs(logs []types.Log) ([]*orm.CrossMsg, []*orm.RelayedMsg, []*orm.L2SentMsg, error) { - // Need use contract abi to parse event Log - // Can only be tested after we have our contracts set up - - var l2CrossMsg []*orm.CrossMsg - // this is use to confirm finalized l1 msg - var relayedMsgs []*orm.RelayedMsg - var l2SentMsgs []*orm.L2SentMsg - for _, vlog := range logs { - switch vlog.Topics[0] { - case backendabi.L2WithdrawETHSig: - event := backendabi.DepositETH{} - err := UnpackLog(backendabi.L2ETHGatewayABI, &event, "WithdrawETH", vlog) - if err != nil { - log.Warn("Failed to unpack WithdrawETH event", "err", err) - return l2CrossMsg, relayedMsgs, l2SentMsgs, err - } - l2SentMsgs[len(l2SentMsgs)-1].OriginalSender = event.From.Hex() - l2CrossMsg = append(l2CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Amount: event.Amount.String(), - Asset: int(orm.ETH), - Layer2Hash: vlog.TxHash.Hex(), - MsgType: int(orm.Layer2Msg), - MsgHash: l2SentMsgs[len(l2SentMsgs)-1].MsgHash, - }) - case backendabi.L2WithdrawERC20Sig: - event := backendabi.ERC20MessageEvent{} - err := UnpackLog(backendabi.L2StandardERC20GatewayABI, &event, "WithdrawERC20", vlog) - if err != nil { - log.Warn("Failed to unpack WithdrawERC20 event", "err", err) - return l2CrossMsg, relayedMsgs, l2SentMsgs, err - } - l2SentMsgs[len(l2SentMsgs)-1].OriginalSender = event.From.Hex() - l2CrossMsg = append(l2CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Amount: event.Amount.String(), - Asset: int(orm.ERC20), - Layer2Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - MsgType: int(orm.Layer2Msg), - MsgHash: l2SentMsgs[len(l2SentMsgs)-1].MsgHash, - }) - case backendabi.L2WithdrawERC721Sig: - event := backendabi.ERC721MessageEvent{} - err := UnpackLog(backendabi.L2ERC721GatewayABI, &event, "WithdrawERC721", vlog) - if err != nil { - log.Warn("Failed to unpack WithdrawERC721 event", "err", err) - return l2CrossMsg, relayedMsgs, l2SentMsgs, err - } - l2SentMsgs[len(l2SentMsgs)-1].OriginalSender = event.From.Hex() - l2CrossMsg = append(l2CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Asset: int(orm.ERC721), - Layer2Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - TokenIDs: event.TokenID.String(), - MsgType: int(orm.Layer2Msg), - MsgHash: l2SentMsgs[len(l2SentMsgs)-1].MsgHash, - }) - case backendabi.L2WithdrawERC1155Sig: - event := backendabi.ERC1155MessageEvent{} - err := UnpackLog(backendabi.L2ERC1155GatewayABI, &event, "WithdrawERC1155", vlog) - if err != nil { - log.Warn("Failed to unpack WithdrawERC1155 event", "err", err) - return l2CrossMsg, relayedMsgs, l2SentMsgs, err - } - l2SentMsgs[len(l2SentMsgs)-1].OriginalSender = event.From.Hex() - l2CrossMsg = append(l2CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Asset: int(orm.ERC1155), - Layer2Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - TokenIDs: event.TokenID.String(), - Amount: event.Amount.String(), - MsgType: int(orm.Layer2Msg), - MsgHash: l2SentMsgs[len(l2SentMsgs)-1].MsgHash, - }) - case backendabi.L2BatchWithdrawERC721Sig: - event := backendabi.BatchERC721MessageEvent{} - err := UnpackLog(backendabi.L2ERC721GatewayABI, &event, "BatchWithdrawERC721", vlog) - if err != nil { - log.Warn("Failed to unpack BatchWithdrawERC721 event", "err", err) - return l2CrossMsg, relayedMsgs, l2SentMsgs, err - } - l2SentMsgs[len(l2SentMsgs)-1].OriginalSender = event.From.Hex() - l2CrossMsg = append(l2CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Asset: int(orm.ERC721), - Layer1Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - MsgType: int(orm.Layer2Msg), - TokenIDs: convertBigIntArrayToString(event.TokenIDs), - MsgHash: l2SentMsgs[len(l2SentMsgs)-1].MsgHash, - }) - case backendabi.L2BatchWithdrawERC1155Sig: - event := backendabi.BatchERC1155MessageEvent{} - err := UnpackLog(backendabi.L2ERC1155GatewayABI, &event, "BatchWithdrawERC1155", vlog) - if err != nil { - log.Warn("Failed to unpack BatchWithdrawERC1155 event", "err", err) - return l2CrossMsg, relayedMsgs, l2SentMsgs, err - } - l2SentMsgs[len(l2SentMsgs)-1].OriginalSender = event.From.Hex() - l2CrossMsg = append(l2CrossMsg, &orm.CrossMsg{ - Height: vlog.BlockNumber, - Sender: event.From.String(), - Target: event.To.String(), - Asset: int(orm.ERC1155), - Layer1Hash: vlog.TxHash.Hex(), - Layer1Token: event.L1Token.Hex(), - Layer2Token: event.L2Token.Hex(), - MsgType: int(orm.Layer2Msg), - TokenIDs: convertBigIntArrayToString(event.TokenIDs), - TokenAmounts: convertBigIntArrayToString(event.TokenAmounts), - MsgHash: l2SentMsgs[len(l2SentMsgs)-1].MsgHash, - }) - case backendabi.L2SentMessageEventSignature: - event := backendabi.L2SentMessageEvent{} - err := UnpackLog(backendabi.L2ScrollMessengerABI, &event, "SentMessage", vlog) - if err != nil { - log.Warn("Failed to unpack SentMessage event", "err", err) - return l2CrossMsg, relayedMsgs, l2SentMsgs, err - } - // since every withdraw event will emit after a sent event, so can use this msg_hash as next withdraw event's msg_hash - msgHash := ComputeMessageHash(event.Sender, event.Target, event.Value, event.MessageNonce, event.Message) - l2SentMsgs = append(l2SentMsgs, - &orm.L2SentMsg{ - Sender: event.Sender.Hex(), - TxHash: vlog.TxHash.Hex(), - Target: event.Target.Hex(), - Value: event.Value.String(), - MsgHash: msgHash.Hex(), - Height: vlog.BlockNumber, - Nonce: event.MessageNonce.Uint64(), - MsgData: hexutil.Encode(event.Message), - }) - case backendabi.L2RelayedMessageEventSignature: - event := backendabi.L2RelayedMessageEvent{} - err := UnpackLog(backendabi.L2ScrollMessengerABI, &event, "RelayedMessage", vlog) - if err != nil { - log.Warn("Failed to unpack RelayedMessage event", "err", err) - return l2CrossMsg, relayedMsgs, l2SentMsgs, err - } - relayedMsgs = append(relayedMsgs, &orm.RelayedMsg{ - MsgHash: event.MessageHash.String(), - Height: vlog.BlockNumber, - Layer2Hash: vlog.TxHash.Hex(), - }) - - } - } - return l2CrossMsg, relayedMsgs, l2SentMsgs, nil -} - -// ParseBatchInfoFromScrollChain parses ScrollChain events -func ParseBatchInfoFromScrollChain(ctx context.Context, client *ethclient.Client, logs []types.Log) ([]*orm.RollupBatch, error) { - var rollupBatches []*orm.RollupBatch - for _, vlog := range logs { - switch vlog.Topics[0] { - case backendabi.L1CommitBatchEventSignature: - event := backendabi.L1CommitBatchEvent{} - err := UnpackLog(backendabi.ScrollChainABI, &event, "CommitBatch", vlog) - if err != nil { - log.Warn("Failed to unpack CommitBatch event", "err", err) - return rollupBatches, err - } - commitTx, isPending, err := client.TransactionByHash(ctx, vlog.TxHash) - if err != nil || isPending { - log.Warn("Failed to get commit Batch tx receipt or the tx is still pending", "err", err) - return rollupBatches, err - } - index, startBlock, endBlock, err := GetBatchRangeFromCalldataV2(commitTx.Data()) - if err != nil { - log.Warn("Failed to get batch range from calldata", "hash", commitTx.Hash().Hex(), "height", vlog.BlockNumber) - return rollupBatches, err - } - rollupBatches = append(rollupBatches, &orm.RollupBatch{ - CommitHeight: vlog.BlockNumber, - BatchIndex: index, - BatchHash: event.BatchHash.Hex(), - StartBlockNumber: startBlock, - EndBlockNumber: endBlock, - }) - - default: - continue - } - } - return rollupBatches, nil -} - -func convertBigIntArrayToString(array []*big.Int) string { - stringArray := make([]string, len(array)) - for i, num := range array { - stringArray[i] = num.String() - } - - result := strings.Join(stringArray, ", ") - return result -} diff --git a/bridge-history-api/utils/utils.go b/bridge-history-api/utils/utils.go deleted file mode 100644 index 1e4674ff06..0000000000 --- a/bridge-history-api/utils/utils.go +++ /dev/null @@ -1,119 +0,0 @@ -package utils - -import ( - "context" - "encoding/binary" - "errors" - "fmt" - "math/big" - - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethclient" - - backendabi "bridge-history-api/abi" -) - -// Keccak2 compute the keccack256 of two concatenations of bytes32 -func Keccak2(a common.Hash, b common.Hash) common.Hash { - return common.BytesToHash(crypto.Keccak256(append(a.Bytes()[:], b.Bytes()[:]...))) -} - -// GetSafeBlockNumber get the safe block number, which is the current block number minus the confirmations -func GetSafeBlockNumber(ctx context.Context, client *ethclient.Client, confirmations uint64) (uint64, error) { - number, err := client.BlockNumber(ctx) - if err != nil || number <= confirmations { - return 0, err - } - number = number - confirmations - return number, nil -} - -// UnpackLog unpacks a retrieved log into the provided output structure. -// @todo: add unit test. -func UnpackLog(c *abi.ABI, out interface{}, event string, log types.Log) error { - if log.Topics[0] != c.Events[event].ID { - return fmt.Errorf("event signature mismatch") - } - if len(log.Data) > 0 { - if err := c.UnpackIntoInterface(out, event, log.Data); err != nil { - return err - } - } - var indexed abi.Arguments - for _, arg := range c.Events[event].Inputs { - if arg.Indexed { - indexed = append(indexed, arg) - } - } - return abi.ParseTopics(out, indexed, log.Topics[1:]) -} - -// ComputeMessageHash compute the message hash -func ComputeMessageHash( - sender common.Address, - target common.Address, - value *big.Int, - messageNonce *big.Int, - message []byte, -) common.Hash { - data, _ := backendabi.L2ScrollMessengerABI.Pack("relayMessage", sender, target, value, messageNonce, message) - return common.BytesToHash(crypto.Keccak256(data)) -} - -type commitBatchArgs struct { - Version uint8 - ParentBatchHeader []byte - Chunks [][]byte - SkippedL1MessageBitmap []byte -} - -// GetBatchRangeFromCalldataV2 find the block range from calldata, both inclusive. -func GetBatchRangeFromCalldataV2(calldata []byte) (uint64, uint64, uint64, error) { - method := backendabi.ScrollChainV2ABI.Methods["commitBatch"] - values, err := method.Inputs.Unpack(calldata[4:]) - if err != nil { - // special case: import genesis batch - method = backendabi.ScrollChainV2ABI.Methods["importGenesisBatch"] - _, err2 := method.Inputs.Unpack(calldata[4:]) - if err2 == nil { - // genesis batch - return 0, 0, 0, nil - } - // none of "commitBatch" and "importGenesisBatch" match, give up - return 0, 0, 0, err - } - args := commitBatchArgs{} - err = method.Inputs.Copy(&args, values) - if err != nil { - return 0, 0, 0, err - } - - var startBlock uint64 - var finishBlock uint64 - - // decode batchIndex from ParentBatchHeader - if len(args.ParentBatchHeader) < 9 { - return 0, 0, 0, errors.New("invalid parent batch header") - } - batchIndex := binary.BigEndian.Uint64(args.ParentBatchHeader[1:9]) + 1 - - // decode blocks from chunk and assume that there's no empty chunk - // | 1 byte | 60 bytes | ... | 60 bytes | - // | num blocks | block 1 | ... | block n | - if len(args.Chunks) == 0 { - return 0, 0, 0, errors.New("invalid chunks") - } - chunk := args.Chunks[0] - block := chunk[1:61] // first block in chunk - startBlock = binary.BigEndian.Uint64(block[0:8]) - - chunk = args.Chunks[len(args.Chunks)-1] - lastBlockIndex := int(chunk[0]) - 1 - block = chunk[1+lastBlockIndex*60 : 1+lastBlockIndex*60+60] // last block in chunk - finishBlock = binary.BigEndian.Uint64(block[0:8]) - - return batchIndex, startBlock, finishBlock, err -} diff --git a/bridge-history-api/utils/utils_test.go b/bridge-history-api/utils/utils_test.go deleted file mode 100644 index d457a87864..0000000000 --- a/bridge-history-api/utils/utils_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package utils_test - -import ( - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/assert" - - "bridge-history-api/utils" -) - -func TestKeccak2(t *testing.T) { - a := common.HexToHash("0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0") - b := common.HexToHash("0x222ff5e0b5877792c2bc1670e2ccd0c2c97cd7bb1672a57d598db05092d3d72c") - c := utils.Keccak2(a, b) - assert.NotEmpty(t, c) - assert.NotEqual(t, a, c) - assert.NotEqual(t, b, c) - assert.Equal(t, "0xc0ffbd7f501bd3d49721b0724b2bff657cb2378f15d5a9b97cd7ea5bf630d512", c.Hex()) -} - -func TestGetBatchRangeFromCalldataV2(t *testing.T) { - // single chunk - batchIndex, start, finish, err := utils.GetBatchRangeFromCalldataV2(common.Hex2Bytes("1325aca000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000005900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003d0100000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000")) - assert.NoError(t, err) - assert.Equal(t, start, uint64(1)) - assert.Equal(t, finish, uint64(1)) - assert.Equal(t, batchIndex, uint64(1)) - - // multiple chunk - batchIndex, start, finish, err = utils.GetBatchRangeFromCalldataV2(common.Hex2Bytes("1325aca000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000007900000000000000000100000000000000010000000000000001038433daac85a0b03cd443ed50bc85e832c883061651ae2182b2984751e0b340119b828c2a2798d2c957228ebeaff7e10bb099ae0d4e224f3eeb779ff61cba610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004c01000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000010000000001000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b403000000000000000b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000300000000000000000b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00050000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012c01000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000100000000010000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa800000000000000000000000000000000000000000000000000000000000000aa")) - assert.NoError(t, err) - assert.Equal(t, start, uint64(10)) - assert.Equal(t, finish, uint64(20)) - assert.Equal(t, batchIndex, uint64(2)) - - // genesis batch - batchIndex, start, finish, err = utils.GetBatchRangeFromCalldataV2(common.Hex2Bytes("3fdeecb200000000000000000000000000000000000000000000000000000000000000402dcb5308098d24a37fc1487a229fcedb09fa4343ede39cbad365bc925535bb09000000000000000000000000000000000000000000000000000000000000005900000000000000000000000000000000000000000000000000c252bc9780c4d83cf11f14b8cd03c92c4d18ce07710ba836d31d12da216c8330000000000000000000000000000000000000000000000000000000000000000000000000000000")) - assert.NoError(t, err) - assert.Equal(t, start, uint64(0)) - assert.Equal(t, finish, uint64(0)) - assert.Equal(t, batchIndex, uint64(0)) -} diff --git a/build/dockerfiles/bridgehistoryapi-api.Dockerfile b/build/dockerfiles/bridgehistoryapi-api.Dockerfile new file mode 100644 index 0000000000..161d9b1414 --- /dev/null +++ b/build/dockerfiles/bridgehistoryapi-api.Dockerfile @@ -0,0 +1,21 @@ +# Download Go dependencies +FROM golang:1.20-alpine3.16 as base + +WORKDIR /src +COPY go.mod* ./ +COPY ./bridge-history-api/go.* ./ +RUN go mod download -x + +# Build bridgehistoryapi-api +FROM base as builder + +RUN --mount=target=. \ + --mount=type=cache,target=/root/.cache/go-build \ + cd /src/bridge-history-api/cmd/api && go build -v -p 4 -o /bin/bridgehistoryapi-api + +# Pull bridgehistoryapi-api into a second stage deploy alpine container +FROM alpine:latest + +COPY --from=builder /bin/bridgehistoryapi-api /bin/ + +ENTRYPOINT ["bridgehistoryapi-api"] \ No newline at end of file diff --git a/build/dockerfiles/bridgehistoryapi-cross-msg-fetcher.Dockerfile b/build/dockerfiles/bridgehistoryapi-cross-msg-fetcher.Dockerfile deleted file mode 100644 index d5087a8a4b..0000000000 --- a/build/dockerfiles/bridgehistoryapi-cross-msg-fetcher.Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# Download Go dependencies -FROM golang:1.20-alpine3.16 as base - -WORKDIR /src -COPY go.mod* ./ -COPY ./bridge-history-api/go.* ./ -RUN go mod download -x - -# Build bridgehistoryapi-cross-msg-fetcher -FROM base as builder - -RUN --mount=target=. \ - --mount=type=cache,target=/root/.cache/go-build \ - cd /src/bridge-history-api/cmd/cross_msg_fetcher && go build -v -p 4 -o /bin/bridgehistoryapi-cross-msg-fetcher - -# Pull bridgehistoryapi-cross-msg-fetcher into a second stage deploy alpine container -FROM alpine:latest - -COPY --from=builder /bin/bridgehistoryapi-cross-msg-fetcher /bin/ - -ENTRYPOINT ["bridgehistoryapi-cross-msg-fetcher"] \ No newline at end of file diff --git a/build/dockerfiles/bridgehistoryapi-fetcher.Dockerfile b/build/dockerfiles/bridgehistoryapi-fetcher.Dockerfile new file mode 100644 index 0000000000..7819cd18f6 --- /dev/null +++ b/build/dockerfiles/bridgehistoryapi-fetcher.Dockerfile @@ -0,0 +1,21 @@ +# Download Go dependencies +FROM golang:1.20-alpine3.16 as base + +WORKDIR /src +COPY go.mod* ./ +COPY ./bridge-history-api/go.* ./ +RUN go mod download -x + +# Build bridgehistoryapi-fetcher +FROM base as builder + +RUN --mount=target=. \ + --mount=type=cache,target=/root/.cache/go-build \ + cd /src/bridge-history-api/cmd/fetcher && go build -v -p 4 -o /bin/bridgehistoryapi-fetcher + +# Pull bridgehistoryapi-fetcher into a second stage deploy alpine container +FROM alpine:latest + +COPY --from=builder /bin/bridgehistoryapi-fetcher /bin/ + +ENTRYPOINT ["bridgehistoryapi-fetcher"] \ No newline at end of file diff --git a/build/dockerfiles/bridgehistoryapi-server.Dockerfile b/build/dockerfiles/bridgehistoryapi-server.Dockerfile deleted file mode 100644 index 7026eec7eb..0000000000 --- a/build/dockerfiles/bridgehistoryapi-server.Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# Download Go dependencies -FROM golang:1.20-alpine3.16 as base - -WORKDIR /src -COPY go.mod* ./ -COPY ./bridge-history-api/go.* ./ -RUN go mod download -x - -# Build bridgehistoryapi-server -FROM base as builder - -RUN --mount=target=. \ - --mount=type=cache,target=/root/.cache/go-build \ - cd /src/bridge-history-api/cmd/backend_server && go build -v -p 4 -o /bin/bridgehistoryapi-server - -# Pull bridgehistoryapi-server into a second stage deploy alpine container -FROM alpine:latest - -COPY --from=builder /bin/bridgehistoryapi-server /bin/ - -ENTRYPOINT ["bridgehistoryapi-server"] \ No newline at end of file diff --git a/common/go.mod b/common/go.mod index e1716a0564..f574f6b75b 100644 --- a/common/go.mod +++ b/common/go.mod @@ -4,13 +4,13 @@ go 1.20 require ( github.com/bits-and-blooms/bitset v1.12.0 - github.com/docker/docker v23.0.6+incompatible + github.com/docker/docker v24.0.7+incompatible github.com/gin-contrib/pprof v1.4.0 github.com/gin-gonic/gin v1.9.1 github.com/jmoiron/sqlx v1.3.5 github.com/lib/pq v1.10.9 github.com/mattn/go-colorable v0.1.13 - github.com/mattn/go-isatty v0.0.19 + github.com/mattn/go-isatty v0.0.20 github.com/modern-go/reflect2 v1.0.2 github.com/orcaman/concurrent-map v1.0.0 github.com/prometheus/client_golang v1.14.0 @@ -18,7 +18,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.25.7 gorm.io/driver/postgres v1.5.0 - gorm.io/gorm v1.25.2 + gorm.io/gorm v1.25.5 ) require ( @@ -27,13 +27,14 @@ require ( github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd v0.20.1-beta // indirect - github.com/bytedance/sonic v1.9.2 // indirect + github.com/bytedance/sonic v1.10.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect + github.com/chenzhuoyu/iasm v0.9.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set v1.8.0 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect @@ -41,21 +42,23 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.14.1 // indirect + github.com/go-playground/validator/v10 v10.15.5 // indirect github.com/go-sql-driver/mysql v1.7.1 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/iden3/go-iden3-crypto v0.0.15 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/pgx/v5 v5.3.1 // indirect + github.com/jackc/pgx/v5 v5.5.0 // indirect + github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect @@ -71,13 +74,13 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc3 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.39.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect @@ -91,16 +94,16 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/arch v0.4.0 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + golang.org/x/arch v0.5.0 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.18.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.15.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/common/go.sum b/common/go.sum index 242eb84ace..50a9f89dce 100644 --- a/common/go.sum +++ b/common/go.sum @@ -20,14 +20,18 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.2 h1:GDaNjuWSGu09guE9Oql0MSTNhNCLlWwO8y/xM5BzcbM= -github.com/bytedance/sonic v1.9.2/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiaysc= +github.com/bytedance/sonic v1.10.1/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -37,10 +41,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.6+incompatible h1:aBD4np894vatVX99UTx/GyOUOK4uEcROwA3+bQhEcoU= -github.com/docker/docker v23.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -69,8 +73,8 @@ github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= -github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= -github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= +github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= @@ -90,10 +94,11 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= @@ -111,9 +116,11 @@ github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5ey github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgx/v5 v5.3.0/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= -github.com/jackc/pgx/v5 v5.3.1 h1:Fcr8QJ1ZeLi5zsPZqQeUZhNhxfkkKBOgJuYkJHoBOtU= -github.com/jackc/pgx/v5 v5.3.1/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= +github.com/jackc/pgx/v5 v5.5.0 h1:NxstgwndsTRy7eq9/kqYc/BZh5w2hHJV86wjvO+1xPw= +github.com/jackc/pgx/v5 v5.5.0/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -132,6 +139,7 @@ github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6 github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= @@ -152,8 +160,8 @@ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxec github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= @@ -179,13 +187,13 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= -github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY= github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -197,8 +205,8 @@ github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvq github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= @@ -231,7 +239,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -254,11 +261,11 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsr github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.5.0 h1:jpGode6huXQxcskEIpOCvrU+tzo81b6+oFLUYXWtH/Y= +golang.org/x/arch v0.5.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -271,8 +278,8 @@ golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -281,8 +288,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -331,8 +338,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -361,8 +368,9 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/postgres v1.5.0 h1:u2FXTy14l45qc3UeCJ7QaAXZmZfDDv0YrthvmRq1l0U= gorm.io/driver/postgres v1.5.0/go.mod h1:FUZXzO+5Uqg5zzwzv4KK49R8lvGIyscBOqYrtI1Ce9A= gorm.io/gorm v1.24.7-0.20230306060331-85eaf9eeda11/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho= -gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= +gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/common/utils/flags.go b/common/utils/flags.go index 455f0b2b32..9ea2440986 100644 --- a/common/utils/flags.go +++ b/common/utils/flags.go @@ -15,6 +15,7 @@ var ( &MetricsEnabled, &MetricsAddr, &MetricsPort, + &ServicePortFlag, } // RollupRelayerFlags contains flags only used in rollup-relayer RollupRelayerFlags = []cli.Flag{ @@ -24,7 +25,7 @@ var ( ConfigFileFlag = cli.StringFlag{ Name: "config", Usage: "JSON configuration file", - Value: "./config.json", + Value: "./conf/config.json", } // VerbosityFlag log level. VerbosityFlag = cli.IntFlag{ @@ -76,4 +77,10 @@ var ( Usage: "Import genesis batch into L1 contract during startup", Value: false, } + // ServicePortFlag is the port the service will listen on + ServicePortFlag = cli.IntFlag{ + Name: "service.port", + Usage: "Port that the service will listen on", + Value: 8080, + } ) diff --git a/coordinator/go.mod b/coordinator/go.mod index 410592f739..ab2c62b489 100644 --- a/coordinator/go.mod +++ b/coordinator/go.mod @@ -11,19 +11,19 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.25.7 - golang.org/x/arch v0.4.0 // indirect - gorm.io/gorm v1.25.2 + golang.org/x/arch v0.5.0 // indirect + gorm.io/gorm v1.25.5 ) require ( - github.com/bytedance/sonic v1.9.2 // indirect + github.com/bytedance/sonic v1.10.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.14.1 // indirect + github.com/go-playground/validator/v10 v10.15.5 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -33,22 +33,22 @@ require ( github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/leodido/go-urn v1.2.4 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/net v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/protobuf v1.31.0 // indirect ) require ( - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.4.0 github.com/prometheus/client_golang v1.14.0 ) @@ -56,22 +56,24 @@ require ( github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd v0.20.1-beta // indirect + github.com/chenzhuoyu/iasm v0.9.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/iden3/go-iden3-crypto v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.39.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/scroll-tech/zktrie v0.7.1 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect golang.org/x/crypto v0.16.0 // indirect golang.org/x/sys v0.15.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/coordinator/go.sum b/coordinator/go.sum index e74af8e776..334c0a99ed 100644 --- a/coordinator/go.sum +++ b/coordinator/go.sum @@ -18,13 +18,17 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.2 h1:GDaNjuWSGu09guE9Oql0MSTNhNCLlWwO8y/xM5BzcbM= -github.com/bytedance/sonic v1.9.2/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiaysc= +github.com/bytedance/sonic v1.10.1/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -52,8 +56,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= -github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= -github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= +github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= @@ -74,10 +78,11 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iden3/go-iden3-crypto v0.0.15 h1:4MJYlrot1l31Fzlo2sF56u7EVFeHHJkxGXXZCtESgK4= @@ -94,6 +99,7 @@ github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6 github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= @@ -109,8 +115,8 @@ github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -128,8 +134,8 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -140,8 +146,8 @@ github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvq github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= @@ -171,7 +177,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -196,11 +201,11 @@ github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6S github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.5.0 h1:jpGode6huXQxcskEIpOCvrU+tzo81b6+oFLUYXWtH/Y= +golang.org/x/arch v0.5.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -218,8 +223,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -276,6 +281,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho= -gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= +gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/database/go.mod b/database/go.mod index 85644f1a69..e794bfc7f6 100644 --- a/database/go.mod +++ b/database/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/jmoiron/sqlx v1.3.5 github.com/lib/pq v1.10.9 - github.com/pressly/goose/v3 v3.7.0 + github.com/pressly/goose/v3 v3.16.0 github.com/scroll-tech/go-ethereum v1.10.14-0.20231130005111-38a3a9c9198c github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.25.7 @@ -14,17 +14,19 @@ require ( require ( github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-sql-driver/mysql v1.7.1 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/kr/pretty v0.3.1 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-sqlite3 v1.14.16 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/sethvargo/go-retry v0.2.4 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.15.0 // indirect - golang.org/x/tools v0.13.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/database/go.sum b/database/go.sum index 1618afbc00..fd3a65cfa8 100644 --- a/database/go.sum +++ b/database/go.sum @@ -1,17 +1,45 @@ +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= +github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= +github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0= +github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= +github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgx/v5 v5.5.0 h1:NxstgwndsTRy7eq9/kqYc/BZh5w2hHJV86wjvO+1xPw= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -22,17 +50,26 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/runc v1.1.10 h1:EaL5WeO9lv9wmS6SASjszOeQdSctvpbu0DdBQBizE40= +github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= +github.com/paulmach/orb v0.10.0 h1:guVYVqzxHE/CQ1KpfGO077TR0ATHSNjp4s6XGLn3W9s= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pressly/goose/v3 v3.7.0 h1:jblaZul15uCIEKHRu5KUdA+5wDA7E60JC0TOthdrtf8= -github.com/pressly/goose/v3 v3.7.0/go.mod h1:N5gqPdIzdxf3BiPWdmoPreIwHStkxsvKWE5xjUvfYNk= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= +github.com/pressly/goose/v3 v3.16.0 h1:xMJUsZdHLqSnCqESyKSqEfcYVYsUuup1nrOhaEFftQg= +github.com/pressly/goose/v3 v3.16.0/go.mod h1:JwdKVnmCRhnF6XLQs2mHEQtucFD49cQBdRM4UiwkxsM= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= @@ -40,30 +77,55 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/scroll-tech/go-ethereum v1.10.14-0.20231130005111-38a3a9c9198c h1:MnAdt80steCDli4SAD0J0spBGNY+gQvbdptNjWztHcw= github.com/scroll-tech/go-ethereum v1.10.14-0.20231130005111-38a3a9c9198c/go.mod h1:4HrFcoStbViFVy/9l/rvKl1XmizVAaPdgqI8v0U8hOc= +github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= +github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= +github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/vertica/vertica-sql-go v1.3.3 h1:fL+FKEAEy5ONmsvya2WH5T8bhkvY27y/Ik3ReR2T+Qw= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dzWP1Lu+A40W883dK/Mr3xyDSM/2MggS8GtHT0qgAnE= +github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2 h1:E0yUuuX7UmPxXm92+yQCjMveLFO3zfvYFIJVuAqsVRA= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= -modernc.org/cc/v3 v3.36.1 h1:CICrjwr/1M4+6OQ4HJZ/AHxjcwe67r5vPUF518MkO8A= -modernc.org/ccgo/v3 v3.16.8 h1:G0QNlTqI5uVgczBWfGKs7B++EPwCfXPWGD2MdeKloDs= -modernc.org/libc v1.16.19 h1:S8flPn5ZeXx6iw/8yNa986hwTQDrY8RXU7tObZuAozo= -modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= -modernc.org/memory v1.1.1 h1:bDOL0DIDLQv7bWhP3gMvIrnoFw+Eo6F7a2QK9HPDiFU= +howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= +lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo= +modernc.org/cc/v3 v3.41.0 h1:QoR1Sn3YWlmA1T4vLaKZfawdVtSiGx8H+cEojbC7v1Q= +modernc.org/ccgo/v3 v3.16.15 h1:KbDR3ZAVU+wiLyMESPtbtE/Add4elztFyfsWoNTgxS0= +modernc.org/libc v1.32.0 h1:yXatHTrACp3WaKNRCoZwUK7qj5V8ep1XyY0ka4oYcNc= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/sqlite v1.18.1 h1:ko32eKt3jf7eqIkCgPAeHMBXw3riNSLhl2f3loEF7o8= -modernc.org/strutil v1.1.2 h1:iFBDH6j1Z0bN/Q9udJnnFoFpENA4252qe/7/5woE5MI= -modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= +modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8= +modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= diff --git a/go.work.sum b/go.work.sum index 8c40ff5c2a..b24701597e 100644 --- a/go.work.sum +++ b/go.work.sum @@ -95,9 +95,11 @@ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8 github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/ClickHouse/ch-go v0.55.0/go.mod h1:kQT2f+yp2p+sagQA/7kS6G3ukym+GQ5KAu1kuFAFDiU= +github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= github.com/ClickHouse/clickhouse-go/v2 v2.2.0 h1:dj00TDKY+xwuTJdbpspCSmTLFyWzRJerTHwaBxut1C0= github.com/ClickHouse/clickhouse-go/v2 v2.2.0/go.mod h1:8f2XZUi7XoeU+uPIytSi1cvx8fmJxi7vIgqpvYTF1+o= github.com/ClickHouse/clickhouse-go/v2 v2.9.1/go.mod h1:teXfZNM90iQ99Jnuht+dxQXCuhDZ8nvvMoTJOFrcmcg= +github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible h1:rZgFj+Gtf3NMi/U5FvCvhzaxzW/TaPYgUYx3bAPz9DE= @@ -112,28 +114,32 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXY github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7 h1:mreN1m/5VJ/Zc3b4pzj9qU6D9SRQ6Vm+3KfI328t3S8= github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af h1:wVe6/Ea46ZMeNkQjjBW6xcqyQA/j5e0D6GytH95g0gQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= @@ -141,6 +147,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db h1:nxAtV4VajJDhKysp2kdcJZsq8Ss1xSA0vZTkVHHJd0E= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/avast/retry-go/v4 v4.1.0 h1:CwudD9anYv6JMVnDuTRlK6kLo4dBamiL+F3U8YDiyfg= @@ -194,6 +202,7 @@ github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible h1:Ppm0npCCsmuR9oQaBtRuZcmILVE74aXE+AmrJj8L2ns= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bits-and-blooms/bitset v1.5.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= @@ -201,6 +210,7 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40 h1:y4B3+GPxKlrigF1ha5FFErxK+sr6sWxQovRMzwMhejo= github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= +github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= @@ -222,6 +232,8 @@ github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= @@ -241,6 +253,10 @@ github.com/cloudflare/cloudflare-go v0.79.0 h1:ErwCYDjFCYppDJlDJ/5WhsSmzegAUe2+K github.com/cloudflare/cloudflare-go v0.79.0/go.mod h1:gkHQf9xEubaQPEuerBuoinR9P8bf8a05Lq0X6WKy1Oc= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= @@ -261,6 +277,7 @@ github.com/consensys/gnark-crypto v0.9.1-0.20230105202408-1a7a29904a7c h1:llSLg4 github.com/consensys/gnark-crypto v0.9.1-0.20230105202408-1a7a29904a7c/go.mod h1:CkbdF9hbRidRJYMRzmfX8TMOr95I2pYXRHF18MzRrvA= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= +github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY= @@ -270,16 +287,19 @@ github.com/crate-crypto/go-ipa v0.0.0-20220523130400-f11357ae11c7 h1:6IrxszG5G+O github.com/crate-crypto/go-ipa v0.0.0-20220523130400-f11357ae11c7/go.mod h1:gFnFS95y8HstDP6P9pPwzrxOOC5TRDkwbM+ao15ChAI= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80 h1:DuBDHVjgGMPki7bAyh91+3cF1Vh34sAEdH8JQgbc2R0= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= +github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c h1:/ovYnF02fwL0kvspmy9AuyKg1JhdTRUgPw4nUxd9oZM= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/dave/jennifer v1.2.0 h1:S15ZkFMRoJ36mGAQgWL1tnr0NQJh9rZ8qatseX/VbBc= github.com/dchest/blake512 v1.0.0 h1:oDFEQFIqFSeuA34xLtXZ/rWxCXdSjirjzPhey5EUvmA= github.com/dchest/blake512 v1.0.0/go.mod h1:FV1x7xPPLWukZlpDpWQ88rF/SFwZ5qbskrzhLMB92JI= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.8.2 h1:SegyeYGcdi0jLLrpbCMoJxnUUn8GBXHsvr4rbzjuhfU= @@ -294,8 +314,6 @@ github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KP github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8 h1:akOQj8IVgoeFfBTzGOEQakCYshWD6RNo1M5pivFXt70= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4= github.com/djherbis/atime v1.1.0 h1:rgwVbP/5by8BvvjBNrbh64Qz33idKT3pSnMSJsxhi0g= github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= @@ -309,8 +327,10 @@ github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5O github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M= github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v23.0.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.6.2/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48 h1:iZOop7pqsg+56twTopWgwCGxdB5SI2yDO8Ti7eTRliQ= github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf h1:Yt+4K30SdjOkRoRRm3vYNQgR+/ZIy0RmeUDZo7Y8zeQ= @@ -332,14 +352,18 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/elastic/go-sysinfo v1.8.1/go.mod h1:JfllUnzoQV/JRYymbH3dO1yggI3mV2oTKSXsDHM+uIM= github.com/elastic/go-sysinfo v1.10.1/go.mod h1:QElTrQ6akcnAVCRwdkZtoAkwuTv8UVM4+qe0hPxT4NU= +github.com/elastic/go-sysinfo v1.11.1/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473 h1:4cmBvAEBNJaGARUEs3/suWRyfyBfhf7I60WBZq+bv2w= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d h1:QyzYnTnPE15SQyUeqU6qLbWxMkwyAyu+vGksa0b7j00= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= github.com/ethereum/go-ethereum v1.10.13/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= +github.com/ethereum/go-ethereum v1.10.26 h1:i/7d9RBBwiXCEuyduBQzJw/mKmnvzsN14jqBmytw72s= github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= github.com/ethereum/go-ethereum v1.11.1/go.mod h1:DuefStAgaxoaYGLR0FueVcVbehmn5n9QUcVrMCuOvuc= github.com/ethereum/go-ethereum v1.11.4/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= @@ -364,22 +388,27 @@ github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmV github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 h1:IZqZOB2fydHte3kUgxrzK5E1fW7RQGeDwE8F/ZZnUYc= github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8= +github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.0.0-20220902153445-097bd83b7732 h1:AB7YjNrzlVHsYz06zCULVV2zYCEft82P86dSmtwxKL0= github.com/gballet/go-verkle v0.0.0-20220902153445-097bd83b7732/go.mod h1:o/XfIXWi4/GqbQirfRm5uTbXMG5NpqxkxblnbZ+QM9I= github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b h1:vMT47RYsrftsHSTQhqXwC3BYflo38OLC3Y4LtXtLyU0= github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b/go.mod h1:CDncRYVRSDqwakm282WEkjfaAj1hxU/v5RXxk5nXOiI= github.com/getkin/kin-openapi v0.61.0 h1:6awGqF5nG5zkVpMsAih1QH4VgzS8phTxECUWIFo7zko= +github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 h1:r5GgOLGbza2wVHRzK7aAj6lWZjfbAwiu/RDCVOKjRyM= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk= +github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd h1:r04MMPyLHj/QwZuMJ5+7tJcBr1AQjpiAK/rZWRrQT7o= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8= github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= github.com/go-chi/chi/v5 v5.0.0 h1:DBPx88FjZJH3FsICfDAfIfnb7XxKIYVGG6lOPlhENAg= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= @@ -388,11 +417,13 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72 h1:b+9H1GAsx5RsjvDFLoS5zkNBzIQMuVKUYQDmxU3N5XE= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= @@ -402,7 +433,9 @@ github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iauee github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= @@ -411,10 +444,9 @@ github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/j github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= @@ -430,6 +462,7 @@ github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA= github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= @@ -451,11 +484,23 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219 h1:utua3L2IbQJmauC5IXdEA547bcoU5dozgQAfc8Onsg4= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38 h1:y0Wmhvml7cGnzPa9nocn/fMraMH/lMDdeG+rkx4VgYY= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/flatbuffers v1.11.0 h1:O7CEyB8Cb3/DmtxODGtLHcEvpr81Jm5qLg/hsHnxA2A= @@ -463,9 +508,11 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= @@ -483,7 +530,6 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -501,9 +547,11 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gotestyourself/gotestyourself v1.4.0 h1:CDSlSIuRL/Fsc72Ln5lMybtrCvSRDddsHsDRG/nP7Rg= github.com/gotestyourself/gotestyourself v1.4.0/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29 h1:sezaKhEfPFg8W0Enm61B9Gs911H8iesGY5R8NDPtd1M= github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/guptarohit/asciigraph v0.5.5 h1:ccFnUF8xYIOUPPY3tmdvRyHqmn1MYI9iv1pLKX+/ZkQ= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= @@ -524,9 +572,12 @@ github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8 github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= +github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150 h1:vlNjIqmUZ9CMAWsbURYl3a6wZbw7q5RHVvlXTNS/Bs8= +github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91 h1:KyZDvZ/GGn+r+Y3DKZ7UOQ/TP4xV6HNkrwiVMB1GnNY= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c= @@ -537,8 +588,10 @@ github.com/iden3/go-iden3-crypto v0.0.14/go.mod h1:dLpM4vEPJ3nDHzhWFXDjzkn1qHoBe github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.1 h1:77BcVUCzvN5HMm8+j9PRBQ4iZcu98Dl4Y9rf+J5vhnc= github.com/influxdata/influxdb v1.8.3 h1:WEypI1BQFTT4teLM+1qkEcvUi0dAvopAI/ir0vAiBg8= github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= @@ -578,6 +631,8 @@ github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.17.0 h1:Hsx+baY8/zU2WtPLQyZi8WbecgcsWEeyoK1jvg/WgIo= github.com/jackc/pgx/v4 v4.17.0/go.mod h1:Gd6RmOhtFLTu8cp/Fhq4kP195KrshxYJH3oW8AWJ1pw= +github.com/jackc/pgx/v5 v5.3.1/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= +github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= github.com/jackc/puddle/v2 v2.2.0 h1:RdcDk92EJBuBS55nQMMYFXTxwstHug4jkhT5pq8VxPk= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= @@ -597,12 +652,15 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= +github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= @@ -618,6 +676,7 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5 h1:PJr+ZMXIecYc1Ey2zucXdR73SMBtgjPgwa31099IMv0= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef h1:2jNeR4YUziVtswNP9sEFAI913cVrzH85T+8Q6LpYbT0= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= +github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559 h1:0VWDXPNE0brOek1Q8bLfzKkvOzwbQE/snjGojlCr8CY= github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/karalabe/usb v0.0.2 h1:M6QQBNxF+CQ8OFvxrT90BA0qBOXymndZnk5q235mFc4= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= @@ -652,7 +711,9 @@ github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHz github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 h1:FOOIBWrEkLgmlgGfMuZT83xIwfPDxEI2OHu6xUmJMFE= github.com/klauspost/compress v1.4.0 h1:8nsMz3tWa9SWWPL60G1V6CUsf4lLjWLTNEtibhe8gh8= +github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= @@ -660,18 +721,24 @@ github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7y github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio= github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= +github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6 h1:KAZ1BW2TCmT6PRihDPpocIy1QTtsAsrx6TneU/4+CMg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada h1:3L+neHp83cTjegPdCiOxVOJtRIy7/8RldvMTsyPYH10= +github.com/knz/go-libedit v1.10.1 h1:0pHpWtx9vcvC0xGZqEQlQdfSQs7WRlAjuPvk3fOZDCo= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= github.com/labstack/echo/v4 v4.2.1 h1:LF5Iq7t/jrtUuSutNuiEWtB5eiHfZ5gSe2pcu5exjQw= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/echo/v4 v4.9.0 h1:wPOF1CE6gvt/kmbMR4dGzWvHMPT+sAEUJOwOTtvITVY= github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= @@ -685,46 +752,67 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2 github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/mailgun/raymond/v2 v2.0.46 h1:aOYHhvTpF5USySJ0o7cpPno/Uh2I5qg2115K25A+Ft4= github.com/mailgun/raymond/v2 v2.0.46/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd h1:HvFwW+cm9bCbZ/+vuGNq7CRWXql8c0y8nGeYpqmpvmk= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2 h1:JAEbJn3j/FrhdWA9jW8B5ajsLIjeuEHLi8xE4fk997o= github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d h1:oNAwILwmgWKFpuU+dXvI6dl9jG2mAWAZLX3r9s0PPiw= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104 h1:d8RFOZ2IiFtFWBcKEHAFYJcPTf0wY5q0exFNJZVWa1U= github.com/mattn/goveralls v0.0.2 h1:7eJB6EqsPhRVxvwEXGnqdO2sJI0PTsrWoTMXEk9/OQc= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed h1:3dQJqqDouawQgl3gBE1PNHKFkJYGEuFb1DbSlaxdosE= github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= github.com/mediocregopher/radix/v3 v3.4.2 h1:galbPBjIwmyREgwGCfQEN4X8lxbJnKBYurgz+VfcStA= +github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/mediocregopher/radix/v3 v3.8.0 h1:HI8EgkaM7WzsrFpYAkOXIgUKbjNonb2Ne7K6Le61Pmg= github.com/mediocregopher/radix/v3 v3.8.0/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/microcosm-cc/bluemonday v1.0.21 h1:dNH3e4PSyE4vNX+KlRGHT5KrSvjeUkoNPwEORjffHJg= github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= github.com/microsoft/go-mssqldb v0.21.0/go.mod h1:+4wZTUnz/SV6nffv+RRRB/ss8jPng5Sho2SmM1l2ts4= +github.com/microsoft/go-mssqldb v1.6.0 h1:mM3gYdVwEPFrlg/Dvr2DNVEgYFG7L42l+dGc67NNNpc= +github.com/microsoft/go-mssqldb v1.6.0/go.mod h1:00mDtPbeQCRGC1HwOOR5K/gr30P1NcEG0vx6Kbv2aJU= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1 h1:jhDmAqPyebOsVDOCICJoINoLb/AnLBaUw58nFzxWS2w= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs= +github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae h1:VeRdUYdCw49yizlSbMEn2SZ+gT+3IUKx8BqxyQdz+BY= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223 h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= @@ -734,35 +822,45 @@ github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0 h1:xdnzwFETV++jNc4W1mw//qFyJGb2ABOombmZJQS4+Qo= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt/v2 v2.3.0 h1:z2mA1a7tIf5ShggOFlR1oBPgd6hGqcDYsISxZByUzdI= github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= github.com/nats-io/nats-server/v2 v2.9.11/go.mod h1:b0oVuxSlkvS3ZjMkncFeACGyZohbO4XhSqW1Lt7iRRY= github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nats.go v1.16.0 h1:zvLE7fGBQYW6MWaFaRdsgm9qT39PJDQoju+DS8KsO1g= github.com/nats-io/nats.go v1.16.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= github.com/nats-io/nkeys v0.1.0 h1:qMd4+pRHgdr1nAClu+2h/2a5F2TmKcCzjCDazVgRoX4= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86 h1:D6paGObi5Wud7xg83MaEFyjxQB1W5bz5d0IFppr+ymk= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c h1:bY6ktFuJkt+ZXkX0RChQch2FtHpWQLVS8Qo1YasiIVk= github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.7.0 h1:/XxtEV3I3Eif/HobnVx9YmJgk8ENdRsuUmM+fLCFNow= github.com/onsi/ginkgo/v2 v2.8.1 h1:xFTEVwOFa1D/Ty24Ws1npBWkDYEV9BqZrsDxVrVkrrU= github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= +github.com/opencontainers/runc v1.1.10/go.mod h1:+/R6+KmDlh+hOO8NkjmgkG9Qzvypzk0yXxAPYYR65+M= github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= @@ -772,10 +870,13 @@ github.com/paulbellamy/ratecounter v0.2.0 h1:2L/RhJq+HA8gBQImDXtLPrDXK5qAj6ozWVK github.com/paulmach/orb v0.7.1 h1:Zha++Z5OX/l168sqHK3k4z18LDvr+YAO/VjK0ReQ9rU= github.com/paulmach/orb v0.7.1/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A= github.com/paulmach/orb v0.9.2/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= +github.com/paulmach/orb v0.10.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/penglongli/gin-metrics v0.1.10/go.mod h1:wxGsGUwpVGv3hmYSxQn2GZgRL3YuCgiRFq2d0X6+EOU= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= @@ -784,11 +885,15 @@ github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5 h1:tFwafIEMf0B7NlcxV/zJ6leBIa81D3hgGSgsE5hCkOQ= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= @@ -796,19 +901,24 @@ github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4 github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/pressly/goose/v3 v3.11.2 h1:QgTP45FhBBHdmf7hWKlbWFHtwPtxo0phSDkwDKGUrYs= github.com/pressly/goose/v3 v3.11.2/go.mod h1:LWQzSc4vwfHA/3B8getTp8g3J5Z8tFBxgxinmGlMlJk= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -821,14 +931,19 @@ github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7/go.mod github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52 h1:RnWNS9Hlm8BIkjr6wx8li5abe0fr73jljLycdfemTp0= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= +github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/sclevine/agouti v3.0.0+incompatible h1:8IBJS6PWz3uTlMP3YBIR5f+KAldcGuOeFkFbUWfBgK4= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/scroll-tech/go-ethereum v1.10.14-0.20221202061207-804e7edc23ba/go.mod h1:jurIpDQ0hqtp9//xxeWzr8X9KMP/+TYn+vz3K1wZrv0= @@ -839,8 +954,12 @@ github.com/scroll-tech/go-ethereum v1.10.14-0.20230220082843-ec9254b0b1c6/go.mod github.com/scroll-tech/go-ethereum v1.10.14-0.20230306131930-03b4de32b78b/go.mod h1:f9ygxrxL7WRCTzuloV+t/UlcxMq3AL+gcNU60liiNNU= github.com/scroll-tech/go-ethereum v1.10.14-0.20230321020420-127af384ed04/go.mod h1:jH8c08L9K8Hieaf0r/ur2P/cpesn4dFhmLm2Mmoi8kI= github.com/scroll-tech/go-ethereum v1.10.14-0.20230802095950-4b2bbf6225e7/go.mod h1:DiN3p2inoXOxGffxSswDKqWjQ7bU+Mp0c9v0XQXKmaA= +github.com/scroll-tech/go-ethereum v1.10.14-0.20230829000527-f883dcdc21fc/go.mod h1:DiN3p2inoXOxGffxSswDKqWjQ7bU+Mp0c9v0XQXKmaA= +github.com/scroll-tech/zktrie v0.6.0/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk= +github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/segmentio/kafka-go v0.2.0 h1:HtCSf6B4gN/87yc5qTl7WsxPKQIIGXLPPM1bMCPOsoY= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -852,6 +971,7 @@ github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxr github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -859,18 +979,33 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tdewolff/minify/v2 v2.12.4 h1:kejsHQMM17n6/gwdw53qsi6lg0TGddZADVyQOz1KMdE= github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= @@ -878,65 +1013,101 @@ github.com/tdewolff/parse/v2 v2.6.4 h1:KCkDvNUMof10e3QExio9OPZJT8SbdKojLBumw8YZy github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= github.com/tdewolff/test v1.0.7 h1:8Vs0142DmPFW/bQeHRP3MV19m1gvndjUb1sn8yy74LM= github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2 h1:DfdQrzQa7Yh2es9SuLkixqxuXS2SxsdYn0KbdrOGWD8= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= github.com/valyala/fasthttp v1.40.0 h1:CRq/00MfruPGFLTQKY8b+8SfdK60TxNztjRMnH0t1Yc= github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/vertica/vertica-sql-go v1.3.3/go.mod h1:jnn2GFuv+O2Jcjktb7zyc4Utlbu9YVqpHH/lx63+1M4= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/willf/bitset v1.1.3 h1:ekJIKh6+YbUIVt9DfNbkR5d6aFcFTLDRyJNAACURBg8= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6 h1:YdYsPAZ2pC6Tow/nPZOPQ96O3hm/ToAkGsPLzedXERk= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= +github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2/go.mod h1:fjBLQ2TdQNl4bMjuWl9adoTGBypwUTPoGC+EqYqiIcU= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw= go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME= go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= @@ -944,18 +1115,37 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299 h1:zQpM52jfKHG6II1ISZY1ZcpygvuSFZpLwfluuF89XOg= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -967,11 +1157,15 @@ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -979,25 +1173,40 @@ golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.3.0 h1:6l90koy8/LaBLmLu8jpHeHexzMwEita0zFfYlggy2F8= golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5 h1:ObuXPmIgI4ZMyQLIz48cJYgSyWdjUXc2SZAdyJMwEAU= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1006,45 +1215,70 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211020174200-9d6173849985/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1060,8 +1294,10 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= @@ -1079,9 +1315,14 @@ google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= @@ -1093,65 +1334,114 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84 h1:R1r5J0u6Cx+RNl/6mezTw6oA14cmKC96FeUwL6A9bd4= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg= +google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f/go.mod h1:nWSwAFPb+qfNJXsoeO3Io7zf4tMSfN8EA8RlDA04GhY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2GVOI3xgiMrQ= +gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce h1:xcEWjVhvbDy+nHP67nPDDpbYrY+ILlfndk4bRioVHaU= +gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 h1:a6cXbcDDUkSBlpnkWV1bJ+vv3mOgQEltEJ2rPxroVu0= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v1.4.0 h1:BjtEgfuw8Qyd+jPvQz8CfoxiO/UjFEidWinwEXZiWv0= gotest.tools v1.4.0/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= +howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +lukechampine.com/uint128 v1.3.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.36.1/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y= modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= +modernc.org/ccgo/v3 v3.16.15/go.mod h1:yT7B+/E2m43tmMOT51GMoM98/MtHIcQQSleGnddkUNI= modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.32.0/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE= modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= +modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= modernc.org/strutil v1.1.2/go.mod h1:OYajnUAcI/MX+XD/Wx7v1bbdvcQSvxgtb0gC+u3d3eg= +modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= moul.io/http2curl v1.0.0 h1:6XwpyZOYsgZJrU8exnG87ncVkU1FVCcTRpwzOkTDUi8= moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= +nullprogram.com/x/optparse v1.0.0 h1:xGFgVi5ZaWOnYdac2foDT3vg0ZZC9ErXFV57mr4OHrI= rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/prover/go.mod b/prover/go.mod index 24ba85b941..7614ee6a59 100644 --- a/prover/go.mod +++ b/prover/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/go-resty/resty/v2 v2.7.0 - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.4.0 github.com/scroll-tech/go-ethereum v1.10.14-0.20231130005111-38a3a9c9198c github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.25.7 @@ -27,7 +27,7 @@ require ( github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -41,9 +41,9 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/net v0.18.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/time v0.3.0 // indirect diff --git a/prover/go.sum b/prover/go.sum index 64d0f28aa6..966bec8726 100644 --- a/prover/go.sum +++ b/prover/go.sum @@ -36,8 +36,8 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= @@ -66,8 +66,8 @@ github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7 github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -115,8 +115,8 @@ github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -127,8 +127,8 @@ golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= diff --git a/rollup/go.mod b/rollup/go.mod index 9ba3bca1ee..718838b536 100644 --- a/rollup/go.mod +++ b/rollup/go.mod @@ -12,16 +12,17 @@ require ( github.com/smartystreets/goconvey v1.8.0 github.com/stretchr/testify v1.8.4 github.com/urfave/cli/v2 v2.25.7 - gorm.io/gorm v1.25.2 + gorm.io/gorm v1.25.5 ) require ( github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd v0.20.1-beta // indirect - github.com/bytedance/sonic v1.9.2 // indirect + github.com/bytedance/sonic v1.10.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect + github.com/chenzhuoyu/iasm v0.9.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set v1.8.0 // indirect @@ -30,12 +31,13 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.14.1 // indirect + github.com/go-playground/validator/v10 v10.15.5 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/gopherjs/gopherjs v1.17.2 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/holiman/uint256 v1.2.4 // indirect @@ -50,17 +52,17 @@ require ( github.com/kr/pretty v0.3.1 // indirect github.com/leodido/go-urn v1.2.4 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.39.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect @@ -75,10 +77,10 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/arch v0.4.0 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + golang.org/x/arch v0.5.0 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/net v0.18.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/rollup/go.sum b/rollup/go.sum index 84de762d95..0b20a856f5 100644 --- a/rollup/go.sum +++ b/rollup/go.sum @@ -16,14 +16,18 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.2 h1:GDaNjuWSGu09guE9Oql0MSTNhNCLlWwO8y/xM5BzcbM= -github.com/bytedance/sonic v1.9.2/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiaysc= +github.com/bytedance/sonic v1.10.1/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -50,8 +54,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= -github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= +github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= @@ -67,10 +71,11 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= @@ -102,6 +107,7 @@ github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6 github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -112,8 +118,8 @@ github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNa github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -132,8 +138,8 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/orcaman/concurrent-map/v2 v2.0.1 h1:jOJ5Pg2w1oeB6PeDurIYf6k9PQ+aTITr/6lP/L/zp6c= github.com/orcaman/concurrent-map/v2 v2.0.1/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -144,8 +150,8 @@ github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvq github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= @@ -181,7 +187,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -199,11 +204,11 @@ github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= -golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.5.0 h1:jpGode6huXQxcskEIpOCvrU+tzo81b6+oFLUYXWtH/Y= +golang.org/x/arch v0.5.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -213,8 +218,8 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -258,6 +263,7 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho= -gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= +gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/tests/integration-test/go.mod b/tests/integration-test/go.mod index e6d48bf5e7..be8083f430 100644 --- a/tests/integration-test/go.mod +++ b/tests/integration-test/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/scroll-tech/go-ethereum v1.10.14-0.20231130005111-38a3a9c9198c github.com/stretchr/testify v1.8.4 - gorm.io/gorm v1.25.2 + gorm.io/gorm v1.25.5 ) require ( @@ -16,7 +16,7 @@ require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/iden3/go-iden3-crypto v0.0.15 // indirect @@ -32,7 +32,7 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect golang.org/x/crypto v0.16.0 // indirect golang.org/x/sys v0.15.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect diff --git a/tests/integration-test/go.sum b/tests/integration-test/go.sum index 43e55a2f58..817ddd9ef3 100644 --- a/tests/integration-test/go.sum +++ b/tests/integration-test/go.sum @@ -31,8 +31,8 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= @@ -91,8 +91,8 @@ github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFA github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= @@ -116,5 +116,5 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho= -gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= +gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=