diff --git a/.github/workflows/eventindexer.yml b/.github/workflows/eventindexer.yml index 5141adaaf69..4ea96f31e93 100644 --- a/.github/workflows/eventindexer.yml +++ b/.github/workflows/eventindexer.yml @@ -2,7 +2,7 @@ name: Eventindexer on: push: - branches: [main, alpha-2] + branches: [main] paths: - "packages/eventindexer/**" pull_request: @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21.0 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -26,7 +26,7 @@ jobs: # Optional: working directory, useful for monorepos working-directory: ./packages/eventindexer - args: --config=.golangci.yml + args: --config=.golangci.yml --timeout=4m test: runs-on: ubuntu-latest @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: ">=1.19.0" + go-version: ">=1.21.0" - name: eventindexer - Unit Tests working-directory: ./packages/eventindexer @@ -96,4 +96,4 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | - PACKAGE=eventindexer \ No newline at end of file + PACKAGE=eventindexer diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 47d632989e9..271c6dc728a 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -24,6 +24,7 @@ jobs: deps eventindexer fork-diff + pos-dashboard protocol relayer starter-dapp diff --git a/.github/workflows/protocol.yml b/.github/workflows/protocol.yml index 68fb82b27c7..7925a12e1fb 100644 --- a/.github/workflows/protocol.yml +++ b/.github/workflows/protocol.yml @@ -61,11 +61,11 @@ jobs: # directory: ./packages/protocol/coverage # flags: protocol - - name: protocol - Generate contract documentation - run: pnpm -F protocol export:docs + # - name: protocol - Generate contract documentation + # run: pnpm -F protocol export:docs - - name: protocol - Commit contract documentation - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Add auto-generated contract documentation - file_pattern: "**/*.md" + # - name: protocol - Commit contract documentation + # uses: stefanzweifel/git-auto-commit-action@v4 + # with: + # commit_message: Add auto-generated contract documentation + # file_pattern: "**/*.md" diff --git a/.github/workflows/relayer.yml b/.github/workflows/relayer.yml index 7b9ade79fd3..8bf582e8fab 100644 --- a/.github/workflows/relayer.yml +++ b/.github/workflows/relayer.yml @@ -2,7 +2,7 @@ name: Relayer on: push: - branches: [main, alpha-2] + branches: [main] paths: - "packages/relayer/**" pull_request: @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21.0 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -26,7 +26,7 @@ jobs: # Optional: working directory, useful for monorepos working-directory: ./packages/relayer - args: --config=.golangci.yml + args: --config=.golangci.yml --timeout=4m test: runs-on: ubuntu-latest @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: ">=1.19.0" + go-version: "1.21.0" - name: relayer - Unit Tests working-directory: ./packages/relayer diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb4f354e136..4336d667a46 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,6 @@ **Table of contents:** - [Make a contribution](#make-a-contribution) -- [Claim a Taiko Contributor GitPOAP](#claim-a-taiko-contributor-gitpoap) - [Coding standards](#coding-standards) - [Documentation standards](#documentation-standards) @@ -14,16 +13,14 @@ Here are some ways you can contribute: - Open a new issue [here](https://github.com/taikoxyz/taiko-mono/issues) (please check the issue does not already exist). - Work on an existing issue (check out the [good first issues list](https://github.com/orgs/taikoxyz/projects/9/views/31) on our public project board). -> Check out the [coding standards](#coding-standards) and [documentation standards](#documentation-standards) before you start working on a pull request. +Please comment on the issue that you're interested in working on. Also, check out the [coding standards](#coding-standards) and [documentation standards](#documentation-standards) before you start working on the pull request. -## Claim a Taiko Contributor GitPOAP - -A Taiko Contributor GitPOAP is rewarded to anyone that merges in a pull request to one of Taiko's GitHub repositories (you can see which repositories here: [2023 Taiko Contributor GitPOAP](https://www.gitpoap.io/gp/893)). - -After your pull request is merged, a bot will automatically leave a comment with instructions to receive your GitPOAP. You only receive a Taiko Contributor GitPOAP for the first pull request you merge in a given year. +Once the pull request is merged to one of Taiko's GitHub repositories (you can see which repositories here: [2023 Taiko Contributor GitPOAP](https://www.gitpoap.io/gp/893)), you will be automatically awarded a Taiko Contributor GitPOAP. Opening a good new issue (not a spam issue) is also eligible for a GitPOAP, just leave a comment and we will manually invoke a GitHub bot that will send the GitPOAP. ## Coding standards +This section describes our coding standards at Taiko. + ### Pull requests Specify the scope of your change with a [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) in the PR title (for example, `feat(scope): description of feature`). This will be squashed and merged into the `main` branch. You can find the full list of allowed scopes [here](https://github.com/taikoxyz/taiko-mono/blob/main/.github/workflows/lint-pr.yml#L19). @@ -36,20 +33,139 @@ For example, `feat(scope): description of feature` should only impact the `scope Follow the [NatSpec format](https://docs.soliditylang.org/en/latest/natspec-format.html) for documenting smart contract source code. Please adhere to a few additional standards: -- Choose `/** */` over `///` for multi-line NatSpec comments to save column space. -- Omit the usage of `@notice` and let the compiler automatically pick it up to save column space. - - For example: `/** @notice This is a notice */` becomes `/** This is a notice */`. +#### Multi-line comments + +Choose `/** */` over `///` for multi-line NatSpec comments to save column space. + +#### Notice tag + +Omit the usage of `@notice` and let the compiler automatically pick it up to save column space. For example, this: + +``` +/// @notice This is a notice. +``` + +becomes this: + +``` +/// This is a notice. +``` + +#### Annotation indentation + +For multi-line annotations, do not "align". For example, this is **wrong**: + +``` +/** + * Here is a comment. + * @param someParam Here is a long parameter blah blah blah + * and I wrap it to here. + * @return someThing Here is a long return parameter blah + * and I wrap it to here. + */ +``` + +This is **correct**: + +``` +/** + * Here is a comment. + * @param someParam Here is a long parameter blah blah blah + * and I wrap it to here. + * @return someThing Here is a long return parameter blah + * and I wrap it to here. + */ +``` + +#### Extra line breaks + +Use extra line breaks as you see fit. By default, do not use them unless it improves the readability. + +This is **preferred**: + +``` +/** + * Here is a comment. + * @param someParam Here is a long parameter blah blah blah + * and I wrap it to here. + * @return someThing Here is a long return parameter blah + * and I wrap it to here. + */ +``` + +This is also **okay**: + +``` +/** + * Here is a comment. + * + * @param someParam Here is a long parameter blah blah blah + * and I wrap it to here. + * @return someThing Here is a long return parameter blah + * and I wrap it to here. + */ +``` + +#### Additional comments + +You can use additional comments with `//`. These can be above what it is describing **or** to the side. Try to remain consistent in what you are commenting. Do not use `/* */`. You can align comments on the side or not, whichever improves readability. + +This is **correct**: + +``` +struct Some { + // This is foo + uint256 foo; + uint256 bar; // This is bar +} +``` + +This is **wrong**: + +``` +struct Some { + uint256 foo; /* This is foo */ +} +``` + +#### Periods + +Periods are optional for comments, but recommended if it's a proper sentence. However, remain consistent in whatever file or section you are commenting. + +This is **correct**: + +``` +struct Some { + // This is foo + uint256 foo; +} +``` + +This is **wrong**: + +``` +struct Some { + // This is foo. + uint256 foo; + // This is bar + uint256 bar; +} +``` ## Documentation standards -Use the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) as a base point of reference for writing style. +This section describes our documentation standards at Taiko. -### Philosophy +### Philosophies - Create the minimum viable documentation. - Don't repeat yourself, use links to existing documentation or inherit it. - Keep documentation close to what it's describing (for example, in the source code). +### Writing style + +Use the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) as a base point of reference for writing style. Generally, don't worry too much about things like typos. What's more important is following the basic [philosophies](#philosophies) outlined above and following structural standards for highly readable and minimal documentation. + ### Creating content If you are interested in creating some content (video, blog post, tweet thread, visuals, etc.), you are absolutely free to do so. It's useful to get a peer review on these, if you need a peer review please reach out to the community / team on the [Taiko Discord](https://discord.gg/taikoxyz). diff --git a/Dockerfile b/Dockerfile index 547fe6bfc51..67e3abdafea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19.3 as builder +FROM golang:1.21.0 as builder ARG PACKAGE=eventindexer diff --git a/go.mod b/go.mod index 8085fa25b5c..6b88e30583f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/taikoxyz/taiko-mono -go 1.19 +go 1.21 require ( github.com/buildkite/terminal-to-html/v3 v3.8.0 @@ -15,13 +15,15 @@ require ( github.com/labstack/echo/v4 v4.9.1 github.com/labstack/gommon v0.4.0 github.com/morkid/paginate v1.1.6 + github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pkg/errors v0.9.1 github.com/pressly/goose v2.7.0+incompatible github.com/pressly/goose/v3 v3.7.0 github.com/prometheus/client_golang v1.14.0 + github.com/shopspring/decimal v1.3.1 github.com/sirupsen/logrus v1.9.0 github.com/stretchr/testify v1.8.4 - github.com/testcontainers/testcontainers-go v0.15.0 + github.com/testcontainers/testcontainers-go v0.21.0 golang.org/x/sync v0.1.0 gopkg.in/go-playground/assert.v1 v1.2.1 gopkg.in/yaml.v3 v3.0.1 @@ -34,7 +36,6 @@ require ( require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/Microsoft/hcsshim v0.9.6 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 // indirect github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect @@ -42,15 +43,15 @@ require ( github.com/aymerick/douceur v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cenkalti/backoff/v4 v4.2.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect - github.com/containerd/cgroups v1.0.4 // indirect - github.com/containerd/containerd v1.6.18 // indirect + github.com/containerd/containerd v1.6.19 // indirect + github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v20.10.17+incompatible // indirect + github.com/docker/docker v24.0.5-0.20230714235725-36e9e796c6fc+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect @@ -80,19 +81,19 @@ require ( github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.16.3 // indirect github.com/leodido/go-urn v1.2.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/microcosm-cc/bluemonday v1.0.20 // indirect - github.com/moby/sys/mount v0.3.3 // indirect - github.com/moby/sys/mountinfo v0.6.2 // indirect - github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect + github.com/moby/patternmatcher v0.5.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/morkid/gocache v1.0.0 // indirect github.com/neko-neko/echo-logrus/v2 v2.0.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect + github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.5 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -108,8 +109,8 @@ require ( github.com/valyala/fasthttp v1.44.0 // indirect github.com/valyala/fasttemplate v1.2.1 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - go.opencensus.io v0.23.0 // indirect golang.org/x/crypto v0.9.0 // indirect + golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect golang.org/x/net v0.10.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect diff --git a/go.sum b/go.sum index 224c269231b..8efaa6b12e1 100644 --- a/go.sum +++ b/go.sum @@ -1,387 +1,149 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8 h1:V8krnnfGj4pV65YLUm3C0/8bl7V5Nry2Pwvy3ru/wLc= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= +github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= -github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= -github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= -github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= -github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim v0.9.6 h1:VwnDOgLeoi2du6dAznfmspNqTiwczvjv4K7NxuY9jsY= -github.com/Microsoft/hcsshim v0.9.6/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= -github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= -github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Microsoft/hcsshim v0.9.7 h1:mKNHW/Xvv1aFH87Jb6ERDzXTJTLPlmzfZ28VBFD/bfg= +github.com/Microsoft/hcsshim v0.9.7/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 h1:ZK3C5DtzV2nVAQTx5S5jQvMeDqWtD1By5mOoyY/xJek= github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= 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/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -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/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= 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/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= 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/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/buildkite/terminal-to-html/v3 v3.8.0 h1:S7ImMS8W+2yS/9D4ugrXzB95C4AuNaKcaw/eR/95bFU= github.com/buildkite/terminal-to-html/v3 v3.8.0/go.mod h1:j3XxsnYElte/Bo7Pft+U5eQWWbcx3j51uQ8fo43VrjM= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= +github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= -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/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= 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/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chris-ramon/douceur v0.2.0/go.mod h1:wDW5xjJdeoMm1mRt4sD4c/LbF/mWdEpRXQKjTR8nIBE= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= -github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= -github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= -github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= 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/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= 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-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-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= +github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= -github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= -github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= -github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= -github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= -github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= -github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= -github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= -github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= -github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= -github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= -github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= -github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= -github.com/containerd/containerd v1.6.18 h1:qZbsLvmyu+Vlty0/Ex5xc0z2YtKpIsb5n45mAMI+2Ns= -github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= -github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= -github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= -github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= -github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= -github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= -github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= -github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= -github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= -github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= -github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= -github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= -github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= -github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= -github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= -github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= -github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= -github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= -github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/containerd/containerd v1.6.19 h1:F0qgQPrG0P2JPgwpxWxYavrVeXAG0ezUIB9Z/4FTUAU= +github.com/containerd/containerd v1.6.19/go.mod h1:HZCDMn4v/Xl2579/MvtOC2M206i+JJ6VxFWU/NetrGY= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 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.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyberhorsey/errors v0.0.0-20220929234051-087d6d8bb841 h1:FaPua89k9KmkkiptlTAmYzcTsn1IFdQsqneuFO6IAu8= github.com/cyberhorsey/errors v0.0.0-20220929234051-087d6d8bb841/go.mod h1:qSH/IvpdArCjfny4ODMko/7U0z4JoNIWctgCnUrapnI= github.com/cyberhorsey/webutils v0.0.0-20230314183728-56890c6ddbe7 h1:KYOh2RfWAltxYsfD/Ar5D3zB4+AuNQejXW5BvMlGor4= github.com/cyberhorsey/webutils v0.0.0-20230314183728-56890c6ddbe7/go.mod h1:bNNUHadsCy1HleNUToQ/t11vmKI9/+9Taw8K6GyxERo= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= 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.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/denisenkom/go-mssqldb v0.12.2 h1:1OcPn5GBIobjWNd+8yjfHNIaFX14B1pWI3F9HZy5KXw= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/denisenkom/go-mssqldb v0.12.2/go.mod h1:lnIw1mZukFRZDJYQ0Pb833QS2IaC3l5HkEfra2LJ+sk= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= -github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= 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 v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= -github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= +github.com/docker/docker v24.0.5-0.20230714235725-36e9e796c6fc+incompatible h1:sdGvA1bxu/1J51gAs1XU0bZC+2WxncYnI210as3c6g8= +github.com/docker/docker v24.0.5-0.20230714235725-36e9e796c6fc+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-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= 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.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.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.11.4 h1:KG81SnUHXWk8LJB3mBcHg/E2yLvXoiPmRMCIRxgx3cE= github.com/ethereum/go-ethereum v1.11.4/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= -github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= github.com/go-git/go-git/v5 v5.7.0 h1:t9AudWVLmqzlo+4bqdf7GY+46SUuRsx59SboFxkq2aE= github.com/go-git/go-git/v5 v5.7.0/go.mod h1:coJHKEOk5kUClpsNlXrUvPrDxY3w3gjHvhcZd8Fodw8= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= @@ -390,27 +152,16 @@ github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD87 github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.0 h1:72qIR/m8ybvL8L5TIyfgrigqkrw7kVYAvjEvpT85l70= github.com/go-playground/validator/v10 v10.4.0/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 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/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= -github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= @@ -422,118 +173,47 @@ github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0kt github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= +github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= 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.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.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.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomarkdown/markdown v0.0.0-20230322041520-c84983bdbf2a h1:AWZzzFrqyjYlRloN6edwTLTUbKxf5flLXNuTBDm3Ews= github.com/gomarkdown/markdown v0.0.0-20230322041520-c84983bdbf2a/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 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/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.3/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.5/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.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/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/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= +github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/iancoleman/strcase v0.1.3/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= @@ -547,6 +227,7 @@ github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8 github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= github.com/jackc/pgconn v1.11.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= +github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -564,6 +245,7 @@ github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwX github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= +github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= @@ -572,17 +254,20 @@ github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrU github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= github.com/jackc/pgtype v1.10.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= 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.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= github.com/jackc/pgx/v4 v4.15.0/go.mod h1:D/zyOyXiaM1TmVWnOM18p0xdDtdakRBa0RsVGI3U3bw= 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/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= 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/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= @@ -591,48 +276,32 @@ github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -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/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 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= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 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/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo-contrib v0.13.0 h1:bzSG0SpuZZd7BmJLvsWtPfU23W0Enh3K0tok3aENVKA= github.com/labstack/echo-contrib v0.13.0/go.mod h1:IF9+MJu22ADOZEHD+bAV67XMIO3vNXUy7Naz/ABPHEs= github.com/labstack/echo/v4 v4.0.0/go.mod h1:tZv7nai5buKSg5h/8E6zz4LsD/Dqh9/91Mvs7Z5Zyno= @@ -649,15 +318,8 @@ github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -676,45 +338,28 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0= github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -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/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/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/microcosm-cc/bluemonday v1.0.4/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w= github.com/microcosm-cc/bluemonday v1.0.20 h1:flpzsq4KU3QIYAYGV/szUat7H+GPOXR0B2JU5A1Wp8Y= github.com/microcosm-cc/bluemonday v1.0.20/go.mod h1:yfBmMi8mxvaZut3Yytv+jTXRY8mxyjJ0/kQBTElld50= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= -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/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/sys/mount v0.3.3 h1:fX1SVkXFJ47XWDoeFW4Sq7PdQJnV2QIDZAqjNqgEjUs= -github.com/moby/sys/mount v0.3.3/go.mod h1:PBaEorSNTLG5t/+4EgukEQVlAvVEc6ZjTySwKdqp5K0= -github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= +github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= -github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= -github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -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/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= @@ -723,133 +368,57 @@ github.com/morkid/gocache v1.0.0/go.mod h1:xK+hmoEMjYffIBvjn7DE8WfSd/rF5Kz/G9f20 github.com/morkid/paginate v1.1.6 h1:K77SJmIgweKBnEYcT2eEugi3jR6wHzYwe2OD2NWc31U= github.com/morkid/paginate v1.1.6/go.mod h1:1VCx2ARlAVEv2Yd+YHTGRMs0Gacvi75dCrPidrmPq5g= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/neko-neko/echo-logrus/v2 v2.0.1 h1:BX2U6uv2N3UiUY75y+SntQak5S1AJIel9j+5Y6h4Nb4= github.com/neko-neko/echo-logrus/v2 v2.0.1/go.mod h1:GDYWo9CY4VXk/vn5ac5reoutYEkZEexlFI01MzHXVG0= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= -github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= 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.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= -github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +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/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pressly/goose v2.7.0+incompatible h1:PWejVEv07LCerQEzMMeAtjuyCKbyprZ/LBa6K5P0OCQ= github.com/pressly/goose v2.7.0+incompatible/go.mod h1:m+QHWCqxR3k8D9l7qfzuC/djtlfzxr34mozWDYEu1z8= 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/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 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-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 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.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.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= 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.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 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/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= +github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -857,44 +426,23 @@ github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1 github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= 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/skeema/knownhosts v1.1.1 h1:MTk78x9FPgDFVFkDLTrsnnfCJl7g1C/nnKvePgrIngE= github.com/skeema/knownhosts v1.1.1/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= -github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= -github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +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.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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= @@ -903,27 +451,21 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/testcontainers/testcontainers-go v0.15.0 h1:3Ex7PUGFv0b2bBsdOv6R42+SK2qoZnWBd21LvZYhUtQ= -github.com/testcontainers/testcontainers-go v0.15.0/go.mod h1:PkohMRH2X8Hib0IWtifVexDfLPVT+tb5E9hsf7cW12w= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/testcontainers/testcontainers-go v0.21.0 h1:syePAxdeTzfkap+RrJaQZpJQ/s/fsUgn11xIvHrOE9U= +github.com/testcontainers/testcontainers-go v0.21.0/go.mod h1:c1ez3WVRHq7T/Aj+X3TIipFBwkBaNT5iNCY8+1b83Ng= github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= 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/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa h1:5SqCsI/2Qya2bCzK15ozrqo2sZxkh0FHynJZOTVoV6Q= +github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= 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.22.0/go.mod h1:0mw2RjXGOzxf4NL2jni3gUQ7LfjjUSiG5sskOUUSEpU= @@ -936,43 +478,16 @@ github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52 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/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -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 v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= 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.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/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -984,26 +499,18 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190130090550-b01c7a725664/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-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/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-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 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= @@ -1013,81 +520,33 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -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-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= 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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -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/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 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.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.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/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-20190108225652-1e06a53dbb7e/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-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/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-20191004110552-13f9640d40b9/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= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -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-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226101413-39120d07d75e/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 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-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= @@ -1096,97 +555,35 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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-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-20201020160332-67f06af15bc9/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.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 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/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-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/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-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/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-20200217220822-9197077df867/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-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/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-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/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-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1196,7 +593,6 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/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-20211116061358-0a5406a5449c/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-20220520151302-bc2c85ada10a/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-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1214,9 +610,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/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.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -1227,63 +622,22 @@ golang.org/x/text v0.7.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 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -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-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -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= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= @@ -1293,122 +647,39 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 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.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/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= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -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.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.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -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.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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/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-20200227125254-8fa46927fb4f/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/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= 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/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= 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/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= 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/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -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.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.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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= @@ -1435,62 +706,28 @@ gorm.io/gorm v1.24.6 h1:wy98aq9oFEetsc4CAbKD2SoBCdMzsbSIvSUUFJuHi5s= gorm.io/gorm v1.24.6/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= -k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= -k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= -k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/code-generator v0.19.7/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= -k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= -k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.36.1 h1:CICrjwr/1M4+6OQ4HJZ/AHxjcwe67r5vPUF518MkO8A= +modernc.org/cc/v3 v3.36.1/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= modernc.org/ccgo/v3 v3.16.8 h1:G0QNlTqI5uVgczBWfGKs7B++EPwCfXPWGD2MdeKloDs= +modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= modernc.org/libc v1.16.19 h1:S8flPn5ZeXx6iw/8yNa986hwTQDrY8RXU7tObZuAozo= +modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= modernc.org/mathutil v1.4.1 h1:ij3fYGe8zBF4Vu+g0oT7mB06r8sqGWKuJu1yXeR4by8= +modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= modernc.org/memory v1.1.1 h1:bDOL0DIDLQv7bWhP3gMvIrnoFw+Eo6F7a2QK9HPDiFU= +modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sqlite v1.18.1 h1:ko32eKt3jf7eqIkCgPAeHMBXw3riNSLhl2f3loEF7o8= +modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= modernc.org/strutil v1.1.2 h1:iFBDH6j1Z0bN/Q9udJnnFoFpENA4252qe/7/5woE5MI= +modernc.org/strutil v1.1.2/go.mod h1:OYajnUAcI/MX+XD/Wx7v1bbdvcQSvxgtb0gC+u3d3eg= modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/lefthook.yml b/lefthook.yml index 75ccbde2bd6..990f1f61e4b 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -2,12 +2,12 @@ pre-commit: parallel: true commands: - bridge-ui: - glob: "packages/bridge-ui/**.{js,svelte,ts}" - run: pnpm -F bridge-ui lint:fix && git add {staged_files} - bridge-ui-v2: - glob: "packages/bridge-ui-v2/**.{js,ts,css,svelte}" - run: pnpm -F bridge-ui-v2 svelte:check && pnpm -F bridge-ui-v2 lint:fix && git add {staged_files} + # bridge-ui: + # glob: "packages/bridge-ui/**.{js,svelte,ts}" + # run: pnpm -F bridge-ui lint:fix && git add {staged_files} + # bridge-ui-v2: + # glob: "packages/bridge-ui-v2/**.{js,ts,css,svelte}" + # run: pnpm -F bridge-ui-v2 svelte:check && pnpm -F bridge-ui-v2 lint:fix && git add {staged_files} protocol_sol: glob: "packages/protocol/**.{sol}" run: pnpm -F protocol lint:sol && git add {staged_files} diff --git a/package.json b/package.json index 5e1fa572e87..e10eb44e488 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.17.0", "private": true, "devDependencies": { - "lefthook": "^1.4.0", + "lefthook": "^1.4.7", "prettier": "^2.8.8" } } diff --git a/packages/branding/README.md b/packages/branding/README.md index 4310f3767ab..90b17222ceb 100644 --- a/packages/branding/README.md +++ b/packages/branding/README.md @@ -15,3 +15,4 @@ Look inside of this package for some common files you can use. Otherwise, please ## Colors Our primary hex color is `#E81899`. For the full color palette and further details, please resort to the [Figma](). + diff --git a/packages/bridge-ui-v2/package.json b/packages/bridge-ui-v2/package.json index 8d87b15bf0e..c0249b04ae9 100644 --- a/packages/bridge-ui-v2/package.json +++ b/packages/bridge-ui-v2/package.json @@ -36,6 +36,7 @@ "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-svelte": "^2.26.0", "ethereum-address": "^0.0.4", + "jsdom": "^22.1.0", "postcss": "^8.4.24", "prettier": "^3.0.0", "prettier-plugin-svelte": "^3.0.0", diff --git a/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte b/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte index 2212f985edb..fa013c8a842 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/AddressInput.svelte @@ -2,6 +2,7 @@ import { isAddress } from 'ethereum-address'; import { createEventDispatcher } from 'svelte'; import { t } from 'svelte-i18n'; + import type { Address } from 'viem'; import { Alert } from '$components/Alert'; import { uid } from '$libs/util/uid'; @@ -10,38 +11,35 @@ let inputId = `input-${uid()}`; let showAlert = true; - let ethereumAddress = ''; + export let ethereumAddress: Address | string = ''; let isValidEthereumAddress = false; let tooShort = true; const dispatch = createEventDispatcher(); - // TODO: nope!!, this should go inside a function whose arguments - // are the values that trigger reactivity - $: { - ethereumAddress; - if (ethereumAddress.length > 41) { - tooShort = false; - validateEthereumAddress(); - } else { + const validateEthereumAddress = (address: string | EventTarget | null) => { + if (address && address instanceof EventTarget) { + address = (address as HTMLInputElement).value; + } + const addr = address as string; + if (addr.length < 42) { tooShort = true; + } else { + tooShort = false; + isValidEthereumAddress = isAddress(addr); + dispatch('input', addr); } - dispatch('addressvalidation', { isValidEthereumAddress, ethereumAddress }); - } - - const validateEthereumAddress = () => { - isValidEthereumAddress = isAddress(ethereumAddress); + dispatch('addressvalidation', { isValidEthereumAddress, addr }); }; + $: validateEthereumAddress(ethereumAddress); + export const clear = () => { input.value = ''; - validateEthereumAddress(); + validateEthereumAddress(''); }; export const focus = () => input.focus(); - export const value = () => { - return input.value; - };
@@ -54,12 +52,14 @@ type="string" placeholder="0x1B77..." bind:value={ethereumAddress} + on:input={(e) => validateEthereumAddress(e.target)} class="w-full input-box outline-none py-6 pr-16 px-[26px] title-subsection-bold placeholder:text-tertiary-content" />
{#if !isValidEthereumAddress && !tooShort} +

Invalid address

This doesn't seem to be a valid Ethereum address

diff --git a/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte b/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte index 30f8bb4e9dc..8390e5cf4e7 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/Amount.svelte @@ -1,5 +1,6 @@ - +
- + diff --git a/packages/bridge-ui-v2/src/components/Bridge/BridgeTabs.svelte b/packages/bridge-ui-v2/src/components/Bridge/BridgeTabs.svelte index 9541eb57ba7..16707e241c1 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/BridgeTabs.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/BridgeTabs.svelte @@ -3,17 +3,20 @@ import { page } from '$app/stores'; import { LinkButton } from '$components/LinkButton'; - $: isERC20Bridge = $page.route.id === '/' ? true : false; - $: isNFTBridge = $page.route.id === '/nft' ? true : false; - $: classes = `flex-basis-0 mr-2 p-3 rounded-full flex justify-center items-center w-auto sm:w-20 2xl:w-32`; + import { classNames } from '$libs/util/classNames'; + + let classes = classNames('space-x-2', $$props.class); + + $: isERC20Bridge = $page.route.id === '/'; + $: isNFTBridge = $page.route.id === '/nft'; -
- +
+ {$t('nav.token')} - + {$t('nav.nft')}
diff --git a/packages/bridge-ui-v2/src/components/Bridge/Recipient.svelte b/packages/bridge-ui-v2/src/components/Bridge/Recipient.svelte index e4bf8f1c62c..245fa4ec0c9 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/Recipient.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/Recipient.svelte @@ -69,11 +69,11 @@ $: displayedRecipient = $recipientAddress || $account?.address; -
+
{$t('recipient.title')} - TODO: add description about processing fee + {$t('recipient.tooltip')}
diff --git a/packages/bridge-ui-v2/src/components/Bridge/SwitchChainsButton.svelte b/packages/bridge-ui-v2/src/components/Bridge/SwitchChainsButton.svelte index 4c64c0ad7cd..0322f1a1ef5 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/SwitchChainsButton.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/SwitchChainsButton.svelte @@ -1,7 +1,7 @@ + +

{$t('processing_fee.title')}

+ +

{$t('processing_fee.description')}

+
+ + {#if tokenDetails} +
+ Name: {tokenDetails.symbol} + Balance: {formatUnits(tokenDetails.balance, tokenDetails.decimals)} +
+ {:else if loadingTokenDetails} + + {:else if tokenError !== '' && tokenAddress !== '' && isValidEthereumAddress} + +

{$t('bridge.errors.custom_token.not_found')}

+

{$t('bridge.errors.custom_token.description')}

+
+ {:else} +
+ {/if} +
+ {#if loading} + + {:else} + + {/if} + + {#if customTokens.length > 0} +
+

Your imported tokens:

+ {#each customTokens as ct (ct.symbol)} +
+
+ + {ct.symbol} +
+ + +
+
+ {/each} +
+ {/if} + + +
+
+ diff --git a/packages/bridge-ui-v2/src/components/TokenDropdown/DialogView.svelte b/packages/bridge-ui-v2/src/components/TokenDropdown/DialogView.svelte index f68582e2e15..e835d2ea25e 100644 --- a/packages/bridge-ui-v2/src/components/TokenDropdown/DialogView.svelte +++ b/packages/bridge-ui-v2/src/components/TokenDropdown/DialogView.svelte @@ -1,18 +1,58 @@ @@ -43,6 +83,43 @@
{/each} + {#each customTokens as token, index (index)} +
  • selectToken(token)} + on:keydown={getTokenKeydownHandler(token)}> +
    + + + + {token.symbol} +
    +
  • + {/each} +
    +
  • + +
  • + + + + + diff --git a/packages/bridge-ui-v2/src/components/TokenDropdown/DropdownView.svelte b/packages/bridge-ui-v2/src/components/TokenDropdown/DropdownView.svelte index 626e4eedbb8..be07de7df27 100644 --- a/packages/bridge-ui-v2/src/components/TokenDropdown/DropdownView.svelte +++ b/packages/bridge-ui-v2/src/components/TokenDropdown/DropdownView.svelte @@ -1,30 +1,60 @@ @@ -44,6 +74,40 @@
    {/each} + {#each customTokens as token, index (index)} +
  • selectToken(token)} + on:keydown={getTokenKeydownHandler(token)}> +
    + + + + {token.symbol} +
    +
  • + {/each} +
    +
  • + +
  • - + + + diff --git a/packages/bridge-ui-v2/src/components/TokenDropdown/TokenDropdown.svelte b/packages/bridge-ui-v2/src/components/TokenDropdown/TokenDropdown.svelte index 8b10916ed12..92cb10a7e92 100644 --- a/packages/bridge-ui-v2/src/components/TokenDropdown/TokenDropdown.svelte +++ b/packages/bridge-ui-v2/src/components/TokenDropdown/TokenDropdown.svelte @@ -1,12 +1,18 @@ @@ -46,7 +68,7 @@ aria-haspopup="listbox" aria-controls={id} aria-expanded={menuOpen} - class="f-between-center w-full px-6 py-[14px] input-box" + class="f-between-center w-full px-6 py-[14px] input-box bg-neutral-background border-0 shadow-none outline-none font-bold text-2xl" on:click={openMenu} on:focus={openMenu}>
    @@ -55,9 +77,15 @@ {/if} {#if value}
    - - - + {#if symbolToIconMap[value.symbol]} + + + + {:else} + + + + {/if} {value.symbol}
    {/if} @@ -66,8 +94,8 @@ {#if isDesktopOrLarger} - + {:else} - + {/if}
    diff --git a/packages/bridge-ui-v2/src/i18n/en.json b/packages/bridge-ui-v2/src/i18n/en.json index 20e21930c64..24e10b3a5d9 100644 --- a/packages/bridge-ui-v2/src/i18n/en.json +++ b/packages/bridge-ui-v2/src/i18n/en.json @@ -30,8 +30,14 @@ "send_message_error": "Failed to send message", "approve_error": "Failed to approve token", "rejected": "Request to bridge rejected.", - "no_allowance_required": "You need to add allowance to bridge this token.", - "unknown_error": "An error occured" + "no_allowance_required": "You already have enough allowance.", + "insufficient_allowance": "You need to increase your allowance in order to be able to bridge.", + "cannot_fetch_balance": "Error fetching balance. Wrong chain?", + "unknown_error": "An error occured", + "custom_token": { + "not_found": "Token not found", + "description": "Are you on the right network?" + } }, "button": { "approve": "Approve", @@ -174,7 +180,8 @@ }, "network": { "switching": "Switching network", - "rejected": "Request to switch chain rejected." + "rejected": "Request to switch chain rejected.", + "pending": "A network switch is still pending, open your wallet to check the status." } }, "common": { diff --git a/packages/bridge-ui-v2/src/libs/bridge/checkBalanceToBridge.ts b/packages/bridge-ui-v2/src/libs/bridge/checkBalanceToBridge.ts index b21addfe4b7..abad3c3e50a 100644 --- a/packages/bridge-ui-v2/src/libs/bridge/checkBalanceToBridge.ts +++ b/packages/bridge-ui-v2/src/libs/bridge/checkBalanceToBridge.ts @@ -1,3 +1,4 @@ +import { getPublicClient } from '@wagmi/core'; import { type Address, zeroAddress } from 'viem'; import { chainContractsMap } from '$libs/chain'; @@ -61,10 +62,16 @@ export async function checkBalanceToBridge({ throw new RevertedWithFailedError('BLL token doing its thing', { cause: err }); } } + if (estimatedCost > balance - amount) { + throw new InsufficientBalanceError('you do not have enough balance to bridge'); + } } else { const { tokenVaultAddress } = chainContractsMap[srcChainId]; const tokenAddress = await getAddress({ token, srcChainId, destChainId }); + // since we are briding a token, we need the ETH balance of the wallet + balance = await getPublicClient().getBalance(wallet.account); + if (!tokenAddress || tokenAddress === zeroAddress) return false; const isTokenAlreadyDeployed = await isDeployedCrossChain({ @@ -88,9 +95,9 @@ export async function checkBalanceToBridge({ throw new InsufficientAllowanceError(`insufficient allowance for the amount ${amount}`, { cause: err }); } } - } - - if (estimatedCost > balance - amount) { - throw new InsufficientBalanceError('you do not have enough balance to bridge'); + // no need to deduct the amount we want to bridge from the balance as we pay in ETH + if (estimatedCost > balance) { + throw new InsufficientBalanceError('you do not have enough balance to bridge'); + } } } diff --git a/packages/bridge-ui-v2/src/libs/storage/CustomTokenService.test.ts b/packages/bridge-ui-v2/src/libs/storage/CustomTokenService.test.ts new file mode 100644 index 00000000000..6430e83549c --- /dev/null +++ b/packages/bridge-ui-v2/src/libs/storage/CustomTokenService.test.ts @@ -0,0 +1,134 @@ +import { type Address, zeroAddress } from 'viem'; +import { describe, expect, test, vi } from 'vitest'; + +import { type Token, TokenType } from '$libs/token'; + +import { CustomTokenService } from './CustomTokenService'; + +const STORAGE_PREFIX = 'custom-tokens'; + +describe('CustomTokenService', () => { + const localStorage = global.localStorage; + let token1: Token; + let token2: Token; + let address: Address; + let tokenService: CustomTokenService; + let storageKey: string; + + const getItemSpy = vi.spyOn(Storage.prototype, 'getItem'); + const setItemSpy = vi.spyOn(Storage.prototype, 'setItem'); + const removeItemSpy = vi.spyOn(Storage.prototype, 'removeItem'); + + beforeEach(() => { + tokenService = new CustomTokenService(localStorage); + address = '0x1234'; + storageKey = STORAGE_PREFIX + '-' + address; + + token1 = { + name: 'Imported Token', + addresses: { address1: '0x999', address2: '0x111' }, + symbol: 'TST', + decimals: 18, + type: TokenType.ERC20, + imported: true, + }; + token2 = { + name: 'Another Token', + addresses: { address1: '0x888', address2: zeroAddress }, + symbol: 'T2T', + decimals: 18, + type: TokenType.ERC20, + imported: true, + }; + }); + + afterEach(() => { + localStorage.clear(); + + getItemSpy.mockClear(); + setItemSpy.mockClear(); + removeItemSpy.mockClear(); + }); + + test('stores token correctly', () => { + // When + const actual = tokenService.storeToken(token1, address); + + // Then + expect(actual).toStrictEqual([token1]); + expect(getItemSpy).toHaveBeenCalledWith(storageKey); + }); + + test('returns all stored tokens', () => { + // Given + const expected = JSON.stringify([token1, token2]); + localStorage.setItem(storageKey, expected); + + // When + const actual = tokenService.getTokens(address); + + // Then + expect(actual).toStrictEqual([token1, token2]); + expect(setItemSpy).toHaveBeenCalledWith(storageKey, expected); + }); + + test('removes token correctly', () => { + // Given + localStorage.setItem(storageKey, JSON.stringify([token1, token2])); + + // When + const actual = tokenService.removeToken(token1, address); + + // Then + expect(actual).toStrictEqual([token2]); + }); + + test('updates token correctly when an address is zeroAddress', () => { + // Given + const token2Updated: Token = { + name: 'Another Token', + addresses: { address1: '0x888', address2: '0x777' }, + symbol: 'T2T', + decimals: 18, + type: TokenType.ERC20, + imported: true, + }; + localStorage.setItem(storageKey, JSON.stringify([token1, token2])); + + // When + const actual = tokenService.updateToken(token2Updated, address); + + // Then + expect(actual).toStrictEqual([token1, token2Updated]); + }); + + test('updates token correctly when an address is not zeroAddress', () => { + // Given + const token1Updated: Token = { + ...token1, + addresses: { address1: '0x999', address2: '0x777' }, + }; + localStorage.setItem(storageKey, JSON.stringify([token1, token2])); + + // When + const actual = tokenService.updateToken(token1Updated, address); + + // Then + expect(actual).toStrictEqual([token1Updated, token2]); + }); + + test('does not update a non zeroAddress address to zeroAddress', () => { + // Given + const token1Updated: Token = { + ...token1, + addresses: { address1: '0x999', address2: zeroAddress }, + }; + localStorage.setItem(storageKey, JSON.stringify([token1, token2])); + + // When + const actual = tokenService.updateToken(token1Updated, address); + + // Then + expect(actual).toStrictEqual([token1, token2]); + }); +}); diff --git a/packages/bridge-ui-v2/src/libs/storage/CustomTokenService.ts b/packages/bridge-ui-v2/src/libs/storage/CustomTokenService.ts new file mode 100644 index 00000000000..91d50bcac57 --- /dev/null +++ b/packages/bridge-ui-v2/src/libs/storage/CustomTokenService.ts @@ -0,0 +1,96 @@ +import { type Address, zeroAddress } from 'viem'; + +import type { Token, TokenService } from '$libs/token'; +import { jsonParseWithDefault } from '$libs/util/jsonParseWithDefault'; + +const STORAGE_PREFIX = 'custom-tokens'; + +// Todo: add logging + +export class CustomTokenService implements TokenService { + private readonly storage: Storage; + + private readonly storageChangeNotifier: EventTarget; + + constructor(storage: Storage) { + this.storage = storage; + this.storageChangeNotifier = new EventTarget(); + } + + private _getTokensFromStorage(address: string): Token[] { + const existingCustomTokens = this.storage.getItem(`${STORAGE_PREFIX}-${address.toLowerCase()}`); + + return jsonParseWithDefault(existingCustomTokens, []); + } + + storeToken(token: Token, address: string): Token[] { + const tokens: Token[] = this._getTokensFromStorage(address); + + let doesTokenAlreadyExist = false; + if (tokens.length > 0) { + doesTokenAlreadyExist = tokens.findIndex((tokenFromStorage) => tokenFromStorage.symbol === token.symbol) >= 0; + } + if (!doesTokenAlreadyExist) { + tokens.push(token); + } + + this.storage.setItem(`${STORAGE_PREFIX}-${address.toLowerCase()}`, JSON.stringify(tokens)); + this.storageChangeNotifier.dispatchEvent(new CustomEvent('storageChange', { detail: tokens })); + + return tokens; + } + + getTokens(address: string): Token[] { + if (address) { + return this._getTokensFromStorage(address); + } + return []; + } + + removeToken(token: Token, address: string): Token[] { + const tokens: Token[] = this._getTokensFromStorage(address); + + const updatedTokenList = tokens.filter((tokenFromStorage) => tokenFromStorage.symbol !== token.symbol); + + this.storage.setItem(`${STORAGE_PREFIX}-${address.toLowerCase()}`, JSON.stringify(updatedTokenList)); + this.storageChangeNotifier.dispatchEvent(new CustomEvent('storageChange', { detail: updatedTokenList })); + + return updatedTokenList; + } + + updateToken(token: Token, address: Address): Token[] { + // Get the tokens from storage + const tokens: Token[] = this._getTokensFromStorage(address); + + // Filter out zero addresses from the new token's addresses + const filteredAddresses = Object.fromEntries( + Object.entries(token.addresses).filter(([key, value]) => value !== zeroAddress), + ); + + // Find the stored token to update + const storedToken = tokens.find((storedToken) => + Object.values(filteredAddresses).some((addressToUpdate) => + Object.values(storedToken.addresses).includes(addressToUpdate), + ), + ); + + // If the stored token was found, update its addresses + if (storedToken) { + storedToken.addresses = { ...storedToken.addresses, ...filteredAddresses }; + + // Save the updated tokens back to storage + this.storage.setItem(`${STORAGE_PREFIX}-${address.toLowerCase()}`, JSON.stringify(tokens)); + this.storageChangeNotifier.dispatchEvent(new CustomEvent('storageChange', { detail: tokens })); + } + + return tokens; + } + + subscribeToChanges(callback: (tokens: Token[]) => void): void { + this.storageChangeNotifier.addEventListener('storageChange', (event) => callback((event as CustomEvent).detail)); + } + + unsubscribeFromChanges(callback: (tokens: Token[]) => void): void { + this.storageChangeNotifier.removeEventListener('storageChange', (event) => callback((event as CustomEvent).detail)); + } +} diff --git a/packages/bridge-ui-v2/src/libs/storage/services.ts b/packages/bridge-ui-v2/src/libs/storage/services.ts new file mode 100644 index 00000000000..0101a11405e --- /dev/null +++ b/packages/bridge-ui-v2/src/libs/storage/services.ts @@ -0,0 +1,3 @@ +import { CustomTokenService } from './CustomTokenService'; + +export const tokenService = new CustomTokenService(globalThis.localStorage); diff --git a/packages/bridge-ui-v2/src/libs/token/types.ts b/packages/bridge-ui-v2/src/libs/token/types.ts index 96e180efb64..1fd49199045 100644 --- a/packages/bridge-ui-v2/src/libs/token/types.ts +++ b/packages/bridge-ui-v2/src/libs/token/types.ts @@ -19,10 +19,19 @@ export type Token = { symbol: string; decimals: number; type: TokenType; + imported?: boolean; }; export type TokenEnv = { name: string; address: Address; symbol: string; + balance: bigint; }; + +export interface TokenService { + storeToken(token: Token, address: string): Token[]; + getTokens(address: string): Token[]; + removeToken(token: Token, address: string): Token[]; + updateToken(token: Token, address: string): Token[]; +} diff --git a/packages/bridge-ui-v2/vite.config.ts b/packages/bridge-ui-v2/vite.config.ts index 808b49b4332..d59218b5cc9 100644 --- a/packages/bridge-ui-v2/vite.config.ts +++ b/packages/bridge-ui-v2/vite.config.ts @@ -14,6 +14,7 @@ export default defineConfig({ tsconfigPaths(), ], test: { + environment: 'jsdom', globals: true, include: ['src/**/*.{test,spec}.{js,ts}'], }, diff --git a/packages/bridge-ui/.default.env b/packages/bridge-ui/.default.env index f4b02398ab7..2140f57057e 100644 --- a/packages/bridge-ui/.default.env +++ b/packages/bridge-ui/.default.env @@ -26,3 +26,5 @@ VITE_L1_SIGNAL_SERVICE_ADDRESS="" VITE_L2_SIGNAL_SERVICE_ADDRESS="" VITE_SENTRY_DSN="" + +VITE_ENABLE_FAUCET= \ No newline at end of file diff --git a/packages/bridge-ui/package.json b/packages/bridge-ui/package.json index 6a96a65ed9e..1a5bf113566 100644 --- a/packages/bridge-ui/package.json +++ b/packages/bridge-ui/package.json @@ -6,6 +6,7 @@ "scripts": { "start": "pnpm run dev", "start:a3": "pnpm run dev --mode a3", + "start:l3": "pnpm run dev --mode l3", "dev": "vite", "build": "vite build", "preview": "vite preview", diff --git a/packages/bridge-ui/public/chains/eldfell.svg b/packages/bridge-ui/public/chains/eldfell.svg new file mode 100644 index 00000000000..c634e8df405 --- /dev/null +++ b/packages/bridge-ui/public/chains/eldfell.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/bridge-ui/public/chains/sepolia.svg b/packages/bridge-ui/public/chains/sepolia.svg new file mode 100644 index 00000000000..4c9de80e7f0 --- /dev/null +++ b/packages/bridge-ui/public/chains/sepolia.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/bridge-ui/public/chains/taiko.svg b/packages/bridge-ui/public/chains/taiko.svg new file mode 100644 index 00000000000..2f66d448b7c --- /dev/null +++ b/packages/bridge-ui/public/chains/taiko.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/packages/bridge-ui/src/chain/chains.ts b/packages/bridge-ui/src/chain/chains.ts index ff3f98d1f48..994d630ea02 100644 --- a/packages/bridge-ui/src/chain/chains.ts +++ b/packages/bridge-ui/src/chain/chains.ts @@ -1,9 +1,8 @@ import type { Chain as WagmiChain } from 'wagmi'; -import Eth from '../components/icons/ETH.svelte'; -import Taiko from '../components/icons/TKO.svelte'; import { L1_BRIDGE_ADDRESS, + L1_CHAIN_ICON, L1_CHAIN_ID, L1_CHAIN_NAME, L1_CROSS_CHAIN_SYNC_ADDRESS, @@ -11,6 +10,7 @@ import { L1_RPC, L1_SIGNAL_SERVICE_ADDRESS, L2_BRIDGE_ADDRESS, + L2_CHAIN_ICON, L2_CHAIN_ID, L2_CHAIN_NAME, L2_CROSS_CHAIN_SYNC_ADDRESS, @@ -20,24 +20,24 @@ import { } from '../constants/envVars'; import type { Chain, ChainID } from '../domain/chain'; -export const mainnetChain: Chain = { +export const L1Chain: Chain = { id: L1_CHAIN_ID, name: L1_CHAIN_NAME, rpc: L1_RPC, enabled: true, - icon: Eth, + iconUrl: L1_CHAIN_ICON, bridgeAddress: L1_BRIDGE_ADDRESS, crossChainSyncAddress: L1_CROSS_CHAIN_SYNC_ADDRESS, explorerUrl: L1_EXPLORER_URL, signalServiceAddress: L1_SIGNAL_SERVICE_ADDRESS, }; -export const taikoChain: Chain = { +export const L2Chain: Chain = { id: L2_CHAIN_ID, name: L2_CHAIN_NAME, rpc: L2_RPC, enabled: true, - icon: Taiko, + iconUrl: L2_CHAIN_ICON, bridgeAddress: L2_BRIDGE_ADDRESS, crossChainSyncAddress: L2_CROSS_CHAIN_SYNC_ADDRESS, explorerUrl: L2_EXPLORER_URL, @@ -45,11 +45,11 @@ export const taikoChain: Chain = { }; export const chains: Record = { - [L1_CHAIN_ID]: mainnetChain, - [L2_CHAIN_ID]: taikoChain, + [L1_CHAIN_ID]: L1Chain, + [L2_CHAIN_ID]: L2Chain, }; -// TODO: can we not merge this chain into mainnetChain? +// TODO: can we not merge this chain into L1Chain? export const mainnetWagmiChain: WagmiChain = { id: L1_CHAIN_ID, name: L1_CHAIN_NAME, @@ -67,7 +67,7 @@ export const mainnetWagmiChain: WagmiChain = { }, }; -// TODO: same here, merge it into taikoChain +// TODO: same here, merge it into L2Chain export const taikoWagmiChain: WagmiChain = { id: L2_CHAIN_ID, name: L2_CHAIN_NAME, diff --git a/packages/bridge-ui/src/components/AddressDropdown.svelte b/packages/bridge-ui/src/components/AddressDropdown.svelte index 9689aa433a9..ae2c3fd0260 100644 --- a/packages/bridge-ui/src/components/AddressDropdown.svelte +++ b/packages/bridge-ui/src/components/AddressDropdown.svelte @@ -112,7 +112,7 @@ class="dropdown-content rounded-box menu shadow bg-dark-2 w-48 mt-2 pb-2 text-sm">
    {#if $srcChain && $signer} - + {$srcChain.name}
    {tokenBalance.length > 10 ? `${truncateString(tokenBalance)}…` diff --git a/packages/bridge-ui/src/components/BridgeForm/SelectChain.svelte b/packages/bridge-ui/src/components/BridgeForm/SelectChain.svelte index 98fd61c1eb9..e2817a0a09e 100644 --- a/packages/bridge-ui/src/components/BridgeForm/SelectChain.svelte +++ b/packages/bridge-ui/src/components/BridgeForm/SelectChain.svelte @@ -3,7 +3,7 @@ import { ArrowRight } from 'svelte-heros-v2'; import { UserRejectedRequestError } from 'wagmi'; - import { mainnetChain, taikoChain } from '../../chain/chains'; + import { L1Chain, L2Chain } from '../../chain/chains'; import { destChain, srcChain } from '../../store/chain'; import { signer } from '../../store/signer'; import { pendingTransactions } from '../../store/transaction'; @@ -20,7 +20,7 @@ return; } - const chain = $srcChain === mainnetChain ? taikoChain : mainnetChain; + const chain = $srcChain === L1Chain ? L2Chain : L1Chain; try { await switchNetwork(chain.id); @@ -49,11 +49,11 @@ class="flex items-center justify-between w-full px-4 md:px-7 py-6 text-sm md:text-lg">
    {#if $srcChain} - + {$srcChain.name} {$srcChain.name} {:else} - - {mainnetChain.name} + {L1Chain.name} + {L1Chain.name} {/if}
    @@ -66,11 +66,11 @@
    {#if $destChain} - + {$destChain.name} {$destChain.name} {:else} - - {taikoChain.name} + {L2Chain.name} + {L2Chain.name} {/if}
    diff --git a/packages/bridge-ui/src/components/ChainDropdown.svelte b/packages/bridge-ui/src/components/ChainDropdown.svelte index 543a1ab93f7..f53be29cbca 100644 --- a/packages/bridge-ui/src/components/ChainDropdown.svelte +++ b/packages/bridge-ui/src/components/ChainDropdown.svelte @@ -3,7 +3,7 @@ import { ChevronDown, ExclamationTriangle } from 'svelte-heros-v2'; import { UserRejectedRequestError } from 'wagmi'; - import { mainnetChain, taikoChain } from '../chain/chains'; + import { L1Chain, L2Chain } from '../chain/chains'; import type { Chain } from '../domain/chain'; import { srcChain } from '../store/chain'; import { signer } from '../store/signer'; @@ -49,8 +49,10 @@
  • diff --git a/packages/bridge-ui/src/components/SwitchChainModal.svelte b/packages/bridge-ui/src/components/SwitchChainModal.svelte index f24caf11ddd..6a00d59df94 100644 --- a/packages/bridge-ui/src/components/SwitchChainModal.svelte +++ b/packages/bridge-ui/src/components/SwitchChainModal.svelte @@ -1,7 +1,7 @@ -
    +
    diff --git a/packages/bridge-ui/src/components/Transactions/Transaction.svelte b/packages/bridge-ui/src/components/Transactions/Transaction.svelte index 7caeb969e2e..786c68e260f 100644 --- a/packages/bridge-ui/src/components/Transactions/Transaction.svelte +++ b/packages/bridge-ui/src/components/Transactions/Transaction.svelte @@ -384,12 +384,24 @@ - - +
    + {txFromChain.name} + +
    - - +
    + {txToChain.name} + +
    {#if Boolean(transaction.message) && isETHByMessage(transaction.message)} diff --git a/packages/bridge-ui/src/constants/__mocks__/envVars.ts b/packages/bridge-ui/src/constants/__mocks__/envVars.ts index 0713baa86af..77b2ac9e2e4 100644 --- a/packages/bridge-ui/src/constants/__mocks__/envVars.ts +++ b/packages/bridge-ui/src/constants/__mocks__/envVars.ts @@ -15,6 +15,8 @@ export const L1_CHAIN_ID = 31336; export const L1_CHAIN_NAME = 'Ethereum'; +export const L1_CHAIN_ICON = 'l1'; + export const L1_EXPLORER_URL = 'https://l1explorer.internal.taiko.xyz'; export const L2_RPC = 'https://l2rpc.internal.taiko.xyz'; @@ -36,6 +38,8 @@ export const L2_CHAIN_ID = 167001; export const L2_CHAIN_NAME = 'Taiko'; +export const L2_CHAIN_ICON = 'l2'; + export const L2_EXPLORER_URL = 'https://l2explorer.internal.taiko.xyz'; export const RELAYER_URL = 'https://relayer.internal.taiko.xyz/'; diff --git a/packages/bridge-ui/src/constants/envVars.ts b/packages/bridge-ui/src/constants/envVars.ts index 8c1a63d75fc..299d0509a70 100644 --- a/packages/bridge-ui/src/constants/envVars.ts +++ b/packages/bridge-ui/src/constants/envVars.ts @@ -23,6 +23,8 @@ export const L1_CHAIN_ID: ChainID = parseInt(import.meta.env?.VITE_L1_CHAIN_ID); export const L1_CHAIN_NAME: string = import.meta.env?.VITE_L1_CHAIN_NAME; +export const L1_CHAIN_ICON: string = import.meta.env?.VITE_L1_CHAIN_ICON; + export const L1_EXPLORER_URL: string = import.meta.env?.VITE_L1_EXPLORER_URL; export const L2_RPC: string = import.meta.env?.VITE_L2_RPC_URL; @@ -43,6 +45,8 @@ export const L2_CHAIN_ID: ChainID = parseInt(import.meta.env?.VITE_L2_CHAIN_ID); export const L2_CHAIN_NAME: string = import.meta.env?.VITE_L2_CHAIN_NAME; +export const L2_CHAIN_ICON: string = import.meta.env?.VITE_L2_CHAIN_ICON; + export const L2_EXPLORER_URL: string = import.meta.env?.VITE_L2_EXPLORER_URL; export const RELAYER_URL: string = import.meta.env?.VITE_RELAYER_URL; @@ -58,3 +62,6 @@ export const SENTRY_DSN: string = import.meta.env?.VITE_SENTRY_DSN; export const WALLETCONNECT_PROJECT_ID: string = import.meta.env ?.VITE_WALLETCONNECT_PROJECT_ID; + +export const ENABLE_FAUCET: boolean = + import.meta.env?.VITE_ENABLE_FAUCET === 'true'; diff --git a/packages/bridge-ui/src/domain/chain.ts b/packages/bridge-ui/src/domain/chain.ts index 3d7eacbff50..b96de325b84 100644 --- a/packages/bridge-ui/src/domain/chain.ts +++ b/packages/bridge-ui/src/domain/chain.ts @@ -1,4 +1,3 @@ -import type { ComponentType } from 'svelte'; import type { Address } from 'wagmi'; export type ChainID = number; @@ -8,7 +7,7 @@ export type Chain = { name: string; rpc: string; enabled?: boolean; - icon?: ComponentType; + iconUrl?: string; bridgeAddress: Address; crossChainSyncAddress: Address; explorerUrl: string; diff --git a/packages/bridge-ui/src/pages/home/Home.svelte b/packages/bridge-ui/src/pages/home/Home.svelte index 97a02961745..a324ccc8be5 100644 --- a/packages/bridge-ui/src/pages/home/Home.svelte +++ b/packages/bridge-ui/src/pages/home/Home.svelte @@ -7,6 +7,7 @@ import Loading from '../../components/Loading.svelte'; import { Tab, TabList, TabPanel, Tabs } from '../../components/Tabs'; import Transactions from '../../components/Transactions'; + import { ENABLE_FAUCET } from '../../constants/envVars'; import { paginationInfo } from '../../store/relayerApi'; import { signer } from '../../store/signer'; import { transactions } from '../../store/transaction'; @@ -16,7 +17,7 @@ const tabsRoute = [ { name: 'bridge', href: '/' }, { name: 'transactions', href: '/transactions' }, - { name: 'faucet', href: '/faucet' }, + { name: 'faucet', href: '/faucet' }, // faucet wont be used if disabled in env // Add more tabs if needed ]; @@ -42,7 +43,6 @@ bind:activeTab> {@const tab1 = tabsRoute[0]} {@const tab2 = tabsRoute[1]} - {@const tab3 = tabsRoute[2]} Bridge @@ -54,7 +54,9 @@ () {/if} - Faucet + {#if ENABLE_FAUCET} + Faucet + {/if} @@ -72,10 +74,12 @@
    - -
    - -
    -
    + {#if ENABLE_FAUCET} + +
    + +
    +
    + {/if}
    diff --git a/packages/bridge-ui/src/proof/ProofService.ts b/packages/bridge-ui/src/proof/ProofService.ts index a7b4ef126a0..967d2ed4f34 100644 --- a/packages/bridge-ui/src/proof/ProofService.ts +++ b/packages/bridge-ui/src/proof/ProofService.ts @@ -91,6 +91,9 @@ export class ProofService implements Prover { ]); log('Proof from eth_getProof', proof); + log('ProofOpts', opts); + log('Key', key); + log('Proof value', proof.storageProof[0].value); if (proof.storageProof[0].value !== '0x1') { throw Error('invalid proof'); diff --git a/packages/bridge-ui/src/sentry.ts b/packages/bridge-ui/src/sentry.ts index d794bb2fbeb..0d19cd22646 100644 --- a/packages/bridge-ui/src/sentry.ts +++ b/packages/bridge-ui/src/sentry.ts @@ -24,6 +24,7 @@ export function setupSentry(dsn?: string) { sampleRate: isProd ? 0.1 : 1.0, tracesSampleRate: isProd ? 0.1 : 1.0, maxBreadcrumbs: 50, + ignoreErrors: ['issue getting minters for BLL'], beforeSend(event, hint) { const processedEvent = { ...event }; diff --git a/packages/bridge-ui/src/token/tokens.ts b/packages/bridge-ui/src/token/tokens.ts index c5b3c1e94e2..5c24f51252a 100644 --- a/packages/bridge-ui/src/token/tokens.ts +++ b/packages/bridge-ui/src/token/tokens.ts @@ -46,8 +46,10 @@ export const testERC20Tokens: Token[] = TEST_ERC20.map( [L2_CHAIN_ID]: '0x00', }, decimals: 18, + + // TODO: in the future the whole URL will come from env var logoComponent: symbolToLogoComponent[symbol] || Unknown, - logoUrl: logoUrl, + logoUrl, // TODO: this is not used yet }), ); diff --git a/packages/bridge-ui/src/utils/checkIfTokenIsDeployedCrossChain.ts b/packages/bridge-ui/src/utils/checkIfTokenIsDeployedCrossChain.ts index 0e4c4f022c2..add6316154d 100644 --- a/packages/bridge-ui/src/utils/checkIfTokenIsDeployedCrossChain.ts +++ b/packages/bridge-ui/src/utils/checkIfTokenIsDeployedCrossChain.ts @@ -56,6 +56,8 @@ export const checkIfTokenIsDeployedCrossChain = async ( }, ); } + } else { + return true; } } return false; diff --git a/packages/bridge-ui/src/utils/getAddressForToken.ts b/packages/bridge-ui/src/utils/getAddressForToken.ts index 565d9e73e9a..e42d3a722d7 100644 --- a/packages/bridge-ui/src/utils/getAddressForToken.ts +++ b/packages/bridge-ui/src/utils/getAddressForToken.ts @@ -19,7 +19,7 @@ export async function getAddressForToken( // Get the address for the token on the source chain let address = token.addresses[srcChain.id]; - // If the token isn't ETH or has no address... + // If the token isn't ETH and has no address... if (!isETH(token) && (!address || address === '0x00')) { // Find the address on the destination chain instead const destChainAddress = token.addresses[destChain.id]; diff --git a/packages/bridge-ui/src/utils/isOnCorrectChain.spec.ts b/packages/bridge-ui/src/utils/isOnCorrectChain.spec.ts index 82f37e2da10..422fe58395a 100644 --- a/packages/bridge-ui/src/utils/isOnCorrectChain.spec.ts +++ b/packages/bridge-ui/src/utils/isOnCorrectChain.spec.ts @@ -1,6 +1,6 @@ import { Wallet } from 'ethers'; -import { taikoChain } from '../chain/chains'; +import { L2Chain } from '../chain/chains'; import { isOnCorrectChain } from './isOnCorrectChain'; jest.mock('../constants/envVars'); @@ -30,13 +30,13 @@ describe('isOnCorrectChain()', () => { const signer = new Wallet('0x'); mockSigner.getChainId.mockImplementationOnce(() => { - return taikoChain.id; + return L2Chain.id; }); mockProvider.getCode.mockImplementationOnce(() => { return '0x00'; }); - const result = await isOnCorrectChain(signer, taikoChain.id); + const result = await isOnCorrectChain(signer, L2Chain.id); expect(result).toBe(true); }); @@ -44,15 +44,15 @@ describe('isOnCorrectChain()', () => { const signer = new Wallet('0x'); mockSigner.getChainId.mockImplementationOnce(() => { - return taikoChain.id + 1; + return L2Chain.id + 1; }); - const result = await isOnCorrectChain(signer, taikoChain.id); + const result = await isOnCorrectChain(signer, L2Chain.id); expect(result).toBe(false); }); it('should return false when bridgeAddress or tokenVaultAddress does not exist', async () => { mockSigner.getChainId.mockImplementationOnce(() => { - return taikoChain.id; + return L2Chain.id; }); mockProvider.getCode.mockImplementationOnce(() => { @@ -61,7 +61,7 @@ describe('isOnCorrectChain()', () => { const signer = new Wallet('0x'); - const result = await isOnCorrectChain(signer, taikoChain.id); + const result = await isOnCorrectChain(signer, L2Chain.id); expect(result).toBe(false); }); diff --git a/packages/bridge-ui/src/utils/recommendProcessingFee.spec.ts b/packages/bridge-ui/src/utils/recommendProcessingFee.spec.ts index 387792a9b57..c2eddda07b3 100644 --- a/packages/bridge-ui/src/utils/recommendProcessingFee.spec.ts +++ b/packages/bridge-ui/src/utils/recommendProcessingFee.spec.ts @@ -1,7 +1,7 @@ import { BigNumber, ethers, Signer } from 'ethers'; import { get } from 'svelte/store'; -import { mainnetChain, taikoChain } from '../chain/chains'; +import { L1Chain, L2Chain } from '../chain/chains'; import { L1_CHAIN_ID, L2_CHAIN_ID } from '../constants/envVars'; import { ProcessingFeeMethod } from '../domain/fee'; import type { Token } from '../domain/token'; @@ -32,8 +32,8 @@ const gasPrice = 2; const mockGetGasPrice = async () => Promise.resolve(BigNumber.from(gasPrice)); // Mocking providers to return the desired gasPrice -providers[mainnetChain.id].getGasPrice = mockGetGasPrice; -providers[taikoChain.id].getGasPrice = mockGetGasPrice; +providers[L1Chain.id].getGasPrice = mockGetGasPrice; +providers[L2Chain.id].getGasPrice = mockGetGasPrice; const mockSigner = {} as Signer; @@ -57,7 +57,7 @@ describe('recommendProcessingFee()', () => { expect( await recommendProcessingFee( null, - mainnetChain, + L1Chain, ProcessingFeeMethod.RECOMMENDED, ETHToken, get(signer), @@ -66,7 +66,7 @@ describe('recommendProcessingFee()', () => { expect( await recommendProcessingFee( - mainnetChain, + L1Chain, null, ProcessingFeeMethod.RECOMMENDED, ETHToken, @@ -76,8 +76,8 @@ describe('recommendProcessingFee()', () => { expect( await recommendProcessingFee( - mainnetChain, - taikoChain, + L1Chain, + L2Chain, null, ETHToken, get(signer), @@ -86,8 +86,8 @@ describe('recommendProcessingFee()', () => { expect( await recommendProcessingFee( - taikoChain, - mainnetChain, + L2Chain, + L1Chain, ProcessingFeeMethod.RECOMMENDED, null, get(signer), @@ -96,8 +96,8 @@ describe('recommendProcessingFee()', () => { expect( await recommendProcessingFee( - taikoChain, - mainnetChain, + L2Chain, + L1Chain, ProcessingFeeMethod.RECOMMENDED, ETHToken, null, @@ -107,8 +107,8 @@ describe('recommendProcessingFee()', () => { it('uses ethGasLimit if the token is ETH', async () => { const fee = await recommendProcessingFee( - taikoChain, - mainnetChain, + L2Chain, + L1Chain, ProcessingFeeMethod.RECOMMENDED, ETHToken, mockSigner, @@ -127,8 +127,8 @@ describe('recommendProcessingFee()', () => { ); const fee = await recommendProcessingFee( - taikoChain, - mainnetChain, + L2Chain, + L1Chain, ProcessingFeeMethod.RECOMMENDED, testERC20Tokens[0], mockSigner, @@ -145,8 +145,8 @@ describe('recommendProcessingFee()', () => { mockContract.canonicalToBridged.mockImplementationOnce(() => '0x123'); const fee = await recommendProcessingFee( - taikoChain, - mainnetChain, + L2Chain, + L1Chain, ProcessingFeeMethod.RECOMMENDED, testERC20Tokens[0], mockSigner, @@ -161,15 +161,15 @@ describe('recommendProcessingFee()', () => { it('uses destination token address', async () => { await recommendProcessingFee( - taikoChain, - mainnetChain, + L2Chain, + L1Chain, ProcessingFeeMethod.RECOMMENDED, mockToken, mockSigner, ); expect(mockContract.canonicalToBridged).toHaveBeenCalledWith( - taikoChain.id, + L2Chain.id, mockToken.addresses[L2_CHAIN_ID], ); }); @@ -179,8 +179,8 @@ describe('recommendProcessingFee()', () => { await expect( recommendProcessingFee( - taikoChain, - mainnetChain, + L2Chain, + L1Chain, ProcessingFeeMethod.RECOMMENDED, testERC20Tokens[0], mockSigner, diff --git a/packages/bridge-ui/src/vite-env.d.ts b/packages/bridge-ui/src/vite-env.d.ts index 496af0d63f5..d534748a6db 100644 --- a/packages/bridge-ui/src/vite-env.d.ts +++ b/packages/bridge-ui/src/vite-env.d.ts @@ -11,6 +11,8 @@ interface ImportMetaEnv { readonly VITE_L2_CHAIN_ID: string; readonly VITE_L1_CHAIN_NAME: string; readonly VITE_L2_CHAIN_NAME: string; + readonly VITE_L1_CHAIN_ICON: string; + readonly VITE_L2_CHAIN_ICON: string; readonly VITE_L1_TOKEN_VAULT_ADDRESS: string; readonly VITE_L2_TOKEN_VAULT_ADDRESS: string; readonly VITE_L1_CROSS_CHAIN_SYNC_ADDRESS: string; @@ -22,6 +24,7 @@ interface ImportMetaEnv { readonly VITE_TEST_ERC20: string; readonly VITE_SENTRY_DSN: string; readonly VITE_WALLETCONNECT_PROJECT_ID: string; + readonly VITE_ENABLE_FAUCET: string; } interface ImportMeta { diff --git a/packages/bridge-ui/src/wagmi/client.ts b/packages/bridge-ui/src/wagmi/client.ts index da0f82b418d..31990675829 100644 --- a/packages/bridge-ui/src/wagmi/client.ts +++ b/packages/bridge-ui/src/wagmi/client.ts @@ -87,8 +87,6 @@ export const client = createClient({ // '--wcm-color-fg-1': '#E81899', '--wcm-accent-color': '#E81899', }, - chainImages: [], - tokenImages: [] }, }, }), diff --git a/packages/bridge-ui/src/wagmi/watcher.ts b/packages/bridge-ui/src/wagmi/watcher.ts index 997221fe818..d5487fa805c 100644 --- a/packages/bridge-ui/src/wagmi/watcher.ts +++ b/packages/bridge-ui/src/wagmi/watcher.ts @@ -1,6 +1,6 @@ import { fetchSigner, watchAccount, watchNetwork } from 'wagmi/actions'; -import { mainnetChain, taikoChain } from '../chain/chains'; +import { L1Chain, L2Chain } from '../chain/chains'; import { destChain, srcChain } from '../store/chain'; import { isSwitchChainModalOpen } from '../store/modal'; import { signer } from '../store/signer'; @@ -13,16 +13,16 @@ let unWatchNetwork: () => void; let unWatchAccount: () => void; const setChain = (chainId: number) => { - if (chainId === mainnetChain.id) { - srcChain.set(mainnetChain); - destChain.set(taikoChain); + if (chainId === L1Chain.id) { + srcChain.set(L1Chain); + destChain.set(L2Chain); - log(`Network swtiched to ${mainnetChain.name}`); - } else if (chainId === taikoChain.id) { - srcChain.set(taikoChain); - destChain.set(mainnetChain); + log(`Network switched to ${L1Chain.name}`); + } else if (chainId === L2Chain.id) { + srcChain.set(L2Chain); + destChain.set(L1Chain); - log(`Network swtiched to ${taikoChain.name}`); + log(`Network switched to ${L2Chain.name}`); } else { isSwitchChainModalOpen.set(true); } diff --git a/packages/eventindexer/.golangci.yml b/packages/eventindexer/.golangci.yml index a58135057de..4d07f36217d 100644 --- a/packages/eventindexer/.golangci.yml +++ b/packages/eventindexer/.golangci.yml @@ -18,7 +18,7 @@ linters: - gocognit - gocritic - gofmt - - golint + # - revive - gosec - gosimple - lll @@ -28,12 +28,12 @@ linters: linters-settings: funlen: - lines: 137 - statements: 54 + lines: 200 + statements: 100 gocognit: - min-complexity: 43 + min-complexity: 100 lll: - line-length: 140 + line-length: 150 issues: exclude-rules: @@ -44,4 +44,6 @@ issues: - path: contracts\.go linters: - lll - + - path: / + linters: + - typecheck diff --git a/packages/eventindexer/ProverPool.json b/packages/eventindexer/ProverPool.json new file mode 100644 index 00000000000..1d424440449 --- /dev/null +++ b/packages/eventindexer/ProverPool.json @@ -0,0 +1,711 @@ +[ + { + "inputs": [], + "name": "CHANGE_TOO_FREQUENT", + "type": "error" + }, + { + "inputs": [], + "name": "INVALID_PARAMS", + "type": "error" + }, + { + "inputs": [], + "name": "NO_MATURE_EXIT", + "type": "error" + }, + { + "inputs": [], + "name": "PROVER_NOT_GOOD_ENOUGH", + "type": "error" + }, + { + "inputs": [], + "name": "RESOLVER_DENIED", + "type": "error" + }, + { + "inputs": [], + "name": "RESOLVER_INVALID_ADDR", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "name", + "type": "bytes32" + } + ], + "name": "RESOLVER_ZERO_ADDR", + "type": "error" + }, + { + "inputs": [], + "name": "UNAUTHORIZED", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "addressManager", + "type": "address" + } + ], + "name": "AddressManagerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "amount", + "type": "uint64" + } + ], + "name": "Exited", + "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": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "amount", + "type": "uint64" + } + ], + "name": "Slashed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "amount", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "rewardPerGas", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "currentCapacity", + "type": "uint32" + } + ], + "name": "Staked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "amount", + "type": "uint64" + } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "EXIT_PERIOD", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_CAPACITY_LOWER_BOUND", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_NUM_PROVERS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_CHANGE_DELAY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_SLASH_AMOUNT", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_STAKE_PER_CAPACITY", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SLASH_POINTS", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "addressManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "blockId", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "feePerGas", + "type": "uint32" + } + ], + "name": "assignProver", + "outputs": [ + { + "internalType": "address", + "name": "prover", + "type": "address" + }, + { + "internalType": "uint32", + "name": "rewardPerGas", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "exit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getCapacity", + "outputs": [ + { + "internalType": "uint256", + "name": "capacity", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "feePerGas", + "type": "uint32" + } + ], + "name": "getProverWeights", + "outputs": [ + { + "internalType": "uint256[32]", + "name": "weights", + "type": "uint256[32]" + }, + { + "internalType": "uint32[32]", + "name": "erpg", + "type": "uint32[32]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getProvers", + "outputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "stakedAmount", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "rewardPerGas", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "currentCapacity", + "type": "uint32" + } + ], + "internalType": "struct ProverPool.Prover[]", + "name": "_provers", + "type": "tuple[]" + }, + { + "internalType": "address[]", + "name": "_stakers", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "getStaker", + "outputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "exitRequestedAt", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "exitAmount", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "maxCapacity", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "proverId", + "type": "uint32" + } + ], + "internalType": "struct ProverPool.Staker", + "name": "staker", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint64", + "name": "stakedAmount", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "rewardPerGas", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "currentCapacity", + "type": "uint32" + } + ], + "internalType": "struct ProverPool.Prover", + "name": "prover", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addressManager", + "type": "address" + } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "proverIdToAddress", + "outputs": [ + { + "internalType": "address", + "name": "prover", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "provers", + "outputs": [ + { + "internalType": "uint64", + "name": "stakedAmount", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "rewardPerGas", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "currentCapacity", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "releaseProver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "name", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "allowZeroAddress", + "type": "bool" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "name", + "type": "bytes32" + }, + { + "internalType": "bool", + "name": "allowZeroAddress", + "type": "bool" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAddressManager", + "type": "address" + } + ], + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "slashProver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "amount", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "rewardPerGas", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "maxCapacity", + "type": "uint32" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "staker", + "type": "address" + } + ], + "name": "stakers", + "outputs": [ + { + "internalType": "uint64", + "name": "exitRequestedAt", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "exitAmount", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "maxCapacity", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "proverId", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/eventindexer/Swap.json b/packages/eventindexer/Swap.json index 299a14b756b..97a2bc659b3 100644 --- a/packages/eventindexer/Swap.json +++ b/packages/eventindexer/Swap.json @@ -1003,6 +1003,28 @@ ], "anonymous": false }, + { + "type": "event", + "name": "Mint", + "inputs": [ + { + "type": "address", + "name": "sender", + "indexed": true + }, + { + "type": "uint256", + "name": "amount0", + "indexed": false + }, + { + "type": "uint256", + "name": "amount1", + "indexed": false + } + ], + "anonymous": false + }, { "stateMutability": "payable", "type": "receive" diff --git a/packages/eventindexer/TaikoL1.json b/packages/eventindexer/TaikoL1.json index 98c46e9f628..3088327a92d 100644 --- a/packages/eventindexer/TaikoL1.json +++ b/packages/eventindexer/TaikoL1.json @@ -9,6 +9,11 @@ "name": "L1_ALREADY_PROVEN", "type": "error" }, + { + "inputs": [], + "name": "L1_BATCH_NOT_AUCTIONABLE", + "type": "error" + }, { "inputs": [], "name": "L1_BLOCK_ID", @@ -68,127 +73,127 @@ }, { "inputs": [], - "name": "L1_INVALID_CONFIG", + "name": "L1_INSUFFICIENT_TOKEN", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_CONFIG", + "name": "L1_INSUFFICIENT_TOKEN", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_ETH_DEPOSIT", + "name": "L1_INSUFFICIENT_TOKEN", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_ETH_DEPOSIT", + "name": "L1_INVALID_BID", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_EVIDENCE", + "name": "L1_INVALID_CONFIG", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_EVIDENCE", + "name": "L1_INVALID_CONFIG", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_METADATA", + "name": "L1_INVALID_ETH_DEPOSIT", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_METADATA", + "name": "L1_INVALID_ETH_DEPOSIT", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_PARAM", + "name": "L1_INVALID_EVIDENCE", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_PROOF", + "name": "L1_INVALID_EVIDENCE", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_PROOF", + "name": "L1_INVALID_METADATA", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_PROOF_OVERWRITE", + "name": "L1_INVALID_METADATA", "type": "error" }, { "inputs": [], - "name": "L1_INVALID_PROOF_OVERWRITE", + "name": "L1_INVALID_PARAM", "type": "error" }, { "inputs": [], - "name": "L1_NOT_SPECIAL_PROVER", + "name": "L1_INVALID_PROOF", "type": "error" }, { "inputs": [], - "name": "L1_NOT_SPECIAL_PROVER", + "name": "L1_INVALID_PROOF", "type": "error" }, { "inputs": [], - "name": "L1_ORACLE_PROVER_DISABLED", + "name": "L1_NOT_BETTER_BID", "type": "error" }, { "inputs": [], - "name": "L1_ORACLE_PROVER_DISABLED", + "name": "L1_NOT_PROVEABLE", "type": "error" }, { "inputs": [], - "name": "L1_SAME_PROOF", + "name": "L1_NOT_PROVEABLE", "type": "error" }, { "inputs": [], - "name": "L1_SAME_PROOF", + "name": "L1_NOT_SPECIAL_PROVER", "type": "error" }, { "inputs": [], - "name": "L1_SYSTEM_PROVER_DISABLED", + "name": "L1_SAME_PROOF", "type": "error" }, { "inputs": [], - "name": "L1_SYSTEM_PROVER_DISABLED", + "name": "L1_SAME_PROOF", "type": "error" }, { "inputs": [], - "name": "L1_SYSTEM_PROVER_PROHIBITED", + "name": "L1_TOO_MANY_BLOCKS", "type": "error" }, { "inputs": [], - "name": "L1_SYSTEM_PROVER_PROHIBITED", + "name": "L1_TOO_MANY_BLOCKS", "type": "error" }, { "inputs": [], - "name": "L1_TOO_MANY_BLOCKS", + "name": "L1_TOO_MANY_OPEN_BLOCKS", "type": "error" }, { "inputs": [], - "name": "L1_TOO_MANY_BLOCKS", + "name": "L1_TOO_MANY_OPEN_BLOCKS", "type": "error" }, { @@ -231,6 +236,16 @@ "name": "L1_TX_LIST_RANGE", "type": "error" }, + { + "inputs": [], + "name": "L1_UNAUTHORIZED", + "type": "error" + }, + { + "inputs": [], + "name": "L1_UNAUTHORIZED", + "type": "error" + }, { "inputs": [], "name": "RESOLVER_DENIED", @@ -276,9 +291,27 @@ { "indexed": true, "internalType": "uint256", - "name": "id", + "name": "blockId", "type": "uint256" }, + { + "indexed": true, + "internalType": "address", + "name": "assignedProver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "rewardPerGas", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "feePerGas", + "type": "uint64" + }, { "components": [ { @@ -363,12 +396,6 @@ "internalType": "struct TaikoData.BlockMetadata", "name": "meta", "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "blockFee", - "type": "uint64" } ], "name": "BlockProposed", @@ -380,9 +407,27 @@ { "indexed": true, "internalType": "uint256", - "name": "id", + "name": "blockId", "type": "uint256" }, + { + "indexed": true, + "internalType": "address", + "name": "assignedProver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "rewardPerGas", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "feePerGas", + "type": "uint64" + }, { "components": [ { @@ -467,12 +512,6 @@ "internalType": "struct TaikoData.BlockMetadata", "name": "meta", "type": "tuple" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "blockFee", - "type": "uint64" } ], "name": "BlockProposed", @@ -484,7 +523,7 @@ { "indexed": true, "internalType": "uint256", - "name": "id", + "name": "blockId", "type": "uint256" }, { @@ -527,7 +566,7 @@ { "indexed": true, "internalType": "uint256", - "name": "id", + "name": "blockId", "type": "uint256" }, { @@ -570,7 +609,7 @@ { "indexed": true, "internalType": "uint256", - "name": "id", + "name": "blockId", "type": "uint256" }, { @@ -579,10 +618,22 @@ "name": "blockHash", "type": "bytes32" }, + { + "indexed": false, + "internalType": "address", + "name": "prover", + "type": "address" + }, { "indexed": false, "internalType": "uint64", - "name": "reward", + "name": "blockFee", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "proofReward", "type": "uint64" } ], @@ -595,7 +646,7 @@ { "indexed": true, "internalType": "uint256", - "name": "id", + "name": "blockId", "type": "uint256" }, { @@ -604,10 +655,22 @@ "name": "blockHash", "type": "bytes32" }, + { + "indexed": false, + "internalType": "address", + "name": "prover", + "type": "address" + }, { "indexed": false, "internalType": "uint64", - "name": "reward", + "name": "blockFee", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "proofReward", "type": "uint64" } ], @@ -756,37 +819,6 @@ "name": "OwnershipTransferred", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "proofTimeTarget", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "proofTimeIssued", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "blockFee", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "adjustmentQuotient", - "type": "uint16" - } - ], - "name": "ProofParamsChanged", - "type": "event" - }, { "inputs": [], "name": "addressManager", @@ -832,6 +864,19 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "depositTaikoToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -847,22 +892,68 @@ "name": "_metaHash", "type": "bytes32" }, + { + "internalType": "uint32", + "name": "_gasLimit", + "type": "uint32" + }, + { + "internalType": "uint24", + "name": "_nextForkChoiceId", + "type": "uint24" + }, + { + "internalType": "uint24", + "name": "_verifiedForkChoiceId", + "type": "uint24" + }, + { + "internalType": "bool", + "name": "_proverReleased", + "type": "bool" + }, { "internalType": "address", "name": "_proposer", "type": "address" }, + { + "internalType": "uint32", + "name": "_feePerGas", + "type": "uint32" + }, { "internalType": "uint64", "name": "_proposedAt", "type": "uint64" + }, + { + "internalType": "address", + "name": "_assignedProver", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_rewardPerGas", + "type": "uint32" + }, + { + "internalType": "uint64", + "name": "_proofWindow", + "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], + "inputs": [ + { + "internalType": "uint32", + "name": "gasLimit", + "type": "uint32" + } + ], "name": "getBlockFee", "outputs": [ { @@ -885,65 +976,70 @@ "name": "chainId", "type": "uint256" }, + { + "internalType": "bool", + "name": "relaySignalRoot", + "type": "bool" + }, { "internalType": "uint256", - "name": "maxNumProposedBlocks", + "name": "blockMaxProposals", "type": "uint256" }, { "internalType": "uint256", - "name": "ringBufferSize", + "name": "blockRingBufferSize", "type": "uint256" }, { "internalType": "uint256", - "name": "maxVerificationsPerTx", + "name": "blockMaxVerificationsPerTx", "type": "uint256" }, { - "internalType": "uint64", + "internalType": "uint32", "name": "blockMaxGasLimit", - "type": "uint64" + "type": "uint32" }, { - "internalType": "uint64", - "name": "maxTransactionsPerBlock", - "type": "uint64" + "internalType": "uint32", + "name": "blockFeeBaseGas", + "type": "uint32" }, { "internalType": "uint64", - "name": "maxBytesPerTxList", + "name": "blockMaxTransactions", "type": "uint64" }, { - "internalType": "uint256", - "name": "txListCacheExpiry", - "type": "uint256" + "internalType": "uint64", + "name": "blockMaxTxListBytes", + "type": "uint64" }, { "internalType": "uint256", - "name": "proofCooldownPeriod", + "name": "blockTxListExpiry", "type": "uint256" }, { "internalType": "uint256", - "name": "systemProofCooldownPeriod", + "name": "proofRegularCooldown", "type": "uint256" }, { "internalType": "uint256", - "name": "realProofSkipSize", + "name": "proofOracleCooldown", "type": "uint256" }, { - "internalType": "uint256", - "name": "ethDepositGas", - "type": "uint256" + "internalType": "uint16", + "name": "proofMinWindow", + "type": "uint16" }, { - "internalType": "uint256", - "name": "ethDepositMaxFee", - "type": "uint256" + "internalType": "uint16", + "name": "proofMaxWindow", + "type": "uint16" }, { "internalType": "uint256", @@ -962,18 +1058,33 @@ }, { "internalType": "uint96", - "name": "ethDepositMaxAmount", + "name": "ethDepositMinAmount", "type": "uint96" }, { "internalType": "uint96", - "name": "ethDepositMinAmount", + "name": "ethDepositMaxAmount", "type": "uint96" }, { - "internalType": "bool", - "name": "relaySignalRoot", - "type": "bool" + "internalType": "uint256", + "name": "ethDepositGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ethDepositMaxFee", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "rewardOpenMultipler", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "rewardOpenMaxCount", + "type": "uint256" } ], "internalType": "struct TaikoData.Config", @@ -1059,16 +1170,16 @@ "name": "signalRoot", "type": "bytes32" }, - { - "internalType": "uint64", - "name": "provenAt", - "type": "uint64" - }, { "internalType": "address", "name": "prover", "type": "address" }, + { + "internalType": "uint64", + "name": "provenAt", + "type": "uint64" + }, { "internalType": "uint32", "name": "gasUsed", @@ -1090,9 +1201,9 @@ { "components": [ { - "internalType": "uint64", - "name": "blockFee", - "type": "uint64" + "internalType": "uint32", + "name": "feePerGas", + "type": "uint32" }, { "internalType": "uint64", @@ -1184,9 +1295,14 @@ "type": "bytes32" }, { - "internalType": "uint64", - "name": "_initBlockFee", - "type": "uint64" + "internalType": "uint32", + "name": "_initFeePerGas", + "type": "uint32" + }, + { + "internalType": "uint16", + "name": "_initAvgProofDelay", + "type": "uint16" } ], "name": "init", @@ -1416,23 +1532,18 @@ "type": "uint64" }, { - "internalType": "uint16", + "internalType": "uint64", "name": "__reserved70", - "type": "uint16" - }, - { - "internalType": "uint48", - "name": "__reserved71", - "type": "uint48" + "type": "uint64" }, { "internalType": "uint64", - "name": "__reserved72", + "name": "__reserved71", "type": "uint64" }, { "internalType": "uint64", - "name": "__reserved80", + "name": "numOpenBlocks", "type": "uint64" }, { @@ -1452,23 +1563,28 @@ }, { "internalType": "uint64", - "name": "blockFee", + "name": "lastVerifiedAt", "type": "uint64" }, { "internalType": "uint64", - "name": "__reserved90", + "name": "lastVerifiedBlockId", "type": "uint64" }, { "internalType": "uint64", - "name": "lastVerifiedBlockId", + "name": "__reserved90", "type": "uint64" }, { - "internalType": "uint64", - "name": "__reserved91", - "type": "uint64" + "internalType": "uint32", + "name": "feePerGas", + "type": "uint32" + }, + { + "internalType": "uint16", + "name": "avgProofDelay", + "type": "uint16" } ], "stateMutability": "view", @@ -1500,6 +1616,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTaikoToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "stateMutability": "payable", "type": "receive" diff --git a/packages/eventindexer/abigen.sh b/packages/eventindexer/abigen.sh index 1814405d9f9..dbd1d00c00b 100755 --- a/packages/eventindexer/abigen.sh +++ b/packages/eventindexer/abigen.sh @@ -5,9 +5,10 @@ if [ ! -d "../protocol/out" ]; then exit 1 fi -paths=("TaikoL1.sol" "Bridge.sol") +paths=("TaikoL1.sol" "ProverPool.sol" "Bridge.sol") + +names=("TaikoL1" "ProverPool" "Bridge") -names=("TaikoL1" "Bridge") for (( i = 0; i < ${#paths[@]}; ++i )); do diff --git a/packages/eventindexer/cli/cli.go b/packages/eventindexer/cli/cli.go index c8b9dbe2835..b5c7e3fba3e 100644 --- a/packages/eventindexer/cli/cli.go +++ b/packages/eventindexer/cli/cli.go @@ -3,6 +3,7 @@ package cli import ( "context" "fmt" + "log" "os" "strconv" "strings" @@ -15,7 +16,6 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/joho/godotenv" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/taikoxyz/taiko-mono/packages/eventindexer" "github.com/taikoxyz/taiko-mono/packages/eventindexer/db" "github.com/taikoxyz/taiko-mono/packages/eventindexer/http" @@ -45,13 +45,12 @@ func Run( mode eventindexer.Mode, watchMode eventindexer.WatchMode, httpOnly eventindexer.HTTPOnly, + indexNfts eventindexer.IndexNFTS, ) { if err := loadAndValidateEnv(); err != nil { log.Fatal(err) } - log.SetFormatter(&log.JSONFormatter{}) - db, err := openDBConnection(eventindexer.DBConnectionOpts{ Name: os.Getenv("MYSQL_USER"), Password: os.Getenv("MYSQL_PASSWORD"), @@ -126,17 +125,29 @@ func Run( log.Fatal(err) } + var nftBalanceRepo eventindexer.NFTBalanceRepository + + if indexNfts { + nftBalanceRepo, err = repo.NewNFTBalanceRepository(db) + if err != nil { + log.Fatal(err) + } + } + i, err := indexer.NewService(indexer.NewServiceOpts{ EventRepo: eventRepository, BlockRepo: blockRepository, StatRepo: statRepository, + NFTBalanceRepo: nftBalanceRepo, EthClient: ethClient, RPCClient: rpcClient, SrcTaikoAddress: common.HexToAddress(os.Getenv("L1_TAIKO_ADDRESS")), + ProverPoolAddress: common.HexToAddress(os.Getenv("PROVER_POOL_ADDRESS")), SrcBridgeAddress: common.HexToAddress(os.Getenv("BRIDGE_ADDRESS")), SrcSwapAddresses: stringsToAddresses(strings.Split(os.Getenv("SWAP_ADDRESSES"), ",")), BlockBatchSize: uint64(blockBatchSize), SubscriptionBackoff: subscriptionBackoff, + IndexNFTs: bool(indexNfts), }) if err != nil { log.Fatal(err) @@ -266,11 +277,19 @@ func newHTTPServer(db eventindexer.DB, l1EthClient *ethclient.Client) (*http.Ser return nil, err } + nftBalanceRepo, err := repo.NewNFTBalanceRepository(db) + if err != nil { + return nil, err + } + srv, err := http.NewServer(http.NewServerOpts{ - EventRepo: eventRepo, - StatRepo: statRepo, - Echo: echo.New(), - CorsOrigins: strings.Split(os.Getenv("CORS_ORIGINS"), ","), + EventRepo: eventRepo, + StatRepo: statRepo, + NFTBalanceRepo: nftBalanceRepo, + Echo: echo.New(), + CorsOrigins: strings.Split(os.Getenv("CORS_ORIGINS"), ","), + EthClient: l1EthClient, + ProverPoolAddress: common.HexToAddress(os.Getenv("PROVER_POOL_ADDRESS")), }) if err != nil { return nil, err diff --git a/packages/eventindexer/cmd/main.go b/packages/eventindexer/cmd/main.go index 9056e9d5d48..a43520605e0 100644 --- a/packages/eventindexer/cmd/main.go +++ b/packages/eventindexer/cmd/main.go @@ -28,11 +28,18 @@ func main() { false: run an http server and index blocks `) + indexNfts := flag.Bool("index-nfts", false, `index nft transfer events. + options: + true: index + false: dont index + `) + flag.Parse() cli.Run( eventindexer.Mode(*modePtr), eventindexer.WatchMode(*watchModePtr), eventindexer.HTTPOnly(*httpOnlyPtr), + eventindexer.IndexNFTS(*indexNfts), ) } diff --git a/packages/eventindexer/contracts/erc1155/abi.go b/packages/eventindexer/contracts/erc1155/abi.go new file mode 100644 index 00000000000..73069984244 --- /dev/null +++ b/packages/eventindexer/contracts/erc1155/abi.go @@ -0,0 +1,318 @@ +package erc1155 + +var ( + ABI = `[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ]` +) diff --git a/packages/eventindexer/contracts/proverpool/ProverPool.go b/packages/eventindexer/contracts/proverpool/ProverPool.go new file mode 100644 index 00000000000..b0ddbae6a25 --- /dev/null +++ b/packages/eventindexer/contracts/proverpool/ProverPool.go @@ -0,0 +1,2052 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package proverpool + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// ProverPoolProver is an auto generated low-level Go binding around an user-defined struct. +type ProverPoolProver struct { + StakedAmount uint64 + RewardPerGas uint32 + CurrentCapacity uint32 +} + +// ProverPoolStaker is an auto generated low-level Go binding around an user-defined struct. +type ProverPoolStaker struct { + ExitRequestedAt uint64 + ExitAmount uint64 + MaxCapacity uint32 + ProverId uint32 +} + +// ProverPoolMetaData contains all meta data concerning the ProverPool contract. +var ProverPoolMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"CHANGE_TOO_FREQUENT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NO_MATURE_EXIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PROVER_NOT_GOOD_ENOUGH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UNAUTHORIZED\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"Exited\",\"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\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"Slashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"currentCapacity\",\"type\":\"uint32\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"EXIT_PERIOD\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_CAPACITY_LOWER_BOUND\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_NUM_PROVERS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_CHANGE_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_SLASH_AMOUNT\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_STAKE_PER_CAPACITY\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SLASH_POINTS\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"}],\"name\":\"assignProver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCapacity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"capacity\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"}],\"name\":\"getProverWeights\",\"outputs\":[{\"internalType\":\"uint256[32]\",\"name\":\"weights\",\"type\":\"uint256[32]\"},{\"internalType\":\"uint32[32]\",\"name\":\"erpg\",\"type\":\"uint32[32]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProvers\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"stakedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"currentCapacity\",\"type\":\"uint32\"}],\"internalType\":\"structProverPool.Prover[]\",\"name\":\"_provers\",\"type\":\"tuple[]\"},{\"internalType\":\"address[]\",\"name\":\"_stakers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getStaker\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"exitRequestedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"exitAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"maxCapacity\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"proverId\",\"type\":\"uint32\"}],\"internalType\":\"structProverPool.Staker\",\"name\":\"staker\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"stakedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"currentCapacity\",\"type\":\"uint32\"}],\"internalType\":\"structProverPool.Prover\",\"name\":\"prover\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"proverIdToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"provers\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"stakedAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"currentCapacity\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"releaseProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"slashProver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"amount\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCapacity\",\"type\":\"uint32\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"exitRequestedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"exitAmount\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"maxCapacity\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"proverId\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// ProverPoolABI is the input ABI used to generate the binding from. +// Deprecated: Use ProverPoolMetaData.ABI instead. +var ProverPoolABI = ProverPoolMetaData.ABI + +// ProverPool is an auto generated Go binding around an Ethereum contract. +type ProverPool struct { + ProverPoolCaller // Read-only binding to the contract + ProverPoolTransactor // Write-only binding to the contract + ProverPoolFilterer // Log filterer for contract events +} + +// ProverPoolCaller is an auto generated read-only Go binding around an Ethereum contract. +type ProverPoolCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProverPoolTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ProverPoolTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProverPoolFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ProverPoolFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ProverPoolSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ProverPoolSession struct { + Contract *ProverPool // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ProverPoolCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ProverPoolCallerSession struct { + Contract *ProverPoolCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ProverPoolTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ProverPoolTransactorSession struct { + Contract *ProverPoolTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ProverPoolRaw is an auto generated low-level Go binding around an Ethereum contract. +type ProverPoolRaw struct { + Contract *ProverPool // Generic contract binding to access the raw methods on +} + +// ProverPoolCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ProverPoolCallerRaw struct { + Contract *ProverPoolCaller // Generic read-only contract binding to access the raw methods on +} + +// ProverPoolTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ProverPoolTransactorRaw struct { + Contract *ProverPoolTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewProverPool creates a new instance of ProverPool, bound to a specific deployed contract. +func NewProverPool(address common.Address, backend bind.ContractBackend) (*ProverPool, error) { + contract, err := bindProverPool(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ProverPool{ProverPoolCaller: ProverPoolCaller{contract: contract}, ProverPoolTransactor: ProverPoolTransactor{contract: contract}, ProverPoolFilterer: ProverPoolFilterer{contract: contract}}, nil +} + +// NewProverPoolCaller creates a new read-only instance of ProverPool, bound to a specific deployed contract. +func NewProverPoolCaller(address common.Address, caller bind.ContractCaller) (*ProverPoolCaller, error) { + contract, err := bindProverPool(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ProverPoolCaller{contract: contract}, nil +} + +// NewProverPoolTransactor creates a new write-only instance of ProverPool, bound to a specific deployed contract. +func NewProverPoolTransactor(address common.Address, transactor bind.ContractTransactor) (*ProverPoolTransactor, error) { + contract, err := bindProverPool(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ProverPoolTransactor{contract: contract}, nil +} + +// NewProverPoolFilterer creates a new log filterer instance of ProverPool, bound to a specific deployed contract. +func NewProverPoolFilterer(address common.Address, filterer bind.ContractFilterer) (*ProverPoolFilterer, error) { + contract, err := bindProverPool(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ProverPoolFilterer{contract: contract}, nil +} + +// bindProverPool binds a generic wrapper to an already deployed contract. +func bindProverPool(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ProverPoolMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ProverPool *ProverPoolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ProverPool.Contract.ProverPoolCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ProverPool *ProverPoolRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProverPool.Contract.ProverPoolTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ProverPool *ProverPoolRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ProverPool.Contract.ProverPoolTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ProverPool *ProverPoolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ProverPool.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ProverPool *ProverPoolTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProverPool.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ProverPool *ProverPoolTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ProverPool.Contract.contract.Transact(opts, method, params...) +} + +// EXITPERIOD is a free data retrieval call binding the contract method 0xc04b5f65. +// +// Solidity: function EXIT_PERIOD() view returns(uint64) +func (_ProverPool *ProverPoolCaller) EXITPERIOD(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "EXIT_PERIOD") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// EXITPERIOD is a free data retrieval call binding the contract method 0xc04b5f65. +// +// Solidity: function EXIT_PERIOD() view returns(uint64) +func (_ProverPool *ProverPoolSession) EXITPERIOD() (uint64, error) { + return _ProverPool.Contract.EXITPERIOD(&_ProverPool.CallOpts) +} + +// EXITPERIOD is a free data retrieval call binding the contract method 0xc04b5f65. +// +// Solidity: function EXIT_PERIOD() view returns(uint64) +func (_ProverPool *ProverPoolCallerSession) EXITPERIOD() (uint64, error) { + return _ProverPool.Contract.EXITPERIOD(&_ProverPool.CallOpts) +} + +// MAXCAPACITYLOWERBOUND is a free data retrieval call binding the contract method 0x35acc933. +// +// Solidity: function MAX_CAPACITY_LOWER_BOUND() view returns(uint32) +func (_ProverPool *ProverPoolCaller) MAXCAPACITYLOWERBOUND(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "MAX_CAPACITY_LOWER_BOUND") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// MAXCAPACITYLOWERBOUND is a free data retrieval call binding the contract method 0x35acc933. +// +// Solidity: function MAX_CAPACITY_LOWER_BOUND() view returns(uint32) +func (_ProverPool *ProverPoolSession) MAXCAPACITYLOWERBOUND() (uint32, error) { + return _ProverPool.Contract.MAXCAPACITYLOWERBOUND(&_ProverPool.CallOpts) +} + +// MAXCAPACITYLOWERBOUND is a free data retrieval call binding the contract method 0x35acc933. +// +// Solidity: function MAX_CAPACITY_LOWER_BOUND() view returns(uint32) +func (_ProverPool *ProverPoolCallerSession) MAXCAPACITYLOWERBOUND() (uint32, error) { + return _ProverPool.Contract.MAXCAPACITYLOWERBOUND(&_ProverPool.CallOpts) +} + +// MAXNUMPROVERS is a free data retrieval call binding the contract method 0x62c0fd98. +// +// Solidity: function MAX_NUM_PROVERS() view returns(uint256) +func (_ProverPool *ProverPoolCaller) MAXNUMPROVERS(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "MAX_NUM_PROVERS") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MAXNUMPROVERS is a free data retrieval call binding the contract method 0x62c0fd98. +// +// Solidity: function MAX_NUM_PROVERS() view returns(uint256) +func (_ProverPool *ProverPoolSession) MAXNUMPROVERS() (*big.Int, error) { + return _ProverPool.Contract.MAXNUMPROVERS(&_ProverPool.CallOpts) +} + +// MAXNUMPROVERS is a free data retrieval call binding the contract method 0x62c0fd98. +// +// Solidity: function MAX_NUM_PROVERS() view returns(uint256) +func (_ProverPool *ProverPoolCallerSession) MAXNUMPROVERS() (*big.Int, error) { + return _ProverPool.Contract.MAXNUMPROVERS(&_ProverPool.CallOpts) +} + +// MINCHANGEDELAY is a free data retrieval call binding the contract method 0x71aff3a6. +// +// Solidity: function MIN_CHANGE_DELAY() view returns(uint256) +func (_ProverPool *ProverPoolCaller) MINCHANGEDELAY(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "MIN_CHANGE_DELAY") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MINCHANGEDELAY is a free data retrieval call binding the contract method 0x71aff3a6. +// +// Solidity: function MIN_CHANGE_DELAY() view returns(uint256) +func (_ProverPool *ProverPoolSession) MINCHANGEDELAY() (*big.Int, error) { + return _ProverPool.Contract.MINCHANGEDELAY(&_ProverPool.CallOpts) +} + +// MINCHANGEDELAY is a free data retrieval call binding the contract method 0x71aff3a6. +// +// Solidity: function MIN_CHANGE_DELAY() view returns(uint256) +func (_ProverPool *ProverPoolCallerSession) MINCHANGEDELAY() (*big.Int, error) { + return _ProverPool.Contract.MINCHANGEDELAY(&_ProverPool.CallOpts) +} + +// MINSLASHAMOUNT is a free data retrieval call binding the contract method 0x1972bc0d. +// +// Solidity: function MIN_SLASH_AMOUNT() view returns(uint64) +func (_ProverPool *ProverPoolCaller) MINSLASHAMOUNT(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "MIN_SLASH_AMOUNT") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MINSLASHAMOUNT is a free data retrieval call binding the contract method 0x1972bc0d. +// +// Solidity: function MIN_SLASH_AMOUNT() view returns(uint64) +func (_ProverPool *ProverPoolSession) MINSLASHAMOUNT() (uint64, error) { + return _ProverPool.Contract.MINSLASHAMOUNT(&_ProverPool.CallOpts) +} + +// MINSLASHAMOUNT is a free data retrieval call binding the contract method 0x1972bc0d. +// +// Solidity: function MIN_SLASH_AMOUNT() view returns(uint64) +func (_ProverPool *ProverPoolCallerSession) MINSLASHAMOUNT() (uint64, error) { + return _ProverPool.Contract.MINSLASHAMOUNT(&_ProverPool.CallOpts) +} + +// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. +// +// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint64) +func (_ProverPool *ProverPoolCaller) MINSTAKEPERCAPACITY(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "MIN_STAKE_PER_CAPACITY") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. +// +// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint64) +func (_ProverPool *ProverPoolSession) MINSTAKEPERCAPACITY() (uint64, error) { + return _ProverPool.Contract.MINSTAKEPERCAPACITY(&_ProverPool.CallOpts) +} + +// MINSTAKEPERCAPACITY is a free data retrieval call binding the contract method 0x7d62c057. +// +// Solidity: function MIN_STAKE_PER_CAPACITY() view returns(uint64) +func (_ProverPool *ProverPoolCallerSession) MINSTAKEPERCAPACITY() (uint64, error) { + return _ProverPool.Contract.MINSTAKEPERCAPACITY(&_ProverPool.CallOpts) +} + +// SLASHPOINTS is a free data retrieval call binding the contract method 0xdd9fb65c. +// +// Solidity: function SLASH_POINTS() view returns(uint64) +func (_ProverPool *ProverPoolCaller) SLASHPOINTS(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "SLASH_POINTS") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// SLASHPOINTS is a free data retrieval call binding the contract method 0xdd9fb65c. +// +// Solidity: function SLASH_POINTS() view returns(uint64) +func (_ProverPool *ProverPoolSession) SLASHPOINTS() (uint64, error) { + return _ProverPool.Contract.SLASHPOINTS(&_ProverPool.CallOpts) +} + +// SLASHPOINTS is a free data retrieval call binding the contract method 0xdd9fb65c. +// +// Solidity: function SLASH_POINTS() view returns(uint64) +func (_ProverPool *ProverPoolCallerSession) SLASHPOINTS() (uint64, error) { + return _ProverPool.Contract.SLASHPOINTS(&_ProverPool.CallOpts) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_ProverPool *ProverPoolCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "addressManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_ProverPool *ProverPoolSession) AddressManager() (common.Address, error) { + return _ProverPool.Contract.AddressManager(&_ProverPool.CallOpts) +} + +// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f. +// +// Solidity: function addressManager() view returns(address) +func (_ProverPool *ProverPoolCallerSession) AddressManager() (common.Address, error) { + return _ProverPool.Contract.AddressManager(&_ProverPool.CallOpts) +} + +// GetCapacity is a free data retrieval call binding the contract method 0xc40000d4. +// +// Solidity: function getCapacity() view returns(uint256 capacity) +func (_ProverPool *ProverPoolCaller) GetCapacity(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "getCapacity") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCapacity is a free data retrieval call binding the contract method 0xc40000d4. +// +// Solidity: function getCapacity() view returns(uint256 capacity) +func (_ProverPool *ProverPoolSession) GetCapacity() (*big.Int, error) { + return _ProverPool.Contract.GetCapacity(&_ProverPool.CallOpts) +} + +// GetCapacity is a free data retrieval call binding the contract method 0xc40000d4. +// +// Solidity: function getCapacity() view returns(uint256 capacity) +func (_ProverPool *ProverPoolCallerSession) GetCapacity() (*big.Int, error) { + return _ProverPool.Contract.GetCapacity(&_ProverPool.CallOpts) +} + +// GetProverWeights is a free data retrieval call binding the contract method 0x3acba718. +// +// Solidity: function getProverWeights(uint32 feePerGas) view returns(uint256[32] weights, uint32[32] erpg) +func (_ProverPool *ProverPoolCaller) GetProverWeights(opts *bind.CallOpts, feePerGas uint32) (struct { + Weights [32]*big.Int + Erpg [32]uint32 +}, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "getProverWeights", feePerGas) + + outstruct := new(struct { + Weights [32]*big.Int + Erpg [32]uint32 + }) + if err != nil { + return *outstruct, err + } + + outstruct.Weights = *abi.ConvertType(out[0], new([32]*big.Int)).(*[32]*big.Int) + outstruct.Erpg = *abi.ConvertType(out[1], new([32]uint32)).(*[32]uint32) + + return *outstruct, err + +} + +// GetProverWeights is a free data retrieval call binding the contract method 0x3acba718. +// +// Solidity: function getProverWeights(uint32 feePerGas) view returns(uint256[32] weights, uint32[32] erpg) +func (_ProverPool *ProverPoolSession) GetProverWeights(feePerGas uint32) (struct { + Weights [32]*big.Int + Erpg [32]uint32 +}, error) { + return _ProverPool.Contract.GetProverWeights(&_ProverPool.CallOpts, feePerGas) +} + +// GetProverWeights is a free data retrieval call binding the contract method 0x3acba718. +// +// Solidity: function getProverWeights(uint32 feePerGas) view returns(uint256[32] weights, uint32[32] erpg) +func (_ProverPool *ProverPoolCallerSession) GetProverWeights(feePerGas uint32) (struct { + Weights [32]*big.Int + Erpg [32]uint32 +}, error) { + return _ProverPool.Contract.GetProverWeights(&_ProverPool.CallOpts, feePerGas) +} + +// GetProvers is a free data retrieval call binding the contract method 0xc0bfd036. +// +// Solidity: function getProvers() view returns((uint64,uint32,uint32)[] _provers, address[] _stakers) +func (_ProverPool *ProverPoolCaller) GetProvers(opts *bind.CallOpts) (struct { + Provers []ProverPoolProver + Stakers []common.Address +}, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "getProvers") + + outstruct := new(struct { + Provers []ProverPoolProver + Stakers []common.Address + }) + if err != nil { + return *outstruct, err + } + + outstruct.Provers = *abi.ConvertType(out[0], new([]ProverPoolProver)).(*[]ProverPoolProver) + outstruct.Stakers = *abi.ConvertType(out[1], new([]common.Address)).(*[]common.Address) + + return *outstruct, err + +} + +// GetProvers is a free data retrieval call binding the contract method 0xc0bfd036. +// +// Solidity: function getProvers() view returns((uint64,uint32,uint32)[] _provers, address[] _stakers) +func (_ProverPool *ProverPoolSession) GetProvers() (struct { + Provers []ProverPoolProver + Stakers []common.Address +}, error) { + return _ProverPool.Contract.GetProvers(&_ProverPool.CallOpts) +} + +// GetProvers is a free data retrieval call binding the contract method 0xc0bfd036. +// +// Solidity: function getProvers() view returns((uint64,uint32,uint32)[] _provers, address[] _stakers) +func (_ProverPool *ProverPoolCallerSession) GetProvers() (struct { + Provers []ProverPoolProver + Stakers []common.Address +}, error) { + return _ProverPool.Contract.GetProvers(&_ProverPool.CallOpts) +} + +// GetStaker is a free data retrieval call binding the contract method 0xa23c44b1. +// +// Solidity: function getStaker(address addr) view returns((uint64,uint64,uint32,uint32) staker, (uint64,uint32,uint32) prover) +func (_ProverPool *ProverPoolCaller) GetStaker(opts *bind.CallOpts, addr common.Address) (struct { + Staker ProverPoolStaker + Prover ProverPoolProver +}, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "getStaker", addr) + + outstruct := new(struct { + Staker ProverPoolStaker + Prover ProverPoolProver + }) + if err != nil { + return *outstruct, err + } + + outstruct.Staker = *abi.ConvertType(out[0], new(ProverPoolStaker)).(*ProverPoolStaker) + outstruct.Prover = *abi.ConvertType(out[1], new(ProverPoolProver)).(*ProverPoolProver) + + return *outstruct, err + +} + +// GetStaker is a free data retrieval call binding the contract method 0xa23c44b1. +// +// Solidity: function getStaker(address addr) view returns((uint64,uint64,uint32,uint32) staker, (uint64,uint32,uint32) prover) +func (_ProverPool *ProverPoolSession) GetStaker(addr common.Address) (struct { + Staker ProverPoolStaker + Prover ProverPoolProver +}, error) { + return _ProverPool.Contract.GetStaker(&_ProverPool.CallOpts, addr) +} + +// GetStaker is a free data retrieval call binding the contract method 0xa23c44b1. +// +// Solidity: function getStaker(address addr) view returns((uint64,uint64,uint32,uint32) staker, (uint64,uint32,uint32) prover) +func (_ProverPool *ProverPoolCallerSession) GetStaker(addr common.Address) (struct { + Staker ProverPoolStaker + Prover ProverPoolProver +}, error) { + return _ProverPool.Contract.GetStaker(&_ProverPool.CallOpts, addr) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ProverPool *ProverPoolCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ProverPool *ProverPoolSession) Owner() (common.Address, error) { + return _ProverPool.Contract.Owner(&_ProverPool.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_ProverPool *ProverPoolCallerSession) Owner() (common.Address, error) { + return _ProverPool.Contract.Owner(&_ProverPool.CallOpts) +} + +// ProverIdToAddress is a free data retrieval call binding the contract method 0xf064afa0. +// +// Solidity: function proverIdToAddress(uint256 id) view returns(address prover) +func (_ProverPool *ProverPoolCaller) ProverIdToAddress(opts *bind.CallOpts, id *big.Int) (common.Address, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "proverIdToAddress", id) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// ProverIdToAddress is a free data retrieval call binding the contract method 0xf064afa0. +// +// Solidity: function proverIdToAddress(uint256 id) view returns(address prover) +func (_ProverPool *ProverPoolSession) ProverIdToAddress(id *big.Int) (common.Address, error) { + return _ProverPool.Contract.ProverIdToAddress(&_ProverPool.CallOpts, id) +} + +// ProverIdToAddress is a free data retrieval call binding the contract method 0xf064afa0. +// +// Solidity: function proverIdToAddress(uint256 id) view returns(address prover) +func (_ProverPool *ProverPoolCallerSession) ProverIdToAddress(id *big.Int) (common.Address, error) { + return _ProverPool.Contract.ProverIdToAddress(&_ProverPool.CallOpts, id) +} + +// Provers is a free data retrieval call binding the contract method 0xfd1190ea. +// +// Solidity: function provers(uint256 ) view returns(uint64 stakedAmount, uint32 rewardPerGas, uint32 currentCapacity) +func (_ProverPool *ProverPoolCaller) Provers(opts *bind.CallOpts, arg0 *big.Int) (struct { + StakedAmount uint64 + RewardPerGas uint32 + CurrentCapacity uint32 +}, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "provers", arg0) + + outstruct := new(struct { + StakedAmount uint64 + RewardPerGas uint32 + CurrentCapacity uint32 + }) + if err != nil { + return *outstruct, err + } + + outstruct.StakedAmount = *abi.ConvertType(out[0], new(uint64)).(*uint64) + outstruct.RewardPerGas = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.CurrentCapacity = *abi.ConvertType(out[2], new(uint32)).(*uint32) + + return *outstruct, err + +} + +// Provers is a free data retrieval call binding the contract method 0xfd1190ea. +// +// Solidity: function provers(uint256 ) view returns(uint64 stakedAmount, uint32 rewardPerGas, uint32 currentCapacity) +func (_ProverPool *ProverPoolSession) Provers(arg0 *big.Int) (struct { + StakedAmount uint64 + RewardPerGas uint32 + CurrentCapacity uint32 +}, error) { + return _ProverPool.Contract.Provers(&_ProverPool.CallOpts, arg0) +} + +// Provers is a free data retrieval call binding the contract method 0xfd1190ea. +// +// Solidity: function provers(uint256 ) view returns(uint64 stakedAmount, uint32 rewardPerGas, uint32 currentCapacity) +func (_ProverPool *ProverPoolCallerSession) Provers(arg0 *big.Int) (struct { + StakedAmount uint64 + RewardPerGas uint32 + CurrentCapacity uint32 +}, error) { + return _ProverPool.Contract.Provers(&_ProverPool.CallOpts, arg0) +} + +// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// +// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) +func (_ProverPool *ProverPoolCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// +// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) +func (_ProverPool *ProverPoolSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _ProverPool.Contract.Resolve(&_ProverPool.CallOpts, chainId, name, allowZeroAddress) +} + +// Resolve is a free data retrieval call binding the contract method 0x6c6563f6. +// +// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address) +func (_ProverPool *ProverPoolCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _ProverPool.Contract.Resolve(&_ProverPool.CallOpts, chainId, name, allowZeroAddress) +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) +func (_ProverPool *ProverPoolCaller) Resolve0(opts *bind.CallOpts, name [32]byte, allowZeroAddress bool) (common.Address, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "resolve0", name, allowZeroAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) +func (_ProverPool *ProverPoolSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _ProverPool.Contract.Resolve0(&_ProverPool.CallOpts, name, allowZeroAddress) +} + +// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e. +// +// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address) +func (_ProverPool *ProverPoolCallerSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) { + return _ProverPool.Contract.Resolve0(&_ProverPool.CallOpts, name, allowZeroAddress) +} + +// Stakers is a free data retrieval call binding the contract method 0x9168ae72. +// +// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint64 exitAmount, uint32 maxCapacity, uint32 proverId) +func (_ProverPool *ProverPoolCaller) Stakers(opts *bind.CallOpts, staker common.Address) (struct { + ExitRequestedAt uint64 + ExitAmount uint64 + MaxCapacity uint32 + ProverId uint32 +}, error) { + var out []interface{} + err := _ProverPool.contract.Call(opts, &out, "stakers", staker) + + outstruct := new(struct { + ExitRequestedAt uint64 + ExitAmount uint64 + MaxCapacity uint32 + ProverId uint32 + }) + if err != nil { + return *outstruct, err + } + + outstruct.ExitRequestedAt = *abi.ConvertType(out[0], new(uint64)).(*uint64) + outstruct.ExitAmount = *abi.ConvertType(out[1], new(uint64)).(*uint64) + outstruct.MaxCapacity = *abi.ConvertType(out[2], new(uint32)).(*uint32) + outstruct.ProverId = *abi.ConvertType(out[3], new(uint32)).(*uint32) + + return *outstruct, err + +} + +// Stakers is a free data retrieval call binding the contract method 0x9168ae72. +// +// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint64 exitAmount, uint32 maxCapacity, uint32 proverId) +func (_ProverPool *ProverPoolSession) Stakers(staker common.Address) (struct { + ExitRequestedAt uint64 + ExitAmount uint64 + MaxCapacity uint32 + ProverId uint32 +}, error) { + return _ProverPool.Contract.Stakers(&_ProverPool.CallOpts, staker) +} + +// Stakers is a free data retrieval call binding the contract method 0x9168ae72. +// +// Solidity: function stakers(address staker) view returns(uint64 exitRequestedAt, uint64 exitAmount, uint32 maxCapacity, uint32 proverId) +func (_ProverPool *ProverPoolCallerSession) Stakers(staker common.Address) (struct { + ExitRequestedAt uint64 + ExitAmount uint64 + MaxCapacity uint32 + ProverId uint32 +}, error) { + return _ProverPool.Contract.Stakers(&_ProverPool.CallOpts, staker) +} + +// AssignProver is a paid mutator transaction binding the contract method 0xbd849fe9. +// +// Solidity: function assignProver(uint64 blockId, uint32 feePerGas) returns(address prover, uint32 rewardPerGas) +func (_ProverPool *ProverPoolTransactor) AssignProver(opts *bind.TransactOpts, blockId uint64, feePerGas uint32) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "assignProver", blockId, feePerGas) +} + +// AssignProver is a paid mutator transaction binding the contract method 0xbd849fe9. +// +// Solidity: function assignProver(uint64 blockId, uint32 feePerGas) returns(address prover, uint32 rewardPerGas) +func (_ProverPool *ProverPoolSession) AssignProver(blockId uint64, feePerGas uint32) (*types.Transaction, error) { + return _ProverPool.Contract.AssignProver(&_ProverPool.TransactOpts, blockId, feePerGas) +} + +// AssignProver is a paid mutator transaction binding the contract method 0xbd849fe9. +// +// Solidity: function assignProver(uint64 blockId, uint32 feePerGas) returns(address prover, uint32 rewardPerGas) +func (_ProverPool *ProverPoolTransactorSession) AssignProver(blockId uint64, feePerGas uint32) (*types.Transaction, error) { + return _ProverPool.Contract.AssignProver(&_ProverPool.TransactOpts, blockId, feePerGas) +} + +// Exit is a paid mutator transaction binding the contract method 0xe9fad8ee. +// +// Solidity: function exit() returns() +func (_ProverPool *ProverPoolTransactor) Exit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "exit") +} + +// Exit is a paid mutator transaction binding the contract method 0xe9fad8ee. +// +// Solidity: function exit() returns() +func (_ProverPool *ProverPoolSession) Exit() (*types.Transaction, error) { + return _ProverPool.Contract.Exit(&_ProverPool.TransactOpts) +} + +// Exit is a paid mutator transaction binding the contract method 0xe9fad8ee. +// +// Solidity: function exit() returns() +func (_ProverPool *ProverPoolTransactorSession) Exit() (*types.Transaction, error) { + return _ProverPool.Contract.Exit(&_ProverPool.TransactOpts) +} + +// Init is a paid mutator transaction binding the contract method 0x19ab453c. +// +// Solidity: function init(address _addressManager) returns() +func (_ProverPool *ProverPoolTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "init", _addressManager) +} + +// Init is a paid mutator transaction binding the contract method 0x19ab453c. +// +// Solidity: function init(address _addressManager) returns() +func (_ProverPool *ProverPoolSession) Init(_addressManager common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.Init(&_ProverPool.TransactOpts, _addressManager) +} + +// Init is a paid mutator transaction binding the contract method 0x19ab453c. +// +// Solidity: function init(address _addressManager) returns() +func (_ProverPool *ProverPoolTransactorSession) Init(_addressManager common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.Init(&_ProverPool.TransactOpts, _addressManager) +} + +// ReleaseProver is a paid mutator transaction binding the contract method 0xcba0414f. +// +// Solidity: function releaseProver(address addr) returns() +func (_ProverPool *ProverPoolTransactor) ReleaseProver(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "releaseProver", addr) +} + +// ReleaseProver is a paid mutator transaction binding the contract method 0xcba0414f. +// +// Solidity: function releaseProver(address addr) returns() +func (_ProverPool *ProverPoolSession) ReleaseProver(addr common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.ReleaseProver(&_ProverPool.TransactOpts, addr) +} + +// ReleaseProver is a paid mutator transaction binding the contract method 0xcba0414f. +// +// Solidity: function releaseProver(address addr) returns() +func (_ProverPool *ProverPoolTransactorSession) ReleaseProver(addr common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.ReleaseProver(&_ProverPool.TransactOpts, addr) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ProverPool *ProverPoolTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ProverPool *ProverPoolSession) RenounceOwnership() (*types.Transaction, error) { + return _ProverPool.Contract.RenounceOwnership(&_ProverPool.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_ProverPool *ProverPoolTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ProverPool.Contract.RenounceOwnership(&_ProverPool.TransactOpts) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address newAddressManager) returns() +func (_ProverPool *ProverPoolTransactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "setAddressManager", newAddressManager) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address newAddressManager) returns() +func (_ProverPool *ProverPoolSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.SetAddressManager(&_ProverPool.TransactOpts, newAddressManager) +} + +// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a. +// +// Solidity: function setAddressManager(address newAddressManager) returns() +func (_ProverPool *ProverPoolTransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.SetAddressManager(&_ProverPool.TransactOpts, newAddressManager) +} + +// SlashProver is a paid mutator transaction binding the contract method 0xcd362a5b. +// +// Solidity: function slashProver(address addr) returns() +func (_ProverPool *ProverPoolTransactor) SlashProver(opts *bind.TransactOpts, addr common.Address) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "slashProver", addr) +} + +// SlashProver is a paid mutator transaction binding the contract method 0xcd362a5b. +// +// Solidity: function slashProver(address addr) returns() +func (_ProverPool *ProverPoolSession) SlashProver(addr common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.SlashProver(&_ProverPool.TransactOpts, addr) +} + +// SlashProver is a paid mutator transaction binding the contract method 0xcd362a5b. +// +// Solidity: function slashProver(address addr) returns() +func (_ProverPool *ProverPoolTransactorSession) SlashProver(addr common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.SlashProver(&_ProverPool.TransactOpts, addr) +} + +// Stake is a paid mutator transaction binding the contract method 0xb19ead66. +// +// Solidity: function stake(uint64 amount, uint32 rewardPerGas, uint32 maxCapacity) returns() +func (_ProverPool *ProverPoolTransactor) Stake(opts *bind.TransactOpts, amount uint64, rewardPerGas uint32, maxCapacity uint32) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "stake", amount, rewardPerGas, maxCapacity) +} + +// Stake is a paid mutator transaction binding the contract method 0xb19ead66. +// +// Solidity: function stake(uint64 amount, uint32 rewardPerGas, uint32 maxCapacity) returns() +func (_ProverPool *ProverPoolSession) Stake(amount uint64, rewardPerGas uint32, maxCapacity uint32) (*types.Transaction, error) { + return _ProverPool.Contract.Stake(&_ProverPool.TransactOpts, amount, rewardPerGas, maxCapacity) +} + +// Stake is a paid mutator transaction binding the contract method 0xb19ead66. +// +// Solidity: function stake(uint64 amount, uint32 rewardPerGas, uint32 maxCapacity) returns() +func (_ProverPool *ProverPoolTransactorSession) Stake(amount uint64, rewardPerGas uint32, maxCapacity uint32) (*types.Transaction, error) { + return _ProverPool.Contract.Stake(&_ProverPool.TransactOpts, amount, rewardPerGas, maxCapacity) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ProverPool *ProverPoolTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ProverPool *ProverPoolSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.TransferOwnership(&_ProverPool.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_ProverPool *ProverPoolTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ProverPool.Contract.TransferOwnership(&_ProverPool.TransactOpts, newOwner) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b. +// +// Solidity: function withdraw() returns() +func (_ProverPool *ProverPoolTransactor) Withdraw(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ProverPool.contract.Transact(opts, "withdraw") +} + +// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b. +// +// Solidity: function withdraw() returns() +func (_ProverPool *ProverPoolSession) Withdraw() (*types.Transaction, error) { + return _ProverPool.Contract.Withdraw(&_ProverPool.TransactOpts) +} + +// Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b. +// +// Solidity: function withdraw() returns() +func (_ProverPool *ProverPoolTransactorSession) Withdraw() (*types.Transaction, error) { + return _ProverPool.Contract.Withdraw(&_ProverPool.TransactOpts) +} + +// ProverPoolAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the ProverPool contract. +type ProverPoolAddressManagerChangedIterator struct { + Event *ProverPoolAddressManagerChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ProverPoolAddressManagerChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ProverPoolAddressManagerChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ProverPoolAddressManagerChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ProverPoolAddressManagerChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProverPoolAddressManagerChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProverPoolAddressManagerChanged represents a AddressManagerChanged event raised by the ProverPool contract. +type ProverPoolAddressManagerChanged struct { + AddressManager common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. +// +// Solidity: event AddressManagerChanged(address addressManager) +func (_ProverPool *ProverPoolFilterer) FilterAddressManagerChanged(opts *bind.FilterOpts) (*ProverPoolAddressManagerChangedIterator, error) { + + logs, sub, err := _ProverPool.contract.FilterLogs(opts, "AddressManagerChanged") + if err != nil { + return nil, err + } + return &ProverPoolAddressManagerChangedIterator{contract: _ProverPool.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil +} + +// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. +// +// Solidity: event AddressManagerChanged(address addressManager) +func (_ProverPool *ProverPoolFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *ProverPoolAddressManagerChanged) (event.Subscription, error) { + + logs, sub, err := _ProverPool.contract.WatchLogs(opts, "AddressManagerChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ProverPoolAddressManagerChanged) + if err := _ProverPool.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b. +// +// Solidity: event AddressManagerChanged(address addressManager) +func (_ProverPool *ProverPoolFilterer) ParseAddressManagerChanged(log types.Log) (*ProverPoolAddressManagerChanged, error) { + event := new(ProverPoolAddressManagerChanged) + if err := _ProverPool.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProverPoolExitedIterator is returned from FilterExited and is used to iterate over the raw logs and unpacked data for Exited events raised by the ProverPool contract. +type ProverPoolExitedIterator struct { + Event *ProverPoolExited // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ProverPoolExitedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ProverPoolExited) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ProverPoolExited) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ProverPoolExitedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProverPoolExitedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProverPoolExited represents a Exited event raised by the ProverPool contract. +type ProverPoolExited struct { + Addr common.Address + Amount uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExited is a free log retrieval operation binding the contract event 0x7b870040d0137f84191e3e446a10f48b5ac5d26ec96be3f795fcfc4c954410fe. +// +// Solidity: event Exited(address indexed addr, uint64 amount) +func (_ProverPool *ProverPoolFilterer) FilterExited(opts *bind.FilterOpts, addr []common.Address) (*ProverPoolExitedIterator, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _ProverPool.contract.FilterLogs(opts, "Exited", addrRule) + if err != nil { + return nil, err + } + return &ProverPoolExitedIterator{contract: _ProverPool.contract, event: "Exited", logs: logs, sub: sub}, nil +} + +// WatchExited is a free log subscription operation binding the contract event 0x7b870040d0137f84191e3e446a10f48b5ac5d26ec96be3f795fcfc4c954410fe. +// +// Solidity: event Exited(address indexed addr, uint64 amount) +func (_ProverPool *ProverPoolFilterer) WatchExited(opts *bind.WatchOpts, sink chan<- *ProverPoolExited, addr []common.Address) (event.Subscription, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _ProverPool.contract.WatchLogs(opts, "Exited", addrRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ProverPoolExited) + if err := _ProverPool.contract.UnpackLog(event, "Exited", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseExited is a log parse operation binding the contract event 0x7b870040d0137f84191e3e446a10f48b5ac5d26ec96be3f795fcfc4c954410fe. +// +// Solidity: event Exited(address indexed addr, uint64 amount) +func (_ProverPool *ProverPoolFilterer) ParseExited(log types.Log) (*ProverPoolExited, error) { + event := new(ProverPoolExited) + if err := _ProverPool.contract.UnpackLog(event, "Exited", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProverPoolInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ProverPool contract. +type ProverPoolInitializedIterator struct { + Event *ProverPoolInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ProverPoolInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ProverPoolInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ProverPoolInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ProverPoolInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProverPoolInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProverPoolInitialized represents a Initialized event raised by the ProverPool contract. +type ProverPoolInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ProverPool *ProverPoolFilterer) FilterInitialized(opts *bind.FilterOpts) (*ProverPoolInitializedIterator, error) { + + logs, sub, err := _ProverPool.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &ProverPoolInitializedIterator{contract: _ProverPool.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ProverPool *ProverPoolFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ProverPoolInitialized) (event.Subscription, error) { + + logs, sub, err := _ProverPool.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ProverPoolInitialized) + if err := _ProverPool.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_ProverPool *ProverPoolFilterer) ParseInitialized(log types.Log) (*ProverPoolInitialized, error) { + event := new(ProverPoolInitialized) + if err := _ProverPool.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProverPoolOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ProverPool contract. +type ProverPoolOwnershipTransferredIterator struct { + Event *ProverPoolOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ProverPoolOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ProverPoolOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ProverPoolOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ProverPoolOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProverPoolOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProverPoolOwnershipTransferred represents a OwnershipTransferred event raised by the ProverPool contract. +type ProverPoolOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ProverPool *ProverPoolFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ProverPoolOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _ProverPool.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ProverPoolOwnershipTransferredIterator{contract: _ProverPool.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ProverPool *ProverPoolFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ProverPoolOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _ProverPool.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ProverPoolOwnershipTransferred) + if err := _ProverPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_ProverPool *ProverPoolFilterer) ParseOwnershipTransferred(log types.Log) (*ProverPoolOwnershipTransferred, error) { + event := new(ProverPoolOwnershipTransferred) + if err := _ProverPool.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProverPoolSlashedIterator is returned from FilterSlashed and is used to iterate over the raw logs and unpacked data for Slashed events raised by the ProverPool contract. +type ProverPoolSlashedIterator struct { + Event *ProverPoolSlashed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ProverPoolSlashedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ProverPoolSlashed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ProverPoolSlashed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ProverPoolSlashedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProverPoolSlashedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProverPoolSlashed represents a Slashed event raised by the ProverPool contract. +type ProverPoolSlashed struct { + Addr common.Address + Amount uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSlashed is a free log retrieval operation binding the contract event 0xdd80bbe216163c1792fa59b50e56f1a7ac79674c4815b65da0ef875a39655e08. +// +// Solidity: event Slashed(address indexed addr, uint64 amount) +func (_ProverPool *ProverPoolFilterer) FilterSlashed(opts *bind.FilterOpts, addr []common.Address) (*ProverPoolSlashedIterator, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _ProverPool.contract.FilterLogs(opts, "Slashed", addrRule) + if err != nil { + return nil, err + } + return &ProverPoolSlashedIterator{contract: _ProverPool.contract, event: "Slashed", logs: logs, sub: sub}, nil +} + +// WatchSlashed is a free log subscription operation binding the contract event 0xdd80bbe216163c1792fa59b50e56f1a7ac79674c4815b65da0ef875a39655e08. +// +// Solidity: event Slashed(address indexed addr, uint64 amount) +func (_ProverPool *ProverPoolFilterer) WatchSlashed(opts *bind.WatchOpts, sink chan<- *ProverPoolSlashed, addr []common.Address) (event.Subscription, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _ProverPool.contract.WatchLogs(opts, "Slashed", addrRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ProverPoolSlashed) + if err := _ProverPool.contract.UnpackLog(event, "Slashed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSlashed is a log parse operation binding the contract event 0xdd80bbe216163c1792fa59b50e56f1a7ac79674c4815b65da0ef875a39655e08. +// +// Solidity: event Slashed(address indexed addr, uint64 amount) +func (_ProverPool *ProverPoolFilterer) ParseSlashed(log types.Log) (*ProverPoolSlashed, error) { + event := new(ProverPoolSlashed) + if err := _ProverPool.contract.UnpackLog(event, "Slashed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProverPoolStakedIterator is returned from FilterStaked and is used to iterate over the raw logs and unpacked data for Staked events raised by the ProverPool contract. +type ProverPoolStakedIterator struct { + Event *ProverPoolStaked // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ProverPoolStakedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ProverPoolStaked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ProverPoolStaked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ProverPoolStakedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProverPoolStakedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProverPoolStaked represents a Staked event raised by the ProverPool contract. +type ProverPoolStaked struct { + Addr common.Address + Amount uint64 + RewardPerGas uint32 + CurrentCapacity uint32 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterStaked is a free log retrieval operation binding the contract event 0x5ca6ec890c0c084d4fe6c6c49e6aea6fd8dbf1460730c83b5b12bf22811851e3. +// +// Solidity: event Staked(address indexed addr, uint64 amount, uint32 rewardPerGas, uint32 currentCapacity) +func (_ProverPool *ProverPoolFilterer) FilterStaked(opts *bind.FilterOpts, addr []common.Address) (*ProverPoolStakedIterator, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _ProverPool.contract.FilterLogs(opts, "Staked", addrRule) + if err != nil { + return nil, err + } + return &ProverPoolStakedIterator{contract: _ProverPool.contract, event: "Staked", logs: logs, sub: sub}, nil +} + +// WatchStaked is a free log subscription operation binding the contract event 0x5ca6ec890c0c084d4fe6c6c49e6aea6fd8dbf1460730c83b5b12bf22811851e3. +// +// Solidity: event Staked(address indexed addr, uint64 amount, uint32 rewardPerGas, uint32 currentCapacity) +func (_ProverPool *ProverPoolFilterer) WatchStaked(opts *bind.WatchOpts, sink chan<- *ProverPoolStaked, addr []common.Address) (event.Subscription, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _ProverPool.contract.WatchLogs(opts, "Staked", addrRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ProverPoolStaked) + if err := _ProverPool.contract.UnpackLog(event, "Staked", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseStaked is a log parse operation binding the contract event 0x5ca6ec890c0c084d4fe6c6c49e6aea6fd8dbf1460730c83b5b12bf22811851e3. +// +// Solidity: event Staked(address indexed addr, uint64 amount, uint32 rewardPerGas, uint32 currentCapacity) +func (_ProverPool *ProverPoolFilterer) ParseStaked(log types.Log) (*ProverPoolStaked, error) { + event := new(ProverPoolStaked) + if err := _ProverPool.contract.UnpackLog(event, "Staked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// ProverPoolWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the ProverPool contract. +type ProverPoolWithdrawnIterator struct { + Event *ProverPoolWithdrawn // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ProverPoolWithdrawnIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ProverPoolWithdrawn) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ProverPoolWithdrawn) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ProverPoolWithdrawnIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ProverPoolWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ProverPoolWithdrawn represents a Withdrawn event raised by the ProverPool contract. +type ProverPoolWithdrawn struct { + Addr common.Address + Amount uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawn is a free log retrieval operation binding the contract event 0xbae95d59332d6e1e8f1ae78e7bebdaeef072d57b731c8790a636667e3a0a87ee. +// +// Solidity: event Withdrawn(address indexed addr, uint64 amount) +func (_ProverPool *ProverPoolFilterer) FilterWithdrawn(opts *bind.FilterOpts, addr []common.Address) (*ProverPoolWithdrawnIterator, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _ProverPool.contract.FilterLogs(opts, "Withdrawn", addrRule) + if err != nil { + return nil, err + } + return &ProverPoolWithdrawnIterator{contract: _ProverPool.contract, event: "Withdrawn", logs: logs, sub: sub}, nil +} + +// WatchWithdrawn is a free log subscription operation binding the contract event 0xbae95d59332d6e1e8f1ae78e7bebdaeef072d57b731c8790a636667e3a0a87ee. +// +// Solidity: event Withdrawn(address indexed addr, uint64 amount) +func (_ProverPool *ProverPoolFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *ProverPoolWithdrawn, addr []common.Address) (event.Subscription, error) { + + var addrRule []interface{} + for _, addrItem := range addr { + addrRule = append(addrRule, addrItem) + } + + logs, sub, err := _ProverPool.contract.WatchLogs(opts, "Withdrawn", addrRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ProverPoolWithdrawn) + if err := _ProverPool.contract.UnpackLog(event, "Withdrawn", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdrawn is a log parse operation binding the contract event 0xbae95d59332d6e1e8f1ae78e7bebdaeef072d57b731c8790a636667e3a0a87ee. +// +// Solidity: event Withdrawn(address indexed addr, uint64 amount) +func (_ProverPool *ProverPoolFilterer) ParseWithdrawn(log types.Log) (*ProverPoolWithdrawn, error) { + event := new(ProverPoolWithdrawn) + if err := _ProverPool.contract.UnpackLog(event, "Withdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/packages/eventindexer/contracts/swap/swap.go b/packages/eventindexer/contracts/swap/Swap.go similarity index 93% rename from packages/eventindexer/contracts/swap/swap.go rename to packages/eventindexer/contracts/swap/Swap.go index 542e34d86b7..f9d7a82d78b 100644 --- a/packages/eventindexer/contracts/swap/swap.go +++ b/packages/eventindexer/contracts/swap/Swap.go @@ -31,7 +31,7 @@ var ( // SwapMetaData contains all meta data concerning the Swap contract. var SwapMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_WETH\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountADesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsIn\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveB\",\"type\":\"uint256\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETHSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapETHForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETHSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"type\":\"event\",\"name\":\"Swap\",\"inputs\":[{\"type\":\"address\",\"name\":\"sender\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount0In\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"amount1In\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"amount0Out\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"amount1Out\",\"indexed\":false},{\"type\":\"address\",\"name\":\"to\",\"indexed\":true}],\"anonymous\":false},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_WETH\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountADesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenDesired\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"addLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountIn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveOut\",\"type\":\"uint256\"}],\"name\":\"getAmountOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsIn\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"}],\"name\":\"getAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveB\",\"type\":\"uint256\"}],\"name\":\"quote\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"removeLiquidityETHSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountTokenMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountETHMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountETH\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"liquidity\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountAMin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountBMin\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"approveMax\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"removeLiquidityWithPermit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountB\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapETHForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactETHForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForETHSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapExactTokensForTokensSupportingFeeOnTransferTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactETH\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"swapTokensForExactTokens\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"type\":\"event\",\"name\":\"Swap\",\"inputs\":[{\"type\":\"address\",\"name\":\"sender\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount0In\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"amount1In\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"amount0Out\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"amount1Out\",\"indexed\":false},{\"type\":\"address\",\"name\":\"to\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Mint\",\"inputs\":[{\"type\":\"address\",\"name\":\"sender\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount0\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"amount1\",\"indexed\":false}],\"anonymous\":false},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", } // SwapABI is the input ABI used to generate the binding from. @@ -775,6 +775,152 @@ func (_Swap *SwapTransactorSession) Receive() (*types.Transaction, error) { return _Swap.Contract.Receive(&_Swap.TransactOpts) } +// SwapMintIterator is returned from FilterMint and is used to iterate over the raw logs and unpacked data for Mint events raised by the Swap contract. +type SwapMintIterator struct { + Event *SwapMint // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SwapMintIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SwapMint) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SwapMint) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SwapMintIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SwapMintIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SwapMint represents a Mint event raised by the Swap contract. +type SwapMint struct { + Sender common.Address + Amount0 *big.Int + Amount1 *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMint is a free log retrieval operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_Swap *SwapFilterer) FilterMint(opts *bind.FilterOpts, sender []common.Address) (*SwapMintIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Swap.contract.FilterLogs(opts, "Mint", senderRule) + if err != nil { + return nil, err + } + return &SwapMintIterator{contract: _Swap.contract, event: "Mint", logs: logs, sub: sub}, nil +} + +// WatchMint is a free log subscription operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_Swap *SwapFilterer) WatchMint(opts *bind.WatchOpts, sink chan<- *SwapMint, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Swap.contract.WatchLogs(opts, "Mint", senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SwapMint) + if err := _Swap.contract.UnpackLog(event, "Mint", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseMint is a log parse operation binding the contract event 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f. +// +// Solidity: event Mint(address indexed sender, uint256 amount0, uint256 amount1) +func (_Swap *SwapFilterer) ParseMint(log types.Log) (*SwapMint, error) { + event := new(SwapMint) + if err := _Swap.contract.UnpackLog(event, "Mint", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // SwapSwapIterator is returned from FilterSwap and is used to iterate over the raw logs and unpacked data for Swap events raised by the Swap contract. type SwapSwapIterator struct { Event *SwapSwap // Event containing the contract specifics and raw log diff --git a/packages/eventindexer/contracts/taikol1/TaikoL1.go b/packages/eventindexer/contracts/taikol1/TaikoL1.go index 93ab0210445..fc22205c813 100644 --- a/packages/eventindexer/contracts/taikol1/TaikoL1.go +++ b/packages/eventindexer/contracts/taikol1/TaikoL1.go @@ -26,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct. @@ -46,24 +47,29 @@ type TaikoDataBlockMetadata struct { // TaikoDataConfig is an auto generated low-level Go binding around an user-defined struct. type TaikoDataConfig struct { - ChainId *big.Int - MaxNumProposedBlocks *big.Int - RingBufferSize *big.Int - MaxVerificationsPerTx *big.Int - BlockMaxGasLimit uint64 - MaxTransactionsPerBlock uint64 - MaxBytesPerTxList uint64 - TxListCacheExpiry *big.Int - ProofCooldownPeriod *big.Int - SystemProofCooldownPeriod *big.Int - RealProofSkipSize *big.Int - EthDepositGas *big.Int - EthDepositMaxFee *big.Int - MinEthDepositsPerBlock uint64 - MaxEthDepositsPerBlock uint64 - MaxEthDepositAmount *big.Int - MinEthDepositAmount *big.Int - RelaySignalRoot bool + ChainId *big.Int + RelaySignalRoot bool + BlockMaxProposals *big.Int + BlockRingBufferSize *big.Int + BlockMaxVerificationsPerTx *big.Int + BlockMaxGasLimit uint32 + BlockFeeBaseGas uint32 + BlockMaxTransactions uint64 + BlockMaxTxListBytes uint64 + BlockTxListExpiry *big.Int + ProofRegularCooldown *big.Int + ProofOracleCooldown *big.Int + ProofMinWindow uint16 + ProofMaxWindow uint16 + EthDepositRingBufferSize *big.Int + EthDepositMinCountPerBlock uint64 + EthDepositMaxCountPerBlock uint64 + EthDepositMinAmount *big.Int + EthDepositMaxAmount *big.Int + EthDepositGas *big.Int + EthDepositMaxFee *big.Int + RewardOpenMultipler uint8 + RewardOpenMaxCount *big.Int } // TaikoDataEthDeposit is an auto generated low-level Go binding around an user-defined struct. @@ -78,29 +84,25 @@ type TaikoDataForkChoice struct { Key [32]byte BlockHash [32]byte SignalRoot [32]byte - ProvenAt uint64 Prover common.Address + ProvenAt uint64 GasUsed uint32 } // TaikoDataStateVariables is an auto generated low-level Go binding around an user-defined struct. type TaikoDataStateVariables struct { - BlockFee uint64 - AccBlockFees uint64 + FeePerGas uint32 GenesisHeight uint64 GenesisTimestamp uint64 NumBlocks uint64 - ProofTimeIssued uint64 - ProofTimeTarget uint64 LastVerifiedBlockId uint64 - AccProposedAt uint64 NextEthDepositToProcess uint64 NumEthDeposits uint64 } // TaikoL1MetaData contains all meta data concerning the TaikoL1 contract. var TaikoL1MetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF_OVERWRITE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ORACLE_PROVER_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ORACLE_PROVER_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SYSTEM_PROVER_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SYSTEM_PROVER_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SYSTEM_PROVER_PROHIBITED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SYSTEM_PROVER_PROHIBITED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"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\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"adjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"ProofParamsChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumProposedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ringBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"txListCacheExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"systemProofCooldownPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"realProofSkipSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"minEthDepositsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxEthDepositsPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"maxEthDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"minEthDepositAmount\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proofTime\",\"type\":\"uint64\"}],\"name\":\"getProofReward\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"accBlockFees\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"accProposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"_initBlockFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_initProofTimeTarget\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_initProofTimeIssued\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"_adjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newProofTimeTarget\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"newProofTimeIssued\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"newBlockFee\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"newAdjustmentQuotient\",\"type\":\"uint16\"}],\"name\":\"setProofParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"adjustmentQuotient\",\"type\":\"uint16\"},{\"internalType\":\"uint48\",\"name\":\"__reserved71\",\"type\":\"uint48\"},{\"internalType\":\"uint64\",\"name\":\"__reserved72\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"accProposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"accBlockFees\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeIssued\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeTarget\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BATCH_NOT_AUCTIONABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_BETTER_BID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_SPECIAL_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_OPEN_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"feePerGas\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"rewardPerGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"feePerGas\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofReward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockFee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"proofReward\",\"type\":\"uint64\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"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\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getBlock\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"_metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"_nextForkChoiceId\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"_verifiedForkChoiceId\",\"type\":\"uint24\"},{\"internalType\":\"bool\",\"name\":\"_proverReleased\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"_proposer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"_proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_assignedProver\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"_rewardPerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"_proofWindow\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxProposals\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTransactions\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"blockTxListExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofRegularCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofOracleCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"proofMinWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"proofMaxWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"rewardOpenMultipler\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"rewardOpenMaxCount\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasUsed\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"_initFeePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_initAvgProofDelay\",\"type\":\"uint16\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved70\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved71\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numOpenBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reserved90\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"feePerGas\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"avgProofDelay\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", } // TaikoL1ABI is the input ABI used to generate the binding from. @@ -204,11 +206,11 @@ func NewTaikoL1Filterer(address common.Address, filterer bind.ContractFilterer) // bindTaikoL1 binds a generic wrapper to an already deployed contract. func bindTaikoL1(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(TaikoL1ABI)) + parsed, err := TaikoL1MetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and @@ -280,29 +282,84 @@ func (_TaikoL1 *TaikoL1CallerSession) AddressManager() (common.Address, error) { return _TaikoL1.Contract.AddressManager(&_TaikoL1.CallOpts) } +// CanDepositEthToL2 is a free data retrieval call binding the contract method 0xcf151d9a. +// +// Solidity: function canDepositEthToL2(uint256 amount) view returns(bool) +func (_TaikoL1 *TaikoL1Caller) CanDepositEthToL2(opts *bind.CallOpts, amount *big.Int) (bool, error) { + var out []interface{} + err := _TaikoL1.contract.Call(opts, &out, "canDepositEthToL2", amount) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// CanDepositEthToL2 is a free data retrieval call binding the contract method 0xcf151d9a. +// +// Solidity: function canDepositEthToL2(uint256 amount) view returns(bool) +func (_TaikoL1 *TaikoL1Session) CanDepositEthToL2(amount *big.Int) (bool, error) { + return _TaikoL1.Contract.CanDepositEthToL2(&_TaikoL1.CallOpts, amount) +} + +// CanDepositEthToL2 is a free data retrieval call binding the contract method 0xcf151d9a. +// +// Solidity: function canDepositEthToL2(uint256 amount) view returns(bool) +func (_TaikoL1 *TaikoL1CallerSession) CanDepositEthToL2(amount *big.Int) (bool, error) { + return _TaikoL1.Contract.CanDepositEthToL2(&_TaikoL1.CallOpts, amount) +} + // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, uint32 _gasLimit, uint24 _nextForkChoiceId, uint24 _verifiedForkChoiceId, bool _proverReleased, address _proposer, uint32 _feePerGas, uint64 _proposedAt, address _assignedProver, uint32 _rewardPerGas, uint64 _proofWindow) func (_TaikoL1 *TaikoL1Caller) GetBlock(opts *bind.CallOpts, blockId *big.Int) (struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 + MetaHash [32]byte + GasLimit uint32 + NextForkChoiceId *big.Int + VerifiedForkChoiceId *big.Int + ProverReleased bool + Proposer common.Address + FeePerGas uint32 + ProposedAt uint64 + AssignedProver common.Address + RewardPerGas uint32 + ProofWindow uint64 }, error) { var out []interface{} err := _TaikoL1.contract.Call(opts, &out, "getBlock", blockId) outstruct := new(struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 + MetaHash [32]byte + GasLimit uint32 + NextForkChoiceId *big.Int + VerifiedForkChoiceId *big.Int + ProverReleased bool + Proposer common.Address + FeePerGas uint32 + ProposedAt uint64 + AssignedProver common.Address + RewardPerGas uint32 + ProofWindow uint64 }) if err != nil { return *outstruct, err } outstruct.MetaHash = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - outstruct.Proposer = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - outstruct.ProposedAt = *abi.ConvertType(out[2], new(uint64)).(*uint64) + outstruct.GasLimit = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.NextForkChoiceId = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.VerifiedForkChoiceId = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.ProverReleased = *abi.ConvertType(out[4], new(bool)).(*bool) + outstruct.Proposer = *abi.ConvertType(out[5], new(common.Address)).(*common.Address) + outstruct.FeePerGas = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.ProposedAt = *abi.ConvertType(out[7], new(uint64)).(*uint64) + outstruct.AssignedProver = *abi.ConvertType(out[8], new(common.Address)).(*common.Address) + outstruct.RewardPerGas = *abi.ConvertType(out[9], new(uint32)).(*uint32) + outstruct.ProofWindow = *abi.ConvertType(out[10], new(uint64)).(*uint64) return *outstruct, err @@ -310,32 +367,48 @@ func (_TaikoL1 *TaikoL1Caller) GetBlock(opts *bind.CallOpts, blockId *big.Int) ( // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, uint32 _gasLimit, uint24 _nextForkChoiceId, uint24 _verifiedForkChoiceId, bool _proverReleased, address _proposer, uint32 _feePerGas, uint64 _proposedAt, address _assignedProver, uint32 _rewardPerGas, uint64 _proofWindow) func (_TaikoL1 *TaikoL1Session) GetBlock(blockId *big.Int) (struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 + MetaHash [32]byte + GasLimit uint32 + NextForkChoiceId *big.Int + VerifiedForkChoiceId *big.Int + ProverReleased bool + Proposer common.Address + FeePerGas uint32 + ProposedAt uint64 + AssignedProver common.Address + RewardPerGas uint32 + ProofWindow uint64 }, error) { return _TaikoL1.Contract.GetBlock(&_TaikoL1.CallOpts, blockId) } // GetBlock is a free data retrieval call binding the contract method 0x04c07569. // -// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, address _proposer, uint64 _proposedAt) +// Solidity: function getBlock(uint256 blockId) view returns(bytes32 _metaHash, uint32 _gasLimit, uint24 _nextForkChoiceId, uint24 _verifiedForkChoiceId, bool _proverReleased, address _proposer, uint32 _feePerGas, uint64 _proposedAt, address _assignedProver, uint32 _rewardPerGas, uint64 _proofWindow) func (_TaikoL1 *TaikoL1CallerSession) GetBlock(blockId *big.Int) (struct { - MetaHash [32]byte - Proposer common.Address - ProposedAt uint64 + MetaHash [32]byte + GasLimit uint32 + NextForkChoiceId *big.Int + VerifiedForkChoiceId *big.Int + ProverReleased bool + Proposer common.Address + FeePerGas uint32 + ProposedAt uint64 + AssignedProver common.Address + RewardPerGas uint32 + ProofWindow uint64 }, error) { return _TaikoL1.Contract.GetBlock(&_TaikoL1.CallOpts, blockId) } -// GetBlockFee is a free data retrieval call binding the contract method 0x7baf0bc7. +// GetBlockFee is a free data retrieval call binding the contract method 0xffb2784f. // -// Solidity: function getBlockFee() view returns(uint64) -func (_TaikoL1 *TaikoL1Caller) GetBlockFee(opts *bind.CallOpts) (uint64, error) { +// Solidity: function getBlockFee(uint32 gasLimit) view returns(uint64) +func (_TaikoL1 *TaikoL1Caller) GetBlockFee(opts *bind.CallOpts, gasLimit uint32) (uint64, error) { var out []interface{} - err := _TaikoL1.contract.Call(opts, &out, "getBlockFee") + err := _TaikoL1.contract.Call(opts, &out, "getBlockFee", gasLimit) if err != nil { return *new(uint64), err @@ -347,23 +420,23 @@ func (_TaikoL1 *TaikoL1Caller) GetBlockFee(opts *bind.CallOpts) (uint64, error) } -// GetBlockFee is a free data retrieval call binding the contract method 0x7baf0bc7. +// GetBlockFee is a free data retrieval call binding the contract method 0xffb2784f. // -// Solidity: function getBlockFee() view returns(uint64) -func (_TaikoL1 *TaikoL1Session) GetBlockFee() (uint64, error) { - return _TaikoL1.Contract.GetBlockFee(&_TaikoL1.CallOpts) +// Solidity: function getBlockFee(uint32 gasLimit) view returns(uint64) +func (_TaikoL1 *TaikoL1Session) GetBlockFee(gasLimit uint32) (uint64, error) { + return _TaikoL1.Contract.GetBlockFee(&_TaikoL1.CallOpts, gasLimit) } -// GetBlockFee is a free data retrieval call binding the contract method 0x7baf0bc7. +// GetBlockFee is a free data retrieval call binding the contract method 0xffb2784f. // -// Solidity: function getBlockFee() view returns(uint64) -func (_TaikoL1 *TaikoL1CallerSession) GetBlockFee() (uint64, error) { - return _TaikoL1.Contract.GetBlockFee(&_TaikoL1.CallOpts) +// Solidity: function getBlockFee(uint32 gasLimit) view returns(uint64) +func (_TaikoL1 *TaikoL1CallerSession) GetBlockFee(gasLimit uint32) (uint64, error) { + return _TaikoL1.Contract.GetBlockFee(&_TaikoL1.CallOpts, gasLimit) } // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,bool)) +// Solidity: function getConfig() pure returns((uint256,bool,uint256,uint256,uint256,uint32,uint32,uint64,uint64,uint256,uint256,uint256,uint16,uint16,uint256,uint64,uint64,uint96,uint96,uint256,uint256,uint8,uint256)) func (_TaikoL1 *TaikoL1Caller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig, error) { var out []interface{} err := _TaikoL1.contract.Call(opts, &out, "getConfig") @@ -380,14 +453,14 @@ func (_TaikoL1 *TaikoL1Caller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig, // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,bool)) +// Solidity: function getConfig() pure returns((uint256,bool,uint256,uint256,uint256,uint32,uint32,uint64,uint64,uint256,uint256,uint256,uint16,uint16,uint256,uint64,uint64,uint96,uint96,uint256,uint256,uint8,uint256)) func (_TaikoL1 *TaikoL1Session) GetConfig() (TaikoDataConfig, error) { return _TaikoL1.Contract.GetConfig(&_TaikoL1.CallOpts) } // GetConfig is a free data retrieval call binding the contract method 0xc3f909d4. // -// Solidity: function getConfig() pure returns((uint256,uint256,uint256,uint256,uint64,uint64,uint64,uint256,uint256,uint256,uint256,uint256,uint256,uint64,uint64,uint96,uint96,bool)) +// Solidity: function getConfig() pure returns((uint256,bool,uint256,uint256,uint256,uint32,uint32,uint64,uint64,uint256,uint256,uint256,uint16,uint16,uint256,uint64,uint64,uint96,uint96,uint256,uint256,uint8,uint256)) func (_TaikoL1 *TaikoL1CallerSession) GetConfig() (TaikoDataConfig, error) { return _TaikoL1.Contract.GetConfig(&_TaikoL1.CallOpts) } @@ -456,7 +529,7 @@ func (_TaikoL1 *TaikoL1CallerSession) GetCrossChainSignalRoot(blockId *big.Int) // GetForkChoice is a free data retrieval call binding the contract method 0x7163e0ed. // -// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,uint64,address,uint32)) +// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,address,uint64,uint32)) func (_TaikoL1 *TaikoL1Caller) GetForkChoice(opts *bind.CallOpts, blockId *big.Int, parentHash [32]byte, parentGasUsed uint32) (TaikoDataForkChoice, error) { var out []interface{} err := _TaikoL1.contract.Call(opts, &out, "getForkChoice", blockId, parentHash, parentGasUsed) @@ -473,52 +546,21 @@ func (_TaikoL1 *TaikoL1Caller) GetForkChoice(opts *bind.CallOpts, blockId *big.I // GetForkChoice is a free data retrieval call binding the contract method 0x7163e0ed. // -// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,uint64,address,uint32)) +// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,address,uint64,uint32)) func (_TaikoL1 *TaikoL1Session) GetForkChoice(blockId *big.Int, parentHash [32]byte, parentGasUsed uint32) (TaikoDataForkChoice, error) { return _TaikoL1.Contract.GetForkChoice(&_TaikoL1.CallOpts, blockId, parentHash, parentGasUsed) } // GetForkChoice is a free data retrieval call binding the contract method 0x7163e0ed. // -// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,uint64,address,uint32)) +// Solidity: function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) view returns((bytes32,bytes32,bytes32,address,uint64,uint32)) func (_TaikoL1 *TaikoL1CallerSession) GetForkChoice(blockId *big.Int, parentHash [32]byte, parentGasUsed uint32) (TaikoDataForkChoice, error) { return _TaikoL1.Contract.GetForkChoice(&_TaikoL1.CallOpts, blockId, parentHash, parentGasUsed) } -// GetProofReward is a free data retrieval call binding the contract method 0x55f7259e. -// -// Solidity: function getProofReward(uint64 proofTime) view returns(uint64) -func (_TaikoL1 *TaikoL1Caller) GetProofReward(opts *bind.CallOpts, proofTime uint64) (uint64, error) { - var out []interface{} - err := _TaikoL1.contract.Call(opts, &out, "getProofReward", proofTime) - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// GetProofReward is a free data retrieval call binding the contract method 0x55f7259e. -// -// Solidity: function getProofReward(uint64 proofTime) view returns(uint64) -func (_TaikoL1 *TaikoL1Session) GetProofReward(proofTime uint64) (uint64, error) { - return _TaikoL1.Contract.GetProofReward(&_TaikoL1.CallOpts, proofTime) -} - -// GetProofReward is a free data retrieval call binding the contract method 0x55f7259e. -// -// Solidity: function getProofReward(uint64 proofTime) view returns(uint64) -func (_TaikoL1 *TaikoL1CallerSession) GetProofReward(proofTime uint64) (uint64, error) { - return _TaikoL1.Contract.GetProofReward(&_TaikoL1.CallOpts, proofTime) -} - // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint32,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1 *TaikoL1Caller) GetStateVariables(opts *bind.CallOpts) (TaikoDataStateVariables, error) { var out []interface{} err := _TaikoL1.contract.Call(opts, &out, "getStateVariables") @@ -535,14 +577,14 @@ func (_TaikoL1 *TaikoL1Caller) GetStateVariables(opts *bind.CallOpts) (TaikoData // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint32,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1 *TaikoL1Session) GetStateVariables() (TaikoDataStateVariables, error) { return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts) } // GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5. // -// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)) +// Solidity: function getStateVariables() view returns((uint32,uint64,uint64,uint64,uint64,uint64,uint64)) func (_TaikoL1 *TaikoL1CallerSession) GetStateVariables() (TaikoDataStateVariables, error) { return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts) } @@ -704,21 +746,21 @@ func (_TaikoL1 *TaikoL1CallerSession) Resolve0(name [32]byte, allowZeroAddress b // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint16 adjustmentQuotient, uint48 __reserved71, uint64 __reserved72, uint64 accProposedAt, uint64 accBlockFees, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 blockFee, uint64 proofTimeIssued, uint64 lastVerifiedBlockId, uint64 proofTimeTarget) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numOpenBlocks, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint64 __reserved90, uint32 feePerGas, uint16 avgProofDelay) func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct { GenesisHeight uint64 GenesisTimestamp uint64 - AdjustmentQuotient uint16 - Reserved71 *big.Int - Reserved72 uint64 - AccProposedAt uint64 - AccBlockFees uint64 + Reserved70 uint64 + Reserved71 uint64 + NumOpenBlocks uint64 + NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 - BlockFee uint64 - ProofTimeIssued uint64 + LastVerifiedAt uint64 LastVerifiedBlockId uint64 - ProofTimeTarget uint64 + Reserved90 uint64 + FeePerGas uint32 + AvgProofDelay uint16 }, error) { var out []interface{} err := _TaikoL1.contract.Call(opts, &out, "state") @@ -726,17 +768,17 @@ func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct { outstruct := new(struct { GenesisHeight uint64 GenesisTimestamp uint64 - AdjustmentQuotient uint16 - Reserved71 *big.Int - Reserved72 uint64 - AccProposedAt uint64 - AccBlockFees uint64 + Reserved70 uint64 + Reserved71 uint64 + NumOpenBlocks uint64 + NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 - BlockFee uint64 - ProofTimeIssued uint64 + LastVerifiedAt uint64 LastVerifiedBlockId uint64 - ProofTimeTarget uint64 + Reserved90 uint64 + FeePerGas uint32 + AvgProofDelay uint16 }) if err != nil { return *outstruct, err @@ -744,17 +786,17 @@ func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct { outstruct.GenesisHeight = *abi.ConvertType(out[0], new(uint64)).(*uint64) outstruct.GenesisTimestamp = *abi.ConvertType(out[1], new(uint64)).(*uint64) - outstruct.AdjustmentQuotient = *abi.ConvertType(out[2], new(uint16)).(*uint16) - outstruct.Reserved71 = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.Reserved72 = *abi.ConvertType(out[4], new(uint64)).(*uint64) - outstruct.AccProposedAt = *abi.ConvertType(out[5], new(uint64)).(*uint64) - outstruct.AccBlockFees = *abi.ConvertType(out[6], new(uint64)).(*uint64) - outstruct.NumBlocks = *abi.ConvertType(out[7], new(uint64)).(*uint64) - outstruct.NextEthDepositToProcess = *abi.ConvertType(out[8], new(uint64)).(*uint64) - outstruct.BlockFee = *abi.ConvertType(out[9], new(uint64)).(*uint64) - outstruct.ProofTimeIssued = *abi.ConvertType(out[10], new(uint64)).(*uint64) - outstruct.LastVerifiedBlockId = *abi.ConvertType(out[11], new(uint64)).(*uint64) - outstruct.ProofTimeTarget = *abi.ConvertType(out[12], new(uint64)).(*uint64) + outstruct.Reserved70 = *abi.ConvertType(out[2], new(uint64)).(*uint64) + outstruct.Reserved71 = *abi.ConvertType(out[3], new(uint64)).(*uint64) + outstruct.NumOpenBlocks = *abi.ConvertType(out[4], new(uint64)).(*uint64) + outstruct.NumEthDeposits = *abi.ConvertType(out[5], new(uint64)).(*uint64) + outstruct.NumBlocks = *abi.ConvertType(out[6], new(uint64)).(*uint64) + outstruct.NextEthDepositToProcess = *abi.ConvertType(out[7], new(uint64)).(*uint64) + outstruct.LastVerifiedAt = *abi.ConvertType(out[8], new(uint64)).(*uint64) + outstruct.LastVerifiedBlockId = *abi.ConvertType(out[9], new(uint64)).(*uint64) + outstruct.Reserved90 = *abi.ConvertType(out[10], new(uint64)).(*uint64) + outstruct.FeePerGas = *abi.ConvertType(out[11], new(uint32)).(*uint32) + outstruct.AvgProofDelay = *abi.ConvertType(out[12], new(uint16)).(*uint16) return *outstruct, err @@ -762,65 +804,65 @@ func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct { // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint16 adjustmentQuotient, uint48 __reserved71, uint64 __reserved72, uint64 accProposedAt, uint64 accBlockFees, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 blockFee, uint64 proofTimeIssued, uint64 lastVerifiedBlockId, uint64 proofTimeTarget) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numOpenBlocks, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint64 __reserved90, uint32 feePerGas, uint16 avgProofDelay) func (_TaikoL1 *TaikoL1Session) State() (struct { GenesisHeight uint64 GenesisTimestamp uint64 - AdjustmentQuotient uint16 - Reserved71 *big.Int - Reserved72 uint64 - AccProposedAt uint64 - AccBlockFees uint64 + Reserved70 uint64 + Reserved71 uint64 + NumOpenBlocks uint64 + NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 - BlockFee uint64 - ProofTimeIssued uint64 + LastVerifiedAt uint64 LastVerifiedBlockId uint64 - ProofTimeTarget uint64 + Reserved90 uint64 + FeePerGas uint32 + AvgProofDelay uint16 }, error) { return _TaikoL1.Contract.State(&_TaikoL1.CallOpts) } // State is a free data retrieval call binding the contract method 0xc19d93fb. // -// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint16 adjustmentQuotient, uint48 __reserved71, uint64 __reserved72, uint64 accProposedAt, uint64 accBlockFees, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 blockFee, uint64 proofTimeIssued, uint64 lastVerifiedBlockId, uint64 proofTimeTarget) +// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reserved70, uint64 __reserved71, uint64 numOpenBlocks, uint64 numEthDeposits, uint64 numBlocks, uint64 nextEthDepositToProcess, uint64 lastVerifiedAt, uint64 lastVerifiedBlockId, uint64 __reserved90, uint32 feePerGas, uint16 avgProofDelay) func (_TaikoL1 *TaikoL1CallerSession) State() (struct { GenesisHeight uint64 GenesisTimestamp uint64 - AdjustmentQuotient uint16 - Reserved71 *big.Int - Reserved72 uint64 - AccProposedAt uint64 - AccBlockFees uint64 + Reserved70 uint64 + Reserved71 uint64 + NumOpenBlocks uint64 + NumEthDeposits uint64 NumBlocks uint64 NextEthDepositToProcess uint64 - BlockFee uint64 - ProofTimeIssued uint64 + LastVerifiedAt uint64 LastVerifiedBlockId uint64 - ProofTimeTarget uint64 + Reserved90 uint64 + FeePerGas uint32 + AvgProofDelay uint16 }, error) { return _TaikoL1.Contract.State(&_TaikoL1.CallOpts) } -// DepositEtherToL2 is a paid mutator transaction binding the contract method 0xa22f7670. +// DepositEtherToL2 is a paid mutator transaction binding the contract method 0x047a289d. // -// Solidity: function depositEtherToL2() payable returns() -func (_TaikoL1 *TaikoL1Transactor) DepositEtherToL2(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TaikoL1.contract.Transact(opts, "depositEtherToL2") +// Solidity: function depositEtherToL2(address recipient) payable returns() +func (_TaikoL1 *TaikoL1Transactor) DepositEtherToL2(opts *bind.TransactOpts, recipient common.Address) (*types.Transaction, error) { + return _TaikoL1.contract.Transact(opts, "depositEtherToL2", recipient) } -// DepositEtherToL2 is a paid mutator transaction binding the contract method 0xa22f7670. +// DepositEtherToL2 is a paid mutator transaction binding the contract method 0x047a289d. // -// Solidity: function depositEtherToL2() payable returns() -func (_TaikoL1 *TaikoL1Session) DepositEtherToL2() (*types.Transaction, error) { - return _TaikoL1.Contract.DepositEtherToL2(&_TaikoL1.TransactOpts) +// Solidity: function depositEtherToL2(address recipient) payable returns() +func (_TaikoL1 *TaikoL1Session) DepositEtherToL2(recipient common.Address) (*types.Transaction, error) { + return _TaikoL1.Contract.DepositEtherToL2(&_TaikoL1.TransactOpts, recipient) } -// DepositEtherToL2 is a paid mutator transaction binding the contract method 0xa22f7670. +// DepositEtherToL2 is a paid mutator transaction binding the contract method 0x047a289d. // -// Solidity: function depositEtherToL2() payable returns() -func (_TaikoL1 *TaikoL1TransactorSession) DepositEtherToL2() (*types.Transaction, error) { - return _TaikoL1.Contract.DepositEtherToL2(&_TaikoL1.TransactOpts) +// Solidity: function depositEtherToL2(address recipient) payable returns() +func (_TaikoL1 *TaikoL1TransactorSession) DepositEtherToL2(recipient common.Address) (*types.Transaction, error) { + return _TaikoL1.Contract.DepositEtherToL2(&_TaikoL1.TransactOpts, recipient) } // DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba. @@ -844,25 +886,25 @@ func (_TaikoL1 *TaikoL1TransactorSession) DepositTaikoToken(amount *big.Int) (*t return _TaikoL1.Contract.DepositTaikoToken(&_TaikoL1.TransactOpts, amount) } -// Init is a paid mutator transaction binding the contract method 0xc7a64b19. +// Init is a paid mutator transaction binding the contract method 0xa72111dc. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint64 _initBlockFee, uint64 _initProofTimeTarget, uint64 _initProofTimeIssued, uint16 _adjustmentQuotient) returns() -func (_TaikoL1 *TaikoL1Transactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _initBlockFee uint64, _initProofTimeTarget uint64, _initProofTimeIssued uint64, _adjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1.contract.Transact(opts, "init", _addressManager, _genesisBlockHash, _initBlockFee, _initProofTimeTarget, _initProofTimeIssued, _adjustmentQuotient) +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint32 _initFeePerGas, uint16 _initAvgProofDelay) returns() +func (_TaikoL1 *TaikoL1Transactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas uint32, _initAvgProofDelay uint16) (*types.Transaction, error) { + return _TaikoL1.contract.Transact(opts, "init", _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofDelay) } -// Init is a paid mutator transaction binding the contract method 0xc7a64b19. +// Init is a paid mutator transaction binding the contract method 0xa72111dc. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint64 _initBlockFee, uint64 _initProofTimeTarget, uint64 _initProofTimeIssued, uint16 _adjustmentQuotient) returns() -func (_TaikoL1 *TaikoL1Session) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initBlockFee uint64, _initProofTimeTarget uint64, _initProofTimeIssued uint64, _adjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash, _initBlockFee, _initProofTimeTarget, _initProofTimeIssued, _adjustmentQuotient) +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint32 _initFeePerGas, uint16 _initAvgProofDelay) returns() +func (_TaikoL1 *TaikoL1Session) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas uint32, _initAvgProofDelay uint16) (*types.Transaction, error) { + return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofDelay) } -// Init is a paid mutator transaction binding the contract method 0xc7a64b19. +// Init is a paid mutator transaction binding the contract method 0xa72111dc. // -// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint64 _initBlockFee, uint64 _initProofTimeTarget, uint64 _initProofTimeIssued, uint16 _adjustmentQuotient) returns() -func (_TaikoL1 *TaikoL1TransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initBlockFee uint64, _initProofTimeTarget uint64, _initProofTimeIssued uint64, _adjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash, _initBlockFee, _initProofTimeTarget, _initProofTimeIssued, _adjustmentQuotient) +// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint32 _initFeePerGas, uint16 _initAvgProofDelay) returns() +func (_TaikoL1 *TaikoL1TransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _initFeePerGas uint32, _initAvgProofDelay uint16) (*types.Transaction, error) { + return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash, _initFeePerGas, _initAvgProofDelay) } // ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845. @@ -949,27 +991,6 @@ func (_TaikoL1 *TaikoL1TransactorSession) SetAddressManager(newAddressManager co return _TaikoL1.Contract.SetAddressManager(&_TaikoL1.TransactOpts, newAddressManager) } -// SetProofParams is a paid mutator transaction binding the contract method 0xae46a347. -// -// Solidity: function setProofParams(uint64 newProofTimeTarget, uint64 newProofTimeIssued, uint64 newBlockFee, uint16 newAdjustmentQuotient) returns() -func (_TaikoL1 *TaikoL1Transactor) SetProofParams(opts *bind.TransactOpts, newProofTimeTarget uint64, newProofTimeIssued uint64, newBlockFee uint64, newAdjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1.contract.Transact(opts, "setProofParams", newProofTimeTarget, newProofTimeIssued, newBlockFee, newAdjustmentQuotient) -} - -// SetProofParams is a paid mutator transaction binding the contract method 0xae46a347. -// -// Solidity: function setProofParams(uint64 newProofTimeTarget, uint64 newProofTimeIssued, uint64 newBlockFee, uint16 newAdjustmentQuotient) returns() -func (_TaikoL1 *TaikoL1Session) SetProofParams(newProofTimeTarget uint64, newProofTimeIssued uint64, newBlockFee uint64, newAdjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1.Contract.SetProofParams(&_TaikoL1.TransactOpts, newProofTimeTarget, newProofTimeIssued, newBlockFee, newAdjustmentQuotient) -} - -// SetProofParams is a paid mutator transaction binding the contract method 0xae46a347. -// -// Solidity: function setProofParams(uint64 newProofTimeTarget, uint64 newProofTimeIssued, uint64 newBlockFee, uint16 newAdjustmentQuotient) returns() -func (_TaikoL1 *TaikoL1TransactorSession) SetProofParams(newProofTimeTarget uint64, newProofTimeIssued uint64, newBlockFee uint64, newAdjustmentQuotient uint16) (*types.Transaction, error) { - return _TaikoL1.Contract.SetProofParams(&_TaikoL1.TransactOpts, newProofTimeTarget, newProofTimeIssued, newBlockFee, newAdjustmentQuotient) -} - // TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. // // Solidity: function transferOwnership(address newOwner) returns() @@ -1257,40 +1278,50 @@ func (it *TaikoL1BlockProposedIterator) Close() error { // TaikoL1BlockProposed represents a BlockProposed event raised by the TaikoL1 contract. type TaikoL1BlockProposed struct { - Id *big.Int - Meta TaikoDataBlockMetadata - BlockFee uint64 - Raw types.Log // Blockchain specific contextual infos + BlockId *big.Int + AssignedProver common.Address + RewardPerGas uint32 + FeePerGas uint64 + Meta TaikoDataBlockMetadata + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProposed is a free log retrieval operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// FilterBlockProposed is a free log retrieval operation binding the contract event 0xeff8292b096b6478c20f0047b60a36bbc7d7c8ec6465769a628fbad6b151170d. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) -func (_TaikoL1 *TaikoL1Filterer) FilterBlockProposed(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1BlockProposedIterator, error) { +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint32 rewardPerGas, uint64 feePerGas, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +func (_TaikoL1 *TaikoL1Filterer) FilterBlockProposed(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address) (*TaikoL1BlockProposedIterator, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } + var assignedProverRule []interface{} + for _, assignedProverItem := range assignedProver { + assignedProverRule = append(assignedProverRule, assignedProverItem) } - logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProposed", idRule) + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProposed", blockIdRule, assignedProverRule) if err != nil { return nil, err } return &TaikoL1BlockProposedIterator{contract: _TaikoL1.contract, event: "BlockProposed", logs: logs, sub: sub}, nil } -// WatchBlockProposed is a free log subscription operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// WatchBlockProposed is a free log subscription operation binding the contract event 0xeff8292b096b6478c20f0047b60a36bbc7d7c8ec6465769a628fbad6b151170d. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) -func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProposed, id []*big.Int) (event.Subscription, error) { +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint32 rewardPerGas, uint64 feePerGas, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProposed, blockId []*big.Int, assignedProver []common.Address) (event.Subscription, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } + var assignedProverRule []interface{} + for _, assignedProverItem := range assignedProver { + assignedProverRule = append(assignedProverRule, assignedProverItem) } - logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProposed", idRule) + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProposed", blockIdRule, assignedProverRule) if err != nil { return nil, err } @@ -1322,9 +1353,9 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink c }), nil } -// ParseBlockProposed is a log parse operation binding the contract event 0x555304f14500c230922dd951cfdbb74012005afbcd7350b4b9fd27dc12d710fe. +// ParseBlockProposed is a log parse operation binding the contract event 0xeff8292b096b6478c20f0047b60a36bbc7d7c8ec6465769a628fbad6b151170d. // -// Solidity: event BlockProposed(uint256 indexed id, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta, uint64 blockFee) +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint32 rewardPerGas, uint64 feePerGas, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) func (_TaikoL1 *TaikoL1Filterer) ParseBlockProposed(log types.Log) (*TaikoL1BlockProposed, error) { event := new(TaikoL1BlockProposed) if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed", log); err != nil { @@ -1334,9 +1365,9 @@ func (_TaikoL1 *TaikoL1Filterer) ParseBlockProposed(log types.Log) (*TaikoL1Bloc return event, nil } -// TaikoL1BlockProvenIterator is returned from FilterBlockProven and is used to iterate over the raw logs and unpacked data for BlockProven events raised by the TaikoL1 contract. -type TaikoL1BlockProvenIterator struct { - Event *TaikoL1BlockProven // Event containing the contract specifics and raw log +// TaikoL1BlockProposed0Iterator is returned from FilterBlockProposed0 and is used to iterate over the raw logs and unpacked data for BlockProposed0 events raised by the TaikoL1 contract. +type TaikoL1BlockProposed0Iterator struct { + Event *TaikoL1BlockProposed0 // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1350,7 +1381,7 @@ type TaikoL1BlockProvenIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1BlockProvenIterator) Next() bool { +func (it *TaikoL1BlockProposed0Iterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1359,7 +1390,7 @@ func (it *TaikoL1BlockProvenIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1BlockProven) + it.Event = new(TaikoL1BlockProposed0) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1374,7 +1405,7 @@ func (it *TaikoL1BlockProvenIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1BlockProven) + it.Event = new(TaikoL1BlockProposed0) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1390,56 +1421,63 @@ func (it *TaikoL1BlockProvenIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1BlockProvenIterator) Error() error { +func (it *TaikoL1BlockProposed0Iterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1BlockProvenIterator) Close() error { +func (it *TaikoL1BlockProposed0Iterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1BlockProven represents a BlockProven event raised by the TaikoL1 contract. -type TaikoL1BlockProven struct { - Id *big.Int - ParentHash [32]byte - BlockHash [32]byte - SignalRoot [32]byte - Prover common.Address - ParentGasUsed uint32 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1BlockProposed0 represents a BlockProposed0 event raised by the TaikoL1 contract. +type TaikoL1BlockProposed0 struct { + BlockId *big.Int + AssignedProver common.Address + RewardPerGas uint32 + FeePerGas uint64 + Meta TaikoDataBlockMetadata + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockProven is a free log retrieval operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0xeff8292b096b6478c20f0047b60a36bbc7d7c8ec6465769a628fbad6b151170d. // -// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) -func (_TaikoL1 *TaikoL1Filterer) FilterBlockProven(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1BlockProvenIterator, error) { +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint32 rewardPerGas, uint64 feePerGas, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +func (_TaikoL1 *TaikoL1Filterer) FilterBlockProposed0(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address) (*TaikoL1BlockProposed0Iterator, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } + var assignedProverRule []interface{} + for _, assignedProverItem := range assignedProver { + assignedProverRule = append(assignedProverRule, assignedProverItem) } - logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProven", idRule) + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProposed0", blockIdRule, assignedProverRule) if err != nil { return nil, err } - return &TaikoL1BlockProvenIterator{contract: _TaikoL1.contract, event: "BlockProven", logs: logs, sub: sub}, nil + return &TaikoL1BlockProposed0Iterator{contract: _TaikoL1.contract, event: "BlockProposed0", logs: logs, sub: sub}, nil } -// WatchBlockProven is a free log subscription operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// WatchBlockProposed0 is a free log subscription operation binding the contract event 0xeff8292b096b6478c20f0047b60a36bbc7d7c8ec6465769a628fbad6b151170d. // -// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) -func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProven, id []*big.Int) (event.Subscription, error) { +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint32 rewardPerGas, uint64 feePerGas, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProposed0, blockId []*big.Int, assignedProver []common.Address) (event.Subscription, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } + var assignedProverRule []interface{} + for _, assignedProverItem := range assignedProver { + assignedProverRule = append(assignedProverRule, assignedProverItem) } - logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProven", idRule) + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProposed0", blockIdRule, assignedProverRule) if err != nil { return nil, err } @@ -1449,8 +1487,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink cha select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1BlockProven) - if err := _TaikoL1.contract.UnpackLog(event, "BlockProven", log); err != nil { + event := new(TaikoL1BlockProposed0) + if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed0", log); err != nil { return err } event.Raw = log @@ -1471,21 +1509,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink cha }), nil } -// ParseBlockProven is a log parse operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. +// ParseBlockProposed0 is a log parse operation binding the contract event 0xeff8292b096b6478c20f0047b60a36bbc7d7c8ec6465769a628fbad6b151170d. // -// Solidity: event BlockProven(uint256 indexed id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) -func (_TaikoL1 *TaikoL1Filterer) ParseBlockProven(log types.Log) (*TaikoL1BlockProven, error) { - event := new(TaikoL1BlockProven) - if err := _TaikoL1.contract.UnpackLog(event, "BlockProven", log); err != nil { +// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint32 rewardPerGas, uint64 feePerGas, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,address,(address,uint96,uint64)[]) meta) +func (_TaikoL1 *TaikoL1Filterer) ParseBlockProposed0(log types.Log) (*TaikoL1BlockProposed0, error) { + event := new(TaikoL1BlockProposed0) + if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed0", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1BlockVerifiedIterator is returned from FilterBlockVerified and is used to iterate over the raw logs and unpacked data for BlockVerified events raised by the TaikoL1 contract. -type TaikoL1BlockVerifiedIterator struct { - Event *TaikoL1BlockVerified // Event containing the contract specifics and raw log +// TaikoL1BlockProvenIterator is returned from FilterBlockProven and is used to iterate over the raw logs and unpacked data for BlockProven events raised by the TaikoL1 contract. +type TaikoL1BlockProvenIterator struct { + Event *TaikoL1BlockProven // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1499,7 +1537,7 @@ type TaikoL1BlockVerifiedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1BlockVerifiedIterator) Next() bool { +func (it *TaikoL1BlockProvenIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1508,7 +1546,7 @@ func (it *TaikoL1BlockVerifiedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1BlockVerified) + it.Event = new(TaikoL1BlockProven) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1523,7 +1561,7 @@ func (it *TaikoL1BlockVerifiedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1BlockVerified) + it.Event = new(TaikoL1BlockProven) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1539,53 +1577,56 @@ func (it *TaikoL1BlockVerifiedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1BlockVerifiedIterator) Error() error { +func (it *TaikoL1BlockProvenIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1BlockVerifiedIterator) Close() error { +func (it *TaikoL1BlockProvenIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1BlockVerified represents a BlockVerified event raised by the TaikoL1 contract. -type TaikoL1BlockVerified struct { - Id *big.Int - BlockHash [32]byte - Reward uint64 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1BlockProven represents a BlockProven event raised by the TaikoL1 contract. +type TaikoL1BlockProven struct { + BlockId *big.Int + ParentHash [32]byte + BlockHash [32]byte + SignalRoot [32]byte + Prover common.Address + ParentGasUsed uint32 + Raw types.Log // Blockchain specific contextual infos } -// FilterBlockVerified is a free log retrieval operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// FilterBlockProven is a free log retrieval operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. // -// Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) -func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified(opts *bind.FilterOpts, id []*big.Int) (*TaikoL1BlockVerifiedIterator, error) { +// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1 *TaikoL1Filterer) FilterBlockProven(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1BlockProvenIterator, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) } - logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified", idRule) + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProven", blockIdRule) if err != nil { return nil, err } - return &TaikoL1BlockVerifiedIterator{contract: _TaikoL1.contract, event: "BlockVerified", logs: logs, sub: sub}, nil + return &TaikoL1BlockProvenIterator{contract: _TaikoL1.contract, event: "BlockProven", logs: logs, sub: sub}, nil } -// WatchBlockVerified is a free log subscription operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// WatchBlockProven is a free log subscription operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. // -// Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) -func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified, id []*big.Int) (event.Subscription, error) { +// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProven, blockId []*big.Int) (event.Subscription, error) { - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) } - logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified", idRule) + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProven", blockIdRule) if err != nil { return nil, err } @@ -1595,8 +1636,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink c select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1BlockVerified) - if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil { + event := new(TaikoL1BlockProven) + if err := _TaikoL1.contract.UnpackLog(event, "BlockProven", log); err != nil { return err } event.Raw = log @@ -1617,21 +1658,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink c }), nil } -// ParseBlockVerified is a log parse operation binding the contract event 0x71eb3f26e4ff6e88e66a79521590634475f8ddb0c9e30e0400de0c7f2b28fb83. +// ParseBlockProven is a log parse operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. // -// Solidity: event BlockVerified(uint256 indexed id, bytes32 blockHash, uint64 reward) -func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified(log types.Log) (*TaikoL1BlockVerified, error) { - event := new(TaikoL1BlockVerified) - if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil { +// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1 *TaikoL1Filterer) ParseBlockProven(log types.Log) (*TaikoL1BlockProven, error) { + event := new(TaikoL1BlockProven) + if err := _TaikoL1.contract.UnpackLog(event, "BlockProven", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1CrossChainSyncedIterator is returned from FilterCrossChainSynced and is used to iterate over the raw logs and unpacked data for CrossChainSynced events raised by the TaikoL1 contract. -type TaikoL1CrossChainSyncedIterator struct { - Event *TaikoL1CrossChainSynced // Event containing the contract specifics and raw log +// TaikoL1BlockProven0Iterator is returned from FilterBlockProven0 and is used to iterate over the raw logs and unpacked data for BlockProven0 events raised by the TaikoL1 contract. +type TaikoL1BlockProven0Iterator struct { + Event *TaikoL1BlockProven0 // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1645,7 +1686,7 @@ type TaikoL1CrossChainSyncedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1CrossChainSyncedIterator) Next() bool { +func (it *TaikoL1BlockProven0Iterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1654,7 +1695,7 @@ func (it *TaikoL1CrossChainSyncedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1CrossChainSynced) + it.Event = new(TaikoL1BlockProven0) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1669,7 +1710,7 @@ func (it *TaikoL1CrossChainSyncedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1CrossChainSynced) + it.Event = new(TaikoL1BlockProven0) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1685,53 +1726,56 @@ func (it *TaikoL1CrossChainSyncedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1CrossChainSyncedIterator) Error() error { +func (it *TaikoL1BlockProven0Iterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1CrossChainSyncedIterator) Close() error { +func (it *TaikoL1BlockProven0Iterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1CrossChainSynced represents a CrossChainSynced event raised by the TaikoL1 contract. -type TaikoL1CrossChainSynced struct { - SrcHeight *big.Int - BlockHash [32]byte - SignalRoot [32]byte - Raw types.Log // Blockchain specific contextual infos +// TaikoL1BlockProven0 represents a BlockProven0 event raised by the TaikoL1 contract. +type TaikoL1BlockProven0 struct { + BlockId *big.Int + ParentHash [32]byte + BlockHash [32]byte + SignalRoot [32]byte + Prover common.Address + ParentGasUsed uint32 + Raw types.Log // Blockchain specific contextual infos } -// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. +// FilterBlockProven0 is a free log retrieval operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. // -// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) -func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced(opts *bind.FilterOpts, srcHeight []*big.Int) (*TaikoL1CrossChainSyncedIterator, error) { +// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1 *TaikoL1Filterer) FilterBlockProven0(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1BlockProven0Iterator, error) { - var srcHeightRule []interface{} - for _, srcHeightItem := range srcHeight { - srcHeightRule = append(srcHeightRule, srcHeightItem) + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) } - logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced", srcHeightRule) + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProven0", blockIdRule) if err != nil { return nil, err } - return &TaikoL1CrossChainSyncedIterator{contract: _TaikoL1.contract, event: "CrossChainSynced", logs: logs, sub: sub}, nil + return &TaikoL1BlockProven0Iterator{contract: _TaikoL1.contract, event: "BlockProven0", logs: logs, sub: sub}, nil } -// WatchCrossChainSynced is a free log subscription operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. +// WatchBlockProven0 is a free log subscription operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. // -// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) -func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced, srcHeight []*big.Int) (event.Subscription, error) { +// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProven0, blockId []*big.Int) (event.Subscription, error) { - var srcHeightRule []interface{} - for _, srcHeightItem := range srcHeight { - srcHeightRule = append(srcHeightRule, srcHeightItem) + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) } - logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced", srcHeightRule) + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProven0", blockIdRule) if err != nil { return nil, err } @@ -1741,8 +1785,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sin select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1CrossChainSynced) - if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil { + event := new(TaikoL1BlockProven0) + if err := _TaikoL1.contract.UnpackLog(event, "BlockProven0", log); err != nil { return err } event.Raw = log @@ -1763,21 +1807,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sin }), nil } -// ParseCrossChainSynced is a log parse operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. +// ParseBlockProven0 is a log parse operation binding the contract event 0x2295930c498c7b1f60143439a63dd1d24bbb730f08ff6ed383b490ba2c1cafa4. // -// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) -func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced(log types.Log) (*TaikoL1CrossChainSynced, error) { - event := new(TaikoL1CrossChainSynced) - if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil { +// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover, uint32 parentGasUsed) +func (_TaikoL1 *TaikoL1Filterer) ParseBlockProven0(log types.Log) (*TaikoL1BlockProven0, error) { + event := new(TaikoL1BlockProven0) + if err := _TaikoL1.contract.UnpackLog(event, "BlockProven0", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1EthDepositedIterator is returned from FilterEthDeposited and is used to iterate over the raw logs and unpacked data for EthDeposited events raised by the TaikoL1 contract. -type TaikoL1EthDepositedIterator struct { - Event *TaikoL1EthDeposited // Event containing the contract specifics and raw log +// TaikoL1BlockVerifiedIterator is returned from FilterBlockVerified and is used to iterate over the raw logs and unpacked data for BlockVerified events raised by the TaikoL1 contract. +type TaikoL1BlockVerifiedIterator struct { + Event *TaikoL1BlockVerified // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1791,7 +1835,7 @@ type TaikoL1EthDepositedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1EthDepositedIterator) Next() bool { +func (it *TaikoL1BlockVerifiedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1800,7 +1844,7 @@ func (it *TaikoL1EthDepositedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1EthDeposited) + it.Event = new(TaikoL1BlockVerified) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1815,7 +1859,7 @@ func (it *TaikoL1EthDepositedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1EthDeposited) + it.Event = new(TaikoL1BlockVerified) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1831,41 +1875,55 @@ func (it *TaikoL1EthDepositedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1EthDepositedIterator) Error() error { +func (it *TaikoL1BlockVerifiedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1EthDepositedIterator) Close() error { +func (it *TaikoL1BlockVerifiedIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1EthDeposited represents a EthDeposited event raised by the TaikoL1 contract. -type TaikoL1EthDeposited struct { - Deposit TaikoDataEthDeposit - Raw types.Log // Blockchain specific contextual infos +// TaikoL1BlockVerified represents a BlockVerified event raised by the TaikoL1 contract. +type TaikoL1BlockVerified struct { + BlockId *big.Int + BlockHash [32]byte + Prover common.Address + BlockFee uint64 + ProofReward uint64 + Raw types.Log // Blockchain specific contextual infos } -// FilterEthDeposited is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. +// FilterBlockVerified is a free log retrieval operation binding the contract event 0x9b08b6aa43471ed7ec774671665f95855fcc9146b7f461b985aef9d9b66df06e. // -// Solidity: event EthDeposited((address,uint96,uint64) deposit) -func (_TaikoL1 *TaikoL1Filterer) FilterEthDeposited(opts *bind.FilterOpts) (*TaikoL1EthDepositedIterator, error) { +// Solidity: event BlockVerified(uint256 indexed blockId, bytes32 blockHash, address prover, uint64 blockFee, uint64 proofReward) +func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1BlockVerifiedIterator, error) { - logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "EthDeposited") + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } + + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified", blockIdRule) if err != nil { return nil, err } - return &TaikoL1EthDepositedIterator{contract: _TaikoL1.contract, event: "EthDeposited", logs: logs, sub: sub}, nil + return &TaikoL1BlockVerifiedIterator{contract: _TaikoL1.contract, event: "BlockVerified", logs: logs, sub: sub}, nil } -// WatchEthDeposited is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. +// WatchBlockVerified is a free log subscription operation binding the contract event 0x9b08b6aa43471ed7ec774671665f95855fcc9146b7f461b985aef9d9b66df06e. // -// Solidity: event EthDeposited((address,uint96,uint64) deposit) -func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink chan<- *TaikoL1EthDeposited) (event.Subscription, error) { +// Solidity: event BlockVerified(uint256 indexed blockId, bytes32 blockHash, address prover, uint64 blockFee, uint64 proofReward) +func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified, blockId []*big.Int) (event.Subscription, error) { - logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "EthDeposited") + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } + + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified", blockIdRule) if err != nil { return nil, err } @@ -1875,8 +1933,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink ch select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1EthDeposited) - if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil { + event := new(TaikoL1BlockVerified) + if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil { return err } event.Raw = log @@ -1897,21 +1955,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink ch }), nil } -// ParseEthDeposited is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. +// ParseBlockVerified is a log parse operation binding the contract event 0x9b08b6aa43471ed7ec774671665f95855fcc9146b7f461b985aef9d9b66df06e. // -// Solidity: event EthDeposited((address,uint96,uint64) deposit) -func (_TaikoL1 *TaikoL1Filterer) ParseEthDeposited(log types.Log) (*TaikoL1EthDeposited, error) { - event := new(TaikoL1EthDeposited) - if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil { +// Solidity: event BlockVerified(uint256 indexed blockId, bytes32 blockHash, address prover, uint64 blockFee, uint64 proofReward) +func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified(log types.Log) (*TaikoL1BlockVerified, error) { + event := new(TaikoL1BlockVerified) + if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1 contract. -type TaikoL1InitializedIterator struct { - Event *TaikoL1Initialized // Event containing the contract specifics and raw log +// TaikoL1BlockVerified0Iterator is returned from FilterBlockVerified0 and is used to iterate over the raw logs and unpacked data for BlockVerified0 events raised by the TaikoL1 contract. +type TaikoL1BlockVerified0Iterator struct { + Event *TaikoL1BlockVerified0 // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1925,7 +1983,7 @@ type TaikoL1InitializedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1InitializedIterator) Next() bool { +func (it *TaikoL1BlockVerified0Iterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1934,7 +1992,7 @@ func (it *TaikoL1InitializedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1Initialized) + it.Event = new(TaikoL1BlockVerified0) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1949,7 +2007,7 @@ func (it *TaikoL1InitializedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1Initialized) + it.Event = new(TaikoL1BlockVerified0) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1965,41 +2023,55 @@ func (it *TaikoL1InitializedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1InitializedIterator) Error() error { +func (it *TaikoL1BlockVerified0Iterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1InitializedIterator) Close() error { +func (it *TaikoL1BlockVerified0Iterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1Initialized represents a Initialized event raised by the TaikoL1 contract. -type TaikoL1Initialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1BlockVerified0 represents a BlockVerified0 event raised by the TaikoL1 contract. +type TaikoL1BlockVerified0 struct { + BlockId *big.Int + BlockHash [32]byte + Prover common.Address + BlockFee uint64 + ProofReward uint64 + Raw types.Log // Blockchain specific contextual infos } -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// FilterBlockVerified0 is a free log retrieval operation binding the contract event 0x9b08b6aa43471ed7ec774671665f95855fcc9146b7f461b985aef9d9b66df06e. // -// Solidity: event Initialized(uint8 version) -func (_TaikoL1 *TaikoL1Filterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoL1InitializedIterator, error) { +// Solidity: event BlockVerified(uint256 indexed blockId, bytes32 blockHash, address prover, uint64 blockFee, uint64 proofReward) +func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified0(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1BlockVerified0Iterator, error) { - logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Initialized") + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } + + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified0", blockIdRule) if err != nil { return nil, err } - return &TaikoL1InitializedIterator{contract: _TaikoL1.contract, event: "Initialized", logs: logs, sub: sub}, nil + return &TaikoL1BlockVerified0Iterator{contract: _TaikoL1.contract, event: "BlockVerified0", logs: logs, sub: sub}, nil } -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// WatchBlockVerified0 is a free log subscription operation binding the contract event 0x9b08b6aa43471ed7ec774671665f95855fcc9146b7f461b985aef9d9b66df06e. // -// Solidity: event Initialized(uint8 version) -func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoL1Initialized) (event.Subscription, error) { +// Solidity: event BlockVerified(uint256 indexed blockId, bytes32 blockHash, address prover, uint64 blockFee, uint64 proofReward) +func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified0, blockId []*big.Int) (event.Subscription, error) { - logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Initialized") + var blockIdRule []interface{} + for _, blockIdItem := range blockId { + blockIdRule = append(blockIdRule, blockIdItem) + } + + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified0", blockIdRule) if err != nil { return nil, err } @@ -2009,8 +2081,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink cha select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1Initialized) - if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil { + event := new(TaikoL1BlockVerified0) + if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", log); err != nil { return err } event.Raw = log @@ -2031,21 +2103,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink cha }), nil } -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// ParseBlockVerified0 is a log parse operation binding the contract event 0x9b08b6aa43471ed7ec774671665f95855fcc9146b7f461b985aef9d9b66df06e. // -// Solidity: event Initialized(uint8 version) -func (_TaikoL1 *TaikoL1Filterer) ParseInitialized(log types.Log) (*TaikoL1Initialized, error) { - event := new(TaikoL1Initialized) - if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil { +// Solidity: event BlockVerified(uint256 indexed blockId, bytes32 blockHash, address prover, uint64 blockFee, uint64 proofReward) +func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified0(log types.Log) (*TaikoL1BlockVerified0, error) { + event := new(TaikoL1BlockVerified0) + if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1 contract. -type TaikoL1OwnershipTransferredIterator struct { - Event *TaikoL1OwnershipTransferred // Event containing the contract specifics and raw log +// TaikoL1CrossChainSyncedIterator is returned from FilterCrossChainSynced and is used to iterate over the raw logs and unpacked data for CrossChainSynced events raised by the TaikoL1 contract. +type TaikoL1CrossChainSyncedIterator struct { + Event *TaikoL1CrossChainSynced // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2059,7 +2131,7 @@ type TaikoL1OwnershipTransferredIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1OwnershipTransferredIterator) Next() bool { +func (it *TaikoL1CrossChainSyncedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2068,7 +2140,7 @@ func (it *TaikoL1OwnershipTransferredIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1OwnershipTransferred) + it.Event = new(TaikoL1CrossChainSynced) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2083,7 +2155,7 @@ func (it *TaikoL1OwnershipTransferredIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1OwnershipTransferred) + it.Event = new(TaikoL1CrossChainSynced) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2099,60 +2171,199 @@ func (it *TaikoL1OwnershipTransferredIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1OwnershipTransferredIterator) Error() error { +func (it *TaikoL1CrossChainSyncedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1OwnershipTransferredIterator) Close() error { +func (it *TaikoL1CrossChainSyncedIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1OwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL1 contract. -type TaikoL1OwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos +// TaikoL1CrossChainSynced represents a CrossChainSynced event raised by the TaikoL1 contract. +type TaikoL1CrossChainSynced struct { + SrcHeight *big.Int + BlockHash [32]byte + SignalRoot [32]byte + Raw types.Log // Blockchain specific contextual infos } -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoL1 *TaikoL1Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1OwnershipTransferredIterator, error) { +// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) +func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced(opts *bind.FilterOpts, srcHeight []*big.Int) (*TaikoL1CrossChainSyncedIterator, error) { - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + var srcHeightRule []interface{} + for _, srcHeightItem := range srcHeight { + srcHeightRule = append(srcHeightRule, srcHeightItem) } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced", srcHeightRule) + if err != nil { + return nil, err } + return &TaikoL1CrossChainSyncedIterator{contract: _TaikoL1.contract, event: "CrossChainSynced", logs: logs, sub: sub}, nil +} - logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) +// WatchCrossChainSynced is a free log subscription operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. +// +// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) +func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced, srcHeight []*big.Int) (event.Subscription, error) { + + var srcHeightRule []interface{} + for _, srcHeightItem := range srcHeight { + srcHeightRule = append(srcHeightRule, srcHeightItem) + } + + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced", srcHeightRule) if err != nil { return nil, err } - return &TaikoL1OwnershipTransferredIterator{contract: _TaikoL1.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1CrossChainSynced) + if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil } -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseCrossChainSynced is a log parse operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL1OwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { +// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) +func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced(log types.Log) (*TaikoL1CrossChainSynced, error) { + event := new(TaikoL1CrossChainSynced) + if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) +// TaikoL1CrossChainSynced0Iterator is returned from FilterCrossChainSynced0 and is used to iterate over the raw logs and unpacked data for CrossChainSynced0 events raised by the TaikoL1 contract. +type TaikoL1CrossChainSynced0Iterator struct { + Event *TaikoL1CrossChainSynced0 // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1CrossChainSynced0Iterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1CrossChainSynced0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1CrossChainSynced0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() } +} - logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1CrossChainSynced0Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1CrossChainSynced0Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1CrossChainSynced0 represents a CrossChainSynced0 event raised by the TaikoL1 contract. +type TaikoL1CrossChainSynced0 struct { + SrcHeight *big.Int + BlockHash [32]byte + SignalRoot [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCrossChainSynced0 is a free log retrieval operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. +// +// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) +func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced0(opts *bind.FilterOpts, srcHeight []*big.Int) (*TaikoL1CrossChainSynced0Iterator, error) { + + var srcHeightRule []interface{} + for _, srcHeightItem := range srcHeight { + srcHeightRule = append(srcHeightRule, srcHeightItem) + } + + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced0", srcHeightRule) + if err != nil { + return nil, err + } + return &TaikoL1CrossChainSynced0Iterator{contract: _TaikoL1.contract, event: "CrossChainSynced0", logs: logs, sub: sub}, nil +} + +// WatchCrossChainSynced0 is a free log subscription operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. +// +// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) +func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced0(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced0, srcHeight []*big.Int) (event.Subscription, error) { + + var srcHeightRule []interface{} + for _, srcHeightItem := range srcHeight { + srcHeightRule = append(srcHeightRule, srcHeightItem) + } + + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced0", srcHeightRule) if err != nil { return nil, err } @@ -2162,8 +2373,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1OwnershipTransferred) - if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + event := new(TaikoL1CrossChainSynced0) + if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil { return err } event.Raw = log @@ -2184,21 +2395,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, }), nil } -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// ParseCrossChainSynced0 is a log parse operation binding the contract event 0x7528bbd1cef0e5d13408706892a51ee8ef82bbf33d4ec0c37216f8beba71205b. // -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_TaikoL1 *TaikoL1Filterer) ParseOwnershipTransferred(log types.Log) (*TaikoL1OwnershipTransferred, error) { - event := new(TaikoL1OwnershipTransferred) - if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { +// Solidity: event CrossChainSynced(uint256 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot) +func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced0(log types.Log) (*TaikoL1CrossChainSynced0, error) { + event := new(TaikoL1CrossChainSynced0) + if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil { return nil, err } event.Raw = log return event, nil } -// TaikoL1ProofParamsChangedIterator is returned from FilterProofParamsChanged and is used to iterate over the raw logs and unpacked data for ProofParamsChanged events raised by the TaikoL1 contract. -type TaikoL1ProofParamsChangedIterator struct { - Event *TaikoL1ProofParamsChanged // Event containing the contract specifics and raw log +// TaikoL1EthDepositedIterator is returned from FilterEthDeposited and is used to iterate over the raw logs and unpacked data for EthDeposited events raised by the TaikoL1 contract. +type TaikoL1EthDepositedIterator struct { + Event *TaikoL1EthDeposited // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -2212,7 +2423,7 @@ type TaikoL1ProofParamsChangedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *TaikoL1ProofParamsChangedIterator) Next() bool { +func (it *TaikoL1EthDepositedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2221,7 +2432,7 @@ func (it *TaikoL1ProofParamsChangedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(TaikoL1ProofParamsChanged) + it.Event = new(TaikoL1EthDeposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2236,7 +2447,7 @@ func (it *TaikoL1ProofParamsChangedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(TaikoL1ProofParamsChanged) + it.Event = new(TaikoL1EthDeposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2252,44 +2463,41 @@ func (it *TaikoL1ProofParamsChangedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *TaikoL1ProofParamsChangedIterator) Error() error { +func (it *TaikoL1EthDepositedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *TaikoL1ProofParamsChangedIterator) Close() error { +func (it *TaikoL1EthDepositedIterator) Close() error { it.sub.Unsubscribe() return nil } -// TaikoL1ProofParamsChanged represents a ProofParamsChanged event raised by the TaikoL1 contract. -type TaikoL1ProofParamsChanged struct { - ProofTimeTarget uint64 - ProofTimeIssued uint64 - BlockFee uint64 - AdjustmentQuotient uint16 - Raw types.Log // Blockchain specific contextual infos +// TaikoL1EthDeposited represents a EthDeposited event raised by the TaikoL1 contract. +type TaikoL1EthDeposited struct { + Deposit TaikoDataEthDeposit + Raw types.Log // Blockchain specific contextual infos } -// FilterProofParamsChanged is a free log retrieval operation binding the contract event 0x565e5aa69c99d81e441dd3bb8535d888585683743f3c6a3bf49e5e1b227bd8f9. +// FilterEthDeposited is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. // -// Solidity: event ProofParamsChanged(uint64 proofTimeTarget, uint64 proofTimeIssued, uint64 blockFee, uint16 adjustmentQuotient) -func (_TaikoL1 *TaikoL1Filterer) FilterProofParamsChanged(opts *bind.FilterOpts) (*TaikoL1ProofParamsChangedIterator, error) { +// Solidity: event EthDeposited((address,uint96,uint64) deposit) +func (_TaikoL1 *TaikoL1Filterer) FilterEthDeposited(opts *bind.FilterOpts) (*TaikoL1EthDepositedIterator, error) { - logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "ProofParamsChanged") + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "EthDeposited") if err != nil { return nil, err } - return &TaikoL1ProofParamsChangedIterator{contract: _TaikoL1.contract, event: "ProofParamsChanged", logs: logs, sub: sub}, nil + return &TaikoL1EthDepositedIterator{contract: _TaikoL1.contract, event: "EthDeposited", logs: logs, sub: sub}, nil } -// WatchProofParamsChanged is a free log subscription operation binding the contract event 0x565e5aa69c99d81e441dd3bb8535d888585683743f3c6a3bf49e5e1b227bd8f9. +// WatchEthDeposited is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. // -// Solidity: event ProofParamsChanged(uint64 proofTimeTarget, uint64 proofTimeIssued, uint64 blockFee, uint16 adjustmentQuotient) -func (_TaikoL1 *TaikoL1Filterer) WatchProofParamsChanged(opts *bind.WatchOpts, sink chan<- *TaikoL1ProofParamsChanged) (event.Subscription, error) { +// Solidity: event EthDeposited((address,uint96,uint64) deposit) +func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink chan<- *TaikoL1EthDeposited) (event.Subscription, error) { - logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "ProofParamsChanged") + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "EthDeposited") if err != nil { return nil, err } @@ -2299,8 +2507,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchProofParamsChanged(opts *bind.WatchOpts, s select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(TaikoL1ProofParamsChanged) - if err := _TaikoL1.contract.UnpackLog(event, "ProofParamsChanged", log); err != nil { + event := new(TaikoL1EthDeposited) + if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil { return err } event.Raw = log @@ -2321,12 +2529,433 @@ func (_TaikoL1 *TaikoL1Filterer) WatchProofParamsChanged(opts *bind.WatchOpts, s }), nil } -// ParseProofParamsChanged is a log parse operation binding the contract event 0x565e5aa69c99d81e441dd3bb8535d888585683743f3c6a3bf49e5e1b227bd8f9. +// ParseEthDeposited is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. // -// Solidity: event ProofParamsChanged(uint64 proofTimeTarget, uint64 proofTimeIssued, uint64 blockFee, uint16 adjustmentQuotient) -func (_TaikoL1 *TaikoL1Filterer) ParseProofParamsChanged(log types.Log) (*TaikoL1ProofParamsChanged, error) { - event := new(TaikoL1ProofParamsChanged) - if err := _TaikoL1.contract.UnpackLog(event, "ProofParamsChanged", log); err != nil { +// Solidity: event EthDeposited((address,uint96,uint64) deposit) +func (_TaikoL1 *TaikoL1Filterer) ParseEthDeposited(log types.Log) (*TaikoL1EthDeposited, error) { + event := new(TaikoL1EthDeposited) + if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1EthDeposited0Iterator is returned from FilterEthDeposited0 and is used to iterate over the raw logs and unpacked data for EthDeposited0 events raised by the TaikoL1 contract. +type TaikoL1EthDeposited0Iterator struct { + Event *TaikoL1EthDeposited0 // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1EthDeposited0Iterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1EthDeposited0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1EthDeposited0) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1EthDeposited0Iterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1EthDeposited0Iterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1EthDeposited0 represents a EthDeposited0 event raised by the TaikoL1 contract. +type TaikoL1EthDeposited0 struct { + Deposit TaikoDataEthDeposit + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEthDeposited0 is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. +// +// Solidity: event EthDeposited((address,uint96,uint64) deposit) +func (_TaikoL1 *TaikoL1Filterer) FilterEthDeposited0(opts *bind.FilterOpts) (*TaikoL1EthDeposited0Iterator, error) { + + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "EthDeposited0") + if err != nil { + return nil, err + } + return &TaikoL1EthDeposited0Iterator{contract: _TaikoL1.contract, event: "EthDeposited0", logs: logs, sub: sub}, nil +} + +// WatchEthDeposited0 is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. +// +// Solidity: event EthDeposited((address,uint96,uint64) deposit) +func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited0(opts *bind.WatchOpts, sink chan<- *TaikoL1EthDeposited0) (event.Subscription, error) { + + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "EthDeposited0") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1EthDeposited0) + if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited0", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEthDeposited0 is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9. +// +// Solidity: event EthDeposited((address,uint96,uint64) deposit) +func (_TaikoL1 *TaikoL1Filterer) ParseEthDeposited0(log types.Log) (*TaikoL1EthDeposited0, error) { + event := new(TaikoL1EthDeposited0) + if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited0", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1 contract. +type TaikoL1InitializedIterator struct { + Event *TaikoL1Initialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1InitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1Initialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1Initialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1InitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1InitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1Initialized represents a Initialized event raised by the TaikoL1 contract. +type TaikoL1Initialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_TaikoL1 *TaikoL1Filterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoL1InitializedIterator, error) { + + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &TaikoL1InitializedIterator{contract: _TaikoL1.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoL1Initialized) (event.Subscription, error) { + + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1Initialized) + if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_TaikoL1 *TaikoL1Filterer) ParseInitialized(log types.Log) (*TaikoL1Initialized, error) { + event := new(TaikoL1Initialized) + if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TaikoL1OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1 contract. +type TaikoL1OwnershipTransferredIterator struct { + Event *TaikoL1OwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TaikoL1OwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TaikoL1OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TaikoL1OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TaikoL1OwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TaikoL1OwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TaikoL1OwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL1 contract. +type TaikoL1OwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL1 *TaikoL1Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1OwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TaikoL1OwnershipTransferredIterator{contract: _TaikoL1.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL1OwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TaikoL1OwnershipTransferred) + if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TaikoL1 *TaikoL1Filterer) ParseOwnershipTransferred(log types.Log) (*TaikoL1OwnershipTransferred, error) { + event := new(TaikoL1OwnershipTransferred) + if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } event.Raw = log diff --git a/packages/eventindexer/errors.go b/packages/eventindexer/errors.go index 5bce12912e5..73e8b651300 100644 --- a/packages/eventindexer/errors.go +++ b/packages/eventindexer/errors.go @@ -4,8 +4,18 @@ import "github.com/cyberhorsey/errors" var ( ErrNoEthClient = errors.Validation.NewWithKeyAndDetail("ERR_NO_ETH_CLIENT", "EthClient is required") - ErrNoEventRepository = errors.Validation.NewWithKeyAndDetail("ERR_NO_EVENT_REPOSITORY", "EventRepository is required") - ErrNoStatRepository = errors.Validation.NewWithKeyAndDetail("ERR_NO_STAT_REPOSITORY", "StatRepository is required") + ErrNoEventRepository = errors.Validation.NewWithKeyAndDetail( + "ERR_NO_EVENT_REPOSITORY", + "EventRepository is required", + ) + ErrNoNFTBalanceRepository = errors.Validation.NewWithKeyAndDetail( + "ERR_NO_NFT_BALANCE_REPOSITORY", + "NFTBalanceRepository is required", + ) + ErrNoStatRepository = errors.Validation.NewWithKeyAndDetail( + "ERR_NO_STAT_REPOSITORY", + "StatRepository is required", + ) ErrNoBlockRepository = errors.Validation.NewWithKeyAndDetail( "ERR_NO_BLOCK_REPOSITORY", "BlockRepository is required", diff --git a/packages/eventindexer/event.go b/packages/eventindexer/event.go index b13d0443966..fa75cb5698a 100644 --- a/packages/eventindexer/event.go +++ b/packages/eventindexer/event.go @@ -7,6 +7,7 @@ import ( "net/http" "github.com/morkid/paginate" + "github.com/shopspring/decimal" "gorm.io/datatypes" ) @@ -14,31 +15,47 @@ var ( EventNameBlockProven = "BlockProven" EventNameBlockProposed = "BlockProposed" EventNameBlockVerified = "BlockVerified" + EventNameSlashed = "Slashed" EventNameMessageSent = "MessageSent" EventNameSwap = "Swap" + EventNameStaked = "Staked" + EventNameExited = "Exited" + EventNameWithdrawn = "Withdrawn" + EventNameMint = "Mint" + EventNameNFTTransfer = "Transfer" ) // Event represents a stored EVM event. The fields will be serialized // into the Data field to be unmarshalled into a concrete struct // dependant on the name of the event type Event struct { - ID int `json:"id"` - Name string `json:"name"` - Data datatypes.JSON `json:"data"` - ChainID int64 `json:"chainID"` - Event string `json:"event"` - Address string `json:"address"` - BlockID sql.NullInt64 `json:"blockID"` + ID int `json:"id"` + Name string `json:"name"` + Data datatypes.JSON `json:"data"` + ChainID int64 `json:"chainID"` + Event string `json:"event"` + Address string `json:"address"` + BlockID sql.NullInt64 `json:"blockID"` + Amount decimal.NullDecimal `json:"amount"` + AssignedProver string `json:"assignedProver"` + To string `json:"to"` + TokenID sql.NullInt64 `json:"tokenID"` + ContractAddress string `json:"contractAddress"` } // SaveEventOpts type SaveEventOpts struct { - Name string - Data string - ChainID *big.Int - Event string - Address string - BlockID *int64 + Name string + Data string + ChainID *big.Int + Event string + Address string + BlockID *int64 + Amount *big.Int + AssignedProver *string + To *string + TokenID *int64 + ContractAddress *string } type UniqueProversResponse struct { @@ -75,9 +92,15 @@ type EventRepository interface { address string, event string, ) (paginate.Page, error) + GetTotalSlashedTokens(ctx context.Context) (*big.Int, error) FirstByAddressAndEventName( ctx context.Context, address string, event string, ) (*Event, error) + GetAssignedBlocksByProverAddress( + ctx context.Context, + req *http.Request, + address string, + ) (paginate.Page, error) } diff --git a/packages/eventindexer/flags.go b/packages/eventindexer/flags.go index 523f62f7dcc..76db6b018ef 100644 --- a/packages/eventindexer/flags.go +++ b/packages/eventindexer/flags.go @@ -18,3 +18,5 @@ var ( ) type HTTPOnly bool + +type IndexNFTS bool diff --git a/packages/eventindexer/http/cache.go b/packages/eventindexer/http/cache.go new file mode 100644 index 00000000000..e9bbdd41bfc --- /dev/null +++ b/packages/eventindexer/http/cache.go @@ -0,0 +1,9 @@ +package http + +var ( + CacheKeyUniqueProposers = "unique-proposers" + CacheKeyUniqueProvers = "unique-provers" + CacheKeyStats = "stats" + CacheKeyPOSStats = "pos-stats" + CacheKeyCurrentProvers = "current-provers" +) diff --git a/packages/eventindexer/http/get_assigned_blocks_by_prover_address.go b/packages/eventindexer/http/get_assigned_blocks_by_prover_address.go new file mode 100644 index 00000000000..d16d73192fd --- /dev/null +++ b/packages/eventindexer/http/get_assigned_blocks_by_prover_address.go @@ -0,0 +1,21 @@ +package http + +import ( + "net/http" + + "github.com/cyberhorsey/webutils" + "github.com/labstack/echo/v4" +) + +func (srv *Server) GetAssignedBlocksByProverAddress(c echo.Context) error { + page, err := srv.eventRepo.GetAssignedBlocksByProverAddress( + c.Request().Context(), + c.Request(), + c.QueryParam("address"), + ) + if err != nil { + return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + } + + return c.JSON(http.StatusOK, page) +} diff --git a/packages/eventindexer/http/get_current_provers.go b/packages/eventindexer/http/get_current_provers.go new file mode 100644 index 00000000000..446085001ab --- /dev/null +++ b/packages/eventindexer/http/get_current_provers.go @@ -0,0 +1,62 @@ +package http + +import ( + "context" + "net/http" + + "github.com/cyberhorsey/webutils" + "github.com/labstack/echo/v4" + "github.com/patrickmn/go-cache" +) + +type Prover struct { + CurrentCapacity uint32 `json:"currentCapacity"` + Address string `json:"address"` + AmountStaked uint64 `json:"amountStaked"` + RewardPerGas uint32 `json:"rewardPerGas"` +} + +type currentProversResponse struct { + Provers []Prover `json:"provers"` +} + +func (srv *Server) GetCurrentProvers(c echo.Context) error { + cached, found := srv.cache.Get(CacheKeyCurrentProvers) + + var resp *currentProversResponse + + var err error + + if found { + resp = cached.(*currentProversResponse) + } else { + resp, err = srv.getCurrentProvers(c.Request().Context()) + if err != nil { + return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + } + + srv.cache.Set(CacheKeyCurrentProvers, resp, cache.DefaultExpiration) + } + + return c.JSON(http.StatusOK, resp) +} + +func (srv *Server) getCurrentProvers(ctx context.Context) (*currentProversResponse, error) { + provers, err := srv.proverPool.GetProvers(nil) + if err != nil { + return nil, err + } + + resp := ¤tProversResponse{} + + for i, prover := range provers.Provers { + resp.Provers = append(resp.Provers, Prover{ + CurrentCapacity: prover.CurrentCapacity, + AmountStaked: prover.StakedAmount, + Address: provers.Stakers[i].Hex(), + RewardPerGas: prover.RewardPerGas, + }) + } + + return resp, nil +} diff --git a/packages/eventindexer/http/get_nft_balances_by_address_and_chain_id.go b/packages/eventindexer/http/get_nft_balances_by_address_and_chain_id.go new file mode 100644 index 00000000000..cb757173956 --- /dev/null +++ b/packages/eventindexer/http/get_nft_balances_by_address_and_chain_id.go @@ -0,0 +1,22 @@ +package http + +import ( + "net/http" + + "github.com/cyberhorsey/webutils" + "github.com/labstack/echo/v4" +) + +func (srv *Server) GetNFTBalancesByAddessAndChainID(c echo.Context) error { + page, err := srv.nftBalanceRepo.FindByAddress( + c.Request().Context(), + c.Request(), + c.QueryParam("address"), + c.QueryParam("chainID"), + ) + if err != nil { + return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + } + + return c.JSON(http.StatusOK, page) +} diff --git a/packages/eventindexer/http/get_pos_stats.go b/packages/eventindexer/http/get_pos_stats.go new file mode 100644 index 00000000000..cdb6fc3e0ef --- /dev/null +++ b/packages/eventindexer/http/get_pos_stats.go @@ -0,0 +1,64 @@ +package http + +import ( + "context" + "net/http" + + "log/slog" + + "github.com/cyberhorsey/webutils" + "github.com/labstack/echo/v4" + "github.com/patrickmn/go-cache" +) + +type posStatsResponse struct { + TotalSlashedTokens string `json:"totalSlashedTokens"` + CurrentProtocolCapacity string `json:"currentProtocolCapacity"` +} + +func (srv *Server) GetPOSStats(c echo.Context) error { + cached, found := srv.cache.Get(CacheKeyPOSStats) + + var resp *posStatsResponse + + var err error + + if found { + resp = cached.(*posStatsResponse) + } else { + resp, err = srv.getPosStats(c.Request().Context()) + + if err != nil { + return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + } + + srv.cache.Set(CacheKeyPOSStats, resp, cache.DefaultExpiration) + } + + return c.JSON(http.StatusOK, resp) +} + +func (srv *Server) getPosStats(ctx context.Context) (*posStatsResponse, error) { + totalSlashedTokens, err := srv.eventRepo.GetTotalSlashedTokens(ctx) + if err != nil { + return nil, err + } + + capacity, err := srv.proverPool.GetCapacity(nil) + if err != nil { + return nil, err + } + + slog.Info( + "pos stats", + "totalSlashedTokens", totalSlashedTokens.String(), + "capacity", capacity.String(), + ) + + resp := &posStatsResponse{ + TotalSlashedTokens: totalSlashedTokens.String(), + CurrentProtocolCapacity: capacity.String(), + } + + return resp, nil +} diff --git a/packages/eventindexer/http/get_pos_stats_test.go b/packages/eventindexer/http/get_pos_stats_test.go new file mode 100644 index 00000000000..8917ca62af5 --- /dev/null +++ b/packages/eventindexer/http/get_pos_stats_test.go @@ -0,0 +1,50 @@ +package http + +import ( + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/cyberhorsey/webutils/testutils" + "github.com/labstack/echo/v4" +) + +func Test_GetPOSStats(t *testing.T) { + srv := newTestServer("") + + srv.cache.Set(CacheKeyPOSStats, &posStatsResponse{ + TotalSlashedTokens: "1", + CurrentProtocolCapacity: "1", + }, 10*time.Second) + + tests := []struct { + name string + address string + wantStatus int + wantBodyRegexpMatches []string + }{ + { + "success", + "0x123", + http.StatusOK, + []string{`{"totalSlashedTokens":"1","currentProtocolCapacity":"1"}`}, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + req := testutils.NewUnauthenticatedRequest( + echo.GET, + "/posStats", + nil, + ) + + rec := httptest.NewRecorder() + + srv.ServeHTTP(rec, req) + + testutils.AssertStatusAndBody(t, rec, tt.wantStatus, tt.wantBodyRegexpMatches) + }) + } +} diff --git a/packages/eventindexer/http/get_stats.go b/packages/eventindexer/http/get_stats.go index 0fc21c18591..cbb68858c6d 100644 --- a/packages/eventindexer/http/get_stats.go +++ b/packages/eventindexer/http/get_stats.go @@ -5,14 +5,28 @@ import ( "github.com/cyberhorsey/webutils" "github.com/labstack/echo/v4" + "github.com/patrickmn/go-cache" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" ) func (srv *Server) GetStats(c echo.Context) error { - stats, err := srv.statRepo.Find( - c.Request().Context(), - ) - if err != nil { - return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + cached, found := srv.cache.Get(CacheKeyStats) + + var stats *eventindexer.Stat + + var err error + + if found { + stats = cached.(*eventindexer.Stat) + } else { + stats, err = srv.statRepo.Find( + c.Request().Context(), + ) + if err != nil { + return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + } + + srv.cache.Set(CacheKeyStats, stats, cache.DefaultExpiration) } return c.JSON(http.StatusOK, stats) diff --git a/packages/eventindexer/http/get_unique_proposers.go b/packages/eventindexer/http/get_unique_proposers.go index f29f94a466a..cac8bd10ed9 100644 --- a/packages/eventindexer/http/get_unique_proposers.go +++ b/packages/eventindexer/http/get_unique_proposers.go @@ -5,6 +5,7 @@ import ( "github.com/cyberhorsey/webutils" "github.com/labstack/echo/v4" + "github.com/patrickmn/go-cache" "github.com/taikoxyz/taiko-mono/packages/eventindexer" ) @@ -14,11 +15,23 @@ type uniqueProposersResp struct { } func (srv *Server) GetUniqueProposers(c echo.Context) error { - proposers, err := srv.eventRepo.FindUniqueProposers( - c.Request().Context(), - ) - if err != nil { - return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + cached, found := srv.cache.Get(CacheKeyUniqueProposers) + + var proposers []eventindexer.UniqueProposersResponse + + var err error + + if found { + proposers = cached.([]eventindexer.UniqueProposersResponse) + } else { + proposers, err = srv.eventRepo.FindUniqueProposers( + c.Request().Context(), + ) + if err != nil { + return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + } + + srv.cache.Set(CacheKeyUniqueProposers, proposers, cache.DefaultExpiration) } return c.JSON(http.StatusOK, &uniqueProposersResp{ diff --git a/packages/eventindexer/http/get_unique_provers.go b/packages/eventindexer/http/get_unique_provers.go index 649cb1e2bca..02ec73bb40f 100644 --- a/packages/eventindexer/http/get_unique_provers.go +++ b/packages/eventindexer/http/get_unique_provers.go @@ -5,6 +5,7 @@ import ( "github.com/cyberhorsey/webutils" "github.com/labstack/echo/v4" + "github.com/patrickmn/go-cache" "github.com/taikoxyz/taiko-mono/packages/eventindexer" ) @@ -14,11 +15,23 @@ type uniqueProversResp struct { } func (srv *Server) GetUniqueProvers(c echo.Context) error { - provers, err := srv.eventRepo.FindUniqueProvers( - c.Request().Context(), - ) - if err != nil { - return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + cached, found := srv.cache.Get(CacheKeyUniqueProvers) + + var provers []eventindexer.UniqueProversResponse + + var err error + + if found { + provers = cached.([]eventindexer.UniqueProversResponse) + } else { + provers, err = srv.eventRepo.FindUniqueProvers( + c.Request().Context(), + ) + if err != nil { + return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + } + + srv.cache.Set(CacheKeyUniqueProvers, provers, cache.DefaultExpiration) } return c.JSON(http.StatusOK, &uniqueProversResp{ diff --git a/packages/eventindexer/http/routes.go b/packages/eventindexer/http/routes.go index 98d1dcaa3f2..193ec75f0b6 100644 --- a/packages/eventindexer/http/routes.go +++ b/packages/eventindexer/http/routes.go @@ -9,6 +9,10 @@ func (srv *Server) configureRoutes() { srv.echo.GET("/eventByAddress", srv.GetCountByAddressAndEventName) srv.echo.GET("/events", srv.GetByAddressAndEventName) srv.echo.GET("/stats", srv.GetStats) + srv.echo.GET("/posStats", srv.GetPOSStats) + srv.echo.GET("/currentProvers", srv.GetCurrentProvers) + srv.echo.GET("/assignedBlocks", srv.GetAssignedBlocksByProverAddress) + srv.echo.GET("/nftsByAddress", srv.GetNFTBalancesByAddessAndChainID) galaxeAPI := srv.echo.Group("/api") @@ -16,4 +20,5 @@ func (srv *Server) configureRoutes() { galaxeAPI.GET("/user-proved-block", srv.UserProvedBlock) galaxeAPI.GET("/user-bridged", srv.UserBridged) galaxeAPI.GET("/user-swapped-on-taiko", srv.UserSwappedOnTaiko) + galaxeAPI.GET("/user-added-liquidity", srv.UserAddedLiquidity) } diff --git a/packages/eventindexer/http/server.go b/packages/eventindexer/http/server.go index 584ddbb32c4..2e5048a1976 100644 --- a/packages/eventindexer/http/server.go +++ b/packages/eventindexer/http/server.go @@ -5,25 +5,36 @@ import ( "fmt" "net/http" "os" + "time" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" "github.com/labstack/echo/v4/middleware" + "github.com/patrickmn/go-cache" "github.com/taikoxyz/taiko-mono/packages/eventindexer" + "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/proverpool" echoprom "github.com/labstack/echo-contrib/prometheus" echo "github.com/labstack/echo/v4" ) type Server struct { - echo *echo.Echo - eventRepo eventindexer.EventRepository - statRepo eventindexer.StatRepository + echo *echo.Echo + eventRepo eventindexer.EventRepository + statRepo eventindexer.StatRepository + nftBalanceRepo eventindexer.NFTBalanceRepository + cache *cache.Cache + proverPool *proverpool.ProverPool } type NewServerOpts struct { - Echo *echo.Echo - EventRepo eventindexer.EventRepository - StatRepo eventindexer.StatRepository - CorsOrigins []string + Echo *echo.Echo + EventRepo eventindexer.EventRepository + StatRepo eventindexer.StatRepository + NFTBalanceRepo eventindexer.NFTBalanceRepository + ProverPoolAddress common.Address + EthClient *ethclient.Client + CorsOrigins []string } func (opts NewServerOpts) Validate() error { @@ -43,6 +54,12 @@ func (opts NewServerOpts) Validate() error { return eventindexer.ErrNoCORSOrigins } + if opts.NFTBalanceRepo == nil { + return eventindexer.ErrNoNFTBalanceRepository + } + + // proverpooladdress is optional + return nil } @@ -51,10 +68,26 @@ func NewServer(opts NewServerOpts) (*Server, error) { return nil, err } + cache := cache.New(5*time.Minute, 10*time.Minute) + + var proverPool *proverpool.ProverPool + + var err error + + if opts.ProverPoolAddress.Hex() != "" { + proverPool, err = proverpool.NewProverPool(opts.ProverPoolAddress, opts.EthClient) + if err != nil { + return nil, err + } + } + srv := &Server{ - echo: opts.Echo, - eventRepo: opts.EventRepo, - statRepo: opts.StatRepo, + echo: opts.Echo, + eventRepo: opts.EventRepo, + statRepo: opts.StatRepo, + nftBalanceRepo: opts.NFTBalanceRepo, + cache: cache, + proverPool: proverPool, } corsOrigins := opts.CorsOrigins diff --git a/packages/eventindexer/http/server_test.go b/packages/eventindexer/http/server_test.go index a732f1a2f89..0ef682716ff 100644 --- a/packages/eventindexer/http/server_test.go +++ b/packages/eventindexer/http/server_test.go @@ -5,9 +5,11 @@ import ( "net/http" "net/http/httptest" "testing" + "time" "github.com/joho/godotenv" echo "github.com/labstack/echo/v4" + "github.com/patrickmn/go-cache" "github.com/stretchr/testify/assert" "github.com/taikoxyz/taiko-mono/packages/eventindexer" "github.com/taikoxyz/taiko-mono/packages/eventindexer/mock" @@ -18,9 +20,11 @@ func newTestServer(url string) *Server { _ = godotenv.Load("../.test.env") srv := &Server{ - echo: echo.New(), - eventRepo: mock.NewEventRepository(), - statRepo: mock.NewStatRepository(), + cache: cache.New(5*time.Second, 6*time.Second), + echo: echo.New(), + eventRepo: mock.NewEventRepository(), + statRepo: mock.NewStatRepository(), + nftBalanceRepo: mock.NewNFTBalanceRepository(), } srv.configureMiddleware([]string{"*"}) @@ -38,47 +42,62 @@ func Test_NewServer(t *testing.T) { }{ { "success", + NewServerOpts{ + Echo: echo.New(), + EventRepo: &repo.EventRepository{}, + CorsOrigins: make([]string, 0), + StatRepo: &repo.StatRepository{}, + NFTBalanceRepo: &repo.NFTBalanceRepository{}, + }, + nil, + }, + { + "noNftBalanceRepo", NewServerOpts{ Echo: echo.New(), EventRepo: &repo.EventRepository{}, CorsOrigins: make([]string, 0), StatRepo: &repo.StatRepository{}, }, - nil, + eventindexer.ErrNoNFTBalanceRepository, }, { "noStatRepo", NewServerOpts{ - Echo: echo.New(), - EventRepo: &repo.EventRepository{}, - CorsOrigins: make([]string, 0), + Echo: echo.New(), + EventRepo: &repo.EventRepository{}, + CorsOrigins: make([]string, 0), + NFTBalanceRepo: &repo.NFTBalanceRepository{}, }, eventindexer.ErrNoStatRepository, }, { "noEventRepo", NewServerOpts{ - Echo: echo.New(), - CorsOrigins: make([]string, 0), - StatRepo: &repo.StatRepository{}, + Echo: echo.New(), + CorsOrigins: make([]string, 0), + StatRepo: &repo.StatRepository{}, + NFTBalanceRepo: &repo.NFTBalanceRepository{}, }, eventindexer.ErrNoEventRepository, }, { "noCorsOrigins", NewServerOpts{ - Echo: echo.New(), - EventRepo: &repo.EventRepository{}, - StatRepo: &repo.StatRepository{}, + Echo: echo.New(), + EventRepo: &repo.EventRepository{}, + StatRepo: &repo.StatRepository{}, + NFTBalanceRepo: &repo.NFTBalanceRepository{}, }, eventindexer.ErrNoCORSOrigins, }, { "noHttpFramework", NewServerOpts{ - EventRepo: &repo.EventRepository{}, - CorsOrigins: make([]string, 0), - StatRepo: &repo.StatRepository{}, + EventRepo: &repo.EventRepository{}, + CorsOrigins: make([]string, 0), + StatRepo: &repo.StatRepository{}, + NFTBalanceRepo: &repo.NFTBalanceRepository{}, }, ErrNoHTTPFramework, }, diff --git a/packages/eventindexer/http/user_added_liquidity.go b/packages/eventindexer/http/user_added_liquidity.go new file mode 100644 index 00000000000..92a370d496d --- /dev/null +++ b/packages/eventindexer/http/user_added_liquidity.go @@ -0,0 +1,32 @@ +package http + +import ( + "net/http" + + "github.com/cyberhorsey/webutils" + "github.com/labstack/echo/v4" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" +) + +func (srv *Server) UserAddedLiquidity(c echo.Context) error { + event, err := srv.eventRepo.FirstByAddressAndEventName( + c.Request().Context(), + c.QueryParam("address"), + eventindexer.EventNameMint, + ) + if err != nil { + return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err) + } + + var found bool = false + + if event != nil { + found = true + } + + return c.JSON(http.StatusOK, &galaxeAPIResponse{ + Data: galaxeData{ + IsOK: found, + }, + }) +} diff --git a/packages/eventindexer/indexer/filter.go b/packages/eventindexer/indexer/filter.go index f3a620f43ed..66ddc8e4103 100644 --- a/packages/eventindexer/indexer/filter.go +++ b/packages/eventindexer/indexer/filter.go @@ -4,8 +4,9 @@ import ( "context" "math/big" + "log/slog" + "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/labstack/gommon/log" "github.com/pkg/errors" "golang.org/x/sync/errgroup" ) @@ -17,6 +18,7 @@ type FilterFunc func( filterOpts *bind.FilterOpts, ) error +// nolint func L1FilterFunc( ctx context.Context, chainID *big.Int, @@ -25,67 +27,137 @@ func L1FilterFunc( ) error { wg, ctx := errgroup.WithContext(ctx) - wg.Go(func() error { - blockProvenEvents, err := svc.taikol1.FilterBlockProven(filterOpts, nil) - if err != nil { - return errors.Wrap(err, "svc.taikol1.FilterBlockProven") - } + if svc.taikol1 != nil { + wg.Go(func() error { + blockProvenEvents, err := svc.taikol1.FilterBlockProven(filterOpts, nil) + if err != nil { + return errors.Wrap(err, "svc.taikol1.FilterBlockProven") + } - err = svc.saveBlockProvenEvents(ctx, chainID, blockProvenEvents) - if err != nil { - return errors.Wrap(err, "svc.saveBlockProvenEvents") - } + err = svc.saveBlockProvenEvents(ctx, chainID, blockProvenEvents) + if err != nil { + return errors.Wrap(err, "svc.saveBlockProvenEvents") + } - return nil - }) + return nil + }) - wg.Go(func() error { - blockProposedEvents, err := svc.taikol1.FilterBlockProposed(filterOpts, nil) - if err != nil { - return errors.Wrap(err, "svc.taikol1.FilterBlockProposed") - } + wg.Go(func() error { + blockProposedEvents, err := svc.taikol1.FilterBlockProposed(filterOpts, nil, nil) + if err != nil { + return errors.Wrap(err, "svc.taikol1.FilterBlockProposed") + } - err = svc.saveBlockProposedEvents(ctx, chainID, blockProposedEvents) - if err != nil { - return errors.Wrap(err, "svc.saveBlockProposedEvents") - } + err = svc.saveBlockProposedEvents(ctx, chainID, blockProposedEvents) + if err != nil { + return errors.Wrap(err, "svc.saveBlockProposedEvents") + } - return nil - }) + return nil + }) - wg.Go(func() error { - blockVerifiedEvents, err := svc.taikol1.FilterBlockVerified(filterOpts, nil) - if err != nil { - return errors.Wrap(err, "svc.taikol1.FilterBlockVerified") - } + wg.Go(func() error { + blockVerifiedEvents, err := svc.taikol1.FilterBlockVerified(filterOpts, nil) + if err != nil { + return errors.Wrap(err, "svc.taikol1.FilterBlockVerified") + } - err = svc.saveBlockVerifiedEvents(ctx, chainID, blockVerifiedEvents) - if err != nil { - return errors.Wrap(err, "svc.saveBlockVerifiedEvents") - } + err = svc.saveBlockVerifiedEvents(ctx, chainID, blockVerifiedEvents) + if err != nil { + return errors.Wrap(err, "svc.saveBlockVerifiedEvents") + } + + return nil + }) + } - return nil - }) + if svc.bridge != nil { + wg.Go(func() error { + messagesSent, err := svc.bridge.FilterMessageSent(filterOpts, nil) + if err != nil { + return errors.Wrap(err, "svc.bridge.FilterMessageSent") + } - wg.Go(func() error { - messagesSent, err := svc.bridge.FilterMessageSent(filterOpts, nil) - if err != nil { - return errors.Wrap(err, "svc.bridge.FilterMessageSent") - } + err = svc.saveMessageSentEvents(ctx, chainID, messagesSent) + if err != nil { + return errors.Wrap(err, "svc.saveMessageSentEvents") + } - err = svc.saveMessageSentEvents(ctx, chainID, messagesSent) - if err != nil { - return errors.Wrap(err, "svc.saveMessageSentEvents") - } + return nil + }) + } + + if svc.proverPool != nil { + wg.Go(func() error { + slashedEvents, err := svc.proverPool.FilterSlashed(filterOpts, nil) + if err != nil { + return errors.Wrap(err, "svc.proverPool.FilterSlashed") + } + + err = svc.saveSlashedEvents(ctx, chainID, slashedEvents) + if err != nil { + return errors.Wrap(err, "svc.saveSlashedEvents") + } + + return nil + }) + + wg.Go(func() error { + stakedEvents, err := svc.proverPool.FilterStaked(filterOpts, nil) + if err != nil { + return errors.Wrap(err, "svc.proverPool.FilterStaked") + } + + err = svc.saveStakedEvents(ctx, chainID, stakedEvents) + if err != nil { + return errors.Wrap(err, "svc.saveStakedEvents") + } + + return nil + }) + + wg.Go(func() error { + exitedEvents, err := svc.proverPool.FilterExited(filterOpts, nil) + if err != nil { + return errors.Wrap(err, "svc.proverPool.FilterExited") + } + + err = svc.saveExitedEvents(ctx, chainID, exitedEvents) + if err != nil { + return errors.Wrap(err, "svc.saveExitedEvents") + } + + return nil + }) - return nil - }) + wg.Go(func() error { + withdrawnEvents, err := svc.proverPool.FilterWithdrawn(filterOpts, nil) + if err != nil { + return errors.Wrap(err, "svc.proverPool.FilterWithdrawn") + } + + err = svc.saveWithdrawnEvents(ctx, chainID, withdrawnEvents) + if err != nil { + return errors.Wrap(err, "svc.saveWithdrawnEvents") + } + return nil + }) + } + + if svc.indexNfts { + wg.Go(func() error { + if err := svc.indexNFTTransfers(ctx, chainID, filterOpts.Start, *filterOpts.End); err != nil { + return errors.Wrap(err, "svc.indexNFTTransfers") + } + return nil + }) + } err := wg.Wait() if err != nil { if errors.Is(err, context.Canceled) { - log.Error("context cancelled") + slog.Error("context cancelled") return err } @@ -121,6 +193,42 @@ func L2FilterFunc( return nil }) + + wg.Go(func() error { + liquidityAdded, err := swap.FilterMint(filterOpts, nil) + + if err != nil { + return errors.Wrap(err, "svc.bridge.FilterMint") + } + + // only save ones above 0.1 ETH, this is only for Galaxe + // and we dont care about the rest + err = svc.saveLiquidityAddedEvents(ctx, chainID, liquidityAdded) + if err != nil { + return errors.Wrap(err, "svc.saveLiquidityAddedEvents") + } + + return nil + }) + } + + if svc.indexNfts { + wg.Go(func() error { + if err := svc.indexNFTTransfers(ctx, chainID, filterOpts.Start, *filterOpts.End); err != nil { + return errors.Wrap(err, "svc.indexNFTTransfers") + } + return nil + }) + } + + err := wg.Wait() + if err != nil { + if errors.Is(err, context.Canceled) { + slog.Error("context cancelled") + return err + } + + return err } return nil diff --git a/packages/eventindexer/indexer/filter_then_subscribe.go b/packages/eventindexer/indexer/filter_then_subscribe.go index 1eb27b8b0e2..c2d4552f6c6 100644 --- a/packages/eventindexer/indexer/filter_then_subscribe.go +++ b/packages/eventindexer/indexer/filter_then_subscribe.go @@ -5,9 +5,10 @@ import ( "fmt" "math/big" + "log/slog" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/taikoxyz/taiko-mono/packages/eventindexer" ) @@ -36,15 +37,15 @@ func (svc *Service) FilterThenSubscribe( } if svc.processingBlockHeight == header.Number.Uint64() { - log.Infof("chain ID %v caught up, subscribing to new incoming events", chainID.Uint64()) + slog.Info("indexing caught up subscribing to new incoming events", "chainID", chainID.Uint64()) return svc.subscribe(ctx, chainID) } - log.Infof("chain ID %v getting events between %v and %v in batches of %v", - chainID.Uint64(), - svc.processingBlockHeight, - header.Number.Int64(), - svc.blockBatchSize, + slog.Info("getting batch of events", + "chainID", chainID.Uint64(), + "startBlock", svc.processingBlockHeight, + "endBlock", header.Number.Int64(), + "batchSize", svc.blockBatchSize, ) for i := svc.processingBlockHeight; i < header.Number.Uint64(); i += svc.blockBatchSize { @@ -78,7 +79,7 @@ func (svc *Service) FilterThenSubscribe( return errors.Wrap(err, "svc.ethClient.HeaderByNumber") } - log.Infof("setting last processed block to height: %v, hash: %v", end, header.Hash().Hex()) + slog.Info("setting last processed block", "height", end, "hash", header.Hash().Hex()) if err := svc.blockRepo.Save(eventindexer.SaveBlockOpts{ Height: uint64(end), @@ -93,9 +94,9 @@ func (svc *Service) FilterThenSubscribe( svc.processingBlockHeight = uint64(end) } - log.Infof( - "chain id %v indexer fully caught up, checking latest block number to see if it's advanced", - chainID.Uint64(), + slog.Info( + "fully caught up, checking blockNumber to see if advanced", + "chainID", chainID.Uint64(), ) latestBlock, err := svc.ethClient.HeaderByNumber(ctx, nil) diff --git a/packages/eventindexer/indexer/index_nft_transfers.go b/packages/eventindexer/indexer/index_nft_transfers.go new file mode 100644 index 00000000000..8ca16608689 --- /dev/null +++ b/packages/eventindexer/indexer/index_nft_transfers.go @@ -0,0 +1,244 @@ +package indexer + +import ( + "context" + "fmt" + "math/big" + "strings" + + "log/slog" + + "github.com/ethereum/go-ethereum" + "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/pkg/errors" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" + "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/erc1155" +) + +var ( + logTransferSignature = []byte("Transfer(address,address,uint256)") + logTransferSigHash = crypto.Keccak256Hash(logTransferSignature) + transferSingleSignature = []byte("TransferSingle(address,address,address,uint256,uint256)") + transferSingleSignatureHash = crypto.Keccak256Hash(transferSingleSignature) + transferBatchSignature = []byte("TransferBatch(address,address,address,uint256[],uint256[])") + transferBatchSignatureHash = crypto.Keccak256Hash(transferBatchSignature) +) + +// indexNFTTransfers indexes from a given starting block to a given end block and parses all event logs +// to find ERC721 or ERC1155 transfer events +func (svc *Service) indexNFTTransfers( + ctx context.Context, + chainID *big.Int, + start uint64, + end uint64, +) error { + query := ethereum.FilterQuery{ + FromBlock: big.NewInt(int64(start)), + ToBlock: big.NewInt(int64(end)), + } + + logs, err := svc.ethClient.FilterLogs(ctx, query) + if err != nil { + return err + } + + for _, vLog := range logs { + if !svc.isERC721Transfer(ctx, vLog) && !svc.isERC1155Transfer(ctx, vLog) { + continue + } + + if err := svc.saveNFTTransfer(ctx, chainID, vLog); err != nil { + return err + } + } + + return nil +} + +// isERC1155Transfer determines whether a given log is a valid ERC1155 transfer event +func (svc *Service) isERC1155Transfer(ctx context.Context, vLog types.Log) bool { + // malformed event + if len(vLog.Topics) == 0 { + return false + } + + // the first topic is ALWAYS the hash of the event signature. + // this is how people are expected to look up which event is which. + if vLog.Topics[0].Hex() != transferSingleSignatureHash.Hex() && + vLog.Topics[0].Hex() != transferBatchSignatureHash.Hex() { + return false + } + + return true +} + +// isERC721Transfer determines whether a given log is a valid ERC721 transfer event +func (svc *Service) isERC721Transfer(ctx context.Context, vLog types.Log) bool { + // malformed event + if len(vLog.Topics) == 0 { + return false + } + + // the first topic is ALWAYS the hash of the event signature. + // this is how people are expected to look up which event is which. + if vLog.Topics[0].Hex() != logTransferSigHash.Hex() { + return false + } + + // erc20 transfer length will be 3, nft will be 4, only way to + // differentiate them + if len(vLog.Topics) != 4 { + return false + } + + return true +} + +// saveNFTTrasnfer parses the event logs and saves either an ERC721 or ERC1155 event, updating +// users balances +func (svc *Service) saveNFTTransfer(ctx context.Context, chainID *big.Int, vLog types.Log) error { + if svc.isERC721Transfer(ctx, vLog) { + return svc.saveERC721Transfer(ctx, chainID, vLog) + } + + if svc.isERC1155Transfer(ctx, vLog) { + return svc.saveERC1155Transfer(ctx, chainID, vLog) + } + + return errors.New("nftTransferVlog not ERC721 or ERC1155") +} + +// saveERC721Transfer updates the user's balances on the from and to of a ERC721 transfer event +func (svc *Service) saveERC721Transfer(ctx context.Context, chainID *big.Int, vLog types.Log) error { + from := fmt.Sprintf("0x%v", common.Bytes2Hex(vLog.Topics[1].Bytes()[12:])) + + to := fmt.Sprintf("0x%v", common.Bytes2Hex(vLog.Topics[2].Bytes()[12:])) + + tokenID := vLog.Topics[3].Big().Int64() + + slog.Info( + "erc721 transfer found", + "from", from, + "to", to, + "tokenID", tokenID, + "contractAddress", vLog.Address.Hex(), + ) + + // increment To address's balance + + _, err := svc.nftBalanceRepo.IncreaseBalance(ctx, eventindexer.UpdateNFTBalanceOpts{ + ChainID: chainID.Int64(), + Address: to, + TokenID: tokenID, + ContractAddress: vLog.Address.Hex(), + ContractType: "ERC721", + Amount: 1, // ERC721 is always 1 + }) + if err != nil { + return err + } + + // decrement From address's balance + // ignore zero address since that is usually the "mint" + if from != ZeroAddress.Hex() { + _, err = svc.nftBalanceRepo.SubtractBalance(ctx, eventindexer.UpdateNFTBalanceOpts{ + ChainID: chainID.Int64(), + Address: from, + TokenID: tokenID, + ContractAddress: vLog.Address.Hex(), + ContractType: "ERC721", + Amount: 1, // ERC721 is always 1 + }) + if err != nil { + return err + } + } + + return nil +} + +// saveERC1155Transfer parses and saves either a TransferSingle or TransferBatch event to +// the database and updates the user's balances +func (svc *Service) saveERC1155Transfer(ctx context.Context, chainID *big.Int, vLog types.Log) error { + from := fmt.Sprintf("0x%v", common.Bytes2Hex(vLog.Topics[2].Bytes()[12:])) + + to := fmt.Sprintf("0x%v", common.Bytes2Hex(vLog.Topics[3].Bytes()[12:])) + + slog.Info("erc1155 found") + + type transfer struct { + ID *big.Int `abi:"id"` + Amount *big.Int `abi:"value"` + } + + var transfers []transfer + + erc1155ABI, err := abi.JSON(strings.NewReader(erc1155.ABI)) + if err != nil { + return err + } + + if vLog.Topics[0].Hex() == transferSingleSignatureHash.Hex() { + var t transfer + + err = erc1155ABI.UnpackIntoInterface(&t, "TransferSingle", []byte(vLog.Data)) + if err != nil { + return err + } + + transfers = append(transfers, t) + } else if vLog.Topics[0].Hex() != transferBatchSignatureHash.Hex() { + var t []transfer + + err = erc1155ABI.UnpackIntoInterface(&t, "TransferBatch", []byte(vLog.Data)) + if err != nil { + return err + } + + transfers = t + } + + slog.Info( + "erc1155 transfer found", + "from", from, + "to", to, + "transfers", transfers, + "contractAddress", vLog.Address.Hex(), + ) + + // increment To address's balance + + for _, transfer := range transfers { + _, err = svc.nftBalanceRepo.IncreaseBalance(ctx, eventindexer.UpdateNFTBalanceOpts{ + ChainID: chainID.Int64(), + Address: to, + TokenID: transfer.ID.Int64(), + ContractAddress: vLog.Address.Hex(), + ContractType: "ERC1155", + Amount: transfer.Amount.Int64(), + }) + if err != nil { + return err + } + + if from != ZeroAddress.Hex() { + // decrement From address's balance + _, err = svc.nftBalanceRepo.SubtractBalance(ctx, eventindexer.UpdateNFTBalanceOpts{ + ChainID: chainID.Int64(), + Address: from, + TokenID: transfer.ID.Int64(), + ContractAddress: vLog.Address.Hex(), + ContractType: "ERC1155", + Amount: transfer.Amount.Int64(), + }) + if err != nil { + return err + } + } + } + + return nil +} diff --git a/packages/eventindexer/indexer/save_block_proposed_event.go b/packages/eventindexer/indexer/save_block_proposed_event.go index 32c0bf46727..a34e36ebab9 100644 --- a/packages/eventindexer/indexer/save_block_proposed_event.go +++ b/packages/eventindexer/indexer/save_block_proposed_event.go @@ -5,9 +5,10 @@ import ( "encoding/json" "math/big" + "log/slog" + "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/taikoxyz/taiko-mono/packages/eventindexer" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/taikol1" ) @@ -18,14 +19,14 @@ func (svc *Service) saveBlockProposedEvents( events *taikol1.TaikoL1BlockProposedIterator, ) error { if !events.Next() || events.Event == nil { - log.Infof("no blockProposed events") + slog.Info("no blockProposed events") return nil } for { event := events.Event - if err := svc.detectAndHandleReorg(ctx, eventindexer.EventNameBlockProposed, event.Id.Int64()); err != nil { + if err := svc.detectAndHandleReorg(ctx, eventindexer.EventNameBlockProposed, event.BlockId.Int64()); err != nil { return errors.Wrap(err, "svc.detectAndHandleReorg") } @@ -39,8 +40,6 @@ func (svc *Service) saveBlockProposedEvents( return errors.Wrap(err, "svc.ethClient.TransactionSender") } - log.Infof("blockProposed by: %v", sender.Hex()) - if err := svc.saveBlockProposedEvent(ctx, chainID, event, sender); err != nil { eventindexer.BlockProposedEventsProcessedError.Inc() @@ -59,22 +58,25 @@ func (svc *Service) saveBlockProposedEvent( event *taikol1.TaikoL1BlockProposed, sender common.Address, ) error { - log.Info("blockProposed event found") + slog.Info("blockProposed", "proposer", sender.Hex()) marshaled, err := json.Marshal(event) if err != nil { return errors.Wrap(err, "json.Marshal(event)") } - blockID := event.Id.Int64() + blockID := event.BlockId.Int64() + + assignedProver := event.AssignedProver.Hex() _, err = svc.eventRepo.Save(ctx, eventindexer.SaveEventOpts{ - Name: eventindexer.EventNameBlockProposed, - Data: string(marshaled), - ChainID: chainID, - Event: eventindexer.EventNameBlockProposed, - Address: sender.Hex(), - BlockID: &blockID, + Name: eventindexer.EventNameBlockProposed, + Data: string(marshaled), + ChainID: chainID, + Event: eventindexer.EventNameBlockProposed, + Address: sender.Hex(), + BlockID: &blockID, + AssignedProver: &assignedProver, }) if err != nil { return errors.Wrap(err, "svc.eventRepo.Save") diff --git a/packages/eventindexer/indexer/save_block_proven_event.go b/packages/eventindexer/indexer/save_block_proven_event.go index e3acee897bb..40c5d93ea61 100644 --- a/packages/eventindexer/indexer/save_block_proven_event.go +++ b/packages/eventindexer/indexer/save_block_proven_event.go @@ -5,9 +5,10 @@ import ( "encoding/json" "math/big" + "log/slog" + "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/taikoxyz/taiko-mono/packages/eventindexer" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/taikol1" ) @@ -23,19 +24,17 @@ func (svc *Service) saveBlockProvenEvents( events *taikol1.TaikoL1BlockProvenIterator, ) error { if !events.Next() || events.Event == nil { - log.Infof("no blockProven events") + slog.Info("no blockProven events") return nil } for { event := events.Event - if err := svc.detectAndHandleReorg(ctx, eventindexer.EventNameBlockProven, event.Id.Int64()); err != nil { + if err := svc.detectAndHandleReorg(ctx, eventindexer.EventNameBlockProven, event.BlockId.Int64()); err != nil { return errors.Wrap(err, "svc.detectAndHandleReorg") } - log.Infof("blockProven by: %v", event.Prover.Hex()) - if err := svc.saveBlockProvenEvent(ctx, chainID, event); err != nil { eventindexer.BlockProvenEventsProcessedError.Inc() @@ -53,14 +52,16 @@ func (svc *Service) saveBlockProvenEvent( chainID *big.Int, event *taikol1.TaikoL1BlockProven, ) error { - log.Infof("blockProven event found, id: %v", event.Id.Int64()) + slog.Info("blockProven event found", + "blockID", event.BlockId.Int64(), + "prover", event.Prover.Hex()) marshaled, err := json.Marshal(event) if err != nil { return errors.Wrap(err, "json.Marshal(event)") } - blockID := event.Id.Int64() + blockID := event.BlockId.Int64() _, err = svc.eventRepo.Save(ctx, eventindexer.SaveEventOpts{ Name: eventindexer.EventNameBlockProven, @@ -86,7 +87,7 @@ func (svc *Service) saveBlockProvenEvent( } func (svc *Service) updateAverageProofTime(ctx context.Context, event *taikol1.TaikoL1BlockProven) error { - block, err := svc.taikol1.GetBlock(nil, event.Id) + block, err := svc.taikol1.GetBlock(nil, event.BlockId) // will be unable to GetBlock for older blocks, just return nil, we dont // care about averageProofTime that much to be honest for older blocks if err != nil { @@ -120,13 +121,20 @@ func (svc *Service) updateAverageProofTime(ctx context.Context, event *taikol1.T new(big.Int).SetUint64(proofTime), ) - log.Infof("avgProofTime update: id: %v, prover: %v, proposedAt: %v, provenAt: %v, proofTIme: %v, avg: %v, newAvg: %v", - event.Id.Int64(), + slog.Info("avgProofWindow update", + "id", + event.BlockId.Int64(), + "prover", event.Prover.Hex(), + "proposedAt", proposedAt, + "provenAt", provenAt, + "proofTime", proofTime, + "avg", avg.String(), + "newAvg", newAverageProofTime.String(), ) diff --git a/packages/eventindexer/indexer/save_block_verified_event.go b/packages/eventindexer/indexer/save_block_verified_event.go index cc930013f89..eaec389feb6 100644 --- a/packages/eventindexer/indexer/save_block_verified_event.go +++ b/packages/eventindexer/indexer/save_block_verified_event.go @@ -5,6 +5,8 @@ import ( "encoding/json" "math/big" + "log/slog" + "github.com/pkg/errors" log "github.com/sirupsen/logrus" "github.com/taikoxyz/taiko-mono/packages/eventindexer" @@ -17,16 +19,14 @@ func (svc *Service) saveBlockVerifiedEvents( events *taikol1.TaikoL1BlockVerifiedIterator, ) error { if !events.Next() || events.Event == nil { - log.Infof("no BlockVerified events") + slog.Info("no BlockVerified events") return nil } for { event := events.Event - log.Infof("new blockVerified event, blockId: %v", event.Id) - - if err := svc.detectAndHandleReorg(ctx, eventindexer.EventNameBlockVerified, event.Id.Int64()); err != nil { + if err := svc.detectAndHandleReorg(ctx, eventindexer.EventNameBlockVerified, event.BlockId.Int64()); err != nil { return errors.Wrap(err, "svc.detectAndHandleReorg") } @@ -47,12 +47,14 @@ func (svc *Service) saveBlockVerifiedEvent( chainID *big.Int, event *taikol1.TaikoL1BlockVerified, ) error { + slog.Info("new blockVerified event", "blockID", event.BlockId.Int64()) + marshaled, err := json.Marshal(event) if err != nil { return errors.Wrap(err, "json.Marshal(event)") } - blockID := event.Id.Int64() + blockID := event.BlockId.Int64() _, err = svc.eventRepo.Save(ctx, eventindexer.SaveEventOpts{ Name: eventindexer.EventNameBlockVerified, @@ -76,7 +78,7 @@ func (svc *Service) saveBlockVerifiedEvent( } func (svc *Service) updateAverageBlockReward(ctx context.Context, event *taikol1.TaikoL1BlockVerified) error { - reward := event.Reward + reward := event.ProofReward stat, err := svc.statRepo.Find(ctx) if err != nil { @@ -94,7 +96,7 @@ func (svc *Service) updateAverageBlockReward(ctx context.Context, event *taikol1 new(big.Int).SetUint64(reward), ) log.Infof("blockVerified reward update. id: %v, newAvg: %v, oldAvg: %v, reward: %v", - event.Id.String(), + event.BlockId.String(), newAverageProofReward.String(), avg.String(), reward, diff --git a/packages/eventindexer/indexer/save_exited_event.go b/packages/eventindexer/indexer/save_exited_event.go new file mode 100644 index 00000000000..7de130828d0 --- /dev/null +++ b/packages/eventindexer/indexer/save_exited_event.go @@ -0,0 +1,73 @@ +package indexer + +import ( + "context" + "encoding/json" + "math/big" + "strconv" + + "log/slog" + + "github.com/pkg/errors" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" + "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/proverpool" +) + +func (svc *Service) saveExitedEvents( + ctx context.Context, + chainID *big.Int, + events *proverpool.ProverPoolExitedIterator, +) error { + if !events.Next() || events.Event == nil { + slog.Info("no Exited events") + return nil + } + + for { + event := events.Event + + slog.Info("new Exited event", + "address", + event.Addr.Hex(), + "amount", + strconv.FormatUint(event.Amount, 10), + ) + + if err := svc.saveExitedEvent(ctx, chainID, event); err != nil { + eventindexer.ExitedEventsProcessedError.Inc() + + return errors.Wrap(err, "svc.saveExitedEvent") + } + + if !events.Next() { + return nil + } + } +} + +func (svc *Service) saveExitedEvent( + ctx context.Context, + chainID *big.Int, + event *proverpool.ProverPoolExited, +) error { + marshaled, err := json.Marshal(event) + if err != nil { + return errors.Wrap(err, "json.Marshal(event)") + } + + _, err = svc.eventRepo.Save(ctx, eventindexer.SaveEventOpts{ + Name: eventindexer.EventNameExited, + Data: string(marshaled), + ChainID: chainID, + Event: eventindexer.EventNameExited, + Address: event.Addr.Hex(), + Amount: new(big.Int).SetUint64(event.Amount), + }) + if err != nil { + return errors.Wrap(err, "svc.eventRepo.Save") + } + + eventindexer.ExitedEventsProcessed.Inc() + + return nil +} diff --git a/packages/eventindexer/indexer/save_liquidity_added_event.go b/packages/eventindexer/indexer/save_liquidity_added_event.go new file mode 100644 index 00000000000..8dd0dacf16a --- /dev/null +++ b/packages/eventindexer/indexer/save_liquidity_added_event.go @@ -0,0 +1,95 @@ +package indexer + +import ( + "context" + "encoding/json" + "math/big" + + "log/slog" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" + "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/swap" +) + +var ( + minLiquidityAddedAmount = big.NewInt(100000000000000000) +) + +func (svc *Service) saveLiquidityAddedEvents( + ctx context.Context, + chainID *big.Int, + events *swap.SwapMintIterator, +) error { + if !events.Next() || events.Event == nil { + slog.Info("no LiquidityAdded events") + return nil + } + + for { + event := events.Event + + if err := svc.saveLiquidityAddedEvent(ctx, chainID, event); err != nil { + eventindexer.LiquidityAddedEventsProcessedError.Inc() + + return errors.Wrap(err, "svc.saveSwapEvent") + } + + if !events.Next() { + return nil + } + } +} + +func (svc *Service) saveLiquidityAddedEvent( + ctx context.Context, + chainID *big.Int, + event *swap.SwapMint, +) error { + tx, _, err := svc.ethClient.TransactionByHash(ctx, event.Raw.TxHash) + if err != nil { + return err + } + + from, err := types.Sender(types.LatestSignerForChainID(tx.ChainId()), tx) + if err != nil { + return err + } + + slog.Info("liquidityAdded event for", + "sender", from.Hex(), + "amount0", event.Amount0.String(), + "amount1", event.Amount1.String(), + ) + + // we only want events with > 0.1 ETH swap + if event.Amount0.Cmp(minLiquidityAddedAmount) <= 0 && event.Amount1.Cmp(minLiquidityAddedAmount) <= 0 { + slog.Info("skipping liquidityAdded event, min trade too low", + "amount0", event.Amount0.String(), + "amount1", event.Amount1.String(), + ) + + return nil + } + + marshaled, err := json.Marshal(event) + if err != nil { + return errors.Wrap(err, "json.Marshal(event)") + } + + _, err = svc.eventRepo.Save(ctx, eventindexer.SaveEventOpts{ + Name: eventindexer.EventNameMint, + Data: string(marshaled), + ChainID: chainID, + Event: eventindexer.EventNameMint, + Address: from.Hex(), + }) + if err != nil { + return errors.Wrap(err, "svc.eventRepo.Save") + } + + eventindexer.LiquidityAddedEventsProcessed.Inc() + + return nil +} diff --git a/packages/eventindexer/indexer/save_message_sent_event.go b/packages/eventindexer/indexer/save_message_sent_event.go index 2d9eb2d6fd8..dd0b76d486b 100644 --- a/packages/eventindexer/indexer/save_message_sent_event.go +++ b/packages/eventindexer/indexer/save_message_sent_event.go @@ -5,9 +5,10 @@ import ( "encoding/json" "math/big" + "log/slog" + "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/taikoxyz/taiko-mono/packages/eventindexer" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/bridge" ) @@ -23,14 +24,14 @@ func (svc *Service) saveMessageSentEvents( events *bridge.BridgeMessageSentIterator, ) error { if !events.Next() || events.Event == nil { - log.Infof("no MessageSent events") + slog.Info("no MessageSent events") return nil } for { event := events.Event - log.Infof("new messageSent event for owner: %v", event.Message.Owner.Hex()) + slog.Info("new messageSent event", "owner", event.Message.Owner.Hex()) if err := svc.saveMessageSentEvent(ctx, chainID, event); err != nil { eventindexer.MessageSentEventsProcessedError.Inc() @@ -51,14 +52,16 @@ func (svc *Service) saveMessageSentEvent( ) error { // only save eth transfers if event.Message.Data != nil && common.BytesToHash(event.Message.Data) != zeroHash { - log.Info("skipping message sent event, is not eth transfer") + slog.Info("skipping message sent event, is not eth transfer") return nil } // amount must be >= 0.15 eth if event.Message.DepositValue.Cmp(minEthAmount) < 0 { - log.Infof("skipping message sent event, value: %v, requiredValue: %v", + slog.Info("skipping message sent event", + "value", event.Message.DepositValue.String(), + "requiredValue", minEthAmount.String(), ) diff --git a/packages/eventindexer/indexer/save_slashed_event.go b/packages/eventindexer/indexer/save_slashed_event.go new file mode 100644 index 00000000000..c45acf7a746 --- /dev/null +++ b/packages/eventindexer/indexer/save_slashed_event.go @@ -0,0 +1,71 @@ +package indexer + +import ( + "context" + "encoding/json" + "math/big" + "strconv" + + "log/slog" + + "github.com/pkg/errors" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" + "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/proverpool" +) + +func (svc *Service) saveSlashedEvents( + ctx context.Context, + chainID *big.Int, + events *proverpool.ProverPoolSlashedIterator, +) error { + if !events.Next() || events.Event == nil { + slog.Info("no Slashed events") + return nil + } + + for { + event := events.Event + + slog.Info("new slashed event", + "address", event.Addr.Hex(), + "amount", strconv.FormatUint(event.Amount, 10), + ) + + if err := svc.saveSlashedEvent(ctx, chainID, event); err != nil { + eventindexer.SlashedEventsProcessedError.Inc() + + return errors.Wrap(err, "svc.saveSlashedEvent") + } + + if !events.Next() { + return nil + } + } +} + +func (svc *Service) saveSlashedEvent( + ctx context.Context, + chainID *big.Int, + event *proverpool.ProverPoolSlashed, +) error { + marshaled, err := json.Marshal(event) + if err != nil { + return errors.Wrap(err, "json.Marshal(event)") + } + + _, err = svc.eventRepo.Save(ctx, eventindexer.SaveEventOpts{ + Name: eventindexer.EventNameSlashed, + Data: string(marshaled), + ChainID: chainID, + Event: eventindexer.EventNameSlashed, + Address: event.Addr.Hex(), + Amount: new(big.Int).SetUint64(event.Amount), + }) + if err != nil { + return errors.Wrap(err, "svc.eventRepo.Save") + } + + eventindexer.SlashedEventsProcessed.Inc() + + return nil +} diff --git a/packages/eventindexer/indexer/save_staked_event.go b/packages/eventindexer/indexer/save_staked_event.go new file mode 100644 index 00000000000..70956d4a092 --- /dev/null +++ b/packages/eventindexer/indexer/save_staked_event.go @@ -0,0 +1,71 @@ +package indexer + +import ( + "context" + "encoding/json" + "math/big" + "strconv" + + "log/slog" + + "github.com/pkg/errors" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" + "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/proverpool" +) + +func (svc *Service) saveStakedEvents( + ctx context.Context, + chainID *big.Int, + events *proverpool.ProverPoolStakedIterator, +) error { + if !events.Next() || events.Event == nil { + slog.Info("no Staked events") + return nil + } + + for { + event := events.Event + + slog.Info("new Staked event", + "address", event.Addr.Hex(), + "amount", strconv.FormatUint(event.Amount, 10), + ) + + if err := svc.saveStakedEvent(ctx, chainID, event); err != nil { + eventindexer.StakedEventsProcessedError.Inc() + + return errors.Wrap(err, "svc.saveStakedEvent") + } + + if !events.Next() { + return nil + } + } +} + +func (svc *Service) saveStakedEvent( + ctx context.Context, + chainID *big.Int, + event *proverpool.ProverPoolStaked, +) error { + marshaled, err := json.Marshal(event) + if err != nil { + return errors.Wrap(err, "json.Marshal(event)") + } + + _, err = svc.eventRepo.Save(ctx, eventindexer.SaveEventOpts{ + Name: eventindexer.EventNameStaked, + Data: string(marshaled), + ChainID: chainID, + Event: eventindexer.EventNameStaked, + Address: event.Addr.Hex(), + Amount: new(big.Int).SetUint64(event.Amount), + }) + if err != nil { + return errors.Wrap(err, "svc.eventRepo.Save") + } + + eventindexer.StakedEventsProcessed.Inc() + + return nil +} diff --git a/packages/eventindexer/indexer/save_swap_event.go b/packages/eventindexer/indexer/save_swap_event.go index bc994b79d26..621b830c3a6 100644 --- a/packages/eventindexer/indexer/save_swap_event.go +++ b/packages/eventindexer/indexer/save_swap_event.go @@ -6,9 +6,10 @@ import ( "fmt" "math/big" + "log/slog" + "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/taikoxyz/taiko-mono/packages/eventindexer" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/swap" ) @@ -23,7 +24,7 @@ func (svc *Service) saveSwapEvents( events *swap.SwapSwapIterator, ) error { if !events.Next() || events.Event == nil { - log.Infof("no Swap events") + slog.Info("no Swap events") return nil } @@ -47,16 +48,16 @@ func (svc *Service) saveSwapEvent( chainID *big.Int, event *swap.SwapSwap, ) error { - log.Infof("swap event for sender 0x%v, amount: %v", - common.Bytes2Hex(event.Raw.Topics[2].Bytes()[12:]), - event.Amount0In.String(), + slog.Info("swap event", + "sender", fmt.Sprintf("0x%v", common.Bytes2Hex(event.Raw.Topics[2].Bytes()[12:])), + "amount", event.Amount0In.String(), ) // we only want events with > 0.1 ETH swap if event.Amount0In.Cmp(minTradeAmount) <= 0 && event.Amount1Out.Cmp(minTradeAmount) <= 0 { - log.Infof("skipping skip event, min trade too low. amountIn: %v, amountOut: %v", - event.Amount0In.String(), - event.Amount1Out.String(), + slog.Info("skipping skip event, min trade too low", + "amount0", event.Amount0In.String(), + "amount1", event.Amount1Out.String(), ) return nil diff --git a/packages/eventindexer/indexer/save_withdrawn_event.go b/packages/eventindexer/indexer/save_withdrawn_event.go new file mode 100644 index 00000000000..df2db547b9a --- /dev/null +++ b/packages/eventindexer/indexer/save_withdrawn_event.go @@ -0,0 +1,70 @@ +package indexer + +import ( + "context" + "encoding/json" + "log/slog" + "math/big" + "strconv" + + "github.com/pkg/errors" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" + "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/proverpool" +) + +func (svc *Service) saveWithdrawnEvents( + ctx context.Context, + chainID *big.Int, + events *proverpool.ProverPoolWithdrawnIterator, +) error { + if !events.Next() || events.Event == nil { + slog.Info("no Withdrawn events") + return nil + } + + for { + event := events.Event + + slog.Info("new Withdrawn event", + "address", event.Addr.Hex(), + "amount", strconv.FormatUint(event.Amount, 10), + ) + + if err := svc.saveWithdrawnEvent(ctx, chainID, event); err != nil { + eventindexer.WithdrawnEventsProcessedError.Inc() + + return errors.Wrap(err, "svc.saveWithdrawnEvent") + } + + if !events.Next() { + return nil + } + } +} + +func (svc *Service) saveWithdrawnEvent( + ctx context.Context, + chainID *big.Int, + event *proverpool.ProverPoolWithdrawn, +) error { + marshaled, err := json.Marshal(event) + if err != nil { + return errors.Wrap(err, "json.Marshal(event)") + } + + _, err = svc.eventRepo.Save(ctx, eventindexer.SaveEventOpts{ + Name: eventindexer.EventNameWithdrawn, + Data: string(marshaled), + ChainID: chainID, + Event: eventindexer.EventNameWithdrawn, + Address: event.Addr.Hex(), + Amount: new(big.Int).SetUint64(event.Amount), + }) + if err != nil { + return errors.Wrap(err, "svc.eventRepo.Save") + } + + eventindexer.WithdrawnEventsProcessed.Inc() + + return nil +} diff --git a/packages/eventindexer/indexer/service.go b/packages/eventindexer/indexer/service.go index 14304f27f36..7a908ae4219 100644 --- a/packages/eventindexer/indexer/service.go +++ b/packages/eventindexer/indexer/service.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/taikoxyz/taiko-mono/packages/eventindexer" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/bridge" + "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/proverpool" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/swap" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/taikol1" ) @@ -18,32 +19,39 @@ var ( ) type Service struct { - eventRepo eventindexer.EventRepository - blockRepo eventindexer.BlockRepository - statRepo eventindexer.StatRepository - ethClient *ethclient.Client + eventRepo eventindexer.EventRepository + blockRepo eventindexer.BlockRepository + statRepo eventindexer.StatRepository + nftBalanceRepo eventindexer.NFTBalanceRepository + ethClient *ethclient.Client processingBlockHeight uint64 blockBatchSize uint64 subscriptionBackoff time.Duration - taikol1 *taikol1.TaikoL1 - bridge *bridge.Bridge - swaps []*swap.Swap + taikol1 *taikol1.TaikoL1 + proverPool *proverpool.ProverPool + bridge *bridge.Bridge + swaps []*swap.Swap + + indexNfts bool } type NewServiceOpts struct { EventRepo eventindexer.EventRepository BlockRepo eventindexer.BlockRepository StatRepo eventindexer.StatRepository + NFTBalanceRepo eventindexer.NFTBalanceRepository EthClient *ethclient.Client RPCClient *rpc.Client SrcTaikoAddress common.Address + ProverPoolAddress common.Address SrcBridgeAddress common.Address SrcSwapAddresses []common.Address BlockBatchSize uint64 SubscriptionBackoff time.Duration + IndexNFTs bool } func NewService(opts NewServiceOpts) (*Service, error) { @@ -51,6 +59,10 @@ func NewService(opts NewServiceOpts) (*Service, error) { return nil, eventindexer.ErrNoEventRepository } + if opts.IndexNFTs && opts.NFTBalanceRepo == nil { + return nil, eventindexer.ErrNoNFTBalanceRepository + } + if opts.EthClient == nil { return nil, eventindexer.ErrNoEthClient } @@ -92,16 +104,28 @@ func NewService(opts NewServiceOpts) (*Service, error) { } } + var proverPool *proverpool.ProverPool + if opts.ProverPoolAddress.Hex() != ZeroAddress.Hex() { + proverPool, err = proverpool.NewProverPool(opts.ProverPoolAddress, opts.EthClient) + if err != nil { + return nil, errors.Wrap(err, "proverpool.NewProverPool") + } + } + return &Service{ - eventRepo: opts.EventRepo, - blockRepo: opts.BlockRepo, - statRepo: opts.StatRepo, - ethClient: opts.EthClient, - taikol1: taikoL1, - bridge: bridgeContract, - swaps: swapContracts, + eventRepo: opts.EventRepo, + blockRepo: opts.BlockRepo, + statRepo: opts.StatRepo, + nftBalanceRepo: opts.NFTBalanceRepo, + ethClient: opts.EthClient, + taikol1: taikoL1, + bridge: bridgeContract, + proverPool: proverPool, + swaps: swapContracts, blockBatchSize: opts.BlockBatchSize, subscriptionBackoff: opts.SubscriptionBackoff, + + indexNfts: opts.IndexNFTs, }, nil } diff --git a/packages/eventindexer/indexer/set_initial_processing_block_height.go b/packages/eventindexer/indexer/set_initial_processing_block_height.go index c44e5ec73e1..709241f177a 100644 --- a/packages/eventindexer/indexer/set_initial_processing_block_height.go +++ b/packages/eventindexer/indexer/set_initial_processing_block_height.go @@ -2,10 +2,10 @@ package indexer import ( "context" + "log/slog" "math/big" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/taikoxyz/taiko-mono/packages/eventindexer" ) @@ -38,7 +38,7 @@ func (svc *Service) setInitialProcessingBlockByMode( startingBlock = latestProcessedBlock.Height } - log.Infof("starting block: %v", startingBlock) + slog.Info("set processingBlockHeight", "startingBlock", startingBlock) svc.processingBlockHeight = startingBlock diff --git a/packages/eventindexer/indexer/subscribe.go b/packages/eventindexer/indexer/subscribe.go index 1357b713a8d..5b09d1a22ff 100644 --- a/packages/eventindexer/indexer/subscribe.go +++ b/packages/eventindexer/indexer/subscribe.go @@ -3,20 +3,25 @@ package indexer import ( "context" "math/big" + "strconv" + + "log/slog" "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/event" + "github.com/labstack/gommon/log" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/taikoxyz/taiko-mono/packages/eventindexer" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/bridge" + "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/proverpool" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/swap" "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/taikol1" ) // subscribe subscribes to latest events func (svc *Service) subscribe(ctx context.Context, chainID *big.Int) error { - log.Info("subscribing to new events") + slog.Info("subscribing to new events") errChan := make(chan error) @@ -26,6 +31,13 @@ func (svc *Service) subscribe(ctx context.Context, chainID *big.Int) error { go svc.subscribeBlockVerified(ctx, chainID, errChan) } + if svc.proverPool != nil { + go svc.subscribeSlashed(ctx, chainID, errChan) + go svc.subscribeStaked(ctx, chainID, errChan) + go svc.subscribeWithdrawn(ctx, chainID, errChan) + go svc.subscribeExited(ctx, chainID, errChan) + } + if svc.bridge != nil { go svc.subscribeMessageSent(ctx, chainID, errChan) } @@ -33,14 +45,19 @@ func (svc *Service) subscribe(ctx context.Context, chainID *big.Int) error { if svc.swaps != nil { for _, swap := range svc.swaps { go svc.subscribeSwap(ctx, swap, chainID, errChan) + go svc.subscribeLiquidityAdded(ctx, swap, chainID, errChan) } } + if svc.indexNfts { + go svc.subscribeNftTransfers(ctx, chainID, errChan) + } + // nolint: gosimple for { select { case <-ctx.Done(): - log.Info("context finished") + slog.Info("context finished") return nil case err := <-errChan: eventindexer.ErrorsEncounteredDuringSubscription.Inc() @@ -50,12 +67,307 @@ func (svc *Service) subscribe(ctx context.Context, chainID *big.Int) error { } } +func (svc *Service) subscribeNftTransfers( + ctx context.Context, + chainID *big.Int, + errChan chan error, +) { + headers := make(chan *types.Header) + + sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { + if err != nil { + slog.Error("svc.SubscribeNewHead", "error", err) + } + slog.Info("resubscribing to NewHead events for nft trasnfers") + + return svc.ethClient.SubscribeNewHead(ctx, headers) + }) + + for { + select { + case <-ctx.Done(): + slog.Info("context finished") + return + case err := <-sub.Err(): + slog.Error("sub.Err()", "error", err) + errChan <- errors.Wrap(err, "sub.Err()") + case header := <-headers: + go func() { + if err := svc.indexNFTTransfers(ctx, chainID, header.Number.Uint64(), header.Number.Uint64()); err != nil { + slog.Error("svc.indexNFTTransfers", "error", err) + } + }() + } + } +} + +func (svc *Service) subscribeSlashed( + ctx context.Context, + chainID *big.Int, + errChan chan error, +) { + sink := make(chan *proverpool.ProverPoolSlashed) + + sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { + if err != nil { + slog.Error("svc.taikoL1.WatchSlashed", "error", err) + } + slog.Info("resubscribing to Slashed events") + + return svc.proverPool.WatchSlashed(&bind.WatchOpts{ + Context: ctx, + }, sink, nil) + }) + + defer sub.Unsubscribe() + + for { + select { + case <-ctx.Done(): + slog.Info("context finished") + return + case err := <-sub.Err(): + slog.Error("sub.Err()", "error", err) + errChan <- errors.Wrap(err, "sub.Err()") + case event := <-sink: + go func() { + slog.Info("slashedEvent", + "address", event.Addr.Hex(), + "amount", strconv.FormatUint(event.Amount, 10), + ) + + if err := svc.saveSlashedEvent(ctx, chainID, event); err != nil { + eventindexer.SlashedEventsProcessedError.Inc() + + slog.Error("svc.subscribe, svc.saveSlashedEvent", "error", err) + + return + } + + block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) + if err != nil { + slog.Error("svc.subscribe, svc.blockRepo.GetLatestBlockProcessed", "error", err) + return + } + + if block.Height < event.Raw.BlockNumber { + err = svc.blockRepo.Save(eventindexer.SaveBlockOpts{ + Height: event.Raw.BlockNumber, + Hash: event.Raw.BlockHash, + ChainID: chainID, + }) + if err != nil { + slog.Error("svc.subscribe, blockRepo.save", "error", err) + return + } + + eventindexer.BlocksProcessed.Inc() + } + }() + } + } +} + +func (svc *Service) subscribeStaked( + ctx context.Context, + chainID *big.Int, + errChan chan error, +) { + sink := make(chan *proverpool.ProverPoolStaked) + + sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { + if err != nil { + slog.Error("svc.taikoL1.WatchStaked", "error", err) + } + slog.Info("resubscribing to Staked events") + + return svc.proverPool.WatchStaked(&bind.WatchOpts{ + Context: ctx, + }, sink, nil) + }) + + defer sub.Unsubscribe() + + for { + select { + case <-ctx.Done(): + slog.Info("context finished") + return + case err := <-sub.Err(): + slog.Error("sub.Err()", "error", err) + errChan <- errors.Wrap(err, "sub.Err()") + case event := <-sink: + go func() { + slog.Info("stakedEvent", + "address", event.Addr.Hex(), + "amount", event.Amount) + + if err := svc.saveStakedEvent(ctx, chainID, event); err != nil { + eventindexer.StakedEventsProcessedError.Inc() + + slog.Error("svc.subscribe, svc.saveStakedEvent", "error", err) + + return + } + + block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) + if err != nil { + slog.Error("svc.subscribe, svc.blockRepo.GetLatestBlockProcessed", "error", err) + return + } + + if block.Height < event.Raw.BlockNumber { + err = svc.blockRepo.Save(eventindexer.SaveBlockOpts{ + Height: event.Raw.BlockNumber, + Hash: event.Raw.BlockHash, + ChainID: chainID, + }) + if err != nil { + slog.Error("svc.subscribe, blockRepo.save", "error", err) + return + } + + eventindexer.BlocksProcessed.Inc() + } + }() + } + } +} + +func (svc *Service) subscribeExited( + ctx context.Context, + chainID *big.Int, + errChan chan error, +) { + sink := make(chan *proverpool.ProverPoolExited) + + sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { + if err != nil { + slog.Error("svc.taikoL1.WatchExited", "error", err) + } + slog.Info("resubscribing to Exited events") + + return svc.proverPool.WatchExited(&bind.WatchOpts{ + Context: ctx, + }, sink, nil) + }) + + defer sub.Unsubscribe() + + for { + select { + case <-ctx.Done(): + slog.Info("context finished") + return + case err := <-sub.Err(): + slog.Error("sub.Err()", "error", err) + errChan <- errors.Wrap(err, "sub.Err()") + case event := <-sink: + go func() { + slog.Info("exitedEvent", "address", event.Addr.Hex(), "amount", event.Amount) + + if err := svc.saveExitedEvent(ctx, chainID, event); err != nil { + eventindexer.ExitedEventsProcessedError.Inc() + + slog.Error("svc.subscribe, svc.saveExitedEvent", "error", err) + + return + } + + block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) + if err != nil { + slog.Error("svc.subscribe, svc.blockRepo.GetLatestBlockProcessed", "error", err) + return + } + + if block.Height < event.Raw.BlockNumber { + err = svc.blockRepo.Save(eventindexer.SaveBlockOpts{ + Height: event.Raw.BlockNumber, + Hash: event.Raw.BlockHash, + ChainID: chainID, + }) + if err != nil { + slog.Error("svc.subscribe, blockRepo.save", "error", err) + return + } + + eventindexer.BlocksProcessed.Inc() + } + }() + } + } +} + +func (svc *Service) subscribeWithdrawn( + ctx context.Context, + chainID *big.Int, + errChan chan error, +) { + sink := make(chan *proverpool.ProverPoolWithdrawn) + + sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { + if err != nil { + slog.Error("svc.taikoL1.WatchWithdrawn", "error", err) + } + slog.Info("resubscribing to Withdrawn events") + + return svc.proverPool.WatchWithdrawn(&bind.WatchOpts{ + Context: ctx, + }, sink, nil) + }) + + defer sub.Unsubscribe() + + for { + select { + case <-ctx.Done(): + slog.Info("context finished") + return + case err := <-sub.Err(): + slog.Error("sub.Err()", "error", err) + errChan <- errors.Wrap(err, "sub.Err()") + case event := <-sink: + go func() { + slog.Info("withdrawnEvent", "address", event.Addr.Hex(), "amount", event.Amount) + + if err := svc.saveWithdrawnEvent(ctx, chainID, event); err != nil { + eventindexer.WithdrawnEventsProcessedError.Inc() + + log.Error("svc.subscribe, svc.saveWithdrawnEvent", "error", err) + + return + } + + block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) + if err != nil { + slog.Error("svc.subscribe, svc.blockRepo.GetLatestBlockProcessed", "error", err) + return + } + + if block.Height < event.Raw.BlockNumber { + err = svc.blockRepo.Save(eventindexer.SaveBlockOpts{ + Height: event.Raw.BlockNumber, + Hash: event.Raw.BlockHash, + ChainID: chainID, + }) + if err != nil { + slog.Error("svc.subscribe, blockRepo.save", "error", err) + return + } + + eventindexer.BlocksProcessed.Inc() + } + }() + } + } +} + func (svc *Service) subscribeBlockProven(ctx context.Context, chainID *big.Int, errChan chan error) { sink := make(chan *taikol1.TaikoL1BlockProven) sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { if err != nil { - log.Errorf("svc.taikoL1.WatchBlockProven: %v", err) + log.Error("svc.taikoL1.WatchBlockProven", "error", err) } log.Info("resubscribing to BlockProven events") @@ -69,26 +381,28 @@ func (svc *Service) subscribeBlockProven(ctx context.Context, chainID *big.Int, for { select { case <-ctx.Done(): - log.Info("context finished") + slog.Info("context finished") return case err := <-sub.Err(): - log.Errorf("sub.Err(): %v", err) + slog.Error("sub.Err()", "error", err) errChan <- errors.Wrap(err, "sub.Err()") case event := <-sink: go func() { - log.Infof("blockProvenEvent from subscription for prover %v", event.Prover.Hex()) + log.Info("blockProvenEvent from subscription for prover", + "prover", event.Prover.Hex(), + ) if err := svc.saveBlockProvenEvent(ctx, chainID, event); err != nil { eventindexer.BlockProvenEventsProcessedError.Inc() - log.Errorf("svc.subscribe, svc.saveBlockProvenEvent: %v", err) + log.Error("svc.subscribe, svc.saveBlockProvenEvent", "error", err) return } block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) if err != nil { - log.Errorf("svc.subscribe, blockRepo.GetLatestBlockProcessed: %v", err) + slog.Error("svc.subscribe, svc.blockRepo.GetLatestBlockProcessed", "error", err) return } @@ -99,7 +413,7 @@ func (svc *Service) subscribeBlockProven(ctx context.Context, chainID *big.Int, ChainID: chainID, }) if err != nil { - log.Errorf("svc.subscribe, svc.blockRepo.Save: %v", err) + slog.Error("svc.subscribe, blockRepo.save", "error", err) return } @@ -115,13 +429,13 @@ func (svc *Service) subscribeBlockProposed(ctx context.Context, chainID *big.Int sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { if err != nil { - log.Errorf("svc.taikoL1.WatchBlockProposed: %v", err) + log.Error("svc.taikoL1.WatchBlockProposed", "error", err) } log.Info("resubscribing to BlockProposed events") return svc.taikol1.WatchBlockProposed(&bind.WatchOpts{ Context: ctx, - }, sink, nil) + }, sink, nil, nil) }) defer sub.Unsubscribe() @@ -129,42 +443,42 @@ func (svc *Service) subscribeBlockProposed(ctx context.Context, chainID *big.Int for { select { case <-ctx.Done(): - log.Info("context finished") + slog.Info("context finished") return case err := <-sub.Err(): - log.Errorf("sub.Err(): %v", err) + slog.Error("sub.Err()", "error", err) errChan <- errors.Wrap(err, "sub.Err()") case event := <-sink: go func() { - log.Infof("blockProposedEvent from subscription") + slog.Info("blockProposedEvent from subscription") tx, _, err := svc.ethClient.TransactionByHash(ctx, event.Raw.TxHash) if err != nil { - log.Errorf("svc.ethClient.TransactionByHash: %v", err) + slog.Error("svc.ethClient.TransactionByHash", "error", err) return } sender, err := svc.ethClient.TransactionSender(ctx, tx, event.Raw.BlockHash, event.Raw.TxIndex) if err != nil { - log.Errorf("svc.ethClient.TransactionSender: %v", err) + slog.Error("svc.ethClient.TransactionSender", "error", err) return } - log.Infof("blockProposed by: %v", sender.Hex()) + slog.Info("blockProposed", "proposer", sender.Hex(), "blockID", event.BlockId.Uint64()) if err := svc.saveBlockProposedEvent(ctx, chainID, event, sender); err != nil { eventindexer.BlockProposedEventsProcessedError.Inc() - log.Errorf("svc.subscribe, svc.saveBlockProposedEvent: %v", err) + slog.Error("svc.subscribe, svc.saveBlockProposedEvent", "error", err) return } block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) if err != nil { - log.Errorf("svc.subscribe, blockRepo.GetLatestBlockProcessed: %v", err) + slog.Error("svc.subscribe, svc.blockRepo.GetLatestBlockProcessed", "error", err) return } @@ -176,7 +490,7 @@ func (svc *Service) subscribeBlockProposed(ctx context.Context, chainID *big.Int ChainID: chainID, }) if err != nil { - log.Errorf("svc.subscribe, svc.blockRepo.Save: %v", err) + slog.Error("svc.subscribe, blockRepo.save", "error", err) return } @@ -193,10 +507,10 @@ func (svc *Service) subscribeBlockVerified(ctx context.Context, chainID *big.Int sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { if err != nil { - log.Errorf("svc.taikoL1.WatchBlockVerified: %v", err) + slog.Error("svc.taikoL1.WatchBlockVerified", "error", err) } - log.Info("resubscribing to BlockVerified events") + slog.Info("resubscribing to BlockVerified events") return svc.taikol1.WatchBlockVerified(&bind.WatchOpts{ Context: ctx, @@ -208,25 +522,25 @@ func (svc *Service) subscribeBlockVerified(ctx context.Context, chainID *big.Int for { select { case <-ctx.Done(): - log.Info("context finished") + slog.Info("context finished") return case err := <-sub.Err(): - log.Errorf("sub.Err(): %v", err) + slog.Error("sub.Err()", "error", err) errChan <- errors.Wrap(err, "sub.Err()") case event := <-sink: go func() { - log.Infof("blockVerifiedEvent from subscription") + slog.Info("blockVerifiedEvent from subscription", "prover", event.Prover.Hex()) if err := svc.saveBlockVerifiedEvent(ctx, chainID, event); err != nil { eventindexer.BlockVerifiedEventsProcessedError.Inc() - log.Errorf("svc.subscribe, svc.saveBlockVerifiedEvent: %v", err) + slog.Error("svc.subscribe, svc.saveBlockVerifiedEvent", "error", err) return } block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) if err != nil { - log.Errorf("svc.subscribe, blockRepo.GetLatestBlockProcessed: %v", err) + slog.Error("svc.subscribe, svc.blockRepo.GetLatestBlockProcessed", "error", err) return } @@ -237,7 +551,7 @@ func (svc *Service) subscribeBlockVerified(ctx context.Context, chainID *big.Int ChainID: chainID, }) if err != nil { - log.Errorf("svc.subscribe, svc.blockRepo.Save: %v", err) + slog.Error("svc.subscribe, blockRepo.save", "error", err) return } @@ -253,9 +567,10 @@ func (svc *Service) subscribeMessageSent(ctx context.Context, chainID *big.Int, sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { if err != nil { - log.Errorf("svc.taikoL1.WatchMessageSent: %v", err) + slog.Error("svc.taikoL1.WatchMessageSent", "error", err) } - log.Info("resubscribing to MessageSent events") + + slog.Info("resubscribing to MessageSent events") return svc.bridge.WatchMessageSent(&bind.WatchOpts{ Context: ctx, @@ -267,26 +582,26 @@ func (svc *Service) subscribeMessageSent(ctx context.Context, chainID *big.Int, for { select { case <-ctx.Done(): - log.Info("context finished") + slog.Info("context finished") return case err := <-sub.Err(): - log.Errorf("sub.Err(): %v", err) + slog.Error("sub.Err()", "error", err) errChan <- errors.Wrap(err, "sub.Err()") case event := <-sink: go func() { - log.Infof("messageSentEvent for owner: %v", event.Message.Owner.Hex()) + slog.Info("messageSentEvent", "owner", event.Message.Owner.Hex()) if err := svc.saveMessageSentEvent(ctx, chainID, event); err != nil { eventindexer.MessageSentEventsProcessedError.Inc() - log.Errorf("svc.subscribe, svc.saveMessageSentEvent: %v", err) + slog.Error("svc.subscribe, svc.saveMessageSentEvent", "error", err) return } block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) if err != nil { - log.Errorf("svc.subscribe, blockRepo.GetLatestBlockProcessed: %v", err) + slog.Error("svc.subscribe, svc.blockRepo.GetLatestBlockProcessed", "error", err) return } @@ -297,7 +612,7 @@ func (svc *Service) subscribeMessageSent(ctx context.Context, chainID *big.Int, ChainID: chainID, }) if err != nil { - log.Errorf("svc.subscribe, svc.blockRepo.Save: %v", err) + slog.Error("svc.subscribe, blockRepo.save", "error", err) return } @@ -313,9 +628,9 @@ func (svc *Service) subscribeSwap(ctx context.Context, s *swap.Swap, chainID *bi sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { if err != nil { - log.Errorf("s.WatchSwap: %v", err) + slog.Error("s.WatchSwap", "error", err) } - log.Info("resubscribing to Swap events") + slog.Info("resubscribing to Swap events") return s.WatchSwap(&bind.WatchOpts{ Context: ctx, @@ -327,24 +642,82 @@ func (svc *Service) subscribeSwap(ctx context.Context, s *swap.Swap, chainID *bi for { select { case <-ctx.Done(): - log.Info("context finished") + slog.Info("context finished") return case err := <-sub.Err(): - log.Errorf("sub.Err(): %v", err) + slog.Error("sub.Err()", "error", err) errChan <- errors.Wrap(err, "sub.Err()") case event := <-sink: go func() { if err := svc.saveSwapEvent(ctx, chainID, event); err != nil { eventindexer.SwapEventsProcessedError.Inc() - log.Errorf("svc.subscribe, svc.saveSwapEvent: %v", err) + slog.Error("svc.subscribe, svc.saveSwapEvent", "error", err) + + return + } + + block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) + if err != nil { + slog.Error("svc.subscribe, svc.blockRepo.GetLatestBlockProcessed", "error", err) + return + } + + if block.Height < event.Raw.BlockNumber { + err = svc.blockRepo.Save(eventindexer.SaveBlockOpts{ + Height: event.Raw.BlockNumber, + Hash: event.Raw.BlockHash, + ChainID: chainID, + }) + if err != nil { + slog.Error("svc.subscribe, blockRepo.save", "error", err) + return + } + + eventindexer.BlocksProcessed.Inc() + } + }() + } + } +} + +func (svc *Service) subscribeLiquidityAdded(ctx context.Context, s *swap.Swap, chainID *big.Int, errChan chan error) { + sink := make(chan *swap.SwapMint) + + sub := event.ResubscribeErr(svc.subscriptionBackoff, func(ctx context.Context, err error) (event.Subscription, error) { + if err != nil { + slog.Error("s.WatchMint", "error", err) + } + slog.Info("resubscribing to Swap events") + + return s.WatchMint(&bind.WatchOpts{ + Context: ctx, + }, sink, nil) + }) + + defer sub.Unsubscribe() + + for { + select { + case <-ctx.Done(): + slog.Info("context finished") + return + case err := <-sub.Err(): + slog.Error("sub.Err()", "error", err) + errChan <- errors.Wrap(err, "sub.Err()") + case event := <-sink: + go func() { + if err := svc.saveLiquidityAddedEvent(ctx, chainID, event); err != nil { + eventindexer.SwapEventsProcessedError.Inc() + + slog.Error("svc.subscribe, svc.saveLiquidityAddedEvent", "error", err) return } block, err := svc.blockRepo.GetLatestBlockProcessed(chainID) if err != nil { - log.Errorf("svc.subscribe, blockRepo.GetLatestBlockProcessed: %v", err) + slog.Error("svc.subscribe, blockRepo.GetLatestBlockProcessed", "error", err) return } @@ -355,7 +728,7 @@ func (svc *Service) subscribeSwap(ctx context.Context, s *swap.Swap, chainID *bi ChainID: chainID, }) if err != nil { - log.Errorf("svc.subscribe, svc.blockRepo.Save: %v", err) + slog.Error("svc.subscribe, svc.blockRepo.Save", "error", err) return } diff --git a/packages/eventindexer/migrations/1666650599_create_events_table.sql b/packages/eventindexer/migrations/1666650599_create_events_table.sql index d616c5c8216..92b0a5bceb0 100644 --- a/packages/eventindexer/migrations/1666650599_create_events_table.sql +++ b/packages/eventindexer/migrations/1666650599_create_events_table.sql @@ -8,6 +8,8 @@ CREATE TABLE IF NOT EXISTS events ( data JSON NOT NULL, address VARCHAR(42) NOT NULL DEFAULT "", block_id int DEFAULT NULL, + amount DECIMAL(65, 0) DEFAULT NULL, + assigned_prover VARCHAR(42) NOT NULL DEFAULT "", created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP , updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ); diff --git a/packages/eventindexer/migrations/1666650706_alter_events_table_add_token_id.sql b/packages/eventindexer/migrations/1666650706_alter_events_table_add_token_id.sql new file mode 100644 index 00000000000..e2921251873 --- /dev/null +++ b/packages/eventindexer/migrations/1666650706_alter_events_table_add_token_id.sql @@ -0,0 +1,9 @@ +-- +goose Up +-- +goose StatementBegin +ALTER TABLE `events` ADD COLUMN token_id int DEFAULT NULL; + +-- +goose StatementEnd +-- +goose Down +-- +goose StatementBegin +ALTER TABLE `events` DROP COLUMN token_id; +-- +goose StatementEnd \ No newline at end of file diff --git a/packages/eventindexer/migrations/1666650707_alter_events_table_add_to.sql b/packages/eventindexer/migrations/1666650707_alter_events_table_add_to.sql new file mode 100644 index 00000000000..561b11ff2c3 --- /dev/null +++ b/packages/eventindexer/migrations/1666650707_alter_events_table_add_to.sql @@ -0,0 +1,9 @@ +-- +goose Up +-- +goose StatementBegin +ALTER TABLE `events` ADD COLUMN `to` VARCHAR(42) DEFAULT ""; + +-- +goose StatementEnd +-- +goose Down +-- +goose StatementBegin +ALTER TABLE `events` DROP COLUMN `to`; +-- +goose StatementEnd \ No newline at end of file diff --git a/packages/eventindexer/migrations/1666650708_alter_events_table_add_contract_address.sql b/packages/eventindexer/migrations/1666650708_alter_events_table_add_contract_address.sql new file mode 100644 index 00000000000..6079d3423f4 --- /dev/null +++ b/packages/eventindexer/migrations/1666650708_alter_events_table_add_contract_address.sql @@ -0,0 +1,9 @@ +-- +goose Up +-- +goose StatementBegin +ALTER TABLE `events` ADD COLUMN contract_address VARCHAR(42) DEFAULT ""; + +-- +goose StatementEnd +-- +goose Down +-- +goose StatementBegin +ALTER TABLE `events` DROP COLUMN contract_address; +-- +goose StatementEnd \ No newline at end of file diff --git a/packages/eventindexer/migrations/1666650709_create_nft_balances_table.sql b/packages/eventindexer/migrations/1666650709_create_nft_balances_table.sql new file mode 100644 index 00000000000..af766f2db46 --- /dev/null +++ b/packages/eventindexer/migrations/1666650709_create_nft_balances_table.sql @@ -0,0 +1,19 @@ +-- +goose Up +-- +goose StatementBegin +CREATE TABLE IF NOT EXISTS nft_balances ( + id int NOT NULL PRIMARY KEY AUTO_INCREMENT, + chain_id int NOT NULL, + address VARCHAR(42) NOT NULL DEFAULT "", + amount DECIMAL(65, 0) DEFAULT NULL, + contract_address VARCHAR(42) NOT NULL DEFAULT "", + contract_type VARCHAR(7) NOT NULL DEFAULT "ERC721", + token_id DECIMAL(65, 0) NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP , + updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +); + +-- +goose StatementEnd +-- +goose Down +-- +goose StatementBegin +DROP TABLE nft_balances; +-- +goose StatementEnd diff --git a/packages/eventindexer/migrations/1666650710_alter_nft_balances_table_add_address_and_chain_id_index.sql b/packages/eventindexer/migrations/1666650710_alter_nft_balances_table_add_address_and_chain_id_index.sql new file mode 100644 index 00000000000..2bdff460540 --- /dev/null +++ b/packages/eventindexer/migrations/1666650710_alter_nft_balances_table_add_address_and_chain_id_index.sql @@ -0,0 +1,9 @@ +-- +goose Up +-- +goose StatementBegin +ALTER TABLE `nft_balances` ADD INDEX `address_and_chain_id_index` (`address`, `chain_id`); + +-- +goose StatementEnd +-- +goose Down +-- +goose StatementBegin +DROP INDEX address_and_chain_id_index on nft_balances; +-- +goose StatementEnd diff --git a/packages/eventindexer/migrations/1666650711_alter_nft_balances_table_add_address_contract_address_token_id_and_chain_id_index.sql b/packages/eventindexer/migrations/1666650711_alter_nft_balances_table_add_address_contract_address_token_id_and_chain_id_index.sql new file mode 100644 index 00000000000..0abc3615882 --- /dev/null +++ b/packages/eventindexer/migrations/1666650711_alter_nft_balances_table_add_address_contract_address_token_id_and_chain_id_index.sql @@ -0,0 +1,9 @@ +-- +goose Up +-- +goose StatementBegin +ALTER TABLE `nft_balances` ADD INDEX `address_contract_address_token_id_and_chain_id_index` (`address`, `contract_address`, `token_id`, `chain_id`); + +-- +goose StatementEnd +-- +goose Down +-- +goose StatementBegin +DROP INDEX address_contract_address_token_id_and_chain_id_index on nft_balances; +-- +goose StatementEnd diff --git a/packages/eventindexer/mock/event_repository.go b/packages/eventindexer/mock/event_repository.go index 545c8bcdd6c..fd97a26ab87 100644 --- a/packages/eventindexer/mock/event_repository.go +++ b/packages/eventindexer/mock/event_repository.go @@ -2,6 +2,7 @@ package mock import ( "context" + "math/big" "math/rand" "net/http" @@ -106,6 +107,12 @@ func (r *EventRepository) Delete( return nil } +func (r *EventRepository) GetTotalSlashedTokens( + ctx context.Context, +) (*big.Int, error) { + return big.NewInt(1), nil +} + func (r *EventRepository) FirstByAddressAndEventName( ctx context.Context, address string, @@ -119,3 +126,21 @@ func (r *EventRepository) FirstByAddressAndEventName( return nil, nil } + +func (r *EventRepository) GetAssignedBlocksByProverAddress( + ctx context.Context, + req *http.Request, + address string, +) (paginate.Page, error) { + var events []*eventindexer.Event + + for _, e := range r.events { + if e.AssignedProver == address && e.Event == eventindexer.EventNameBlockProposed { + events = append(events, e) + } + } + + return paginate.Page{ + Items: events, + }, nil +} diff --git a/packages/eventindexer/mock/nft_balance_repository.go b/packages/eventindexer/mock/nft_balance_repository.go new file mode 100644 index 00000000000..4b55cae4b70 --- /dev/null +++ b/packages/eventindexer/mock/nft_balance_repository.go @@ -0,0 +1,49 @@ +package mock + +import ( + "context" + "net/http" + + "github.com/morkid/paginate" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" +) + +type NFTBalanceRepository struct { + nftBalances []*eventindexer.NFTBalance +} + +func NewNFTBalanceRepository() *NFTBalanceRepository { + return &NFTBalanceRepository{} +} + +func (r *NFTBalanceRepository) SubtractBalance( + ctx context.Context, + opts eventindexer.UpdateNFTBalanceOpts, +) (*eventindexer.NFTBalance, error) { + return nil, nil +} + +func (r *NFTBalanceRepository) IncreaseBalance( + ctx context.Context, + opts eventindexer.UpdateNFTBalanceOpts, +) (*eventindexer.NFTBalance, error) { + return nil, nil +} + +func (r *NFTBalanceRepository) FindByAddress(ctx context.Context, + req *http.Request, + address string, + chainID string, +) (paginate.Page, error) { + var balances []*eventindexer.NFTBalance + + for _, b := range r.nftBalances { + if b.Address == address { + balances = append(balances, b) + } + } + + return paginate.Page{ + Items: balances, + }, nil +} diff --git a/packages/eventindexer/nft_balance.go b/packages/eventindexer/nft_balance.go new file mode 100644 index 00000000000..9b1651a49b1 --- /dev/null +++ b/packages/eventindexer/nft_balance.go @@ -0,0 +1,40 @@ +package eventindexer + +import ( + "context" + "net/http" + + "github.com/morkid/paginate" +) + +// NFTBalance represents a single contractAddress/tokenId pairing for a given holder +// address +type NFTBalance struct { + ID int `json:"id"` + ChainID int64 `json:"chainID"` + Address string `json:"address"` + Amount int64 `json:"amount"` + TokenID int64 `json:"tokenID"` + ContractAddress string `json:"contractAddress"` + ContractType string `json:"contractType"` +} + +type UpdateNFTBalanceOpts struct { + ChainID int64 + Address string + TokenID int64 + ContractAddress string + ContractType string + Amount int64 +} + +// NFTBalanceRepository is used to interact with nft balances in the store +type NFTBalanceRepository interface { + SubtractBalance(ctx context.Context, opts UpdateNFTBalanceOpts) (*NFTBalance, error) + IncreaseBalance(ctx context.Context, opts UpdateNFTBalanceOpts) (*NFTBalance, error) + FindByAddress(ctx context.Context, + req *http.Request, + address string, + chainID string, + ) (paginate.Page, error) +} diff --git a/packages/eventindexer/prometheus.go b/packages/eventindexer/prometheus.go index cab3ef87bb1..ea95653d7d2 100644 --- a/packages/eventindexer/prometheus.go +++ b/packages/eventindexer/prometheus.go @@ -30,6 +30,38 @@ var ( Name: "block_verified_events_processed_error_ops_total", Help: "The total number of processed BlockVerified event errors encountered", }) + SlashedEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{ + Name: "slashed_events_processed_ops_total", + Help: "The total number of processed Slashed events", + }) + SlashedEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{ + Name: "slashed_events_processed_error_ops_total", + Help: "The total number of processed Slashed event errors encountered", + }) + StakedEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{ + Name: "staked_events_processed_ops_total", + Help: "The total number of processed Staked events", + }) + StakedEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{ + Name: "staked_events_processed_error_ops_total", + Help: "The total number of processed Staked event errors encountered", + }) + ExitedEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{ + Name: "exited_events_processed_ops_total", + Help: "The total number of processed Exited events", + }) + ExitedEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{ + Name: "exited_events_processed_error_ops_total", + Help: "The total number of processed Exited event errors encountered", + }) + WithdrawnEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{ + Name: "withdrawn_events_processed_ops_total", + Help: "The total number of processed Exited events", + }) + WithdrawnEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{ + Name: "withdrawn_events_processed_error_ops_total", + Help: "The total number of processed Exited event errors encountered", + }) MessageSentEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{ Name: "message_sent_events_processed_ops_total", Help: "The total number of processed MessageSent events", @@ -40,12 +72,20 @@ var ( }) SwapEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{ Name: "swap_events_processed_ops_total", - Help: "The total number of processed MessageSent events", + Help: "The total number of processed Swap events", }) SwapEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{ Name: "swap_events_processed_error_ops_total", Help: "The total number of processed Swap event errors encountered", }) + LiquidityAddedEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{ + Name: "liquidity_added_events_processed_ops_total", + Help: "The total number of processed LiquidityAdded events", + }) + LiquidityAddedEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{ + Name: "liquidity_added_events_processed_error_ops_total", + Help: "The total number of processed LiquidityAdded event errors encountered", + }) BlocksProcessed = promauto.NewCounter(prometheus.CounterOpts{ Name: "blocks_processed_ops_total", Help: "The total number of processed blocks", diff --git a/packages/eventindexer/repo/containers_test.go b/packages/eventindexer/repo/containers_test.go index 53eff7bcc84..d0d809b7e6a 100644 --- a/packages/eventindexer/repo/containers_test.go +++ b/packages/eventindexer/repo/containers_test.go @@ -23,7 +23,7 @@ var ( func testMysql(t *testing.T) (eventindexer.DB, func(), error) { req := testcontainers.ContainerRequest{ - Image: "mysql:latest", + Image: "mysql:8.0.33", ExposedPorts: []string{"3306/tcp", "33060/tcp"}, Env: map[string]string{ "MYSQL_ROOT_PASSWORD": dbPassword, diff --git a/packages/eventindexer/repo/event.go b/packages/eventindexer/repo/event.go index 4c8885c5923..515bfa20ed3 100644 --- a/packages/eventindexer/repo/event.go +++ b/packages/eventindexer/repo/event.go @@ -2,10 +2,13 @@ package repo import ( "context" + "database/sql" + "math/big" "net/http" "github.com/morkid/paginate" "github.com/pkg/errors" + "github.com/shopspring/decimal" "github.com/taikoxyz/taiko-mono/packages/eventindexer" "gorm.io/datatypes" "gorm.io/gorm" @@ -34,6 +37,44 @@ func (r *EventRepository) Save(ctx context.Context, opts eventindexer.SaveEventO Address: opts.Address, } + if opts.BlockID != nil { + e.BlockID = sql.NullInt64{ + Valid: true, + Int64: *opts.BlockID, + } + } + + if opts.Amount != nil { + amt, err := decimal.NewFromString(opts.Amount.String()) + if err != nil { + return nil, errors.Wrap(err, "decimal.NewFromString") + } + + e.Amount = decimal.NullDecimal{ + Valid: true, + Decimal: amt, + } + } + + if opts.AssignedProver != nil { + e.AssignedProver = *opts.AssignedProver + } + + if opts.TokenID != nil { + e.TokenID = sql.NullInt64{ + Valid: true, + Int64: *opts.TokenID, + } + } + + if opts.To != nil { + e.To = *opts.To + } + + if opts.ContractAddress != nil { + e.ContractAddress = *opts.ContractAddress + } + if err := r.db.GormDB().Create(e).Error; err != nil { return nil, errors.Wrap(err, "r.db.Create") } @@ -135,6 +176,24 @@ func (r *EventRepository) GetByAddressAndEventName( return page, nil } +func (r *EventRepository) GetTotalSlashedTokens( + ctx context.Context, +) (*big.Int, error) { + var sum decimal.NullDecimal + + if err := r.db.GormDB(). + Raw("SELECT SUM(amount) FROM events WHERE event = ?", eventindexer.EventNameSlashed). + FirstOrInit(&sum).Error; err != nil { + return nil, errors.Wrap(err, "r.db.FirstOrInit") + } + + if !sum.Valid { + return big.NewInt(0), nil + } + + return sum.Decimal.BigInt(), nil +} + func (r *EventRepository) FirstByAddressAndEventName( ctx context.Context, address string, @@ -155,3 +214,22 @@ func (r *EventRepository) FirstByAddressAndEventName( return e, nil } + +func (r *EventRepository) GetAssignedBlocksByProverAddress( + ctx context.Context, + req *http.Request, + address string, +) (paginate.Page, error) { + pg := paginate.New(&paginate.Config{ + DefaultSize: 100, + }) + + q := r.db.GormDB(). + Raw("SELECT * FROM events WHERE event = ? AND assigned_prover = ?", eventindexer.EventNameBlockProposed, address) + + reqCtx := pg.With(q) + + page := reqCtx.Request(req).Response(&[]eventindexer.Event{}) + + return page, nil +} diff --git a/packages/eventindexer/repo/event_test.go b/packages/eventindexer/repo/event_test.go index adc8d3d2922..d44b685cf0d 100644 --- a/packages/eventindexer/repo/event_test.go +++ b/packages/eventindexer/repo/event_test.go @@ -258,6 +258,55 @@ func TestIntegration_Event_Delete(t *testing.T) { } } +func TestIntegration_Event_GetTotalSlashedTokens(t *testing.T) { + db, close, err := testMysql(t) + assert.Equal(t, nil, err) + + defer close() + + eventRepo, err := NewEventRepository(db) + assert.Equal(t, nil, err) + + opts := eventindexer.SaveEventOpts{ + Name: eventindexer.EventNameSlashed, + Address: "0x123", + Data: "{\"data\":\"something\"}", + Event: eventindexer.EventNameSlashed, + ChainID: big.NewInt(1), + BlockID: &blockID, + Amount: big.NewInt(1), + } + + for i := 0; i < 5; i++ { + _, err = eventRepo.Save(context.Background(), opts) + + assert.Equal(t, nil, err) + } + + tests := []struct { + name string + wantResp *big.Int + wantErr error + }{ + { + "success", + big.NewInt(5), + nil, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + resp, err := eventRepo.GetTotalSlashedTokens( + context.Background(), + ) + spew.Dump(resp) + assert.Equal(t, tt.wantErr, err) + assert.Equal(t, tt.wantResp, resp) + }) + } +} + func TestIntegration_Event_FirstByAddressAndEvent(t *testing.T) { db, close, err := testMysql(t) assert.Equal(t, nil, err) diff --git a/packages/eventindexer/repo/nft_balance.go b/packages/eventindexer/repo/nft_balance.go new file mode 100644 index 00000000000..5ecf134ef12 --- /dev/null +++ b/packages/eventindexer/repo/nft_balance.go @@ -0,0 +1,127 @@ +package repo + +import ( + "context" + "net/http" + + "github.com/morkid/paginate" + "github.com/pkg/errors" + "github.com/taikoxyz/taiko-mono/packages/eventindexer" + "gorm.io/gorm" +) + +type NFTBalanceRepository struct { + db eventindexer.DB +} + +func NewNFTBalanceRepository(db eventindexer.DB) (*NFTBalanceRepository, error) { + if db == nil { + return nil, eventindexer.ErrNoDB + } + + return &NFTBalanceRepository{ + db: db, + }, nil +} + +func (r *NFTBalanceRepository) IncreaseBalance( + ctx context.Context, + opts eventindexer.UpdateNFTBalanceOpts, +) (*eventindexer.NFTBalance, error) { + b := &eventindexer.NFTBalance{ + ContractAddress: opts.ContractAddress, + TokenID: opts.TokenID, + Address: opts.Address, + ContractType: opts.ContractType, + ChainID: opts.ChainID, + Amount: 0, + } + + err := r.db. + GormDB(). + Where("contract_address = ?", opts.ContractAddress). + Where("token_id = ?", opts.TokenID). + Where("address = ?", opts.Address). + Where("chain_id = ?", opts.ChainID). + First(b). + Error + if err != nil { + // allow to be not found, it may be first time this user has this NFT + if err != gorm.ErrRecordNotFound { + // should always be found, since we are subtracting a balance. + // that should be indexed as a positive balance before. + return nil, errors.Wrap(err, "r.db.gormDB.First") + } + } + + b.Amount += opts.Amount + + // update the row to reflect new balance + if err := r.db.GormDB().Save(b).Error; err != nil { + return nil, errors.Wrap(err, "r.db.Save") + } + + return b, nil +} + +func (r *NFTBalanceRepository) SubtractBalance( + ctx context.Context, + opts eventindexer.UpdateNFTBalanceOpts, +) (*eventindexer.NFTBalance, error) { + b := &eventindexer.NFTBalance{ + ContractAddress: opts.ContractAddress, + TokenID: opts.TokenID, + Address: opts.Address, + ContractType: opts.ContractType, + ChainID: opts.ChainID, + } + + err := r.db. + GormDB(). + Where("contract_address = ?", opts.ContractAddress). + Where("token_id = ?", opts.TokenID). + Where("address = ?", opts.Address). + Where("chain_id = ?", opts.ChainID). + First(b). + Error + if err != nil { + // should always be found, since we are subtracting a balance. + // that should be indexed as a positive balance before. + return nil, errors.Wrap(err, "r.db.gormDB.First") + } + + b.Amount -= opts.Amount + + // we can just delete the row, this user has no more of this NFT + if b.Amount == 0 { + if err := r.db.GormDB().Delete(b).Error; err != nil { + return nil, errors.Wrap(err, "r.db.Delete") + } + } else { + // update the row instead to reflect new balance + if err := r.db.GormDB().Save(b).Error; err != nil { + return nil, errors.Wrap(err, "r.db.Save") + } + } + + return b, nil +} + +func (r *NFTBalanceRepository) FindByAddress(ctx context.Context, + req *http.Request, + address string, + chainID string, +) (paginate.Page, error) { + pg := paginate.New(&paginate.Config{ + DefaultSize: 100, + }) + + q := r.db.GormDB(). + Raw("SELECT * FROM nft_balances WHERE address = ? AND chain_id = ? AND amount > 0", address, chainID) + + reqCtx := pg.With(q) + + page := reqCtx.Request(req).Response(&[]eventindexer.NFTBalance{}) + + return page, nil +} diff --git a/packages/pos-dashboard/.babelrc b/packages/pos-dashboard/.babelrc new file mode 100644 index 00000000000..86670507c24 --- /dev/null +++ b/packages/pos-dashboard/.babelrc @@ -0,0 +1,8 @@ +{ + "presets": [["@babel/preset-env", { "targets": { "node": "current" } }]], + "env": { + "test": { + "plugins": ["transform-es2015-modules-commonjs"] + } + } +} diff --git a/packages/pos-dashboard/.default.env b/packages/pos-dashboard/.default.env new file mode 100644 index 00000000000..07fcb01d790 --- /dev/null +++ b/packages/pos-dashboard/.default.env @@ -0,0 +1,18 @@ +VITE_NODE_ENV=dev + +VITE_L1_RPC_URL="https://internet.com" +VITE_L2_RPC_URL="https://internet.com" +VITE_L1_EXPLORER_URL="https://internet.com" +VITE_L2_EXPLORER_URL="https://internet.com" + +VITE_EVENT_INDEXER_URL="http://localhost:4100" + +VITE_PROVER_POOL_ADDRESS="0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0" + +VITE_TAIKO_L1_ADDRESS="0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1" + +VITE_WALLETCONNECT_PROJECT_ID="" + +VITE_TKO_ADDRESS="0x1243" + +VITE_ENV_VAR="" \ No newline at end of file diff --git a/packages/pos-dashboard/.editorconfig b/packages/pos-dashboard/.editorconfig new file mode 100644 index 00000000000..c7e8f0e5fd2 --- /dev/null +++ b/packages/pos-dashboard/.editorconfig @@ -0,0 +1,10 @@ +root=true + +[*] +end_of_line = lf +insert_final_newline = true + +[*.{js,ts,svelte,css,json,yml,yaml}] +charset = utf-8 +indent_style = space +indent_size = 2 diff --git a/packages/pos-dashboard/.eslintignore b/packages/pos-dashboard/.eslintignore new file mode 100644 index 00000000000..17059d68349 --- /dev/null +++ b/packages/pos-dashboard/.eslintignore @@ -0,0 +1,8 @@ +dist +build +coverage +node_modules +scripts +example +LICENSES +public diff --git a/packages/pos-dashboard/.eslintrc.cjs b/packages/pos-dashboard/.eslintrc.cjs new file mode 100644 index 00000000000..2f75bc39fea --- /dev/null +++ b/packages/pos-dashboard/.eslintrc.cjs @@ -0,0 +1,95 @@ +module.exports = { + env: { + node: true, + browser: true, + es2021: true, + webextensions: true, + }, + extends: ['eslint:recommended'], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + extraFileExtensions: ['.svelte'], + }, + plugins: ['svelte3', '@typescript-eslint', 'simple-import-sort'], + rules: { + semi: ['error', 'always'], + 'linebreak-style': ['error', 'unix'], + 'simple-import-sort/imports': 'error', + 'simple-import-sort/exports': 'error', + 'no-console': ['error', { allow: ['warn', 'error'] }], + 'no-irregular-whitespace': 'off', + }, + ignorePatterns: ['node_modules', 'wagmi.config.ts'], + settings: { + 'svelte3/typescript': require('typescript'), + }, + overrides: [ + { + files: ['*.ts', '*.svelte'], + extends: [ + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + ], + parserOptions: { + project: ['./tsconfig.json'], + tsconfigRootDir: __dirname, + }, + rules: { + '@typescript-eslint/no-inferrable-types': 'off', + '@typescript-eslint/unbound-method': 'off', + '@typescript-eslint/no-empty-interface': 'off', + + // TODO: fix all these errors and turn back on these rules + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-return': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/no-misused-promises': 'off', + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/restrict-plus-operands': 'off', + }, + }, + { + files: ['*.svelte'], + processor: 'svelte3/svelte3', + // typescript and svelte dont work with template handlers yet. + // https://stackoverflow.com/questions/63337868/svelte-typescript-unexpected-tokensvelteparse-error-when-adding-type-to-an-ev + // we need these 3 rules to be able to do: + // on:change=(e) => anyFunctionHere(). + // when svelte is updated, we can remove these 5 rules for svelte files. + rules: { + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-implicit-any': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/restrict-template-expressions': [ + 'warn', + { + allowNumber: true, + allowBoolean: true, + allowNullish: true, + allowAny: true, + }, + ], + }, + }, + { + files: ['*.spec.ts'], + plugins: ['jest'], + rules: { + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/unbound-method': 'off', + }, + }, + ], +}; diff --git a/packages/pos-dashboard/.gitignore b/packages/pos-dashboard/.gitignore new file mode 100644 index 00000000000..8e51e802eac --- /dev/null +++ b/packages/pos-dashboard/.gitignore @@ -0,0 +1,29 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/ +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.env +.a1.env +.s.env + +# vite +vite.config.ts.timestamp-*.mjs diff --git a/packages/pos-dashboard/.lintstagedrc b/packages/pos-dashboard/.lintstagedrc new file mode 100644 index 00000000000..23019c250e1 --- /dev/null +++ b/packages/pos-dashboard/.lintstagedrc @@ -0,0 +1,6 @@ +{ + "**/*.{js,ts,svelte}": [ + "pnpm prettier:write", + "pnpm lint:fix" + ] +} diff --git a/packages/pos-dashboard/.prettierignore b/packages/pos-dashboard/.prettierignore new file mode 100644 index 00000000000..1b7237d57c2 --- /dev/null +++ b/packages/pos-dashboard/.prettierignore @@ -0,0 +1,12 @@ +dist +build +coverage +node_modules +scripts +example +LICENSES +public +.gitignore +.eslintignore +.lintstagedrc +.prettierignore diff --git a/packages/pos-dashboard/.prettierrc.json b/packages/pos-dashboard/.prettierrc.json new file mode 100644 index 00000000000..2adcf19559f --- /dev/null +++ b/packages/pos-dashboard/.prettierrc.json @@ -0,0 +1,14 @@ +{ + "trailingComma": "all", + "tabWidth": 2, + "semi": true, + "singleQuote": true, + "bracketSameLine": true, + + "plugins": ["prettier-plugin-svelte"], + + "svelteSortOrder": "options-scripts-markup-styles", + "svelteStrictMode": false, + "svelteAllowShorthand": true, + "svelteIndentScriptAndStyle": true +} diff --git a/packages/pos-dashboard/CHANGELOG.md b/packages/pos-dashboard/CHANGELOG.md new file mode 100644 index 00000000000..511536957a5 --- /dev/null +++ b/packages/pos-dashboard/CHANGELOG.md @@ -0,0 +1,188 @@ +# Changelog + +## [0.9.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.8.0...bridge-ui-v0.9.0) (2023-06-26) + + +### Features + +* **bridge-ui:** sentry integration ([#13943](https://github.com/taikoxyz/taiko-mono/issues/13943)) ([05baee8](https://github.com/taikoxyz/taiko-mono/commit/05baee8ca113b607f89c3cc25354768c8d368b46)) + + +### Bug Fixes + +* **bridge-ui:** add extra info to sentry ([#13972](https://github.com/taikoxyz/taiko-mono/issues/13972)) ([50a1034](https://github.com/taikoxyz/taiko-mono/commit/50a1034812ded4ed890f9859fc603bfc801dcdc3)) +* **bridge-ui:** filtering out BLL token failure when bridging ([#13969](https://github.com/taikoxyz/taiko-mono/issues/13969)) ([300be15](https://github.com/taikoxyz/taiko-mono/commit/300be15d3fdcdc9297a7b28427cfcdc905991306)) +* **bridge-ui:** fix issue in beforeSend ([#13971](https://github.com/taikoxyz/taiko-mono/issues/13971)) ([08baec0](https://github.com/taikoxyz/taiko-mono/commit/08baec00cfdc235c0baf3d139a8a62df6e34e914)) +* **bridge-ui:** reduce sample rate ([#14051](https://github.com/taikoxyz/taiko-mono/issues/14051)) ([e836d7d](https://github.com/taikoxyz/taiko-mono/commit/e836d7da3fdd11e443618af15318b1d93bca117e)) + +## [0.8.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.7.1...bridge-ui-v0.8.0) (2023-06-12) + + +### Features + +* **bridge-ui:** add token to wallet ([#13902](https://github.com/taikoxyz/taiko-mono/issues/13902)) ([683b19c](https://github.com/taikoxyz/taiko-mono/commit/683b19cab30bf8c9c713e889f969336e04641187)) +* **bridge-ui:** update favicon ([#13913](https://github.com/taikoxyz/taiko-mono/issues/13913)) ([7b0976f](https://github.com/taikoxyz/taiko-mono/commit/7b0976fb7239826acc178b209126624634e90548)) + + +### Bug Fixes + +* **bridge-ui:** fix use max logic ([#13898](https://github.com/taikoxyz/taiko-mono/issues/13898)) ([1abc3ff](https://github.com/taikoxyz/taiko-mono/commit/1abc3ff1a83b8a87f3e40c498065743e40b4dfff)) +* **bridge-ui:** handle wrong bridge address ([#13880](https://github.com/taikoxyz/taiko-mono/issues/13880)) ([fe425d9](https://github.com/taikoxyz/taiko-mono/commit/fe425d90d39665ceaca7d6d5ca1b13e5369ebed5)) +* **bridge-ui:** inform connect when adding erc20 ([#13900](https://github.com/taikoxyz/taiko-mono/issues/13900)) ([2b21f59](https://github.com/taikoxyz/taiko-mono/commit/2b21f59b1171fcedfafb03cddadc5d950cf4c754)) +* **bridge-ui:** issue with decimals ([#13892](https://github.com/taikoxyz/taiko-mono/issues/13892)) ([fbed474](https://github.com/taikoxyz/taiko-mono/commit/fbed4746ec3c75972dca95238569af2a7054a5a1)) +* **bridge-ui:** mobile issues ([#13927](https://github.com/taikoxyz/taiko-mono/issues/13927)) ([2cb5125](https://github.com/taikoxyz/taiko-mono/commit/2cb51255ee44ba49d1e2444f2d56433807dda81e)) +* **bridge-ui:** notification toast ([#13926](https://github.com/taikoxyz/taiko-mono/issues/13926)) ([9d0a502](https://github.com/taikoxyz/taiko-mono/commit/9d0a502171669258ded67c8d5a3387c98c8c52e0)) + +## [0.7.1](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.7.0...bridge-ui-v0.7.1) (2023-05-26) + + +### Bug Fixes + +* **bridge-ui:** fix proof ([#13748](https://github.com/taikoxyz/taiko-mono/issues/13748)) ([497d7ab](https://github.com/taikoxyz/taiko-mono/commit/497d7abd895bbda2b60311d48bca5ebe3d9755c6)) +* **bridge-ui:** selecting chain was not informing of errors ([#13712](https://github.com/taikoxyz/taiko-mono/issues/13712)) ([5d29c6d](https://github.com/taikoxyz/taiko-mono/commit/5d29c6d06d4a7b24ef31d18c38e7f1941c322215)) + +## [0.7.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.6.0...bridge-ui-v0.7.0) (2023-05-11) + + +### Features + +* **protocol:** major protocol upgrade for alpha-3 testnet ([#13640](https://github.com/taikoxyz/taiko-mono/issues/13640)) ([02552f2](https://github.com/taikoxyz/taiko-mono/commit/02552f2aa001893d326062ce627004c61b46cd26)) + + +### Bug Fixes + +* **bridge-ui:** update abis ([#13705](https://github.com/taikoxyz/taiko-mono/issues/13705)) ([d3d4e69](https://github.com/taikoxyz/taiko-mono/commit/d3d4e693176b8df1dcdd7321c30d66222121a05b)) + +## [0.6.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.5.0...bridge-ui-v0.6.0) (2023-04-27) + + +### Features + +* **bridge-ui:** add transaction list pagination ([#13586](https://github.com/taikoxyz/taiko-mono/issues/13586)) ([a3b7498](https://github.com/taikoxyz/taiko-mono/commit/a3b7498a89576a5aac4c2cd5581d8ce4d457b718)) + + +### Bug Fixes + +* **bridge-ui:** pending transactions custom store with better error handling ([#13581](https://github.com/taikoxyz/taiko-mono/issues/13581)) ([394a9d1](https://github.com/taikoxyz/taiko-mono/commit/394a9d188da5a6bc8e2ffdd80121cb18471b3f08)) +* **bridge-ui:** wrong spacing [#13339](https://github.com/taikoxyz/taiko-mono/issues/13339) ([#13567](https://github.com/taikoxyz/taiko-mono/issues/13567)) ([0ed7638](https://github.com/taikoxyz/taiko-mono/commit/0ed7638d8820feb22c36cc39a35cef7fea12224d)) + +## [0.5.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.4.0...bridge-ui-v0.5.0) (2023-04-08) + + +### Features + +* **bridge-ui:** more informative processing fee ([#13488](https://github.com/taikoxyz/taiko-mono/issues/13488)) ([f5f7b7e](https://github.com/taikoxyz/taiko-mono/commit/f5f7b7ee2a99ec940a73e263fb12e9378d139734)) + + +### Bug Fixes + +* **bridge-ui:** fix issue with claim notice modal ([#13507](https://github.com/taikoxyz/taiko-mono/issues/13507)) ([a3e38fa](https://github.com/taikoxyz/taiko-mono/commit/a3e38faff37f01669e6be6878d35431cb24e40bb)) +* **bridge-ui:** fix relayer ([#13548](https://github.com/taikoxyz/taiko-mono/issues/13548)) ([5f60fd7](https://github.com/taikoxyz/taiko-mono/commit/5f60fd711c71ead82c7c147b4ff8dd12eab02c43)) +* **bridge-ui:** improve notice modal ([#13530](https://github.com/taikoxyz/taiko-mono/issues/13530)) ([3944ca8](https://github.com/taikoxyz/taiko-mono/commit/3944ca8bc5282c2ab0c4b11b2bb1b5f102329d59)) +* **bridge-ui:** NETWORK_ERROR exception ([#13562](https://github.com/taikoxyz/taiko-mono/issues/13562)) ([a779cdb](https://github.com/taikoxyz/taiko-mono/commit/a779cdb3433ea6cc2e0d203cecebde3d9c121f5a)) +* **bridge-ui:** only request connect if require ([#13519](https://github.com/taikoxyz/taiko-mono/issues/13519)) ([92e9032](https://github.com/taikoxyz/taiko-mono/commit/92e9032e88fb997db5e9e9801089671604f0a9bc)) +* **bridge-ui:** Typos in Update ProcessingFee.svelte ([#13518](https://github.com/taikoxyz/taiko-mono/issues/13518)) ([8edd302](https://github.com/taikoxyz/taiko-mono/commit/8edd302fc2ea0764c3fb96bbcc2454f154556167)) +* **bridge-ui:** URL change won't update activeTab ([#13485](https://github.com/taikoxyz/taiko-mono/issues/13485)) ([884e782](https://github.com/taikoxyz/taiko-mono/commit/884e78283d8f98f20b15ff7e3e5e371df30fcd13)) +* **repo:** fix multiple typos ([#13558](https://github.com/taikoxyz/taiko-mono/issues/13558)) ([f54242a](https://github.com/taikoxyz/taiko-mono/commit/f54242aa95e5c5563f8f0a7f9af0a1eab20ab67b)) + +## [0.4.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.3.0...bridge-ui-v0.4.0) (2023-03-29) + + +### Features + +* **bridge-ui:** add outgoing link to bridge docs ([#13391](https://github.com/taikoxyz/taiko-mono/issues/13391)) ([1b3c268](https://github.com/taikoxyz/taiko-mono/commit/1b3c268fb15f9a9e6be8ebc83d588ed4279237ff)) +* **bridge-ui:** switch to using StaticJsonRpcProvider ([#13482](https://github.com/taikoxyz/taiko-mono/issues/13482)) ([f175d39](https://github.com/taikoxyz/taiko-mono/commit/f175d3955e4d37e05f7bc3ba7e479dc257944876)) +* **bridge-ui:** Tabs Component ([#13380](https://github.com/taikoxyz/taiko-mono/issues/13380)) ([a046fa3](https://github.com/taikoxyz/taiko-mono/commit/a046fa3907efa85482bd9bce60de44ea2253be55)) +* **protocol:** merge alpha 2 to main ([#13369](https://github.com/taikoxyz/taiko-mono/issues/13369)) ([2b9cc64](https://github.com/taikoxyz/taiko-mono/commit/2b9cc6466509372f35109b48c00948d2234b0d59)) +* **relayer:** big Gas price ([#13492](https://github.com/taikoxyz/taiko-mono/issues/13492)) ([cb3f7b9](https://github.com/taikoxyz/taiko-mono/commit/cb3f7b9529addc25fe4d3067f2e2c3da3ae1b2bf)) +* **relayer:** merge alpha-2 to main ([#13376](https://github.com/taikoxyz/taiko-mono/issues/13376)) ([3148f6b](https://github.com/taikoxyz/taiko-mono/commit/3148f6ba955e1b3918289332d2ee30f139edea8b)) + + +### Bug Fixes + +* **bridge-ui:** Chain block ([#13452](https://github.com/taikoxyz/taiko-mono/issues/13452)) ([cb32862](https://github.com/taikoxyz/taiko-mono/commit/cb3286270c2a106b1492a78745b64b1b7dcc5ccf)) +* **bridge-ui:** Chain id check ([#13451](https://github.com/taikoxyz/taiko-mono/issues/13451)) ([7285947](https://github.com/taikoxyz/taiko-mono/commit/7285947a4e7a183ecad4555705b8d9eeb5de4341)) + +## [0.3.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.2.0...bridge-ui-v0.3.0) (2023-03-15) + +### Features + +- **bridge-ui:** custom recipient address ([#13309](https://github.com/taikoxyz/taiko-mono/issues/13309)) ([56d8848](https://github.com/taikoxyz/taiko-mono/commit/56d884812b3f12a52895bc666cb25e6edbe6eba0)) +- **bridge-ui:** fetch transactions from relayer api ([#13244](https://github.com/taikoxyz/taiko-mono/issues/13244)) ([9732cc0](https://github.com/taikoxyz/taiko-mono/commit/9732cc084ed99196a4cd2ccedf9187af4d289ed6)) +- **bridge-ui:** support both bull and horse tokens on the bridge UI ([#13249](https://github.com/taikoxyz/taiko-mono/issues/13249)) ([f9f38bb](https://github.com/taikoxyz/taiko-mono/commit/f9f38bb075c02c7976e0d04c84e4b8b5ac255644)) +- **bridge-ui:** support route param to directly open transactions tab ([#13281](https://github.com/taikoxyz/taiko-mono/issues/13281)) ([b4c31cd](https://github.com/taikoxyz/taiko-mono/commit/b4c31cd8566b834cbf83a434c705fb281d375d12)) + +### Bug Fixes + +- **bridge-ui:** minor transactions list fix ([#13266](https://github.com/taikoxyz/taiko-mono/issues/13266)) ([4e78865](https://github.com/taikoxyz/taiko-mono/commit/4e788655ebd508eca3e1665ecb50f3010d2f51af)) +- **bridge-ui:** transaction and pendingTransaction refactor ([#13307](https://github.com/taikoxyz/taiko-mono/issues/13307)) ([9d215cf](https://github.com/taikoxyz/taiko-mono/commit/9d215cfe5ac6863405390444672a1e70e7501032)) +- **website,bridge-ui:** broken docs link + remove deprecated note in docs ([#13259](https://github.com/taikoxyz/taiko-mono/issues/13259)) ([912c155](https://github.com/taikoxyz/taiko-mono/commit/912c15595d7b0e3e2b4ec62fbcebeaf9dbc9db66)) + +## [0.2.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.1.2...bridge-ui-v0.2.0) (2023-03-01) + +### Features + +- **bridge-ui:** add custom ERC20 tokens support ([#13170](https://github.com/taikoxyz/taiko-mono/issues/13170)) ([227d8de](https://github.com/taikoxyz/taiko-mono/commit/227d8de30c10a2d84d0fb390b3709b32d0aee8b8)) +- **bridge-ui:** release token button ([#13203](https://github.com/taikoxyz/taiko-mono/issues/13203)) ([4052aad](https://github.com/taikoxyz/taiko-mono/commit/4052aadd01b75611be3e9b50970aeb649f2de34b)) + +### Bug Fixes + +- **bridge-ui:** change text of button to "bridge" ([#13163](https://github.com/taikoxyz/taiko-mono/issues/13163)) ([0113490](https://github.com/taikoxyz/taiko-mono/commit/0113490f388a986a705d970ef8b4a263de882707)) +- **bridge-ui:** max button css ([#13192](https://github.com/taikoxyz/taiko-mono/issues/13192)) ([9547f94](https://github.com/taikoxyz/taiko-mono/commit/9547f9438585ded0654558ad787b35cdb033a706)) + +## [0.1.2](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.1.1...bridge-ui-v0.1.2) (2023-02-15) + +### Bug Fixes + +- **bridge:** light theme toggle chain button ([#13089](https://github.com/taikoxyz/taiko-mono/issues/13089)) ([ed5a748](https://github.com/taikoxyz/taiko-mono/commit/ed5a7488395aef747bc2b9b27067ecca769991cc)) + +## [0.1.1](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.1.0...bridge-ui-v0.1.1) (2023-01-31) + +### Bug Fixes + +- **bridge-ui:** fix local dependency not found error for jest-dom ([#12990](https://github.com/taikoxyz/taiko-mono/issues/12990)) ([39bfb09](https://github.com/taikoxyz/taiko-mono/commit/39bfb09ff331a5522362ef683c21e75a2f9cfec3)) + +## [0.1.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.0.1...bridge-ui-v0.1.0) (2023-01-19) + +### Features + +- **bridge-ui:** add announcement for bridge ui testnet ([#454](https://github.com/taikoxyz/taiko-mono/issues/454)) ([fb801f2](https://github.com/taikoxyz/taiko-mono/commit/fb801f236aa6033793130afbaf74575e0bb9751e)) +- **bridge-ui:** add memo max length check ([#12980](https://github.com/taikoxyz/taiko-mono/issues/12980)) ([dd389be](https://github.com/taikoxyz/taiko-mono/commit/dd389be4f47bfa37ffd338e674ff9e4bf7ea36c5)) +- **bridge-ui:** bridge light and dark themes ([#12957](https://github.com/taikoxyz/taiko-mono/issues/12957)) ([a36aebd](https://github.com/taikoxyz/taiko-mono/commit/a36aebd8baa2517e970564fcd0a2d0e5d0ea42a8)) +- **bridge-ui:** ERC20 Bridge + approval ([#353](https://github.com/taikoxyz/taiko-mono/issues/353)) ([0652595](https://github.com/taikoxyz/taiko-mono/commit/0652595af38f17ed4bfc6e72bca64d2a6fb5616c)) +- **bridge-ui:** hide input arrows and focus ring ([#439](https://github.com/taikoxyz/taiko-mono/issues/439)) ([2269cc5](https://github.com/taikoxyz/taiko-mono/commit/2269cc5ab913c5da84e9d075b7cf86b233efe5dd)) +- **bridge-ui:** process message ([#387](https://github.com/taikoxyz/taiko-mono/issues/387)) ([d1781c0](https://github.com/taikoxyz/taiko-mono/commit/d1781c0107110e70c87e76d3fc1f6a9bc2aa1a46)) +- **bridge-ui:** recommend fee ([#457](https://github.com/taikoxyz/taiko-mono/issues/457)) ([c373194](https://github.com/taikoxyz/taiko-mono/commit/c3731945efb7d94878fe050f3fe68e046236d21a)) +- **bridge-ui:** remove right padding on mobile view banner ([#455](https://github.com/taikoxyz/taiko-mono/issues/455)) ([0c274a2](https://github.com/taikoxyz/taiko-mono/commit/0c274a2cd60e256659b6a69a8cb78b71fb1c254f)) +- **bridge-ui:** responsive design, memo, style updates, navbar changes ([#396](https://github.com/taikoxyz/taiko-mono/issues/396)) ([742ddcb](https://github.com/taikoxyz/taiko-mono/commit/742ddcbc9e40f266079d8a415ce19d077ac4d980)) +- **bridge-ui:** tooltips, bug fix, general UI enhancements ([#462](https://github.com/taikoxyz/taiko-mono/issues/462)) ([846a18d](https://github.com/taikoxyz/taiko-mono/commit/846a18dac69078d9bb31c03ea735ae2b6648c306)) +- **bridge:** add faucet link to announcement ([#485](https://github.com/taikoxyz/taiko-mono/issues/485)) ([d1a4921](https://github.com/taikoxyz/taiko-mono/commit/d1a492183fd4ab8f195697864f54c35349dca93d)) +- **bridge:** autoconnect wallet on load ([#6643](https://github.com/taikoxyz/taiko-mono/issues/6643)) ([1332aa2](https://github.com/taikoxyz/taiko-mono/commit/1332aa2dbb0a606720f7783b250b0850ec32fa9c)) +- **bridge:** bridge design ([#369](https://github.com/taikoxyz/taiko-mono/issues/369)) ([04702db](https://github.com/taikoxyz/taiko-mono/commit/04702db23e3fd705133408e077b8d1a040951202)) +- **bridge:** bridge transactions ([#411](https://github.com/taikoxyz/taiko-mono/issues/411)) ([19dd7ab](https://github.com/taikoxyz/taiko-mono/commit/19dd7abd4a2f5bc83e43d31938e43501472ff108)) +- **bridge:** change pending message for l2 to l1 ([#486](https://github.com/taikoxyz/taiko-mono/issues/486)) ([11be3cd](https://github.com/taikoxyz/taiko-mono/commit/11be3cd192039b3cb5ecf8c42c1bcae0b9243f3c)) +- **bridge:** non-mm wallets ([#438](https://github.com/taikoxyz/taiko-mono/issues/438)) ([7f3ac3b](https://github.com/taikoxyz/taiko-mono/commit/7f3ac3b2f3d0b650ce2db06a13655c032b771b33)) +- migrate to nextra ([#12947](https://github.com/taikoxyz/taiko-mono/issues/12947)) ([ac11959](https://github.com/taikoxyz/taiko-mono/commit/ac1195940d1ab450e95367e6008162de1d22f0ab)) +- **ui:** Template / initial repo for UI ([#304](https://github.com/taikoxyz/taiko-mono/issues/304)) ([a396511](https://github.com/taikoxyz/taiko-mono/commit/a39651133d4c3bd8b6eea5db93daec7698600707)) + +### Bug Fixes + +- **bridge-ui:** Eth fix ([#475](https://github.com/taikoxyz/taiko-mono/issues/475)) ([08175b8](https://github.com/taikoxyz/taiko-mono/commit/08175b803aaabdf6195f5a7a3ed8e0baf9558cc5)) +- **bridge-ui:** ios dropdown a11y and horizontal padding ([#425](https://github.com/taikoxyz/taiko-mono/issues/425)) ([b8fbdea](https://github.com/taikoxyz/taiko-mono/commit/b8fbdead07338e76c3e06360cd5ba2447de2eea9)) +- **bridge-ui:** make testnet naming consistent with UI ([#481](https://github.com/taikoxyz/taiko-mono/issues/481)) ([58f4259](https://github.com/taikoxyz/taiko-mono/commit/58f4259f1bcfd181b0d59e8b97c00df748176b2a)) +- **bridge-ui:** toggle chain ([#395](https://github.com/taikoxyz/taiko-mono/issues/395)) ([2d45b9c](https://github.com/taikoxyz/taiko-mono/commit/2d45b9c69e3eac8fe8d4b8baf8a24194fd25a3b2)) +- **bridge-ui:** transaction tab same width as bridge width ([#8195](https://github.com/taikoxyz/taiko-mono/issues/8195)) ([85a5bfd](https://github.com/taikoxyz/taiko-mono/commit/85a5bfd235b7e5884b135322cbee9b12475a7b1b)) +- **bridge:** bridge Ui should estimate gas not used hardcoded gas limit ([#12962](https://github.com/taikoxyz/taiko-mono/issues/12962)) ([1eb3c6f](https://github.com/taikoxyz/taiko-mono/commit/1eb3c6f5add36a8856d45c85fbaafb32655a8b70)) +- **bridge:** fix max amount button ([#6246](https://github.com/taikoxyz/taiko-mono/issues/6246)) ([409e7a4](https://github.com/taikoxyz/taiko-mono/commit/409e7a4cb46440f392952471411b20e5bd419ad7)) +- **bridge:** max amount button should deduct gas ([#12661](https://github.com/taikoxyz/taiko-mono/issues/12661)) ([7692ac8](https://github.com/taikoxyz/taiko-mono/commit/7692ac89456b353ad0fdf8c898cd5058cde0e2b4)) +- **bridge:** minor responsiveness fixes ([#407](https://github.com/taikoxyz/taiko-mono/issues/407)) ([0d617c5](https://github.com/taikoxyz/taiko-mono/commit/0d617c533e0baf40cea915ab327b308ce852be42)) +- **bridge:** minor responsiveness fixes ([#407](https://github.com/taikoxyz/taiko-mono/issues/407)) ([0358add](https://github.com/taikoxyz/taiko-mono/commit/0358addf37186294fa2a452321d6f642762abde7)) +- **bridge:** minor ui fixes ([#474](https://github.com/taikoxyz/taiko-mono/issues/474)) ([5998197](https://github.com/taikoxyz/taiko-mono/commit/59981970e17e146ca09afbea1964409372d954d2)) +- **bridge:** multiple message processed toasts ([#8186](https://github.com/taikoxyz/taiko-mono/issues/8186)) ([a091bc0](https://github.com/taikoxyz/taiko-mono/commit/a091bc05bd64f0a0c9a930e4fe296adf363a7233)) +- **bridge:** remove input arrows from firefox ([#6248](https://github.com/taikoxyz/taiko-mono/issues/6248)) ([197ae01](https://github.com/taikoxyz/taiko-mono/commit/197ae01bdfd0c7256671c2045dfdf145171b9172)) +- **bridge:** reported issue fixes ([#12368](https://github.com/taikoxyz/taiko-mono/issues/12368)) ([0e596cb](https://github.com/taikoxyz/taiko-mono/commit/0e596cb1c95beeef0d90682d98fd6e50ecffd5a2)) +- **bridge:** ui and disconnect fixes ([#7076](https://github.com/taikoxyz/taiko-mono/issues/7076)) ([b6345e2](https://github.com/taikoxyz/taiko-mono/commit/b6345e28abd414cbb52e403369323976f8b14272)) +- **bridge:** ui fixes ([#489](https://github.com/taikoxyz/taiko-mono/issues/489)) ([6c080cb](https://github.com/taikoxyz/taiko-mono/commit/6c080cb3be95468deace6fdd3d9467902fef4be1)) +- **bridge:** use metamask wagmi connector ([#2080](https://github.com/taikoxyz/taiko-mono/issues/2080)) ([0d74845](https://github.com/taikoxyz/taiko-mono/commit/0d74845d0192736229cbc682ff7fd8f8610ee643)) +- **protocol:** Remove enableDestChain functionality ([#12341](https://github.com/taikoxyz/taiko-mono/issues/12341)) ([362d083](https://github.com/taikoxyz/taiko-mono/commit/362d083497cc74b3bcd05a406beeff2101a422ef)) +- **relayer:** gas limit + use loading as priorioty on bridge form ([#487](https://github.com/taikoxyz/taiko-mono/issues/487)) ([3747d4c](https://github.com/taikoxyz/taiko-mono/commit/3747d4c41e836ab533e864ec44073ae681bf4b36)) diff --git a/packages/pos-dashboard/README.md b/packages/pos-dashboard/README.md new file mode 100644 index 00000000000..b8f77a640a4 --- /dev/null +++ b/packages/pos-dashboard/README.md @@ -0,0 +1,55 @@ +# Bridge UI + +🚨 **Important** 🚨: Currently the Bridge UI is in maintenance mode. Please, hold off sending PRs. + +## Installation + +`pnpm install` + +## Usage + +`pnpm start` + +## Environment Variables + +You can use the following values in the `.env` file to spin up the Bridge UI locally. + +``` +VITE_L1_RPC_URL=https://l1rpc.internal.taiko.xyz +VITE_L2_RPC_URL=https://rpc.internal.taiko.xyz +VITE_L3_RPC_URL=https://l3rpc.internal.taiko.xyz + +VITE_L1_EXPLORER_URL=https://l1explorer.internal.taiko.xyz +VITE_L2_EXPLORER_URL=https://explorer.internal.taiko.xyz +VITE_L3_EXPLORER_URL=https://l3explorer.internal.taiko.xyz + +VITE_RELAYER_URL=https://relayer.internal.taiko.xyz + +VITE_L1_CHAIN_ID=31336 +VITE_L2_CHAIN_ID=167001 +VITE_L3_CHAIN_ID=167002 + +VITE_L1_CHAIN_NAME="Ethereum" +VITE_L2_CHAIN_NAME="Taiko" +VITE_L3_CHAIN_NAME="L3 Chain" + +VITE_L1_CROSS_CHAIN_SYNC_ADDRESS=0x0B306BF915C4d645ff596e518fAf3F9669b97016 +VITE_L2_CROSS_CHAIN_SYNC_ADDRESS=0x1000777700000000000000000000000000000001 +VITE_L3_CROSS_CHAIN_SYNC_ADDRESS=0x1000777700000000000000000000000000000001 + +VITE_L1_TOKEN_VAULT_ADDRESS=0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44 +VITE_L2_TOKEN_VAULT_ADDRESS=0x1000777700000000000000000000000000000002 +VITE_L3_TOKEN_VAULT_ADDRESS=0x1000777700000000000000000000000000000002 + +VITE_L1_BRIDGE_ADDRESS=0xc6e7DF5E7b4f2A278906862b61205850344D4e7d +VITE_L2_BRIDGE_ADDRESS=0x1000777700000000000000000000000000000004 +VITE_L3_BRIDGE_ADDRESS=0x1000777700000000000000000000000000000004 + +VITE_L1_SIGNAL_SERVICE_ADDRESS=0x7a2088a1bFc9d81c55368AE168C2C02570cB814F +VITE_L2_SIGNAL_SERVICE_ADDRESS=0x1000777700000000000000000000000000000007 +VITE_L3_SIGNAL_SERVICE_ADDRESS=0x1000777700000000000000000000000000000007 + +VITE_TEST_ERC20=[{"address": "0x9A676e781A523b5d0C0e43731313A708CB607508", "symbol": "BLL", "name": "Bull Token"}, {"address": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", "symbol": "HORSE", "name": "Horse Token"}] + +VITE_WALLETCONNECT_PROJECT_ID=1234567890 +``` diff --git a/packages/pos-dashboard/__mocks__/axios/index.ts b/packages/pos-dashboard/__mocks__/axios/index.ts new file mode 100644 index 00000000000..a12187c620a --- /dev/null +++ b/packages/pos-dashboard/__mocks__/axios/index.ts @@ -0,0 +1,7 @@ +import type { AxiosRequestConfig } from 'axios'; + +const axios = { + get: jest.fn, [string, AxiosRequestConfig]>(), +}; + +export default axios; diff --git a/packages/pos-dashboard/index.html b/packages/pos-dashboard/index.html new file mode 100644 index 00000000000..5ea2fa7be5c --- /dev/null +++ b/packages/pos-dashboard/index.html @@ -0,0 +1,34 @@ + + + + + + + + + + + Staking Dashboard + + +
    + + + + + diff --git a/packages/pos-dashboard/jest.config.js b/packages/pos-dashboard/jest.config.js new file mode 100644 index 00000000000..041f3f7d19e --- /dev/null +++ b/packages/pos-dashboard/jest.config.js @@ -0,0 +1,61 @@ +/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */ +export default { + transform: { + '^.+\\.js$': 'babel-jest', + '^.+\\.ts$': 'ts-jest', + '^.+\\.svelte$': [ + 'svelte-jester', + { + preprocess: true, + }, + ], + }, + globals: { + 'ts-jest': { + diagnostics: { + ignoreCodes: [1343], + }, + astTransformers: { + before: [ + { + path: 'node_modules/ts-jest-mock-import-meta', + }, + ], + }, + }, + }, + transformIgnorePatterns: ['node_modules/(?!(svelte-i18n)/)'], + moduleFileExtensions: ['ts', 'js', 'svelte', 'json'], + collectCoverage: true, + coverageDirectory: 'coverage', + coverageReporters: [ + 'lcov', + 'text', + 'cobertura', + 'json-summary', + 'json', + 'text-summary', + 'json', + ], + coverageThreshold: { + global: { + // TODO: temporal coverage decrease due to new logic, + // services, utils and and error handling. + // Mising tests for: + // - relayer-api/RelayerAPIService (partial test coverage) + // - bridge/ERC20Bridge (partial test coverage) + // - bridge/ETHBridge (partial test coverage) + statements: 93, + branches: 92, + functions: 97, + lines: 93, + }, + }, + modulePathIgnorePatterns: ['/public/build/'], + preset: 'ts-jest', + testEnvironment: 'jsdom', + testPathIgnorePatterns: ['/node_modules/'], + coveragePathIgnorePatterns: ['/src/components/'], + testTimeout: 40 * 1000, + watchPathIgnorePatterns: ['node_modules'], +}; diff --git a/packages/pos-dashboard/package.json b/packages/pos-dashboard/package.json new file mode 100644 index 00000000000..62ef6f1e95a --- /dev/null +++ b/packages/pos-dashboard/package.json @@ -0,0 +1,85 @@ +{ + "name": "@taiko/pos-dashboard", + "version": "0.9.0", + "private": true, + "type": "module", + "scripts": { + "start": "pnpm run dev", + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "svelte:check": "svelte-check --tsconfig ./tsconfig.json --ignore ./wagmi.config.ts", + "test": "pnpm exec jest --silent", + "test:debug": "pnpm exec jest", + "prettier": "pnpm exec prettier '**/*.{js,ts,svelte}'", + "prettier:write": "pnpm run prettier '**/*.{js,ts,svelte}' --write", + "prettier:check": "pnpm run prettier '**/*.{js,ts,svelte}' --check", + "lint": "pnpm exec eslint './**/*.{js,ts,svelte}' --ignore-path .eslintignore", + "lint:fix": "pnpm exec eslint --fix './**/*.{js,ts,svelte}' --ignore-path .eslintignore", + "generate-abi": "pnpm exec wagmi generate" + }, + "devDependencies": { + "@babel/preset-env": "^7.16.0", + "@sentry/vite-plugin": "^2.2.1", + "@sveltejs/vite-plugin-svelte": "^1.0.1", + "@tsconfig/svelte": "^3.0.0", + "@types/debug": "^4.1.7", + "@types/eslint": "^8.2.1", + "@types/estree": "^0.0.50", + "@types/jest": "^27.0.2", + "@types/mixpanel": "^2.14.3", + "@types/sanitize-html": "^2.6.2", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", + "@wagmi/cli": "^1.0.1", + "@zerodevx/svelte-toast": "^0.6.3", + "abitype": "^0.8.2", + "autoprefixer": "^10.4.13", + "babel-jest": "^27.3.1", + "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", + "daisyui": "1.16.6", + "eslint": "^7.32.0", + "eslint-plugin-jest": "^27.2.1", + "eslint-plugin-simple-import-sort": "^10.0.0", + "eslint-plugin-svelte3": "^4.0.0", + "fs-extra": "^11.1.1", + "jest": "^27.5.1", + "node-sass": "^7.0.1", + "postcss": "^8.4.19", + "postcss-cli": "^7.1.2", + "postcss-loader": "^6.2.0", + "prettier": "2.7.1", + "prettier-plugin-svelte": "^2.9.0", + "rollup-plugin-node-builtins": "^2.0.0", + "rollup-plugin-polyfill-node": "^0.10.2", + "svelte": "^3.53.1", + "svelte-check": "^2.8.0", + "svelte-heros-v2": "^0.3.10", + "svelte-jester": "^2.1.5", + "svelte-loader": "^3.1.2", + "svelte-preprocess": "^4.10.7", + "tailwindcss": "^3.2.4", + "theme-change": "^2.2.0", + "ts-jest": "^27.0.7", + "ts-jest-mock-import-meta": "^0.12.0", + "ts-loader": "^9.2.6", + "tslib": "^2.4.0", + "typescript": "^4.6.4", + "vite": "^3.0.0" + }, + "dependencies": { + "@coinbase/wallet-sdk": "^3.6.3", + "@ethersproject/experimental": "^5.7.0", + "@lottiefiles/svelte-lottie-player": "^0.2.0", + "@sentry/svelte": "^7.54.0", + "@sveltestack/svelte-query": "^1.6.0", + "axios": "^1.2.0", + "buffer": "^6.0.3", + "debug": "^4.3.4", + "ethers": "^5.7.1", + "identicon.js": "^2.3.3", + "svelte-i18n": "^3.5.1", + "svelte-spa-router": "^3.2.0", + "wagmi": "^0.12.16" + } +} diff --git a/packages/pos-dashboard/postcss.config.cjs b/packages/pos-dashboard/postcss.config.cjs new file mode 100644 index 00000000000..12a703d900d --- /dev/null +++ b/packages/pos-dashboard/postcss.config.cjs @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/packages/pos-dashboard/public/lottie/loader.json b/packages/pos-dashboard/public/lottie/loader.json new file mode 100644 index 00000000000..9252ebfdab3 --- /dev/null +++ b/packages/pos-dashboard/public/lottie/loader.json @@ -0,0 +1,268 @@ +{ + "nm": "Comp 1", + "mn": "", + "layers": [ + { + "ty": 4, + "nm": "Shape Layer 2", + "mn": "", + "sr": 1, + "st": 0, + "op": 300, + "ip": 0, + "hd": false, + "cl": "", + "ln": "", + "ddd": 0, + "bm": 0, + "tt": 0, + "hasMask": false, + "td": 0, + "ao": 0, + "ks": { + "a": { "a": 0, "k": [-22.637, 19.301, 0], "ix": 1 }, + "s": { + "a": 0, + "k": [33.33333333333334, 33.33333333333334, 100], + "ix": 6 + }, + "sk": { "a": 0, "k": 0 }, + "p": { + "a": 0, + "k": [100.02066666666668, 100.00000000000003, 0], + "ix": 2 + }, + "sa": { "a": 0, "k": 0 }, + "o": { "a": 0, "k": 80, "ix": 11 }, + "r": { + "a": 1, + "k": [ + { + "o": { "x": 0.472, "y": 0.326 }, + "i": { "x": 0.526, "y": 0.673 }, + "s": [0], + "t": 0 + }, + { + "o": { "x": 0.167, "y": 0.167 }, + "i": { "x": 0.833, "y": 0.833 }, + "s": [183], + "t": 60 + } + ], + "ix": 10 + } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "cl": "", + "ln": "", + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Ellipse 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "el", + "bm": 0, + "cl": "", + "ln": "", + "hd": false, + "mn": "ADBE Vector Shape - Ellipse", + "nm": "Ellipse Path 1", + "d": 1, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "s": { "a": 0, "k": [368.602, 368.602], "ix": 2 } + }, + { + "ty": "st", + "bm": 0, + "cl": "", + "ln": "", + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { "a": 0, "k": 100, "ix": 4 }, + "w": { "a": 0, "k": 49, "ix": 5 }, + "d": [], + "c": { "a": 0, "k": [0.9882, 0.0588, 0.7529], "ix": 3 } + }, + { + "ty": "tr", + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "p": { "a": 0, "k": [-22.699, 19.301], "ix": 2 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "o": { "a": 0, "k": 100, "ix": 7 } + } + ] + }, + { + "ty": "tm", + "bm": 0, + "cl": "", + "ln": "", + "hd": false, + "mn": "ADBE Vector Filter - Trim", + "nm": "Trim Paths 1", + "ix": 2, + "e": { + "a": 1, + "k": [ + { + "o": { "x": 0.559, "y": 0 }, + "i": { "x": 0.504, "y": 1 }, + "s": [1], + "t": 0 + }, + { + "o": { "x": 0.167, "y": 0.167 }, + "i": { "x": 0.833, "y": 0.833 }, + "s": [50], + "t": 30 + } + ], + "ix": 2 + }, + "o": { "a": 0, "k": 0, "ix": 3 }, + "s": { + "a": 1, + "k": [ + { + "o": { "x": 0.579, "y": 0 }, + "i": { "x": 0.438, "y": 1 }, + "s": [0], + "t": 30 + }, + { + "o": { "x": 0.167, "y": 0.167 }, + "i": { "x": 0.833, "y": 0.833 }, + "s": [49], + "t": 60 + } + ], + "ix": 1 + }, + "m": 1 + } + ], + "ind": 0 + }, + { + "ty": 4, + "nm": "Shape Layer 1", + "mn": "", + "sr": 1, + "st": 0, + "op": 300, + "ip": 0, + "hd": false, + "cl": "", + "ln": "", + "ddd": 0, + "bm": 0, + "tt": 0, + "hasMask": false, + "td": 0, + "ao": 0, + "ks": { + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { + "a": 0, + "k": [33.33333333333334, 33.33333333333334, 100], + "ix": 6 + }, + "sk": { "a": 0, "k": 0 }, + "p": { + "a": 0, + "k": [107.56633333333339, 93.56633333333338, 0], + "ix": 2 + }, + "sa": { "a": 0, "k": 0 }, + "o": { "a": 0, "k": 10, "ix": 11 }, + "r": { "a": 0, "k": 0, "ix": 10 } + }, + "ef": [], + "shapes": [ + { + "ty": "gr", + "bm": 0, + "cl": "", + "ln": "", + "hd": false, + "mn": "ADBE Vector Group", + "nm": "Ellipse 1", + "ix": 1, + "cix": 2, + "np": 3, + "it": [ + { + "ty": "el", + "bm": 0, + "cl": "", + "ln": "", + "hd": false, + "mn": "ADBE Vector Shape - Ellipse", + "nm": "Ellipse Path 1", + "d": 1, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "s": { "a": 0, "k": [368.602, 368.602], "ix": 2 } + }, + { + "ty": "st", + "bm": 0, + "cl": "", + "ln": "", + "hd": false, + "mn": "ADBE Vector Graphic - Stroke", + "nm": "Stroke 1", + "lc": 2, + "lj": 1, + "ml": 4, + "o": { "a": 0, "k": 100, "ix": 4 }, + "w": { "a": 0, "k": 49, "ix": 5 }, + "d": [], + "c": { "a": 0, "k": [0.698, 0.0588, 0.5373], "ix": 3 } + }, + { + "ty": "tr", + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "p": { "a": 0, "k": [-22.699, 19.301], "ix": 2 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "o": { "a": 0, "k": 100, "ix": 7 } + } + ] + } + ], + "ind": 1 + } + ], + "ddd": 0, + "h": 200, + "w": 200, + "meta": { + "a": "", + "k": "", + "d": "", + "g": "@lottiefiles/toolkit-js 0.17.3", + "tc": "#ffffff" + }, + "v": "5.5.0", + "fr": 30, + "op": 60, + "ip": 0, + "assets": [] +} diff --git a/packages/pos-dashboard/public/taiko-favicon.svg b/packages/pos-dashboard/public/taiko-favicon.svg new file mode 100644 index 00000000000..f61040109c4 --- /dev/null +++ b/packages/pos-dashboard/public/taiko-favicon.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/pos-dashboard/src/App.svelte b/packages/pos-dashboard/src/App.svelte new file mode 100644 index 00000000000..5f976b9edb6 --- /dev/null +++ b/packages/pos-dashboard/src/App.svelte @@ -0,0 +1,20 @@ + + +
    + + +
    + + + diff --git a/packages/pos-dashboard/src/app.ts b/packages/pos-dashboard/src/app.ts new file mode 100644 index 00000000000..0532d66bc88 --- /dev/null +++ b/packages/pos-dashboard/src/app.ts @@ -0,0 +1,17 @@ +import './styles/app.css'; + +import { Buffer } from 'buffer'; + +import App from './App.svelte'; +import { setupI18n } from './i18n'; + +setupI18n({ withLocale: 'en' }); + +const app = new App({ + target: document.getElementById('app'), +}); + +// @ts-ignore +window.Buffer = Buffer; + +export default app; diff --git a/packages/pos-dashboard/src/chain/chains.ts b/packages/pos-dashboard/src/chain/chains.ts new file mode 100644 index 00000000000..cd9e035c2bb --- /dev/null +++ b/packages/pos-dashboard/src/chain/chains.ts @@ -0,0 +1,40 @@ +import type { Chain as WagmiChain } from 'wagmi'; + +import Eth from '../components/icons/ETH.svelte'; +import { + L1_EXPLORER_URL, + L1_RPC, + L1_CHAIN_ID, + L1_CHAIN_NAME, +} from '../constants/envVars'; +import type { Chain, ChainID } from '../domain/chain'; + +export const mainnetChain: Chain = { + id: L1_CHAIN_ID, + name: L1_CHAIN_NAME, + rpc: L1_RPC, + enabled: true, + icon: Eth, + explorerUrl: L1_EXPLORER_URL, +}; + +export const chains: Record = { + [L1_CHAIN_ID]: mainnetChain, +}; + +export const mainnetWagmiChain: WagmiChain = { + id: L1_CHAIN_ID, + name: L1_CHAIN_NAME, + network: '', + nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, + rpcUrls: { + default: { http: [L1_RPC] }, + public: { http: [L1_RPC] }, + }, + blockExplorers: { + default: { + name: 'Main', + url: L1_EXPLORER_URL, + }, + }, +}; diff --git a/packages/pos-dashboard/src/components/AddressDropdown.svelte b/packages/pos-dashboard/src/components/AddressDropdown.svelte new file mode 100644 index 00000000000..9689aa433a9 --- /dev/null +++ b/packages/pos-dashboard/src/components/AddressDropdown.svelte @@ -0,0 +1,148 @@ + + + +{#if $signer} + +{/if} diff --git a/packages/pos-dashboard/src/components/Button.svelte b/packages/pos-dashboard/src/components/Button.svelte new file mode 100644 index 00000000000..bc3ff8f75c8 --- /dev/null +++ b/packages/pos-dashboard/src/components/Button.svelte @@ -0,0 +1,16 @@ + + + + diff --git a/packages/pos-dashboard/src/components/ButtonWithTooltip.svelte b/packages/pos-dashboard/src/components/ButtonWithTooltip.svelte new file mode 100644 index 00000000000..dbfc1b154c7 --- /dev/null +++ b/packages/pos-dashboard/src/components/ButtonWithTooltip.svelte @@ -0,0 +1,12 @@ + + +
    + + +
    diff --git a/packages/pos-dashboard/src/components/ChainDropdown.svelte b/packages/pos-dashboard/src/components/ChainDropdown.svelte new file mode 100644 index 00000000000..de1a78bc419 --- /dev/null +++ b/packages/pos-dashboard/src/components/ChainDropdown.svelte @@ -0,0 +1,76 @@ + + + diff --git a/packages/pos-dashboard/src/components/ConnectWallet.svelte b/packages/pos-dashboard/src/components/ConnectWallet.svelte new file mode 100644 index 00000000000..d2d0dc64956 --- /dev/null +++ b/packages/pos-dashboard/src/components/ConnectWallet.svelte @@ -0,0 +1,83 @@ + + + + + (isConnectWalletModalOpen = false)}> +
    + {#each wagmiClient.connectors as connector} + + {/each} +
    +
    diff --git a/packages/pos-dashboard/src/components/CurrentProvers/CurrentProvers.svelte b/packages/pos-dashboard/src/components/CurrentProvers/CurrentProvers.svelte new file mode 100644 index 00000000000..cef9ff614df --- /dev/null +++ b/packages/pos-dashboard/src/components/CurrentProvers/CurrentProvers.svelte @@ -0,0 +1,35 @@ + + +
    + Address + Amount + Capacity + RewardPerGas + {#each provers as prover} + + + window.open( + `https://explorer.test.taiko.xyz/address/${prover.address}`, + '_blank', + )}>{truncateString(prover.address, 8)}... + {ethers.utils.formatUnits(prover.amountStaked.toString(), 8)} + {prover.currentCapacity} + {prover.rewardPerGas} + + {/each} +
    diff --git a/packages/pos-dashboard/src/components/CurrentProvers/index.ts b/packages/pos-dashboard/src/components/CurrentProvers/index.ts new file mode 100644 index 00000000000..f78513c64a6 --- /dev/null +++ b/packages/pos-dashboard/src/components/CurrentProvers/index.ts @@ -0,0 +1 @@ +export { default } from './CurrentProvers.svelte'; diff --git a/packages/pos-dashboard/src/components/Events/Event.svelte b/packages/pos-dashboard/src/components/Events/Event.svelte new file mode 100644 index 00000000000..dbfd0e8bbd8 --- /dev/null +++ b/packages/pos-dashboard/src/components/Events/Event.svelte @@ -0,0 +1,20 @@ + + + + + + + + {event.data.Raw.transactionHash} + + + + diff --git a/packages/pos-dashboard/src/components/Events/EventDetail.svelte b/packages/pos-dashboard/src/components/Events/EventDetail.svelte new file mode 100644 index 00000000000..bd4ac4cdc0f --- /dev/null +++ b/packages/pos-dashboard/src/components/Events/EventDetail.svelte @@ -0,0 +1,87 @@ + + + + + + + + + {#if transaction.message} + + + + + + + + + + + + + {#if transaction.message.callValue} + + + + + {/if} + {#if transaction.message.processingFee} + + + + + {/if} + + + + + + +
    Tx hash + + {addressSubsection(transaction.hash)} + + +
    Sender + {addressSubsection(transaction.message.sender)} +
    Owner + {addressSubsection(transaction.message.owner)} +
    Refund address + {addressSubsection(transaction.message.refundAddress)} +
    Call value + {ethers.utils.formatEther(transaction.message.callValue.toString())} + ETH +
    Processing fee + {ethers.utils.formatEther(transaction.message.processingFee)} ETH +
    Gas limit + {transaction.message.gasLimit} +
    Memo +