From 3893d9c5dc72fecd8877c73d18c4c413ae7c0ed7 Mon Sep 17 00:00:00 2001 From: Gustavo Gama Date: Sat, 9 Nov 2024 00:16:12 -0300 Subject: [PATCH] chore: refactor config module tests --- .golangci.yml | 3 + cmd/start.go | 3 +- go.mod | 50 +- go.sum | 139 +- pkg/cli/config.go | 19 +- pkg/cli/config_test.go | 289 ++-- pkg/contracts/CallProxy.go | 332 ++++ pkg/contracts/ManyChainMultiSig.go | 1238 +++++++++++++++ pkg/contracts/RBACTimelock.go | 2336 ++++++++++++++++++++++++++++ pkg/contracts/abigen_log.go | 10 + pkg/timelock/timelock.go | 12 +- scripts/golangci.yml | 3 + tests/containers/common.go | 60 + tests/containers/geth.go | 156 ++ tests/integration/account.go | 39 + tests/integration/suite.go | 121 ++ tests/integration/suite_test.go | 11 + tests/integration/timelock_test.go | 116 ++ tests/logger.go | 54 + 19 files changed, 4817 insertions(+), 174 deletions(-) create mode 100644 pkg/contracts/CallProxy.go create mode 100644 pkg/contracts/ManyChainMultiSig.go create mode 100644 pkg/contracts/RBACTimelock.go create mode 100644 pkg/contracts/abigen_log.go create mode 100644 tests/containers/common.go create mode 100644 tests/containers/geth.go create mode 100644 tests/integration/account.go create mode 100644 tests/integration/suite.go create mode 100644 tests/integration/suite_test.go create mode 100644 tests/integration/timelock_test.go create mode 100644 tests/logger.go diff --git a/.golangci.yml b/.golangci.yml index b139663..7ce597f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -50,3 +50,6 @@ linters: max-same-issues: 0 severity: default-severity: error +issues: + exclude-dirs: + - pkg/contracts diff --git a/cmd/start.go b/cmd/start.go index 14b70f9..aad6ef0 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -1,6 +1,7 @@ package cmd import ( + "context" "math/big" "github.com/smartcontractkit/timelock-worker/pkg/cli" @@ -91,7 +92,7 @@ func startTimelock(cmd *cobra.Command) { logs.Fatal().Msgf("error creating the timelock-worker: %s", err.Error()) } - if err := tWorker.Listen(); err != nil { + if err := tWorker.Listen(context.Background()); err != nil { logs.Fatal().Msgf("error while starting timelock-worker: %s", err.Error()) } diff --git a/go.mod b/go.mod index 44b8a12..c43c678 100644 --- a/go.mod +++ b/go.mod @@ -3,49 +3,79 @@ module github.com/smartcontractkit/timelock-worker go 1.22 require ( + github.com/docker/go-connections v0.5.0 github.com/ethereum/go-ethereum v1.13.15 github.com/prometheus/client_golang v1.19.0 github.com/rs/zerolog v1.31.0 + github.com/smartcontractkit/chain-selectors v1.0.17 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.17.0 github.com/stretchr/testify v1.9.0 + github.com/testcontainers/testcontainers-go v0.34.0 ) require ( - github.com/Microsoft/go-winio v0.6.1 // indirect + dario.cat/mergo v1.0.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/containerd/containerd v1.7.18 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect + github.com/cpuguy83/dockercfg v0.3.2 // indirect github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/docker v27.1.1+incompatible // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/gogo/protobuf v1.3.3 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // 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.19 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/smartcontractkit/chain-selectors v1.0.17 // indirect + github.com/shirou/gopsutil/v3 v3.23.12 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.5.1 // indirect @@ -55,17 +85,19 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect - golang.org/x/crypto v0.17.0 // indirect + golang.org/x/crypto v0.22.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/mod v0.14.0 // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index f0e5964..8b690e0 100644 --- a/go.sum +++ b/go.sum @@ -35,13 +35,19 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +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/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.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -52,6 +58,8 @@ github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf 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/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/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/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -80,13 +88,23 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao= +github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= +github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -97,6 +115,14 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5il github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= +github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= +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/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= @@ -107,6 +133,8 @@ github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.15 h1:U7sSGYGo4SPjP6iNIifNoyIAiNjrmQkz6EwQG+/EZWo= github.com/ethereum/go-ethereum v1.13.15/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= @@ -123,6 +151,11 @@ github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY 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-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= @@ -174,7 +207,10 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.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/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -194,13 +230,15 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.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/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -226,8 +264,8 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 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.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -240,6 +278,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -249,8 +289,6 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= @@ -258,6 +296,18 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +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/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +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/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -271,6 +321,10 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -279,6 +333,8 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -300,6 +356,7 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= @@ -308,6 +365,14 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= +github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartcontractkit/chain-selectors v1.0.17 h1:otOlYUnutS8oQBEAi9RLQICqZP0Nxy0k8vOZuSMJa4w= github.com/smartcontractkit/chain-selectors v1.0.17/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= @@ -327,6 +392,8 @@ github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -343,12 +410,15 @@ github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbe github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5fl+nylMaIr9PVV1w343YRDtsy+Rwu7XI= github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= +github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= +github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= @@ -357,14 +427,30 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.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.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= @@ -376,8 +462,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= 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= @@ -413,8 +499,6 @@ 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.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-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= @@ -452,6 +536,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 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= @@ -507,6 +593,7 @@ golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -514,9 +601,11 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-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-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -524,10 +613,13 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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= @@ -593,8 +685,6 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -663,6 +753,11 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13 h1:vlzZttNJGVqTsRFU9AmdnrcO1Znh8Ew9kCD//yjigk0= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 h1:6GQBEOdGkX6MMTLT9V+TjtIRZCw9VPD5Z+yHY9wMgS0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= 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.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -679,6 +774,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= +google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= 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= @@ -691,8 +788,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -712,6 +809,8 @@ 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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= 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= diff --git a/pkg/cli/config.go b/pkg/cli/config.go index 8c32e10..e10e198 100644 --- a/pkg/cli/config.go +++ b/pkg/cli/config.go @@ -1,6 +1,7 @@ package cli import ( + "fmt" "os" "strconv" @@ -54,23 +55,29 @@ func NewTimelockCLI() (*Config, error) { if os.Getenv("FROM_BLOCK") != "" { fb, err := strconv.Atoi(os.Getenv("FROM_BLOCK")) - if err == nil { - c.FromBlock = int64(fb) + if err != nil { + return nil, fmt.Errorf("unable to parse FROM_BLOCK value: %w", err) } + + c.FromBlock = int64(fb) } if os.Getenv("POLL_PERIOD") != "" { pp, err := strconv.Atoi(os.Getenv("POLL_PERIOD")) - if err == nil { - c.PollPeriod = int64(pp) + if err != nil { + return nil, fmt.Errorf("unable to parse POLL_PERIOD value: %w", err) } + + c.PollPeriod = int64(pp) } if os.Getenv("EVENT_LISTENER_POLL_PERIOD") != "" { pp, err := strconv.Atoi(os.Getenv("EVENT_LISTENER_POLL_PERIOD")) - if err == nil { - c.EventListenerPollPeriod = int64(pp) + if err != nil { + return nil, fmt.Errorf("unable to parse EVENT_LISTENER_POLL_PERIOD value: %w", err) } + + c.EventListenerPollPeriod = int64(pp) } return &c, nil diff --git a/pkg/cli/config_test.go b/pkg/cli/config_test.go index 5b56f61..ec13ff0 100644 --- a/pkg/cli/config_test.go +++ b/pkg/cli/config_test.go @@ -1,161 +1,184 @@ package cli_test import ( - "bufio" - "fmt" "os" - "reflect" "testing" "github.com/smartcontractkit/timelock-worker/pkg/cli" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) -func TestNewConfigRaw(t *testing.T) { - var newConfig = &cli.Config{ - NodeURL: "foo:test", - TimelockAddress: "0x12345", - CallProxyAddress: "0x12345", - PrivateKey: "0123456789", - FromBlock: 0, - } - - if assert.NotNil(t, newConfig) { - assert.Equal(t, "foo:test", newConfig.NodeURL) - assert.Equal(t, "0x12345", newConfig.TimelockAddress) - assert.Equal(t, "0x12345", newConfig.CallProxyAddress) - assert.Equal(t, "0123456789", newConfig.PrivateKey) - assert.Equal(t, int64(0), newConfig.FromBlock) - } -} - -func TestNewTimelockCLIFromEnvVar(t *testing.T) { - os.Unsetenv("NODE_URL") - os.Unsetenv("TIMELOCK_ADDRESS") - os.Unsetenv("CALL_PROXY_ADDRESS") - os.Unsetenv("PRIVATE_KEY") - os.Unsetenv("POLL_PERIOD") - os.Unsetenv("FROM_BLOCK") - - t.Setenv("NODE_URL", "wss://goerli/test") - t.Setenv("TIMELOCK_ADDRESS", "0x12345") - t.Setenv("CALL_PROXY_ADDRESS", "0x12345") - t.Setenv("PRIVATE_KEY", "1234567890") - t.Setenv("FROM_BLOCK", "1234567890") - - var wantedConfig = cli.Config{ - NodeURL: "wss://goerli/test", - TimelockAddress: "0x12345", - CallProxyAddress: "0x12345", - PrivateKey: "1234567890", - FromBlock: 1234567890, - } +func Test_NewTimelockCLI(t *testing.T) { + const configFileName = "timelock.env" tests := []struct { name string + setup func(t *testing.T) want *cli.Config - wantErr bool + wantErr string }{ { - "Environment Vars - should succeed", - &wantedConfig, - false, + name: "load from file", + setup: func(t *testing.T) { + unsetenvs(t, "NODE_URL", "TIMELOCK_ADDRESS", "CALL_PROXY_ADDRESS", "PRIVATE_KEY", "FROM_BLOCK", + "POLL_PERIOD", "EVENT_LISTENER_POLL_PERIOD") + + err := os.WriteFile(configFileName, []byte(string( + "NODE_URL=wss://goerli/test\n"+ + "TIMELOCK_ADDRESS=0x12345\n"+ + "CALL_PROXY_ADDRESS=0x67890\n"+ + "PRIVATE_KEY=9876543210\n"+ + "FROM_BLOCK=1\n"+ + "POLL_PERIOD=2\n"+ + "EVENT_LISTENER_POLL_PERIOD=3\n", + )), os.FileMode(0644)) + require.NoError(t, err) + + t.Cleanup(func() { os.Remove(configFileName) }) + }, + want: &cli.Config{ + NodeURL: "wss://goerli/test", + TimelockAddress: "0x12345", + CallProxyAddress: "0x67890", + PrivateKey: "9876543210", + FromBlock: 1, + PollPeriod: 2, + EventListenerPollPeriod: 3, + }, }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := cli.NewTimelockCLI() - if (err != nil) != tt.wantErr { - t.Errorf("NewTimelockCLI() error = %v, wantErr %v", err, tt.wantErr) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("NewTimelockCLI() = %v, want %v", got, tt.want) - } - }) - } -} - -func TestNewTimelockCLIFromEnvVarAndFile(t *testing.T) { - os.Unsetenv("NODE_URL") - os.Unsetenv("TIMELOCK_ADDRESS") - os.Unsetenv("CALL_PROXY_ADDRESS") - os.Unsetenv("PRIVATE_KEY") - os.Unsetenv("POLL_PERIOD") - os.Unsetenv("FROM_BLOCK") - - f, err := os.Create("timelock.env") - if err != nil { - return - } - defer f.Close() - - w := bufio.NewWriter(f) - _, err = fmt.Fprintf(w, "NODE_URL=wss://goerli/test\n") - if err != nil { - return - } - - _, err = fmt.Fprintf(w, "TIMELOCK_ADDRESS=0x12345\n") - if err != nil { - return - } - - _, err = fmt.Fprintf(w, "CALL_PROXY_ADDRESS=0x6789\n") - if err != nil { - return - } - - _, err = fmt.Fprintf(w, "PRIVATE_KEY=9876543210\n") - if err != nil { - return - } - _, err = fmt.Fprintf(w, "FROM_BLOCK=0\n") - if err != nil { - return - } - - w.Flush() - - // envvars should prevail over timelock.env - t.Setenv("PRIVATE_KEY", "abcdefg") - t.Setenv("POLL_PERIOD", "10") - t.Setenv("FROM_BLOCK", "1234567890") - - var config = cli.Config{ - NodeURL: "wss://goerli/test", - TimelockAddress: "0x12345", - CallProxyAddress: "0x6789", - PrivateKey: "abcdefg", - FromBlock: 1234567890, - PollPeriod: 10, - } - - tests := []struct { - name string - want *cli.Config - wantErr bool - }{ { - "timelock.env and env vars - should succeed", - &config, - false, + name: "load from environment (overrides values in file)", + setup: func(t *testing.T) { + err := os.WriteFile(configFileName, []byte(string( + "NODE_URL=wss://goerli/test\n"+ + "TIMELOCK_ADDRESS=0x12345\n"+ + "CALL_PROXY_ADDRESS=0x67890\n"+ + "PRIVATE_KEY=9876543210\n"+ + "FROM_BLOCK=1\n"+ + "POLL_PERIOD=2\n"+ + "EVENT_LISTENER_POLL_PERIOD=3\n", + )), os.FileMode(0644)) + require.NoError(t, err) + + t.Setenv("NODE_URL", "http://node.url/path") + t.Setenv("TIMELOCK_ADDRESS", "0x111111") + t.Setenv("CALL_PROXY_ADDRESS", "0x222222") + t.Setenv("PRIVATE_KEY", "333333") + t.Setenv("FROM_BLOCK", "4") + t.Setenv("POLL_PERIOD", "5") + t.Setenv("EVENT_LISTENER_POLL_PERIOD", "6") + + t.Cleanup(func() { os.Remove(configFileName) }) + }, + want: &cli.Config{ + NodeURL: "http://node.url/path", + TimelockAddress: "0x111111", + CallProxyAddress: "0x222222", + PrivateKey: "333333", + FromBlock: 4, + PollPeriod: 5, + EventListenerPollPeriod: 6, + }, + }, + { + name: "load from environment and file", + setup: func(t *testing.T) { + err := os.WriteFile(configFileName, []byte(string( + "NODE_URL=wss://goerli/test\n"+ + "TIMELOCK_ADDRESS=0x12345\n"+ + "CALL_PROXY_ADDRESS=0x67890\n", + )), os.FileMode(0644)) + require.NoError(t, err) + + unsetenvs(t, "NODE_URL", "TIMELOCK_ADDRESS", "CALL_PROXY_ADDRESS") + t.Setenv("PRIVATE_KEY", "333333") + t.Setenv("FROM_BLOCK", "4") + t.Setenv("POLL_PERIOD", "5") + t.Setenv("EVENT_LISTENER_POLL_PERIOD", "6") + + t.Cleanup(func() { os.Remove(configFileName) }) + }, + want: &cli.Config{ + NodeURL: "wss://goerli/test", + TimelockAddress: "0x12345", + CallProxyAddress: "0x67890", + PrivateKey: "333333", + FromBlock: 4, + PollPeriod: 5, + EventListenerPollPeriod: 6, + }, + }, + { + name: "fails due to non-numeric FROM_BLOCK", + setup: func(t *testing.T) { + t.Setenv("NODE_URL", "http://node.url/path") + t.Setenv("TIMELOCK_ADDRESS", "0x111111") + t.Setenv("CALL_PROXY_ADDRESS", "0x222222") + t.Setenv("PRIVATE_KEY", "333333") + t.Setenv("POLL_PERIOD", "5") + t.Setenv("EVENT_LISTENER_POLL_PERIOD", "6") + t.Setenv("FROM_BLOCK", "invalid") + }, + wantErr: "unable to parse FROM_BLOCK value:", + }, + { + name: "fails due to non-numeric POLL_PERIOD", + setup: func(t *testing.T) { + t.Setenv("NODE_URL", "http://node.url/path") + t.Setenv("TIMELOCK_ADDRESS", "0x111111") + t.Setenv("CALL_PROXY_ADDRESS", "0x222222") + t.Setenv("PRIVATE_KEY", "333333") + t.Setenv("FROM_BLOCK", "4") + t.Setenv("EVENT_LISTENER_POLL_PERIOD", "6") + t.Setenv("POLL_PERIOD", "invalid") + }, + wantErr: "unable to parse POLL_PERIOD value:", + }, + { + name: "fails due to non-numeric EVENT_LISTSENER_POLL_PERIOD", + setup: func(t *testing.T) { + t.Setenv("NODE_URL", "http://node.url/path") + t.Setenv("TIMELOCK_ADDRESS", "0x111111") + t.Setenv("CALL_PROXY_ADDRESS", "0x222222") + t.Setenv("PRIVATE_KEY", "333333") + t.Setenv("FROM_BLOCK", "4") + t.Setenv("POLL_PERIOD", "5") + t.Setenv("EVENT_LISTENER_POLL_PERIOD", "invalid") + }, + wantErr: "unable to parse EVENT_LISTENER_POLL_PERIOD value:", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + tt.setup(t) + got, err := cli.NewTimelockCLI() - if (err != nil) != tt.wantErr { - t.Errorf("NewTimelockCLI() error = %v, wantErr %v", err, tt.wantErr) - return - } - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("NewTimelockCLI() = %+vv, want %+v", got, tt.want) + + if tt.wantErr == "" { + require.Equal(t, tt.want, got) + } else { + require.ErrorContains(t, err, tt.wantErr) } }) } +} - if err := os.Remove("timelock.env"); err != nil { - return +func unsetenvs(t *testing.T, keys ...string) { + for _, key := range keys { + prevValue, ok := os.LookupEnv(key) + + if err := os.Unsetenv(key); err != nil { + t.Fatalf("cannot unset environment variable: %v", err) + } + + if ok { + t.Cleanup(func() { + os.Setenv(key, prevValue) + }) + } else { + t.Cleanup(func() { + os.Unsetenv(key) + }) + } } } diff --git a/pkg/contracts/CallProxy.go b/pkg/contracts/CallProxy.go new file mode 100644 index 0000000..07cca59 --- /dev/null +++ b/pkg/contracts/CallProxy.go @@ -0,0 +1,332 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "errors" + "fmt" + "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" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +var CallProxyMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"TargetSet\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false}]", + Bin: "0x60a060405234801561001057600080fd5b5060405161013e38038061013e83398101604081905261002f91610077565b6001600160a01b03811660808190526040519081527f3bfb4bbf112628248058745a3c57e35b13369386e474b8e56c552f3063a4a1969060200160405180910390a1506100a7565b60006020828403121561008957600080fd5b81516001600160a01b03811681146100a057600080fd5b9392505050565b608051607f6100bf600039600060060152607f6000f3fe60806040527f0000000000000000000000000000000000000000000000000000000000000000366000803760008036600034855af13d6000803e80156043573d6000f35b503d6000fdfea26469706673582212202974aca3a8ae03528c7df03132603029149d639b2cd6de0ce90e33abd7a3eb9064736f6c63430008130033", +} + +var CallProxyABI = CallProxyMetaData.ABI + +var CallProxyBin = CallProxyMetaData.Bin + +func DeployCallProxy(auth *bind.TransactOpts, backend bind.ContractBackend, target common.Address) (common.Address, *types.Transaction, *CallProxy, error) { + parsed, err := CallProxyMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(CallProxyBin), backend, target) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &CallProxy{address: address, abi: *parsed, CallProxyCaller: CallProxyCaller{contract: contract}, CallProxyTransactor: CallProxyTransactor{contract: contract}, CallProxyFilterer: CallProxyFilterer{contract: contract}}, nil +} + +type CallProxy struct { + address common.Address + abi abi.ABI + CallProxyCaller + CallProxyTransactor + CallProxyFilterer +} + +type CallProxyCaller struct { + contract *bind.BoundContract +} + +type CallProxyTransactor struct { + contract *bind.BoundContract +} + +type CallProxyFilterer struct { + contract *bind.BoundContract +} + +type CallProxySession struct { + Contract *CallProxy + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type CallProxyCallerSession struct { + Contract *CallProxyCaller + CallOpts bind.CallOpts +} + +type CallProxyTransactorSession struct { + Contract *CallProxyTransactor + TransactOpts bind.TransactOpts +} + +type CallProxyRaw struct { + Contract *CallProxy +} + +type CallProxyCallerRaw struct { + Contract *CallProxyCaller +} + +type CallProxyTransactorRaw struct { + Contract *CallProxyTransactor +} + +func NewCallProxy(address common.Address, backend bind.ContractBackend) (*CallProxy, error) { + abi, err := abi.JSON(strings.NewReader(CallProxyABI)) + if err != nil { + return nil, err + } + contract, err := bindCallProxy(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &CallProxy{address: address, abi: abi, CallProxyCaller: CallProxyCaller{contract: contract}, CallProxyTransactor: CallProxyTransactor{contract: contract}, CallProxyFilterer: CallProxyFilterer{contract: contract}}, nil +} + +func NewCallProxyCaller(address common.Address, caller bind.ContractCaller) (*CallProxyCaller, error) { + contract, err := bindCallProxy(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CallProxyCaller{contract: contract}, nil +} + +func NewCallProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*CallProxyTransactor, error) { + contract, err := bindCallProxy(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CallProxyTransactor{contract: contract}, nil +} + +func NewCallProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*CallProxyFilterer, error) { + contract, err := bindCallProxy(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CallProxyFilterer{contract: contract}, nil +} + +func bindCallProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CallProxyMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_CallProxy *CallProxyRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CallProxy.Contract.CallProxyCaller.contract.Call(opts, result, method, params...) +} + +func (_CallProxy *CallProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CallProxy.Contract.CallProxyTransactor.contract.Transfer(opts) +} + +func (_CallProxy *CallProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CallProxy.Contract.CallProxyTransactor.contract.Transact(opts, method, params...) +} + +func (_CallProxy *CallProxyCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _CallProxy.Contract.contract.Call(opts, result, method, params...) +} + +func (_CallProxy *CallProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _CallProxy.Contract.contract.Transfer(opts) +} + +func (_CallProxy *CallProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _CallProxy.Contract.contract.Transact(opts, method, params...) +} + +func (_CallProxy *CallProxyTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _CallProxy.contract.RawTransact(opts, calldata) +} + +func (_CallProxy *CallProxySession) Fallback(calldata []byte) (*types.Transaction, error) { + return _CallProxy.Contract.Fallback(&_CallProxy.TransactOpts, calldata) +} + +func (_CallProxy *CallProxyTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _CallProxy.Contract.Fallback(&_CallProxy.TransactOpts, calldata) +} + +type CallProxyTargetSetIterator struct { + Event *CallProxyTargetSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *CallProxyTargetSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(CallProxyTargetSet) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(CallProxyTargetSet) + 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() + } +} + +func (it *CallProxyTargetSetIterator) Error() error { + return it.fail +} + +func (it *CallProxyTargetSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type CallProxyTargetSet struct { + Target common.Address + Raw types.Log +} + +func (_CallProxy *CallProxyFilterer) FilterTargetSet(opts *bind.FilterOpts) (*CallProxyTargetSetIterator, error) { + + logs, sub, err := _CallProxy.contract.FilterLogs(opts, "TargetSet") + if err != nil { + return nil, err + } + return &CallProxyTargetSetIterator{contract: _CallProxy.contract, event: "TargetSet", logs: logs, sub: sub}, nil +} + +func (_CallProxy *CallProxyFilterer) WatchTargetSet(opts *bind.WatchOpts, sink chan<- *CallProxyTargetSet) (event.Subscription, error) { + + logs, sub, err := _CallProxy.contract.WatchLogs(opts, "TargetSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(CallProxyTargetSet) + if err := _CallProxy.contract.UnpackLog(event, "TargetSet", 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 +} + +func (_CallProxy *CallProxyFilterer) ParseTargetSet(log types.Log) (*CallProxyTargetSet, error) { + event := new(CallProxyTargetSet) + if err := _CallProxy.contract.UnpackLog(event, "TargetSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +func (_CallProxy *CallProxy) ParseLog(log types.Log) (AbigenLog, error) { + switch log.Topics[0] { + case _CallProxy.abi.Events["TargetSet"].ID: + return _CallProxy.ParseTargetSet(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (CallProxyTargetSet) Topic() common.Hash { + return common.HexToHash("0x3bfb4bbf112628248058745a3c57e35b13369386e474b8e56c552f3063a4a196") +} + +func (_CallProxy *CallProxy) Address() common.Address { + return _CallProxy.address +} + +type CallProxyInterface interface { + Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) + + FilterTargetSet(opts *bind.FilterOpts) (*CallProxyTargetSetIterator, error) + + WatchTargetSet(opts *bind.WatchOpts, sink chan<- *CallProxyTargetSet) (event.Subscription, error) + + ParseTargetSet(log types.Log) (*CallProxyTargetSet, error) + + ParseLog(log types.Log) (AbigenLog, error) + + Address() common.Address +} diff --git a/pkg/contracts/ManyChainMultiSig.go b/pkg/contracts/ManyChainMultiSig.go new file mode 100644 index 0000000..b55a1ff --- /dev/null +++ b/pkg/contracts/ManyChainMultiSig.go @@ -0,0 +1,1238 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "errors" + "fmt" + "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" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type ManyChainMultiSigConfig struct { + Signers []ManyChainMultiSigSigner + GroupQuorums [32]uint8 + GroupParents [32]uint8 +} + +type ManyChainMultiSigOp struct { + ChainId *big.Int + MultiSig common.Address + Nonce *big.Int + To common.Address + Value *big.Int + Data []byte +} + +type ManyChainMultiSigRootMetadata struct { + ChainId *big.Int + MultiSig common.Address + PreOpCount *big.Int + PostOpCount *big.Int + OverridePreviousRoot bool +} + +type ManyChainMultiSigSignature struct { + V uint8 + R [32]byte + S [32]byte +} + +type ManyChainMultiSigSigner struct { + Addr common.Address + Index uint8 + Group uint8 +} + +var ManyChainMultiSigMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"MAX_NUM_SIGNERS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"NUM_GROUPS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"execute\",\"inputs\":[{\"name\":\"op\",\"type\":\"tuple\",\"internalType\":\"structManyChainMultiSig.Op\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"multiSig\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"nonce\",\"type\":\"uint40\",\"internalType\":\"uint40\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"proof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"getConfig\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structManyChainMultiSig.Config\",\"components\":[{\"name\":\"signers\",\"type\":\"tuple[]\",\"internalType\":\"structManyChainMultiSig.Signer[]\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"group\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"groupQuorums\",\"type\":\"uint8[32]\",\"internalType\":\"uint8[32]\"},{\"name\":\"groupParents\",\"type\":\"uint8[32]\",\"internalType\":\"uint8[32]\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getOpCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint40\",\"internalType\":\"uint40\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"validUntil\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRootMetadata\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structManyChainMultiSig.RootMetadata\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"multiSig\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"preOpCount\",\"type\":\"uint40\",\"internalType\":\"uint40\"},{\"name\":\"postOpCount\",\"type\":\"uint40\",\"internalType\":\"uint40\"},{\"name\":\"overridePreviousRoot\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setConfig\",\"inputs\":[{\"name\":\"signerAddresses\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"signerGroups\",\"type\":\"uint8[]\",\"internalType\":\"uint8[]\"},{\"name\":\"groupQuorums\",\"type\":\"uint8[32]\",\"internalType\":\"uint8[32]\"},{\"name\":\"groupParents\",\"type\":\"uint8[32]\",\"internalType\":\"uint8[32]\"},{\"name\":\"clearRoot\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setRoot\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"validUntil\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"metadata\",\"type\":\"tuple\",\"internalType\":\"structManyChainMultiSig.RootMetadata\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"multiSig\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"preOpCount\",\"type\":\"uint40\",\"internalType\":\"uint40\"},{\"name\":\"postOpCount\",\"type\":\"uint40\",\"internalType\":\"uint40\"},{\"name\":\"overridePreviousRoot\",\"type\":\"bool\",\"internalType\":\"bool\"}]},{\"name\":\"metadataProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"},{\"name\":\"signatures\",\"type\":\"tuple[]\",\"internalType\":\"structManyChainMultiSig.Signature[]\",\"components\":[{\"name\":\"v\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"r\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"s\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"ConfigSet\",\"inputs\":[{\"name\":\"config\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structManyChainMultiSig.Config\",\"components\":[{\"name\":\"signers\",\"type\":\"tuple[]\",\"internalType\":\"structManyChainMultiSig.Signer[]\",\"components\":[{\"name\":\"addr\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"index\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"group\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"groupQuorums\",\"type\":\"uint8[32]\",\"internalType\":\"uint8[32]\"},{\"name\":\"groupParents\",\"type\":\"uint8[32]\",\"internalType\":\"uint8[32]\"}]},{\"name\":\"isRootCleared\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewRoot\",\"inputs\":[{\"name\":\"root\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"validUntil\",\"type\":\"uint32\",\"indexed\":false,\"internalType\":\"uint32\"},{\"name\":\"metadata\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structManyChainMultiSig.RootMetadata\",\"components\":[{\"name\":\"chainId\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"multiSig\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"preOpCount\",\"type\":\"uint40\",\"internalType\":\"uint40\"},{\"name\":\"postOpCount\",\"type\":\"uint40\",\"internalType\":\"uint40\"},{\"name\":\"overridePreviousRoot\",\"type\":\"bool\",\"internalType\":\"bool\"}]}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OpExecuted\",\"inputs\":[{\"name\":\"nonce\",\"type\":\"uint40\",\"indexed\":true,\"internalType\":\"uint40\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"CallReverted\",\"inputs\":[{\"name\":\"error\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"GroupTreeNotWellFormed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InsufficientSigners\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidSigner\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"MissingConfig\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OutOfBoundsGroup\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OutOfBoundsGroupQuorum\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OutOfBoundsNumOfSigners\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PendingOps\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PostOpCountReached\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProofCannotBeVerified\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootExpired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignedHashAlreadySeen\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignerGroupsLengthMismatch\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignerInDisabledGroup\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignersAddressesMustBeStrictlyIncreasing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ValidUntilHasAlreadyPassed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongChainId\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongMultiSig\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongNonce\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongPostOpCount\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongPreOpCount\",\"inputs\":[]}]", + Bin: "0x60806040523480156200001157600080fd5b506200001d3362000023565b62000091565b600180546001600160a01b03191690556200003e8162000041565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61264380620000a16000396000f3fe6080604052600436106100e15760003560e01c8063846c67ef1161007f578063b759d68511610059578063b759d68514610345578063c3f909d414610358578063e30c39781461037a578063f2fde38b1461039857600080fd5b8063846c67ef146102de5780638da5cb5b146102fe578063a76f55981461033057600080fd5b80636b45fb3e116100bb5780636b45fb3e146101a3578063715018a61461029257806379ba5097146102a95780637cc38b28146102be57600080fd5b80635a2519ef146100ed5780635ca1e16514610119578063627e8a3b1461016f57600080fd5b366100e857005b600080fd5b3480156100f957600080fd5b50610102602081565b60405160ff90911681526020015b60405180910390f35b34801561012557600080fd5b506040805160608101825260075480825260085463ffffffff81166020808501829052600160201b90920464ffffffffff1693850193909352835191825281019190915201610110565b34801561017b57600080fd5b50600854600160201b900464ffffffffff1660405164ffffffffff9091168152602001610110565b3480156101af57600080fd5b5061023b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152506040805160a0810182526009548152600a546001600160a01b0381166020830152600160a01b810464ffffffffff90811693830193909352600160c81b81049092166060820152600160f01b90910460ff161515608082015290565b6040516101109190815181526020808301516001600160a01b03169082015260408083015164ffffffffff908116918301919091526060808401519091169082015260809182015115159181019190915260a00190565b34801561029e57600080fd5b506102a76103b8565b005b3480156102b557600080fd5b506102a76103cc565b3480156102ca57600080fd5b506102a76102d9366004611b5b565b61044b565b3480156102ea57600080fd5b506102a76102f9366004611c5f565b610a2f565b34801561030a57600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610110565b34801561033c57600080fd5b5061010260c881565b6102a7610353366004611d0a565b6111a2565b34801561036457600080fd5b5061036d61144d565b6040516101109190611dab565b34801561038657600080fd5b506001546001600160a01b0316610318565b3480156103a457600080fd5b506102a76103b3366004611e5f565b61158f565b6103c0611600565b6103ca600061165a565b565b60015433906001600160a01b0316811461043f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084015b60405180910390fd5b6104488161165a565b50565b60006104bb888860405160200161047292919091825263ffffffff16602082015260400190565b604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b60008181526006602052604090205490915060ff16156104ee576040516348c2688b60e01b815260040160405180910390fd5b6040805160608101825260008082526020820181905291810182905290610513611a19565b60005b858110156106de573687878381811061053157610531611e7c565b6060029190910191506000905061055e8761054f6020850185611e92565b84602001358560400135611673565b9050806001600160a01b0316856001600160a01b03161061059257604051630946dd8160e31b815260040160405180910390fd5b6001600160a01b038082166000818152600260209081526040918290208251606081018452905494851680825260ff600160a01b8704811693830193909352600160a81b90950490911691810191909152975091955085911461060857604051632057875960e21b815260040160405180910390fd5b60408601515b848160ff166020811061062357610623611e7c565b6020020180519061063382611ecb565b60ff9081169091526004915082166020811061065157610651611e7c565b602091828204019190069054906101000a900460ff1660ff16858260ff166020811061067f5761067f611e7c565b602002015160ff16036106c85760ff8116156106c857600560ff8216602081106106ab576106ab611e7c565b602081049091015460ff601f9092166101000a900416905061060e565b50505080806106d690611eea565b915050610516565b5060045460ff1660000361070557604051635530c2e560e11b815260040160405180910390fd5b600454815160ff91821691161015610730576040516361774dcf60e11b815260040160405180910390fd5b505050428763ffffffff16101561075a5760405163582bd22960e11b815260040160405180910390fd5b60007fe6b82be989101b4eb519770114b997b97b3c8707515286748a871717f0e4ea1c8760405160200161078f929190611f82565b6040516020818303038152906040528051906020012090506107e78686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508d925085915061169b9050565b6108035760405162948a8760e61b815260040160405180910390fd5b5046863514610824576040516217e1ef60ea1b815260040160405180910390fd5b6108346040870160208801611e5f565b6001600160a01b0316306001600160a01b03161461086557604051639a84601560e01b815260040160405180910390fd5b600854600a5464ffffffffff600160201b909204821691600160c81b9091041681148015906108a1575061089f60a0880160808901611f96565b155b156108bf57604051633230825b60e01b815260040160405180910390fd5b6108cf6060880160408901611fb3565b64ffffffffff168164ffffffffff16146108fc5760405163a255a76360e01b815260040160405180910390fd5b61090c6080880160608901611fb3565b64ffffffffff166109236060890160408a01611fb3565b64ffffffffff161115610949576040516318c26a5f60e31b815260040160405180910390fd5b600082815260066020908152604091829020805460ff191660011790558151606080820184528c825263ffffffff8c1692820192909252918281019161099491908b01908b01611fb3565b64ffffffffff9081169091528151600755602082015160088054604090940151909216600160201b0268ffffffffffffffffff1990931663ffffffff909116179190911790558660096109e78282611fd0565b905050887f7ea643ae44677f24e0d6f40168893712daaf729b0a38fe7702d21cb544c841018989604051610a1c929190612067565b60405180910390a2505050505050505050565b610a37611600565b851580610a44575060c886115b15610a6257604051633c3b072960e21b815260040160405180910390fd5b858414610a8257604051630f1f305360e41b815260040160405180910390fd5b610a8a611a19565b60005b85811015610b42576020878783818110610aa957610aa9611e7c565b9050602002016020810190610abe9190611e92565b60ff1610610adf57604051635cd7472960e11b815260040160405180910390fd5b81878783818110610af257610af2611e7c565b9050602002016020810190610b079190611e92565b60ff1660208110610b1a57610b1a611e7c565b60200201805190610b2a82611ecb565b60ff1690525080610b3a81611eea565b915050610a8d565b5060005b6020811015610d3457600081610b5e60016020612081565b60ff16610b6b919061209a565b90508015801590610ba3575080858260208110610b8a57610b8a611e7c565b602002016020810190610b9d9190611e92565b60ff1610155b80610bdd575080158015610bdd5750848160208110610bc457610bc4611e7c565b602002016020810190610bd79190611e92565b60ff1615155b15610bfe576040516001627ce2ed60e11b0319815260040160405180910390fd5b6000868260208110610c1257610c12611e7c565b602002016020810190610c259190611e92565b60ff161590508015610c6e57838260208110610c4357610c43611e7c565b602002015160ff1615610c6957604051638db4e75d60e01b815260040160405180910390fd5b610d1f565b868260208110610c8057610c80611e7c565b602002016020810190610c939190611e92565b60ff16848360208110610ca857610ca8611e7c565b602002015160ff161015610ccf57604051635d8009b760e11b815260040160405180910390fd5b83868360208110610ce257610ce2611e7c565b602002016020810190610cf59190611e92565b60ff1660208110610d0857610d08611e7c565b60200201805190610d1882611ecb565b60ff169052505b50508080610d2c90611eea565b915050610b46565b505060006003600001805480602002602001604051908101604052809291908181526020016000905b82821015610db457600084815260209081902060408051606081018252918501546001600160a01b038116835260ff600160a01b8204811684860152600160a81b9091041690820152825260019092019101610d5d565b50505050905060005b8151811015610e58576000828281518110610dda57610dda611e7c565b602090810291909101810151516001600160a01b03811660009081526002909252604090912080546001600160b01b0319169055600380549192509080610e2357610e236120ad565b600082815260209020810160001990810180546001600160b01b03191690550190555080610e5081611eea565b915050610dbd565b5060035415610e6957610e696120c3565b610e766004856020611a38565b50610e846005846020611a38565b506000805b8881101561108c57898982818110610ea357610ea3611e7c565b9050602002016020810190610eb89190611e5f565b6001600160a01b0316826001600160a01b031610610ee957604051630946dd8160e31b815260040160405180910390fd5b600060405180606001604052808c8c85818110610f0857610f08611e7c565b9050602002016020810190610f1d9190611e5f565b6001600160a01b031681526020018360ff1681526020018a8a85818110610f4657610f46611e7c565b9050602002016020810190610f5b9190611e92565b60ff169052905080600260008d8d86818110610f7957610f79611e7c565b9050602002016020810190610f8e9190611e5f565b6001600160a01b0390811682526020808301939093526040918201600090812085518154878701519786015160ff908116600160a81b90810260ff60a81b199a8316600160a01b9081026001600160a81b0319958616968a1696909617959095178b161790945560038054600181018255955289517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9095018054988b0151978b01518216909402961690910295169190921617929092179092169190911790558a8a8381811061106157611061611e7c565b90506020020160208101906110769190611e5f565b925050808061108490611eea565b915050610e89565b50821561115d5760088054604080516060808201835260008083526020808401829052600160201b80870464ffffffffff1694860185905260079290925568ffffffffffffffffff1990951690830217909455815160a08101835246808252309482018590529281018290529384018190526001608090940193909352600955600a8054600160f01b6001600160c81b031990911664ffffffffff60a01b1990931692909217600160a01b84021765ffffffffffff60c81b1916600160c81b90930260ff60f01b1916929092171790555b7f0a4974ad206b9c736f9ab2feac1c9b1d043fe4ef377c70ae45659f2ef089f03e60038460405161118f929190612361565b60405180910390a1505050505050505050565b60408051606081018252600754815260085463ffffffff8116602083015264ffffffffff600160201b9091048116928201839052600a549192600160c81b9092041611611202576040516315b6266360e31b815260040160405180910390fd5b83354614611222576040516217e1ef60ea1b815260040160405180910390fd5b306112336040860160208701611e5f565b6001600160a01b03161461125a57604051639a84601560e01b815260040160405180910390fd5b806020015163ffffffff16421115611285576040516309ba674360e41b815260040160405180910390fd5b806040015164ffffffffff168460400160208101906112a49190611fb3565b64ffffffffff16146112c95760405163d9c6386f60e01b815260040160405180910390fd5b60007f08d275622006c4ca82d03f498e90163cafd53c663a48470c3b52ac8bfbd9f52c856040516020016112fe92919061242e565b604051602081830303815290604052805190602001209050611356848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250508551915084905061169b565b6113725760405162948a8760e61b815260040160405180910390fd5b60408201516113829060016124f7565b6008805464ffffffffff92909216600160201b0268ffffffffff00000000199092169190911790556113d46113bd6080870160608801611e5f565b60808701356113cf60a089018961251c565b6116b3565b6113e46060860160408701611fb3565b64ffffffffff167f87d58fdd48be753fb9ef4ec8a5895086c401506da8b4d752abc90602c3e62d1d61141c6080880160608901611e5f565b61142960a089018961251c565b896080013560405161143e9493929190612563565b60405180910390a25050505050565b611455611ace565b604080516003805460806020820284018101909452606083018181529293919284929091849160009085015b828210156114d857600084815260209081902060408051606081018252918501546001600160a01b038116835260ff600160a01b8204811684860152600160a81b9091041690820152825260019092019101611481565b50505090825250604080516104008101918290526020928301929091600185019190826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116114ff575050509284525050604080516104008101918290526020938401939092506002850191826000855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411611553579050505050505081525050905090565b611597611600565b600180546001600160a01b0383166001600160a01b031990911681179091556115c86000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146103ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610436565b600180546001600160a01b031916905561044881611740565b600080600061168487878787611790565b9150915061169181611854565b5095945050505050565b6000826116a8858461199e565b1490505b9392505050565b600080856001600160a01b03168585856040516116d1929190612599565b60006040518083038185875af1925050503d806000811461170e576040519150601f19603f3d011682016040523d82523d6000602084013e611713565b606091505b50915091508161173857806040516370de1b4b60e01b815260040161043691906125a9565b505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156117c7575060009050600361184b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561181b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166118445760006001925092505061184b565b9150600090505b94509492505050565b6000816004811115611868576118686125f7565b036118705750565b6001816004811115611884576118846125f7565b036118d15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610436565b60028160048111156118e5576118e56125f7565b036119325760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610436565b6003816004811115611946576119466125f7565b036104485760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610436565b600081815b84518110156119e3576119cf828683815181106119c2576119c2611e7c565b60200260200101516119ed565b9150806119db81611eea565b9150506119a3565b5090505b92915050565b6000818310611a095760008281526020849052604090206116ac565b5060009182526020526040902090565b6040518061040001604052806020906020820280368337509192915050565b600183019183908215611abe5791602002820160005b83821115611a8f57833560ff1683826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302611a4e565b8015611abc5782816101000a81549060ff0219169055600101602081600001049283019260010302611a8f565b505b50611aca929150611afa565b5090565b604051806060016040528060608152602001611ae8611a19565b8152602001611af5611a19565b905290565b5b80821115611aca5760008155600101611afb565b60008083601f840112611b2157600080fd5b50813567ffffffffffffffff811115611b3957600080fd5b6020830191508360208260051b8501011115611b5457600080fd5b9250929050565b6000806000806000806000878903610120811215611b7857600080fd5b88359750602089013563ffffffff81168114611b9357600080fd5b965060a0603f1982011215611ba757600080fd5b5060408801945060e088013567ffffffffffffffff80821115611bc957600080fd5b611bd58b838c01611b0f565b90965094506101008a0135915080821115611bef57600080fd5b818a0191508a601f830112611c0357600080fd5b813581811115611c1257600080fd5b8b6020606083028501011115611c2757600080fd5b60208301945080935050505092959891949750929550565b8061040081018310156119e757600080fd5b801515811461044857600080fd5b6000806000806000806000610860888a031215611c7b57600080fd5b873567ffffffffffffffff80821115611c9357600080fd5b611c9f8b838c01611b0f565b909950975060208a0135915080821115611cb857600080fd5b50611cc58a828b01611b0f565b9096509450611cd990508960408a01611c3f565b9250611ce9896104408a01611c3f565b9150610840880135611cfa81611c51565b8091505092959891949750929550565b600080600060408486031215611d1f57600080fd5b833567ffffffffffffffff80821115611d3757600080fd5b9085019060c08288031215611d4b57600080fd5b90935060208501359080821115611d6157600080fd5b50611d6e86828701611b0f565b9497909650939450505050565b8060005b6020808210611d8e5750611da5565b825160ff1685529384019390910190600101611d7f565b50505050565b6020808252825161082083830152805161084084018190526000929182019083906108608601905b80831015611e1857835180516001600160a01b031683528581015160ff9081168785015260409182015116908301529284019260019290920191606090910190611dd3565b509286015192611e2b6040870185611d7b565b60408701519350611e40610440870185611d7b565b9695505050505050565b6001600160a01b038116811461044857600080fd5b600060208284031215611e7157600080fd5b81356116ac81611e4a565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611ea457600080fd5b813560ff811681146116ac57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8103611ee157611ee1611eb5565b60010192915050565b600060018201611efc57611efc611eb5565b5060010190565b64ffffffffff8116811461044857600080fd5b803582526020810135611f2881611e4a565b6001600160a01b031660208301526040810135611f4481611f03565b64ffffffffff9081166040840152606082013590611f6182611f03565b1660608301526080810135611f7581611c51565b8015156080840152505050565b82815260c081016116ac6020830184611f16565b600060208284031215611fa857600080fd5b81356116ac81611c51565b600060208284031215611fc557600080fd5b81356116ac81611f03565b81358155600181016020830135611fe681611e4a565b81546040850135611ff681611f03565b606086013561200481611f03565b608087013561201281611c51565b60c89190911b64ffffffffff60c81b1660a09290921b64ffffffffff60a01b166001600160f81b0319939093166001600160a01b039490941693909317919091171790151560f01b60ff60f01b161790555050565b63ffffffff8316815260c081016116ac6020830184611f16565b60ff82811682821603908111156119e7576119e7611eb5565b818103818111156119e7576119e7611eb5565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b8060005b602080601f8301106120ef5750611da5565b825460ff8082168752600882901c8116838801526040612118818901838560101c1660ff169052565b606061212d818a01848660181c1660ff169052565b6080612141818b018587891c1660ff169052565b60a09550612158868b01858760281c1660ff169052565b60c061216d818c01868860301c1660ff169052565b60e0612182818d01878960381c1660ff169052565b60ff87861c8716166101008d01526121a56101208d01878960481c1660ff169052565b6121ba6101408d01878960501c1660ff169052565b6121cf6101608d01878960581c1660ff169052565b60ff87851c8716166101808d01526121f26101a08d01878960681c1660ff169052565b6122076101c08d01878960701c1660ff169052565b61221c6101e08d01878960781c1660ff169052565b60ff87841c8716166102008d015261223f6102208d01878960881c1660ff169052565b6122546102408d01878960901c1660ff169052565b6122696102608d01878960981c1660ff169052565b60ff87891c8716166102808d015261228c6102a08d01878960a81c1660ff169052565b6122a16102c08d01878960b01c1660ff169052565b6122b66102e08d01878960b81c1660ff169052565b60ff87831c8716166103008d01526122d96103208d01878960c81c1660ff169052565b6122ee6103408d01878960d01c1660ff169052565b6123036103608d01878960d81c1660ff169052565b60ff87821c8716166103808d0152505050505061232b6103a08801828460e81c1660ff169052565b6123406103c08801828460f01c1660ff169052565b5060f81c6103e08601525061040090930192600191909101906020016120dd565b600060408083526108608301610820828501528086548083526108808601915087600052602092508260002060005b828110156123d05781546001600160a01b038116855260ff60a082901c81168787015260a89190911c168685015260609093019260019182019101612390565b5050506123e360608601600189016120d9565b6123f46104608601600289016120d9565b941515930192909252509092915050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b82815260406020820152813560408201526000602083013561244f81611e4a565b6001600160a01b03908116606084015260408401359061246e82611f03565b64ffffffffff821660808501526060850135915061248b82611e4a565b1660a083810191909152608084013560c084015283013536849003601e190181126124b557600080fd5b830160208101903567ffffffffffffffff8111156124d257600080fd5b8036038213156124e157600080fd5b60c060e0850152611e4061010085018284612405565b64ffffffffff81811683821601908082111561251557612515611eb5565b5092915050565b6000808335601e1984360301811261253357600080fd5b83018035915067ffffffffffffffff82111561254e57600080fd5b602001915036819003821315611b5457600080fd5b6001600160a01b03851681526060602082018190526000906125889083018587612405565b905082604083015295945050505050565b8183823760009101908152919050565b600060208083528351808285015260005b818110156125d6578581018301518582016040015282016125ba565b506000604082860101526040601f19601f8301168501019250505092915050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220789e10e5d6588dc4b26dba62aaa06971ed6ac6cbd43499f78a57e1d8415d671c64736f6c63430008130033", +} + +var ManyChainMultiSigABI = ManyChainMultiSigMetaData.ABI + +var ManyChainMultiSigBin = ManyChainMultiSigMetaData.Bin + +func DeployManyChainMultiSig(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ManyChainMultiSig, error) { + parsed, err := ManyChainMultiSigMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(ManyChainMultiSigBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &ManyChainMultiSig{address: address, abi: *parsed, ManyChainMultiSigCaller: ManyChainMultiSigCaller{contract: contract}, ManyChainMultiSigTransactor: ManyChainMultiSigTransactor{contract: contract}, ManyChainMultiSigFilterer: ManyChainMultiSigFilterer{contract: contract}}, nil +} + +type ManyChainMultiSig struct { + address common.Address + abi abi.ABI + ManyChainMultiSigCaller + ManyChainMultiSigTransactor + ManyChainMultiSigFilterer +} + +type ManyChainMultiSigCaller struct { + contract *bind.BoundContract +} + +type ManyChainMultiSigTransactor struct { + contract *bind.BoundContract +} + +type ManyChainMultiSigFilterer struct { + contract *bind.BoundContract +} + +type ManyChainMultiSigSession struct { + Contract *ManyChainMultiSig + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type ManyChainMultiSigCallerSession struct { + Contract *ManyChainMultiSigCaller + CallOpts bind.CallOpts +} + +type ManyChainMultiSigTransactorSession struct { + Contract *ManyChainMultiSigTransactor + TransactOpts bind.TransactOpts +} + +type ManyChainMultiSigRaw struct { + Contract *ManyChainMultiSig +} + +type ManyChainMultiSigCallerRaw struct { + Contract *ManyChainMultiSigCaller +} + +type ManyChainMultiSigTransactorRaw struct { + Contract *ManyChainMultiSigTransactor +} + +func NewManyChainMultiSig(address common.Address, backend bind.ContractBackend) (*ManyChainMultiSig, error) { + abi, err := abi.JSON(strings.NewReader(ManyChainMultiSigABI)) + if err != nil { + return nil, err + } + contract, err := bindManyChainMultiSig(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ManyChainMultiSig{address: address, abi: abi, ManyChainMultiSigCaller: ManyChainMultiSigCaller{contract: contract}, ManyChainMultiSigTransactor: ManyChainMultiSigTransactor{contract: contract}, ManyChainMultiSigFilterer: ManyChainMultiSigFilterer{contract: contract}}, nil +} + +func NewManyChainMultiSigCaller(address common.Address, caller bind.ContractCaller) (*ManyChainMultiSigCaller, error) { + contract, err := bindManyChainMultiSig(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ManyChainMultiSigCaller{contract: contract}, nil +} + +func NewManyChainMultiSigTransactor(address common.Address, transactor bind.ContractTransactor) (*ManyChainMultiSigTransactor, error) { + contract, err := bindManyChainMultiSig(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ManyChainMultiSigTransactor{contract: contract}, nil +} + +func NewManyChainMultiSigFilterer(address common.Address, filterer bind.ContractFilterer) (*ManyChainMultiSigFilterer, error) { + contract, err := bindManyChainMultiSig(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ManyChainMultiSigFilterer{contract: contract}, nil +} + +func bindManyChainMultiSig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := ManyChainMultiSigMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_ManyChainMultiSig *ManyChainMultiSigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ManyChainMultiSig.Contract.ManyChainMultiSigCaller.contract.Call(opts, result, method, params...) +} + +func (_ManyChainMultiSig *ManyChainMultiSigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.ManyChainMultiSigTransactor.contract.Transfer(opts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.ManyChainMultiSigTransactor.contract.Transact(opts, method, params...) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ManyChainMultiSig.Contract.contract.Call(opts, result, method, params...) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.contract.Transfer(opts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.contract.Transact(opts, method, params...) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCaller) MAXNUMSIGNERS(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ManyChainMultiSig.contract.Call(opts, &out, "MAX_NUM_SIGNERS") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) MAXNUMSIGNERS() (uint8, error) { + return _ManyChainMultiSig.Contract.MAXNUMSIGNERS(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCallerSession) MAXNUMSIGNERS() (uint8, error) { + return _ManyChainMultiSig.Contract.MAXNUMSIGNERS(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCaller) NUMGROUPS(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _ManyChainMultiSig.contract.Call(opts, &out, "NUM_GROUPS") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) NUMGROUPS() (uint8, error) { + return _ManyChainMultiSig.Contract.NUMGROUPS(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCallerSession) NUMGROUPS() (uint8, error) { + return _ManyChainMultiSig.Contract.NUMGROUPS(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCaller) GetConfig(opts *bind.CallOpts) (ManyChainMultiSigConfig, error) { + var out []interface{} + err := _ManyChainMultiSig.contract.Call(opts, &out, "getConfig") + + if err != nil { + return *new(ManyChainMultiSigConfig), err + } + + out0 := *abi.ConvertType(out[0], new(ManyChainMultiSigConfig)).(*ManyChainMultiSigConfig) + + return out0, err + +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) GetConfig() (ManyChainMultiSigConfig, error) { + return _ManyChainMultiSig.Contract.GetConfig(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCallerSession) GetConfig() (ManyChainMultiSigConfig, error) { + return _ManyChainMultiSig.Contract.GetConfig(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCaller) GetOpCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _ManyChainMultiSig.contract.Call(opts, &out, "getOpCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) GetOpCount() (*big.Int, error) { + return _ManyChainMultiSig.Contract.GetOpCount(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCallerSession) GetOpCount() (*big.Int, error) { + return _ManyChainMultiSig.Contract.GetOpCount(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCaller) GetRoot(opts *bind.CallOpts) (GetRoot, + + error) { + var out []interface{} + err := _ManyChainMultiSig.contract.Call(opts, &out, "getRoot") + + outstruct := new(GetRoot) + if err != nil { + return *outstruct, err + } + + outstruct.Root = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + outstruct.ValidUntil = *abi.ConvertType(out[1], new(uint32)).(*uint32) + + return *outstruct, err + +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) GetRoot() (GetRoot, + + error) { + return _ManyChainMultiSig.Contract.GetRoot(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCallerSession) GetRoot() (GetRoot, + + error) { + return _ManyChainMultiSig.Contract.GetRoot(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCaller) GetRootMetadata(opts *bind.CallOpts) (ManyChainMultiSigRootMetadata, error) { + var out []interface{} + err := _ManyChainMultiSig.contract.Call(opts, &out, "getRootMetadata") + + if err != nil { + return *new(ManyChainMultiSigRootMetadata), err + } + + out0 := *abi.ConvertType(out[0], new(ManyChainMultiSigRootMetadata)).(*ManyChainMultiSigRootMetadata) + + return out0, err + +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) GetRootMetadata() (ManyChainMultiSigRootMetadata, error) { + return _ManyChainMultiSig.Contract.GetRootMetadata(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCallerSession) GetRootMetadata() (ManyChainMultiSigRootMetadata, error) { + return _ManyChainMultiSig.Contract.GetRootMetadata(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ManyChainMultiSig.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 + +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) Owner() (common.Address, error) { + return _ManyChainMultiSig.Contract.Owner(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCallerSession) Owner() (common.Address, error) { + return _ManyChainMultiSig.Contract.Owner(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _ManyChainMultiSig.contract.Call(opts, &out, "pendingOwner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) PendingOwner() (common.Address, error) { + return _ManyChainMultiSig.Contract.PendingOwner(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigCallerSession) PendingOwner() (common.Address, error) { + return _ManyChainMultiSig.Contract.PendingOwner(&_ManyChainMultiSig.CallOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ManyChainMultiSig.contract.Transact(opts, "acceptOwnership") +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) AcceptOwnership() (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.AcceptOwnership(&_ManyChainMultiSig.TransactOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.AcceptOwnership(&_ManyChainMultiSig.TransactOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactor) Execute(opts *bind.TransactOpts, op ManyChainMultiSigOp, proof [][32]byte) (*types.Transaction, error) { + return _ManyChainMultiSig.contract.Transact(opts, "execute", op, proof) +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) Execute(op ManyChainMultiSigOp, proof [][32]byte) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.Execute(&_ManyChainMultiSig.TransactOpts, op, proof) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactorSession) Execute(op ManyChainMultiSigOp, proof [][32]byte) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.Execute(&_ManyChainMultiSig.TransactOpts, op, proof) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ManyChainMultiSig.contract.Transact(opts, "renounceOwnership") +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) RenounceOwnership() (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.RenounceOwnership(&_ManyChainMultiSig.TransactOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.RenounceOwnership(&_ManyChainMultiSig.TransactOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactor) SetConfig(opts *bind.TransactOpts, signerAddresses []common.Address, signerGroups []uint8, groupQuorums [32]uint8, groupParents [32]uint8, clearRoot bool) (*types.Transaction, error) { + return _ManyChainMultiSig.contract.Transact(opts, "setConfig", signerAddresses, signerGroups, groupQuorums, groupParents, clearRoot) +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) SetConfig(signerAddresses []common.Address, signerGroups []uint8, groupQuorums [32]uint8, groupParents [32]uint8, clearRoot bool) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.SetConfig(&_ManyChainMultiSig.TransactOpts, signerAddresses, signerGroups, groupQuorums, groupParents, clearRoot) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactorSession) SetConfig(signerAddresses []common.Address, signerGroups []uint8, groupQuorums [32]uint8, groupParents [32]uint8, clearRoot bool) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.SetConfig(&_ManyChainMultiSig.TransactOpts, signerAddresses, signerGroups, groupQuorums, groupParents, clearRoot) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactor) SetRoot(opts *bind.TransactOpts, root [32]byte, validUntil uint32, metadata ManyChainMultiSigRootMetadata, metadataProof [][32]byte, signatures []ManyChainMultiSigSignature) (*types.Transaction, error) { + return _ManyChainMultiSig.contract.Transact(opts, "setRoot", root, validUntil, metadata, metadataProof, signatures) +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) SetRoot(root [32]byte, validUntil uint32, metadata ManyChainMultiSigRootMetadata, metadataProof [][32]byte, signatures []ManyChainMultiSigSignature) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.SetRoot(&_ManyChainMultiSig.TransactOpts, root, validUntil, metadata, metadataProof, signatures) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactorSession) SetRoot(root [32]byte, validUntil uint32, metadata ManyChainMultiSigRootMetadata, metadataProof [][32]byte, signatures []ManyChainMultiSigSignature) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.SetRoot(&_ManyChainMultiSig.TransactOpts, root, validUntil, metadata, metadataProof, signatures) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _ManyChainMultiSig.contract.Transact(opts, "transferOwnership", newOwner) +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.TransferOwnership(&_ManyChainMultiSig.TransactOpts, newOwner) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.TransferOwnership(&_ManyChainMultiSig.TransactOpts, newOwner) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ManyChainMultiSig.contract.RawTransact(opts, nil) +} + +func (_ManyChainMultiSig *ManyChainMultiSigSession) Receive() (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.Receive(&_ManyChainMultiSig.TransactOpts) +} + +func (_ManyChainMultiSig *ManyChainMultiSigTransactorSession) Receive() (*types.Transaction, error) { + return _ManyChainMultiSig.Contract.Receive(&_ManyChainMultiSig.TransactOpts) +} + +type ManyChainMultiSigConfigSetIterator struct { + Event *ManyChainMultiSigConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *ManyChainMultiSigConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigConfigSet) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigConfigSet) + 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() + } +} + +func (it *ManyChainMultiSigConfigSetIterator) Error() error { + return it.fail +} + +func (it *ManyChainMultiSigConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type ManyChainMultiSigConfigSet struct { + Config ManyChainMultiSigConfig + IsRootCleared bool + Raw types.Log +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) FilterConfigSet(opts *bind.FilterOpts) (*ManyChainMultiSigConfigSetIterator, error) { + + logs, sub, err := _ManyChainMultiSig.contract.FilterLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return &ManyChainMultiSigConfigSetIterator{contract: _ManyChainMultiSig.contract, event: "ConfigSet", logs: logs, sub: sub}, nil +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigConfigSet) (event.Subscription, error) { + + logs, sub, err := _ManyChainMultiSig.contract.WatchLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(ManyChainMultiSigConfigSet) + if err := _ManyChainMultiSig.contract.UnpackLog(event, "ConfigSet", 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 +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) ParseConfigSet(log types.Log) (*ManyChainMultiSigConfigSet, error) { + event := new(ManyChainMultiSigConfigSet) + if err := _ManyChainMultiSig.contract.UnpackLog(event, "ConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type ManyChainMultiSigNewRootIterator struct { + Event *ManyChainMultiSigNewRoot + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *ManyChainMultiSigNewRootIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigNewRoot) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigNewRoot) + 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() + } +} + +func (it *ManyChainMultiSigNewRootIterator) Error() error { + return it.fail +} + +func (it *ManyChainMultiSigNewRootIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type ManyChainMultiSigNewRoot struct { + Root [32]byte + ValidUntil uint32 + Metadata ManyChainMultiSigRootMetadata + Raw types.Log +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) FilterNewRoot(opts *bind.FilterOpts, root [][32]byte) (*ManyChainMultiSigNewRootIterator, error) { + + var rootRule []interface{} + for _, rootItem := range root { + rootRule = append(rootRule, rootItem) + } + + logs, sub, err := _ManyChainMultiSig.contract.FilterLogs(opts, "NewRoot", rootRule) + if err != nil { + return nil, err + } + return &ManyChainMultiSigNewRootIterator{contract: _ManyChainMultiSig.contract, event: "NewRoot", logs: logs, sub: sub}, nil +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) WatchNewRoot(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigNewRoot, root [][32]byte) (event.Subscription, error) { + + var rootRule []interface{} + for _, rootItem := range root { + rootRule = append(rootRule, rootItem) + } + + logs, sub, err := _ManyChainMultiSig.contract.WatchLogs(opts, "NewRoot", rootRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(ManyChainMultiSigNewRoot) + if err := _ManyChainMultiSig.contract.UnpackLog(event, "NewRoot", 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 +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) ParseNewRoot(log types.Log) (*ManyChainMultiSigNewRoot, error) { + event := new(ManyChainMultiSigNewRoot) + if err := _ManyChainMultiSig.contract.UnpackLog(event, "NewRoot", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type ManyChainMultiSigOpExecutedIterator struct { + Event *ManyChainMultiSigOpExecuted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *ManyChainMultiSigOpExecutedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigOpExecuted) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigOpExecuted) + 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() + } +} + +func (it *ManyChainMultiSigOpExecutedIterator) Error() error { + return it.fail +} + +func (it *ManyChainMultiSigOpExecutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type ManyChainMultiSigOpExecuted struct { + Nonce *big.Int + To common.Address + Data []byte + Value *big.Int + Raw types.Log +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) FilterOpExecuted(opts *bind.FilterOpts, nonce []*big.Int) (*ManyChainMultiSigOpExecutedIterator, error) { + + var nonceRule []interface{} + for _, nonceItem := range nonce { + nonceRule = append(nonceRule, nonceItem) + } + + logs, sub, err := _ManyChainMultiSig.contract.FilterLogs(opts, "OpExecuted", nonceRule) + if err != nil { + return nil, err + } + return &ManyChainMultiSigOpExecutedIterator{contract: _ManyChainMultiSig.contract, event: "OpExecuted", logs: logs, sub: sub}, nil +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) WatchOpExecuted(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigOpExecuted, nonce []*big.Int) (event.Subscription, error) { + + var nonceRule []interface{} + for _, nonceItem := range nonce { + nonceRule = append(nonceRule, nonceItem) + } + + logs, sub, err := _ManyChainMultiSig.contract.WatchLogs(opts, "OpExecuted", nonceRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(ManyChainMultiSigOpExecuted) + if err := _ManyChainMultiSig.contract.UnpackLog(event, "OpExecuted", 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 +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) ParseOpExecuted(log types.Log) (*ManyChainMultiSigOpExecuted, error) { + event := new(ManyChainMultiSigOpExecuted) + if err := _ManyChainMultiSig.contract.UnpackLog(event, "OpExecuted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type ManyChainMultiSigOwnershipTransferStartedIterator struct { + Event *ManyChainMultiSigOwnershipTransferStarted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *ManyChainMultiSigOwnershipTransferStartedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigOwnershipTransferStarted) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigOwnershipTransferStarted) + 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() + } +} + +func (it *ManyChainMultiSigOwnershipTransferStartedIterator) Error() error { + return it.fail +} + +func (it *ManyChainMultiSigOwnershipTransferStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type ManyChainMultiSigOwnershipTransferStarted struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ManyChainMultiSigOwnershipTransferStartedIterator, 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 := _ManyChainMultiSig.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ManyChainMultiSigOwnershipTransferStartedIterator{contract: _ManyChainMultiSig.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigOwnershipTransferStarted, 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 := _ManyChainMultiSig.contract.WatchLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(ManyChainMultiSigOwnershipTransferStarted) + if err := _ManyChainMultiSig.contract.UnpackLog(event, "OwnershipTransferStarted", 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 +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) ParseOwnershipTransferStarted(log types.Log) (*ManyChainMultiSigOwnershipTransferStarted, error) { + event := new(ManyChainMultiSigOwnershipTransferStarted) + if err := _ManyChainMultiSig.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type ManyChainMultiSigOwnershipTransferredIterator struct { + Event *ManyChainMultiSigOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *ManyChainMultiSigOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigOwnershipTransferred) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(ManyChainMultiSigOwnershipTransferred) + 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() + } +} + +func (it *ManyChainMultiSigOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *ManyChainMultiSigOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type ManyChainMultiSigOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ManyChainMultiSigOwnershipTransferredIterator, 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 := _ManyChainMultiSig.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &ManyChainMultiSigOwnershipTransferredIterator{contract: _ManyChainMultiSig.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigOwnershipTransferred, 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 := _ManyChainMultiSig.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: + + event := new(ManyChainMultiSigOwnershipTransferred) + if err := _ManyChainMultiSig.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 +} + +func (_ManyChainMultiSig *ManyChainMultiSigFilterer) ParseOwnershipTransferred(log types.Log) (*ManyChainMultiSigOwnershipTransferred, error) { + event := new(ManyChainMultiSigOwnershipTransferred) + if err := _ManyChainMultiSig.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type GetRoot struct { + Root [32]byte + ValidUntil uint32 +} + +func (_ManyChainMultiSig *ManyChainMultiSig) ParseLog(log types.Log) (AbigenLog, error) { + switch log.Topics[0] { + case _ManyChainMultiSig.abi.Events["ConfigSet"].ID: + return _ManyChainMultiSig.ParseConfigSet(log) + case _ManyChainMultiSig.abi.Events["NewRoot"].ID: + return _ManyChainMultiSig.ParseNewRoot(log) + case _ManyChainMultiSig.abi.Events["OpExecuted"].ID: + return _ManyChainMultiSig.ParseOpExecuted(log) + case _ManyChainMultiSig.abi.Events["OwnershipTransferStarted"].ID: + return _ManyChainMultiSig.ParseOwnershipTransferStarted(log) + case _ManyChainMultiSig.abi.Events["OwnershipTransferred"].ID: + return _ManyChainMultiSig.ParseOwnershipTransferred(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (ManyChainMultiSigConfigSet) Topic() common.Hash { + return common.HexToHash("0x0a4974ad206b9c736f9ab2feac1c9b1d043fe4ef377c70ae45659f2ef089f03e") +} + +func (ManyChainMultiSigNewRoot) Topic() common.Hash { + return common.HexToHash("0x7ea643ae44677f24e0d6f40168893712daaf729b0a38fe7702d21cb544c84101") +} + +func (ManyChainMultiSigOpExecuted) Topic() common.Hash { + return common.HexToHash("0x87d58fdd48be753fb9ef4ec8a5895086c401506da8b4d752abc90602c3e62d1d") +} + +func (ManyChainMultiSigOwnershipTransferStarted) Topic() common.Hash { + return common.HexToHash("0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700") +} + +func (ManyChainMultiSigOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (_ManyChainMultiSig *ManyChainMultiSig) Address() common.Address { + return _ManyChainMultiSig.address +} + +type ManyChainMultiSigInterface interface { + MAXNUMSIGNERS(opts *bind.CallOpts) (uint8, error) + + NUMGROUPS(opts *bind.CallOpts) (uint8, error) + + GetConfig(opts *bind.CallOpts) (ManyChainMultiSigConfig, error) + + GetOpCount(opts *bind.CallOpts) (*big.Int, error) + + GetRoot(opts *bind.CallOpts) (GetRoot, + + error) + + GetRootMetadata(opts *bind.CallOpts) (ManyChainMultiSigRootMetadata, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + PendingOwner(opts *bind.CallOpts) (common.Address, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + Execute(opts *bind.TransactOpts, op ManyChainMultiSigOp, proof [][32]byte) (*types.Transaction, error) + + RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + SetConfig(opts *bind.TransactOpts, signerAddresses []common.Address, signerGroups []uint8, groupQuorums [32]uint8, groupParents [32]uint8, clearRoot bool) (*types.Transaction, error) + + SetRoot(opts *bind.TransactOpts, root [32]byte, validUntil uint32, metadata ManyChainMultiSigRootMetadata, metadataProof [][32]byte, signatures []ManyChainMultiSigSignature) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) + + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + + FilterConfigSet(opts *bind.FilterOpts) (*ManyChainMultiSigConfigSetIterator, error) + + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigConfigSet) (event.Subscription, error) + + ParseConfigSet(log types.Log) (*ManyChainMultiSigConfigSet, error) + + FilterNewRoot(opts *bind.FilterOpts, root [][32]byte) (*ManyChainMultiSigNewRootIterator, error) + + WatchNewRoot(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigNewRoot, root [][32]byte) (event.Subscription, error) + + ParseNewRoot(log types.Log) (*ManyChainMultiSigNewRoot, error) + + FilterOpExecuted(opts *bind.FilterOpts, nonce []*big.Int) (*ManyChainMultiSigOpExecutedIterator, error) + + WatchOpExecuted(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigOpExecuted, nonce []*big.Int) (event.Subscription, error) + + ParseOpExecuted(log types.Log) (*ManyChainMultiSigOpExecuted, error) + + FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ManyChainMultiSigOwnershipTransferStartedIterator, error) + + WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigOwnershipTransferStarted, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) + + ParseOwnershipTransferStarted(log types.Log) (*ManyChainMultiSigOwnershipTransferStarted, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ManyChainMultiSigOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ManyChainMultiSigOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*ManyChainMultiSigOwnershipTransferred, error) + + ParseLog(log types.Log) (AbigenLog, error) + + Address() common.Address +} diff --git a/pkg/contracts/RBACTimelock.go b/pkg/contracts/RBACTimelock.go new file mode 100644 index 0000000..784804f --- /dev/null +++ b/pkg/contracts/RBACTimelock.go @@ -0,0 +1,2336 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "errors" + "fmt" + "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" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +type RBACTimelockCall struct { + Target common.Address + Value *big.Int + Data []byte +} + +var RBACTimelockMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"minDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"admin\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"proposers\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"executors\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"cancellers\",\"type\":\"address[]\",\"internalType\":\"address[]\"},{\"name\":\"bypassers\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"BYPASSER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"CANCELLER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"DEFAULT_ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"EXECUTOR_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PROPOSER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blockFunctionSelector\",\"inputs\":[{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bypasserExecuteBatch\",\"inputs\":[{\"name\":\"calls\",\"type\":\"tuple[]\",\"internalType\":\"structRBACTimelock.Call[]\",\"components\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"cancel\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"executeBatch\",\"inputs\":[{\"name\":\"calls\",\"type\":\"tuple[]\",\"internalType\":\"structRBACTimelock.Call[]\",\"components\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"predecessor\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"getBlockedFunctionSelectorAt\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBlockedFunctionSelectorCount\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getMinDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"duration\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleAdmin\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMember\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleMemberCount\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getTimestamp\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"grantRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"hasRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hashOperationBatch\",\"inputs\":[{\"name\":\"calls\",\"type\":\"tuple[]\",\"internalType\":\"structRBACTimelock.Call[]\",\"components\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"predecessor\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"hash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"isOperation\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"registered\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperationDone\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"done\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperationPending\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"pending\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"isOperationReady\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"ready\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"onERC1155BatchReceived\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onERC1155Received\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"onERC721Received\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"revokeRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"scheduleBatch\",\"inputs\":[{\"name\":\"calls\",\"type\":\"tuple[]\",\"internalType\":\"structRBACTimelock.Call[]\",\"components\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"predecessor\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"delay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unblockFunctionSelector\",\"inputs\":[{\"name\":\"selector\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateDelay\",\"inputs\":[{\"name\":\"newDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"BypasserCallExecuted\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"target\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallExecuted\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"target\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"CallScheduled\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"target\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"predecessor\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"salt\",\"type\":\"bytes32\",\"indexed\":false,\"internalType\":\"bytes32\"},{\"name\":\"delay\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Cancelled\",\"inputs\":[{\"name\":\"id\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FunctionSelectorBlocked\",\"inputs\":[{\"name\":\"selector\",\"type\":\"bytes4\",\"indexed\":true,\"internalType\":\"bytes4\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FunctionSelectorUnblocked\",\"inputs\":[{\"name\":\"selector\",\"type\":\"bytes4\",\"indexed\":true,\"internalType\":\"bytes4\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinDelayChange\",\"inputs\":[{\"name\":\"oldDuration\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newDuration\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleAdminChanged\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"previousAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleGranted\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleRevoked\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]", + Bin: "0x60806040523480156200001157600080fd5b50604051620027bc380380620027bc833981016040819052620000349162000533565b6200004f6000805160206200277c83398151915280620002bb565b620000796000805160206200273c8339815191526000805160206200277c833981519152620002bb565b620000a36000805160206200275c8339815191526000805160206200277c833981519152620002bb565b620000cd6000805160206200279c8339815191526000805160206200277c833981519152620002bb565b620001087fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d6000805160206200277c833981519152620002bb565b620001236000805160206200277c8339815191528662000306565b60005b845181101562000180576200016d6000805160206200273c83398151915286838151811062000159576200015962000608565b60200260200101516200030660201b60201c565b62000178816200061e565b905062000126565b5060005b8351811015620001ca57620001b76000805160206200275c83398151915285838151811062000159576200015962000608565b620001c2816200061e565b905062000184565b5060005b82518110156200021457620002016000805160206200279c83398151915284838151811062000159576200015962000608565b6200020c816200061e565b9050620001ce565b5060005b81518110156200026f576200025c7fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d83838151811062000159576200015962000608565b62000267816200061e565b905062000218565b5060038690556040805160008152602081018890527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505050505062000646565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b62000312828262000316565b5050565b62000322828262000341565b60008281526001602052604090206200033c9082620003e1565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000312576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200039d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620003f8836001600160a01b03841662000401565b90505b92915050565b60008181526001830160205260408120546200044a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003fb565b506000620003fb565b80516001600160a01b03811681146200046b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200049857600080fd5b815160206001600160401b0380831115620004b757620004b762000470565b8260051b604051601f19603f83011681018181108482111715620004df57620004df62000470565b604052938452858101830193838101925087851115620004fe57600080fd5b83870191505b848210156200052857620005188262000453565b8352918301919083019062000504565b979650505050505050565b60008060008060008060c087890312156200054d57600080fd5b865195506200055f6020880162000453565b60408801519095506001600160401b03808211156200057d57600080fd5b6200058b8a838b0162000486565b95506060890151915080821115620005a257600080fd5b620005b08a838b0162000486565b94506080890151915080821115620005c757600080fd5b620005d58a838b0162000486565b935060a0890151915080821115620005ec57600080fd5b50620005fb89828a0162000486565b9150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b6000600182016200063f57634e487b7160e01b600052601160045260246000fd5b5060010190565b6120e680620006566000396000f3fe6080604052600436106101f25760003560e01c806364d623531161010d578063a944142d116100a0578063ca15c8731161006f578063ca15c8731461062d578063d45c44351461064d578063d547741f1461067a578063f23a6e611461069a578063f27a0c92146106c657600080fd5b8063a944142d1461058d578063b08e51c0146105ad578063bc197c81146105e1578063c4d252f51461060d57600080fd5b80639010d07c116100dc5780639010d07c1461050057806391d14854146105385780639f5a23f714610558578063a217fddf1461057857600080fd5b806364d62353146104775780636ceef4801461049757806375b238fc146104aa5780638f61f4f5146104cc57600080fd5b806326bb2ec51161018557806336568abe1161015457806336568abe146103f75780633a98b4e414610417578063515a3db314610437578063584b153e1461045757600080fd5b806326bb2ec5146103725780632ab0f529146103875780632f2ff15d146103b757806331d50750146103d757600080fd5b806313bc9f20116101c157806313bc9f20146102c3578063150b7a02146102e3578063191cb7b31461030e578063248a9ca31461034257600080fd5b806301ffc9a7146101fe57806303e561551461023357806307bd02651461026c5780630db866b1146102ae57600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b5061021e6102193660046117d2565b6106db565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b5061025361024e3660046117fc565b610706565b6040516001600160e01b0319909116815260200161022a565b34801561027857600080fd5b506102a07fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b60405190815260200161022a565b6102c16102bc366004611860565b610713565b005b3480156102cf57600080fd5b5061021e6102de3660046117fc565b61086f565b3480156102ef57600080fd5b506102536102fe366004611972565b630a85bd0160e11b949350505050565b34801561031a57600080fd5b506102a07fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d81565b34801561034e57600080fd5b506102a061035d3660046117fc565b60009081526020819052604090206001015490565b34801561037e57600080fd5b506102a0610895565b34801561039357600080fd5b5061021e6103a23660046117fc565b60009081526002602052604090205460011490565b3480156103c357600080fd5b506102c16103d23660046119d9565b6108a6565b3480156103e357600080fd5b5061021e6103f23660046117fc565b6108d0565b34801561040357600080fd5b506102c16104123660046119d9565b6108e9565b34801561042357600080fd5b506102c16104323660046117d2565b61096c565b34801561044357600080fd5b506102a0610452366004611a05565b6109d7565b34801561046357600080fd5b5061021e6104723660046117fc565b610a10565b34801561048357600080fd5b506102c16104923660046117fc565b610a27565b6102c16104a5366004611a05565b610a81565b3480156104b657600080fd5b506102a060008051602061209183398151915281565b3480156104d857600080fd5b506102a07fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc181565b34801561050c57600080fd5b5061052061051b366004611a55565b610bed565b6040516001600160a01b03909116815260200161022a565b34801561054457600080fd5b5061021e6105533660046119d9565b610c05565b34801561056457600080fd5b506102c16105733660046117d2565b610c2e565b34801561058457600080fd5b506102a0600081565b34801561059957600080fd5b506102c16105a8366004611a77565b610c99565b3480156105b957600080fd5b506102a07ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78381565b3480156105ed57600080fd5b506102536105fc366004611b4f565b63bc197c8160e01b95945050505050565b34801561061957600080fd5b506102c16106283660046117fc565b610e28565b34801561063957600080fd5b506102a06106483660046117fc565b610f16565b34801561065957600080fd5b506102a06106683660046117fc565b60009081526002602052604090205490565b34801561068657600080fd5b506102c16106953660046119d9565b610f2d565b3480156106a657600080fd5b506102536106b5366004611bf8565b63f23a6e6160e01b95945050505050565b3480156106d257600080fd5b506003546102a0565b60006001600160e01b03198216630271189760e51b1480610700575061070082610f52565b92915050565b6000610700600483610f77565b7fa1b2b8005de234c4b8ce8cd0be058239056e0d54f6097825b5117101469d5a8d3361074d60008051602061209183398151915282610c05565b61075b5761075b8282610f83565b60005b838110156108685761079285858381811061077b5761077b611c5c565b905060200281019061078d9190611c72565b610fdc565b807f6b983f337bab73dfe37faca733adf3ea35b45b8b144ec8ee2de3a1b224564b0c8686848181106107c6576107c6611c5c565b90506020028101906107d89190611c72565b6107e6906020810190611c92565b8787858181106107f8576107f8611c5c565b905060200281019061080a9190611c72565b6020013588888681811061082057610820611c5c565b90506020028101906108329190611c72565b610840906040810190611cad565b6040516108509493929190611d1c565b60405180910390a261086181611d64565b905061075e565b5050505050565b60008181526002602052604081205460018111801561088e5750428111155b9392505050565b60006108a160046110bd565b905090565b6000828152602081905260409020600101546108c1816110c7565b6108cb83836110d4565b505050565b60008181526002602052604081205481905b1192915050565b6001600160a01b038116331461095e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61096882826110f6565b5050565b600080516020612091833981519152610984816110c7565b61099960046001600160e01b03198416611118565b15610968576040516001600160e01b03198316907fd91859a8d88193a56a2983deb65a5253985141c49c70bf016880b5243bd432e190600090a25050565b6000848484846040516020016109f09493929190611d7d565b604051602081830303815290604052805190602001209050949350505050565b6000818152600260205260408120546001906108e2565b600080516020612091833981519152610a3f816110c7565b60035460408051918252602082018490527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150600355565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6333610abb60008051602061209183398151915282610c05565b610ac957610ac98282610f83565b6000610ad7878787876109d7565b9050610ae38186611124565b60005b86811015610bda57610b0388888381811061077b5761077b611c5c565b80827fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b588a8a85818110610b3857610b38611c5c565b9050602002810190610b4a9190611c72565b610b58906020810190611c92565b8b8b86818110610b6a57610b6a611c5c565b9050602002810190610b7c9190611c72565b602001358c8c87818110610b9257610b92611c5c565b9050602002810190610ba49190611c72565b610bb2906040810190611cad565b604051610bc29493929190611d1c565b60405180910390a3610bd381611d64565b9050610ae6565b50610be4816111b0565b50505050505050565b600082815260016020526040812061088e9083610f77565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020612091833981519152610c46816110c7565b610c5b60046001600160e01b031984166111e9565b15610968576040516001600160e01b03198316907f15b40cf8ed4c95cd3c0e1dedfdb3987c3f9bf3d3770d13ddf6dc4daa5ffae9ef90600090a25050565b7fb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc133610cd360008051602061209183398151915282610c05565b610ce157610ce18282610f83565b6000610cef888888886109d7565b9050610cfb81856111f5565b60005b87811015610e1d57610d40898983818110610d1b57610d1b611c5c565b9050602002810190610d2d9190611c72565b610d3b906040810190611cad565b6112cf565b80827f4f4da6666f52e3b6dbc3638d8eae4017722678fe58bca79cd8320817807a65be8b8b85818110610d7557610d75611c5c565b9050602002810190610d879190611c72565b610d95906020810190611c92565b8c8c86818110610da757610da7611c5c565b9050602002810190610db99190611c72565b602001358d8d87818110610dcf57610dcf611c5c565b9050602002810190610de19190611c72565b610def906040810190611cad565b8d8d8d604051610e059796959493929190611e65565b60405180910390a3610e1681611d64565b9050610cfe565b505050505050505050565b7ffd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f78333610e6260008051602061209183398151915282610c05565b610e7057610e708282610f83565b610e7983610a10565b610ed95760405162461bcd60e51b815260206004820152602b60248201527f5242414354696d656c6f636b3a206f7065726174696f6e2063616e6e6f74206260448201526a194818d85b98d95b1b195960aa1b6064820152608401610955565b6000838152600260205260408082208290555184917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a2505050565b6000818152600160205260408120610700906110bd565b600082815260208190526040902060010154610f48816110c7565b6108cb83836110f6565b60006001600160e01b03198216635a05180f60e01b1480610700575061070082611375565b600061088e83836113aa565b610f8d8282610c05565b61096857610f9a816113d4565b610fa58360206113e6565b604051602001610fb6929190611ed0565b60408051601f198184030181529082905262461bcd60e51b825261095591600401611f45565b6000610feb6020830183611c92565b6001600160a01b031660208301356110066040850185611cad565b604051611014929190611f78565b60006040518083038185875af1925050503d8060008114611051576040519150601f19603f3d011682016040523d82523d6000602084013e611056565b606091505b50509050806109685760405162461bcd60e51b815260206004820152602d60248201527f5242414354696d656c6f636b3a20756e6465726c79696e67207472616e73616360448201526c1d1a5bdb881c995d995c9d1959609a1b6064820152608401610955565b6000610700825490565b6110d18133610f83565b50565b6110de8282611581565b60008281526001602052604090206108cb9082611605565b611100828261161a565b60008281526001602052604090206108cb908261167f565b600061088e8383611690565b61112d8261086f565b6111495760405162461bcd60e51b815260040161095590611f88565b80158061116457506000818152600260205260409020546001145b6109685760405162461bcd60e51b815260206004820181905260248201527f5242414354696d656c6f636b3a206d697373696e6720646570656e64656e63796044820152606401610955565b6111b98161086f565b6111d55760405162461bcd60e51b815260040161095590611f88565b600090815260026020526040902060019055565b600061088e8383611783565b6111fe826108d0565b1561125d5760405162461bcd60e51b815260206004820152602960248201527f5242414354696d656c6f636b3a206f7065726174696f6e20616c7265616479206044820152681cd8da19591d5b195960ba1b6064820152608401610955565b6003548110156112af5760405162461bcd60e51b815260206004820181905260248201527f5242414354696d656c6f636b3a20696e73756666696369656e742064656c61796044820152606401610955565b6112b98142611fcc565b6000928352600260205260409092209190915550565b60048110156112dc575050565b60006112eb6004828486611fdf565b6112f491612009565b905061131e60046001600160e01b031983166000818152600183016020526040812054151561088e565b156108cb5760405162461bcd60e51b815260206004820152602160248201527f5242414354696d656c6f636b3a2073656c6563746f7220697320626c6f636b656044820152601960fa1b6064820152608401610955565b60006001600160e01b03198216637965db0b60e01b148061070057506301ffc9a760e01b6001600160e01b0319831614610700565b60008260000182815481106113c1576113c1611c5c565b9060005260206000200154905092915050565b60606107006001600160a01b03831660145b606060006113f5836002612039565b611400906002611fcc565b6001600160401b03811115611417576114176118bd565b6040519080825280601f01601f191660200182016040528015611441576020820181803683370190505b509050600360fc1b8160008151811061145c5761145c611c5c565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061148b5761148b611c5c565b60200101906001600160f81b031916908160001a90535060006114af846002612039565b6114ba906001611fcc565b90505b6001811115611532576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106114ee576114ee611c5c565b1a60f81b82828151811061150457611504611c5c565b60200101906001600160f81b031916908160001a90535060049490941c9361152b81612050565b90506114bd565b50831561088e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610955565b61158b8282610c05565b610968576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556115c13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061088e836001600160a01b038416611783565b6116248282610c05565b15610968576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061088e836001600160a01b0384165b600081815260018301602052604081205480156117795760006116b4600183612067565b85549091506000906116c890600190612067565b905081811461172d5760008660000182815481106116e8576116e8611c5c565b906000526020600020015490508087600001848154811061170b5761170b611c5c565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061173e5761173e61207a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610700565b6000915050610700565b60008181526001830160205260408120546117ca57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610700565b506000610700565b6000602082840312156117e457600080fd5b81356001600160e01b03198116811461088e57600080fd5b60006020828403121561180e57600080fd5b5035919050565b60008083601f84011261182757600080fd5b5081356001600160401b0381111561183e57600080fd5b6020830191508360208260051b850101111561185957600080fd5b9250929050565b6000806020838503121561187357600080fd5b82356001600160401b0381111561188957600080fd5b61189585828601611815565b90969095509350505050565b80356001600160a01b03811681146118b857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156118fb576118fb6118bd565b604052919050565b600082601f83011261191457600080fd5b81356001600160401b0381111561192d5761192d6118bd565b611940601f8201601f19166020016118d3565b81815284602083860101111561195557600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561198857600080fd5b611991856118a1565b935061199f602086016118a1565b92506040850135915060608501356001600160401b038111156119c157600080fd5b6119cd87828801611903565b91505092959194509250565b600080604083850312156119ec57600080fd5b823591506119fc602084016118a1565b90509250929050565b60008060008060608587031215611a1b57600080fd5b84356001600160401b03811115611a3157600080fd5b611a3d87828801611815565b90989097506020870135966040013595509350505050565b60008060408385031215611a6857600080fd5b50508035926020909101359150565b600080600080600060808688031215611a8f57600080fd5b85356001600160401b03811115611aa557600080fd5b611ab188828901611815565b9099909850602088013597604081013597506060013595509350505050565b600082601f830112611ae157600080fd5b813560206001600160401b03821115611afc57611afc6118bd565b8160051b611b0b8282016118d3565b9283528481018201928281019087851115611b2557600080fd5b83870192505b84831015611b4457823582529183019190830190611b2b565b979650505050505050565b600080600080600060a08688031215611b6757600080fd5b611b70866118a1565b9450611b7e602087016118a1565b935060408601356001600160401b0380821115611b9a57600080fd5b611ba689838a01611ad0565b94506060880135915080821115611bbc57600080fd5b611bc889838a01611ad0565b93506080880135915080821115611bde57600080fd5b50611beb88828901611903565b9150509295509295909350565b600080600080600060a08688031215611c1057600080fd5b611c19866118a1565b9450611c27602087016118a1565b9350604086013592506060860135915060808601356001600160401b03811115611c5057600080fd5b611beb88828901611903565b634e487b7160e01b600052603260045260246000fd5b60008235605e19833603018112611c8857600080fd5b9190910192915050565b600060208284031215611ca457600080fd5b61088e826118a1565b6000808335601e19843603018112611cc457600080fd5b8301803591506001600160401b03821115611cde57600080fd5b60200191503681900382131561185957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60018060a01b0385168152836020820152606060408201526000611d44606083018486611cf3565b9695505050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201611d7657611d76611d4e565b5060010190565b60608082528181018590526000906080600587901b8401810190840188845b89811015611e4e57868403607f190183528135368c9003605e19018112611dc257600080fd5b8b016001600160a01b03611dd5826118a1565b16855260208082013581870152604080830135601e19843603018112611dfa57600080fd5b9092018181019290356001600160401b03811115611e1757600080fd5b803603841315611e2657600080fd5b8882890152611e388989018286611cf3565b9750505093840193929092019150600101611d9c565b505050602084019590955250506040015292915050565b60018060a01b038816815286602082015260c060408201526000611e8d60c083018789611cf3565b606083019590955250608081019290925260a090910152949350505050565b60005b83811015611ec7578181015183820152602001611eaf565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611f08816017850160208801611eac565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611f39816028840160208801611eac565b01602801949350505050565b6020815260008251806020840152611f64816040850160208701611eac565b601f01601f19169190910160400192915050565b8183823760009101908152919050565b60208082526024908201527f5242414354696d656c6f636b3a206f7065726174696f6e206973206e6f7420726040820152636561647960e01b606082015260800190565b8082018082111561070057610700611d4e565b60008085851115611fef57600080fd5b83861115611ffc57600080fd5b5050820193919092039150565b6001600160e01b031981358181169160048510156120315780818660040360031b1b83161692505b505092915050565b808202811582820484141761070057610700611d4e565b60008161205f5761205f611d4e565b506000190190565b8181038181111561070057610700611d4e565b634e487b7160e01b600052603160045260246000fdfea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a264697066735822122064a83f60721959359d1c432c52a08f81bea2667aebccbbc732918f7169a85df564736f6c63430008130033b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775fd643c72710c63c0180259aba6b2d05451e3591a24e58b62239378085726f783", +} + +var RBACTimelockABI = RBACTimelockMetaData.ABI + +var RBACTimelockBin = RBACTimelockMetaData.Bin + +func DeployRBACTimelock(auth *bind.TransactOpts, backend bind.ContractBackend, minDelay *big.Int, admin common.Address, proposers []common.Address, executors []common.Address, cancellers []common.Address, bypassers []common.Address) (common.Address, *types.Transaction, *RBACTimelock, error) { + parsed, err := RBACTimelockMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(RBACTimelockBin), backend, minDelay, admin, proposers, executors, cancellers, bypassers) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &RBACTimelock{address: address, abi: *parsed, RBACTimelockCaller: RBACTimelockCaller{contract: contract}, RBACTimelockTransactor: RBACTimelockTransactor{contract: contract}, RBACTimelockFilterer: RBACTimelockFilterer{contract: contract}}, nil +} + +type RBACTimelock struct { + address common.Address + abi abi.ABI + RBACTimelockCaller + RBACTimelockTransactor + RBACTimelockFilterer +} + +type RBACTimelockCaller struct { + contract *bind.BoundContract +} + +type RBACTimelockTransactor struct { + contract *bind.BoundContract +} + +type RBACTimelockFilterer struct { + contract *bind.BoundContract +} + +type RBACTimelockSession struct { + Contract *RBACTimelock + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type RBACTimelockCallerSession struct { + Contract *RBACTimelockCaller + CallOpts bind.CallOpts +} + +type RBACTimelockTransactorSession struct { + Contract *RBACTimelockTransactor + TransactOpts bind.TransactOpts +} + +type RBACTimelockRaw struct { + Contract *RBACTimelock +} + +type RBACTimelockCallerRaw struct { + Contract *RBACTimelockCaller +} + +type RBACTimelockTransactorRaw struct { + Contract *RBACTimelockTransactor +} + +func NewRBACTimelock(address common.Address, backend bind.ContractBackend) (*RBACTimelock, error) { + abi, err := abi.JSON(strings.NewReader(RBACTimelockABI)) + if err != nil { + return nil, err + } + contract, err := bindRBACTimelock(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &RBACTimelock{address: address, abi: abi, RBACTimelockCaller: RBACTimelockCaller{contract: contract}, RBACTimelockTransactor: RBACTimelockTransactor{contract: contract}, RBACTimelockFilterer: RBACTimelockFilterer{contract: contract}}, nil +} + +func NewRBACTimelockCaller(address common.Address, caller bind.ContractCaller) (*RBACTimelockCaller, error) { + contract, err := bindRBACTimelock(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &RBACTimelockCaller{contract: contract}, nil +} + +func NewRBACTimelockTransactor(address common.Address, transactor bind.ContractTransactor) (*RBACTimelockTransactor, error) { + contract, err := bindRBACTimelock(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &RBACTimelockTransactor{contract: contract}, nil +} + +func NewRBACTimelockFilterer(address common.Address, filterer bind.ContractFilterer) (*RBACTimelockFilterer, error) { + contract, err := bindRBACTimelock(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &RBACTimelockFilterer{contract: contract}, nil +} + +func bindRBACTimelock(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := RBACTimelockMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_RBACTimelock *RBACTimelockRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _RBACTimelock.Contract.RBACTimelockCaller.contract.Call(opts, result, method, params...) +} + +func (_RBACTimelock *RBACTimelockRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _RBACTimelock.Contract.RBACTimelockTransactor.contract.Transfer(opts) +} + +func (_RBACTimelock *RBACTimelockRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _RBACTimelock.Contract.RBACTimelockTransactor.contract.Transact(opts, method, params...) +} + +func (_RBACTimelock *RBACTimelockCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _RBACTimelock.Contract.contract.Call(opts, result, method, params...) +} + +func (_RBACTimelock *RBACTimelockTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _RBACTimelock.Contract.contract.Transfer(opts) +} + +func (_RBACTimelock *RBACTimelockTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _RBACTimelock.Contract.contract.Transact(opts, method, params...) +} + +func (_RBACTimelock *RBACTimelockCaller) ADMINROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "ADMIN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) ADMINROLE() ([32]byte, error) { + return _RBACTimelock.Contract.ADMINROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCallerSession) ADMINROLE() ([32]byte, error) { + return _RBACTimelock.Contract.ADMINROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCaller) BYPASSERROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "BYPASSER_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) BYPASSERROLE() ([32]byte, error) { + return _RBACTimelock.Contract.BYPASSERROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCallerSession) BYPASSERROLE() ([32]byte, error) { + return _RBACTimelock.Contract.BYPASSERROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCaller) CANCELLERROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "CANCELLER_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) CANCELLERROLE() ([32]byte, error) { + return _RBACTimelock.Contract.CANCELLERROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCallerSession) CANCELLERROLE() ([32]byte, error) { + return _RBACTimelock.Contract.CANCELLERROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) DEFAULTADMINROLE() ([32]byte, error) { + return _RBACTimelock.Contract.DEFAULTADMINROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCallerSession) DEFAULTADMINROLE() ([32]byte, error) { + return _RBACTimelock.Contract.DEFAULTADMINROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCaller) EXECUTORROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "EXECUTOR_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) EXECUTORROLE() ([32]byte, error) { + return _RBACTimelock.Contract.EXECUTORROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCallerSession) EXECUTORROLE() ([32]byte, error) { + return _RBACTimelock.Contract.EXECUTORROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCaller) PROPOSERROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "PROPOSER_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) PROPOSERROLE() ([32]byte, error) { + return _RBACTimelock.Contract.PROPOSERROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCallerSession) PROPOSERROLE() ([32]byte, error) { + return _RBACTimelock.Contract.PROPOSERROLE(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCaller) GetBlockedFunctionSelectorAt(opts *bind.CallOpts, index *big.Int) ([4]byte, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "getBlockedFunctionSelectorAt", index) + + if err != nil { + return *new([4]byte), err + } + + out0 := *abi.ConvertType(out[0], new([4]byte)).(*[4]byte) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) GetBlockedFunctionSelectorAt(index *big.Int) ([4]byte, error) { + return _RBACTimelock.Contract.GetBlockedFunctionSelectorAt(&_RBACTimelock.CallOpts, index) +} + +func (_RBACTimelock *RBACTimelockCallerSession) GetBlockedFunctionSelectorAt(index *big.Int) ([4]byte, error) { + return _RBACTimelock.Contract.GetBlockedFunctionSelectorAt(&_RBACTimelock.CallOpts, index) +} + +func (_RBACTimelock *RBACTimelockCaller) GetBlockedFunctionSelectorCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "getBlockedFunctionSelectorCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) GetBlockedFunctionSelectorCount() (*big.Int, error) { + return _RBACTimelock.Contract.GetBlockedFunctionSelectorCount(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCallerSession) GetBlockedFunctionSelectorCount() (*big.Int, error) { + return _RBACTimelock.Contract.GetBlockedFunctionSelectorCount(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCaller) GetMinDelay(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "getMinDelay") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) GetMinDelay() (*big.Int, error) { + return _RBACTimelock.Contract.GetMinDelay(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCallerSession) GetMinDelay() (*big.Int, error) { + return _RBACTimelock.Contract.GetMinDelay(&_RBACTimelock.CallOpts) +} + +func (_RBACTimelock *RBACTimelockCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "getRoleAdmin", role) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _RBACTimelock.Contract.GetRoleAdmin(&_RBACTimelock.CallOpts, role) +} + +func (_RBACTimelock *RBACTimelockCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _RBACTimelock.Contract.GetRoleAdmin(&_RBACTimelock.CallOpts, role) +} + +func (_RBACTimelock *RBACTimelockCaller) GetRoleMember(opts *bind.CallOpts, role [32]byte, index *big.Int) (common.Address, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "getRoleMember", role, index) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) GetRoleMember(role [32]byte, index *big.Int) (common.Address, error) { + return _RBACTimelock.Contract.GetRoleMember(&_RBACTimelock.CallOpts, role, index) +} + +func (_RBACTimelock *RBACTimelockCallerSession) GetRoleMember(role [32]byte, index *big.Int) (common.Address, error) { + return _RBACTimelock.Contract.GetRoleMember(&_RBACTimelock.CallOpts, role, index) +} + +func (_RBACTimelock *RBACTimelockCaller) GetRoleMemberCount(opts *bind.CallOpts, role [32]byte) (*big.Int, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "getRoleMemberCount", role) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) GetRoleMemberCount(role [32]byte) (*big.Int, error) { + return _RBACTimelock.Contract.GetRoleMemberCount(&_RBACTimelock.CallOpts, role) +} + +func (_RBACTimelock *RBACTimelockCallerSession) GetRoleMemberCount(role [32]byte) (*big.Int, error) { + return _RBACTimelock.Contract.GetRoleMemberCount(&_RBACTimelock.CallOpts, role) +} + +func (_RBACTimelock *RBACTimelockCaller) GetTimestamp(opts *bind.CallOpts, id [32]byte) (*big.Int, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "getTimestamp", id) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) GetTimestamp(id [32]byte) (*big.Int, error) { + return _RBACTimelock.Contract.GetTimestamp(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCallerSession) GetTimestamp(id [32]byte) (*big.Int, error) { + return _RBACTimelock.Contract.GetTimestamp(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "hasRole", role, account) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _RBACTimelock.Contract.HasRole(&_RBACTimelock.CallOpts, role, account) +} + +func (_RBACTimelock *RBACTimelockCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _RBACTimelock.Contract.HasRole(&_RBACTimelock.CallOpts, role, account) +} + +func (_RBACTimelock *RBACTimelockCaller) HashOperationBatch(opts *bind.CallOpts, calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte) ([32]byte, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "hashOperationBatch", calls, predecessor, salt) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) HashOperationBatch(calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte) ([32]byte, error) { + return _RBACTimelock.Contract.HashOperationBatch(&_RBACTimelock.CallOpts, calls, predecessor, salt) +} + +func (_RBACTimelock *RBACTimelockCallerSession) HashOperationBatch(calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte) ([32]byte, error) { + return _RBACTimelock.Contract.HashOperationBatch(&_RBACTimelock.CallOpts, calls, predecessor, salt) +} + +func (_RBACTimelock *RBACTimelockCaller) IsOperation(opts *bind.CallOpts, id [32]byte) (bool, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "isOperation", id) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) IsOperation(id [32]byte) (bool, error) { + return _RBACTimelock.Contract.IsOperation(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCallerSession) IsOperation(id [32]byte) (bool, error) { + return _RBACTimelock.Contract.IsOperation(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCaller) IsOperationDone(opts *bind.CallOpts, id [32]byte) (bool, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "isOperationDone", id) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) IsOperationDone(id [32]byte) (bool, error) { + return _RBACTimelock.Contract.IsOperationDone(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCallerSession) IsOperationDone(id [32]byte) (bool, error) { + return _RBACTimelock.Contract.IsOperationDone(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCaller) IsOperationPending(opts *bind.CallOpts, id [32]byte) (bool, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "isOperationPending", id) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) IsOperationPending(id [32]byte) (bool, error) { + return _RBACTimelock.Contract.IsOperationPending(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCallerSession) IsOperationPending(id [32]byte) (bool, error) { + return _RBACTimelock.Contract.IsOperationPending(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCaller) IsOperationReady(opts *bind.CallOpts, id [32]byte) (bool, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "isOperationReady", id) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) IsOperationReady(id [32]byte) (bool, error) { + return _RBACTimelock.Contract.IsOperationReady(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCallerSession) IsOperationReady(id [32]byte) (bool, error) { + return _RBACTimelock.Contract.IsOperationReady(&_RBACTimelock.CallOpts, id) +} + +func (_RBACTimelock *RBACTimelockCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _RBACTimelock.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_RBACTimelock *RBACTimelockSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _RBACTimelock.Contract.SupportsInterface(&_RBACTimelock.CallOpts, interfaceId) +} + +func (_RBACTimelock *RBACTimelockCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _RBACTimelock.Contract.SupportsInterface(&_RBACTimelock.CallOpts, interfaceId) +} + +func (_RBACTimelock *RBACTimelockTransactor) BlockFunctionSelector(opts *bind.TransactOpts, selector [4]byte) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "blockFunctionSelector", selector) +} + +func (_RBACTimelock *RBACTimelockSession) BlockFunctionSelector(selector [4]byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.BlockFunctionSelector(&_RBACTimelock.TransactOpts, selector) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) BlockFunctionSelector(selector [4]byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.BlockFunctionSelector(&_RBACTimelock.TransactOpts, selector) +} + +func (_RBACTimelock *RBACTimelockTransactor) BypasserExecuteBatch(opts *bind.TransactOpts, calls []RBACTimelockCall) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "bypasserExecuteBatch", calls) +} + +func (_RBACTimelock *RBACTimelockSession) BypasserExecuteBatch(calls []RBACTimelockCall) (*types.Transaction, error) { + return _RBACTimelock.Contract.BypasserExecuteBatch(&_RBACTimelock.TransactOpts, calls) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) BypasserExecuteBatch(calls []RBACTimelockCall) (*types.Transaction, error) { + return _RBACTimelock.Contract.BypasserExecuteBatch(&_RBACTimelock.TransactOpts, calls) +} + +func (_RBACTimelock *RBACTimelockTransactor) Cancel(opts *bind.TransactOpts, id [32]byte) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "cancel", id) +} + +func (_RBACTimelock *RBACTimelockSession) Cancel(id [32]byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.Cancel(&_RBACTimelock.TransactOpts, id) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) Cancel(id [32]byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.Cancel(&_RBACTimelock.TransactOpts, id) +} + +func (_RBACTimelock *RBACTimelockTransactor) ExecuteBatch(opts *bind.TransactOpts, calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "executeBatch", calls, predecessor, salt) +} + +func (_RBACTimelock *RBACTimelockSession) ExecuteBatch(calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.ExecuteBatch(&_RBACTimelock.TransactOpts, calls, predecessor, salt) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) ExecuteBatch(calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.ExecuteBatch(&_RBACTimelock.TransactOpts, calls, predecessor, salt) +} + +func (_RBACTimelock *RBACTimelockTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "grantRole", role, account) +} + +func (_RBACTimelock *RBACTimelockSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _RBACTimelock.Contract.GrantRole(&_RBACTimelock.TransactOpts, role, account) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _RBACTimelock.Contract.GrantRole(&_RBACTimelock.TransactOpts, role, account) +} + +func (_RBACTimelock *RBACTimelockTransactor) OnERC1155BatchReceived(opts *bind.TransactOpts, arg0 common.Address, arg1 common.Address, arg2 []*big.Int, arg3 []*big.Int, arg4 []byte) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "onERC1155BatchReceived", arg0, arg1, arg2, arg3, arg4) +} + +func (_RBACTimelock *RBACTimelockSession) OnERC1155BatchReceived(arg0 common.Address, arg1 common.Address, arg2 []*big.Int, arg3 []*big.Int, arg4 []byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.OnERC1155BatchReceived(&_RBACTimelock.TransactOpts, arg0, arg1, arg2, arg3, arg4) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) OnERC1155BatchReceived(arg0 common.Address, arg1 common.Address, arg2 []*big.Int, arg3 []*big.Int, arg4 []byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.OnERC1155BatchReceived(&_RBACTimelock.TransactOpts, arg0, arg1, arg2, arg3, arg4) +} + +func (_RBACTimelock *RBACTimelockTransactor) OnERC1155Received(opts *bind.TransactOpts, arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 *big.Int, arg4 []byte) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "onERC1155Received", arg0, arg1, arg2, arg3, arg4) +} + +func (_RBACTimelock *RBACTimelockSession) OnERC1155Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 *big.Int, arg4 []byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.OnERC1155Received(&_RBACTimelock.TransactOpts, arg0, arg1, arg2, arg3, arg4) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) OnERC1155Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 *big.Int, arg4 []byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.OnERC1155Received(&_RBACTimelock.TransactOpts, arg0, arg1, arg2, arg3, arg4) +} + +func (_RBACTimelock *RBACTimelockTransactor) OnERC721Received(opts *bind.TransactOpts, arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "onERC721Received", arg0, arg1, arg2, arg3) +} + +func (_RBACTimelock *RBACTimelockSession) OnERC721Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.OnERC721Received(&_RBACTimelock.TransactOpts, arg0, arg1, arg2, arg3) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) OnERC721Received(arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.OnERC721Received(&_RBACTimelock.TransactOpts, arg0, arg1, arg2, arg3) +} + +func (_RBACTimelock *RBACTimelockTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "renounceRole", role, account) +} + +func (_RBACTimelock *RBACTimelockSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _RBACTimelock.Contract.RenounceRole(&_RBACTimelock.TransactOpts, role, account) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _RBACTimelock.Contract.RenounceRole(&_RBACTimelock.TransactOpts, role, account) +} + +func (_RBACTimelock *RBACTimelockTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "revokeRole", role, account) +} + +func (_RBACTimelock *RBACTimelockSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _RBACTimelock.Contract.RevokeRole(&_RBACTimelock.TransactOpts, role, account) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _RBACTimelock.Contract.RevokeRole(&_RBACTimelock.TransactOpts, role, account) +} + +func (_RBACTimelock *RBACTimelockTransactor) ScheduleBatch(opts *bind.TransactOpts, calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte, delay *big.Int) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "scheduleBatch", calls, predecessor, salt, delay) +} + +func (_RBACTimelock *RBACTimelockSession) ScheduleBatch(calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte, delay *big.Int) (*types.Transaction, error) { + return _RBACTimelock.Contract.ScheduleBatch(&_RBACTimelock.TransactOpts, calls, predecessor, salt, delay) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) ScheduleBatch(calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte, delay *big.Int) (*types.Transaction, error) { + return _RBACTimelock.Contract.ScheduleBatch(&_RBACTimelock.TransactOpts, calls, predecessor, salt, delay) +} + +func (_RBACTimelock *RBACTimelockTransactor) UnblockFunctionSelector(opts *bind.TransactOpts, selector [4]byte) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "unblockFunctionSelector", selector) +} + +func (_RBACTimelock *RBACTimelockSession) UnblockFunctionSelector(selector [4]byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.UnblockFunctionSelector(&_RBACTimelock.TransactOpts, selector) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) UnblockFunctionSelector(selector [4]byte) (*types.Transaction, error) { + return _RBACTimelock.Contract.UnblockFunctionSelector(&_RBACTimelock.TransactOpts, selector) +} + +func (_RBACTimelock *RBACTimelockTransactor) UpdateDelay(opts *bind.TransactOpts, newDelay *big.Int) (*types.Transaction, error) { + return _RBACTimelock.contract.Transact(opts, "updateDelay", newDelay) +} + +func (_RBACTimelock *RBACTimelockSession) UpdateDelay(newDelay *big.Int) (*types.Transaction, error) { + return _RBACTimelock.Contract.UpdateDelay(&_RBACTimelock.TransactOpts, newDelay) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) UpdateDelay(newDelay *big.Int) (*types.Transaction, error) { + return _RBACTimelock.Contract.UpdateDelay(&_RBACTimelock.TransactOpts, newDelay) +} + +func (_RBACTimelock *RBACTimelockTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _RBACTimelock.contract.RawTransact(opts, nil) +} + +func (_RBACTimelock *RBACTimelockSession) Receive() (*types.Transaction, error) { + return _RBACTimelock.Contract.Receive(&_RBACTimelock.TransactOpts) +} + +func (_RBACTimelock *RBACTimelockTransactorSession) Receive() (*types.Transaction, error) { + return _RBACTimelock.Contract.Receive(&_RBACTimelock.TransactOpts) +} + +type RBACTimelockBypasserCallExecutedIterator struct { + Event *RBACTimelockBypasserCallExecuted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockBypasserCallExecutedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockBypasserCallExecuted) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockBypasserCallExecuted) + 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() + } +} + +func (it *RBACTimelockBypasserCallExecutedIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockBypasserCallExecutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockBypasserCallExecuted struct { + Index *big.Int + Target common.Address + Value *big.Int + Data []byte + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterBypasserCallExecuted(opts *bind.FilterOpts, index []*big.Int) (*RBACTimelockBypasserCallExecutedIterator, error) { + + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "BypasserCallExecuted", indexRule) + if err != nil { + return nil, err + } + return &RBACTimelockBypasserCallExecutedIterator{contract: _RBACTimelock.contract, event: "BypasserCallExecuted", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchBypasserCallExecuted(opts *bind.WatchOpts, sink chan<- *RBACTimelockBypasserCallExecuted, index []*big.Int) (event.Subscription, error) { + + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "BypasserCallExecuted", indexRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockBypasserCallExecuted) + if err := _RBACTimelock.contract.UnpackLog(event, "BypasserCallExecuted", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseBypasserCallExecuted(log types.Log) (*RBACTimelockBypasserCallExecuted, error) { + event := new(RBACTimelockBypasserCallExecuted) + if err := _RBACTimelock.contract.UnpackLog(event, "BypasserCallExecuted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type RBACTimelockCallExecutedIterator struct { + Event *RBACTimelockCallExecuted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockCallExecutedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockCallExecuted) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockCallExecuted) + 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() + } +} + +func (it *RBACTimelockCallExecutedIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockCallExecutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockCallExecuted struct { + Id [32]byte + Index *big.Int + Target common.Address + Value *big.Int + Data []byte + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterCallExecuted(opts *bind.FilterOpts, id [][32]byte, index []*big.Int) (*RBACTimelockCallExecutedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "CallExecuted", idRule, indexRule) + if err != nil { + return nil, err + } + return &RBACTimelockCallExecutedIterator{contract: _RBACTimelock.contract, event: "CallExecuted", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchCallExecuted(opts *bind.WatchOpts, sink chan<- *RBACTimelockCallExecuted, id [][32]byte, index []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "CallExecuted", idRule, indexRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockCallExecuted) + if err := _RBACTimelock.contract.UnpackLog(event, "CallExecuted", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseCallExecuted(log types.Log) (*RBACTimelockCallExecuted, error) { + event := new(RBACTimelockCallExecuted) + if err := _RBACTimelock.contract.UnpackLog(event, "CallExecuted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type RBACTimelockCallScheduledIterator struct { + Event *RBACTimelockCallScheduled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockCallScheduledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockCallScheduled) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockCallScheduled) + 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() + } +} + +func (it *RBACTimelockCallScheduledIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockCallScheduledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockCallScheduled struct { + Id [32]byte + Index *big.Int + Target common.Address + Value *big.Int + Data []byte + Predecessor [32]byte + Salt [32]byte + Delay *big.Int + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterCallScheduled(opts *bind.FilterOpts, id [][32]byte, index []*big.Int) (*RBACTimelockCallScheduledIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "CallScheduled", idRule, indexRule) + if err != nil { + return nil, err + } + return &RBACTimelockCallScheduledIterator{contract: _RBACTimelock.contract, event: "CallScheduled", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchCallScheduled(opts *bind.WatchOpts, sink chan<- *RBACTimelockCallScheduled, id [][32]byte, index []*big.Int) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "CallScheduled", idRule, indexRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockCallScheduled) + if err := _RBACTimelock.contract.UnpackLog(event, "CallScheduled", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseCallScheduled(log types.Log) (*RBACTimelockCallScheduled, error) { + event := new(RBACTimelockCallScheduled) + if err := _RBACTimelock.contract.UnpackLog(event, "CallScheduled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type RBACTimelockCancelledIterator struct { + Event *RBACTimelockCancelled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockCancelledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockCancelled) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockCancelled) + 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() + } +} + +func (it *RBACTimelockCancelledIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockCancelledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockCancelled struct { + Id [32]byte + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterCancelled(opts *bind.FilterOpts, id [][32]byte) (*RBACTimelockCancelledIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "Cancelled", idRule) + if err != nil { + return nil, err + } + return &RBACTimelockCancelledIterator{contract: _RBACTimelock.contract, event: "Cancelled", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchCancelled(opts *bind.WatchOpts, sink chan<- *RBACTimelockCancelled, id [][32]byte) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "Cancelled", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockCancelled) + if err := _RBACTimelock.contract.UnpackLog(event, "Cancelled", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseCancelled(log types.Log) (*RBACTimelockCancelled, error) { + event := new(RBACTimelockCancelled) + if err := _RBACTimelock.contract.UnpackLog(event, "Cancelled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type RBACTimelockFunctionSelectorBlockedIterator struct { + Event *RBACTimelockFunctionSelectorBlocked + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockFunctionSelectorBlockedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockFunctionSelectorBlocked) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockFunctionSelectorBlocked) + 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() + } +} + +func (it *RBACTimelockFunctionSelectorBlockedIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockFunctionSelectorBlockedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockFunctionSelectorBlocked struct { + Selector [4]byte + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterFunctionSelectorBlocked(opts *bind.FilterOpts, selector [][4]byte) (*RBACTimelockFunctionSelectorBlockedIterator, error) { + + var selectorRule []interface{} + for _, selectorItem := range selector { + selectorRule = append(selectorRule, selectorItem) + } + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "FunctionSelectorBlocked", selectorRule) + if err != nil { + return nil, err + } + return &RBACTimelockFunctionSelectorBlockedIterator{contract: _RBACTimelock.contract, event: "FunctionSelectorBlocked", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchFunctionSelectorBlocked(opts *bind.WatchOpts, sink chan<- *RBACTimelockFunctionSelectorBlocked, selector [][4]byte) (event.Subscription, error) { + + var selectorRule []interface{} + for _, selectorItem := range selector { + selectorRule = append(selectorRule, selectorItem) + } + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "FunctionSelectorBlocked", selectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockFunctionSelectorBlocked) + if err := _RBACTimelock.contract.UnpackLog(event, "FunctionSelectorBlocked", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseFunctionSelectorBlocked(log types.Log) (*RBACTimelockFunctionSelectorBlocked, error) { + event := new(RBACTimelockFunctionSelectorBlocked) + if err := _RBACTimelock.contract.UnpackLog(event, "FunctionSelectorBlocked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type RBACTimelockFunctionSelectorUnblockedIterator struct { + Event *RBACTimelockFunctionSelectorUnblocked + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockFunctionSelectorUnblockedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockFunctionSelectorUnblocked) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockFunctionSelectorUnblocked) + 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() + } +} + +func (it *RBACTimelockFunctionSelectorUnblockedIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockFunctionSelectorUnblockedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockFunctionSelectorUnblocked struct { + Selector [4]byte + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterFunctionSelectorUnblocked(opts *bind.FilterOpts, selector [][4]byte) (*RBACTimelockFunctionSelectorUnblockedIterator, error) { + + var selectorRule []interface{} + for _, selectorItem := range selector { + selectorRule = append(selectorRule, selectorItem) + } + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "FunctionSelectorUnblocked", selectorRule) + if err != nil { + return nil, err + } + return &RBACTimelockFunctionSelectorUnblockedIterator{contract: _RBACTimelock.contract, event: "FunctionSelectorUnblocked", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchFunctionSelectorUnblocked(opts *bind.WatchOpts, sink chan<- *RBACTimelockFunctionSelectorUnblocked, selector [][4]byte) (event.Subscription, error) { + + var selectorRule []interface{} + for _, selectorItem := range selector { + selectorRule = append(selectorRule, selectorItem) + } + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "FunctionSelectorUnblocked", selectorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockFunctionSelectorUnblocked) + if err := _RBACTimelock.contract.UnpackLog(event, "FunctionSelectorUnblocked", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseFunctionSelectorUnblocked(log types.Log) (*RBACTimelockFunctionSelectorUnblocked, error) { + event := new(RBACTimelockFunctionSelectorUnblocked) + if err := _RBACTimelock.contract.UnpackLog(event, "FunctionSelectorUnblocked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type RBACTimelockMinDelayChangeIterator struct { + Event *RBACTimelockMinDelayChange + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockMinDelayChangeIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockMinDelayChange) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockMinDelayChange) + 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() + } +} + +func (it *RBACTimelockMinDelayChangeIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockMinDelayChangeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockMinDelayChange struct { + OldDuration *big.Int + NewDuration *big.Int + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterMinDelayChange(opts *bind.FilterOpts) (*RBACTimelockMinDelayChangeIterator, error) { + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "MinDelayChange") + if err != nil { + return nil, err + } + return &RBACTimelockMinDelayChangeIterator{contract: _RBACTimelock.contract, event: "MinDelayChange", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchMinDelayChange(opts *bind.WatchOpts, sink chan<- *RBACTimelockMinDelayChange) (event.Subscription, error) { + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "MinDelayChange") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockMinDelayChange) + if err := _RBACTimelock.contract.UnpackLog(event, "MinDelayChange", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseMinDelayChange(log types.Log) (*RBACTimelockMinDelayChange, error) { + event := new(RBACTimelockMinDelayChange) + if err := _RBACTimelock.contract.UnpackLog(event, "MinDelayChange", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type RBACTimelockRoleAdminChangedIterator struct { + Event *RBACTimelockRoleAdminChanged + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockRoleAdminChangedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockRoleAdminChanged) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockRoleAdminChanged) + 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() + } +} + +func (it *RBACTimelockRoleAdminChangedIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockRoleAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*RBACTimelockRoleAdminChangedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return &RBACTimelockRoleAdminChangedIterator{contract: _RBACTimelock.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *RBACTimelockRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockRoleAdminChanged) + if err := _RBACTimelock.contract.UnpackLog(event, "RoleAdminChanged", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseRoleAdminChanged(log types.Log) (*RBACTimelockRoleAdminChanged, error) { + event := new(RBACTimelockRoleAdminChanged) + if err := _RBACTimelock.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type RBACTimelockRoleGrantedIterator struct { + Event *RBACTimelockRoleGranted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockRoleGrantedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockRoleGranted) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockRoleGranted) + 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() + } +} + +func (it *RBACTimelockRoleGrantedIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockRoleGrantedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*RBACTimelockRoleGrantedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &RBACTimelockRoleGrantedIterator{contract: _RBACTimelock.contract, event: "RoleGranted", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *RBACTimelockRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockRoleGranted) + if err := _RBACTimelock.contract.UnpackLog(event, "RoleGranted", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseRoleGranted(log types.Log) (*RBACTimelockRoleGranted, error) { + event := new(RBACTimelockRoleGranted) + if err := _RBACTimelock.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type RBACTimelockRoleRevokedIterator struct { + Event *RBACTimelockRoleRevoked + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *RBACTimelockRoleRevokedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(RBACTimelockRoleRevoked) + 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 + } + } + + select { + case log := <-it.logs: + it.Event = new(RBACTimelockRoleRevoked) + 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() + } +} + +func (it *RBACTimelockRoleRevokedIterator) Error() error { + return it.fail +} + +func (it *RBACTimelockRoleRevokedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type RBACTimelockRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log +} + +func (_RBACTimelock *RBACTimelockFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*RBACTimelockRoleRevokedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _RBACTimelock.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &RBACTimelockRoleRevokedIterator{contract: _RBACTimelock.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil +} + +func (_RBACTimelock *RBACTimelockFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *RBACTimelockRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _RBACTimelock.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(RBACTimelockRoleRevoked) + if err := _RBACTimelock.contract.UnpackLog(event, "RoleRevoked", 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 +} + +func (_RBACTimelock *RBACTimelockFilterer) ParseRoleRevoked(log types.Log) (*RBACTimelockRoleRevoked, error) { + event := new(RBACTimelockRoleRevoked) + if err := _RBACTimelock.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +func (_RBACTimelock *RBACTimelock) ParseLog(log types.Log) (AbigenLog, error) { + switch log.Topics[0] { + case _RBACTimelock.abi.Events["BypasserCallExecuted"].ID: + return _RBACTimelock.ParseBypasserCallExecuted(log) + case _RBACTimelock.abi.Events["CallExecuted"].ID: + return _RBACTimelock.ParseCallExecuted(log) + case _RBACTimelock.abi.Events["CallScheduled"].ID: + return _RBACTimelock.ParseCallScheduled(log) + case _RBACTimelock.abi.Events["Cancelled"].ID: + return _RBACTimelock.ParseCancelled(log) + case _RBACTimelock.abi.Events["FunctionSelectorBlocked"].ID: + return _RBACTimelock.ParseFunctionSelectorBlocked(log) + case _RBACTimelock.abi.Events["FunctionSelectorUnblocked"].ID: + return _RBACTimelock.ParseFunctionSelectorUnblocked(log) + case _RBACTimelock.abi.Events["MinDelayChange"].ID: + return _RBACTimelock.ParseMinDelayChange(log) + case _RBACTimelock.abi.Events["RoleAdminChanged"].ID: + return _RBACTimelock.ParseRoleAdminChanged(log) + case _RBACTimelock.abi.Events["RoleGranted"].ID: + return _RBACTimelock.ParseRoleGranted(log) + case _RBACTimelock.abi.Events["RoleRevoked"].ID: + return _RBACTimelock.ParseRoleRevoked(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (RBACTimelockBypasserCallExecuted) Topic() common.Hash { + return common.HexToHash("0x6b983f337bab73dfe37faca733adf3ea35b45b8b144ec8ee2de3a1b224564b0c") +} + +func (RBACTimelockCallExecuted) Topic() common.Hash { + return common.HexToHash("0xc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b58") +} + +func (RBACTimelockCallScheduled) Topic() common.Hash { + return common.HexToHash("0x4f4da6666f52e3b6dbc3638d8eae4017722678fe58bca79cd8320817807a65be") +} + +func (RBACTimelockCancelled) Topic() common.Hash { + return common.HexToHash("0xbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb70") +} + +func (RBACTimelockFunctionSelectorBlocked) Topic() common.Hash { + return common.HexToHash("0x15b40cf8ed4c95cd3c0e1dedfdb3987c3f9bf3d3770d13ddf6dc4daa5ffae9ef") +} + +func (RBACTimelockFunctionSelectorUnblocked) Topic() common.Hash { + return common.HexToHash("0xd91859a8d88193a56a2983deb65a5253985141c49c70bf016880b5243bd432e1") +} + +func (RBACTimelockMinDelayChange) Topic() common.Hash { + return common.HexToHash("0x11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5") +} + +func (RBACTimelockRoleAdminChanged) Topic() common.Hash { + return common.HexToHash("0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff") +} + +func (RBACTimelockRoleGranted) Topic() common.Hash { + return common.HexToHash("0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d") +} + +func (RBACTimelockRoleRevoked) Topic() common.Hash { + return common.HexToHash("0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b") +} + +func (_RBACTimelock *RBACTimelock) Address() common.Address { + return _RBACTimelock.address +} + +type RBACTimelockInterface interface { + ADMINROLE(opts *bind.CallOpts) ([32]byte, error) + + BYPASSERROLE(opts *bind.CallOpts) ([32]byte, error) + + CANCELLERROLE(opts *bind.CallOpts) ([32]byte, error) + + DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) + + EXECUTORROLE(opts *bind.CallOpts) ([32]byte, error) + + PROPOSERROLE(opts *bind.CallOpts) ([32]byte, error) + + GetBlockedFunctionSelectorAt(opts *bind.CallOpts, index *big.Int) ([4]byte, error) + + GetBlockedFunctionSelectorCount(opts *bind.CallOpts) (*big.Int, error) + + GetMinDelay(opts *bind.CallOpts) (*big.Int, error) + + GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) + + GetRoleMember(opts *bind.CallOpts, role [32]byte, index *big.Int) (common.Address, error) + + GetRoleMemberCount(opts *bind.CallOpts, role [32]byte) (*big.Int, error) + + GetTimestamp(opts *bind.CallOpts, id [32]byte) (*big.Int, error) + + HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) + + HashOperationBatch(opts *bind.CallOpts, calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte) ([32]byte, error) + + IsOperation(opts *bind.CallOpts, id [32]byte) (bool, error) + + IsOperationDone(opts *bind.CallOpts, id [32]byte) (bool, error) + + IsOperationPending(opts *bind.CallOpts, id [32]byte) (bool, error) + + IsOperationReady(opts *bind.CallOpts, id [32]byte) (bool, error) + + SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) + + BlockFunctionSelector(opts *bind.TransactOpts, selector [4]byte) (*types.Transaction, error) + + BypasserExecuteBatch(opts *bind.TransactOpts, calls []RBACTimelockCall) (*types.Transaction, error) + + Cancel(opts *bind.TransactOpts, id [32]byte) (*types.Transaction, error) + + ExecuteBatch(opts *bind.TransactOpts, calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte) (*types.Transaction, error) + + GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) + + OnERC1155BatchReceived(opts *bind.TransactOpts, arg0 common.Address, arg1 common.Address, arg2 []*big.Int, arg3 []*big.Int, arg4 []byte) (*types.Transaction, error) + + OnERC1155Received(opts *bind.TransactOpts, arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 *big.Int, arg4 []byte) (*types.Transaction, error) + + OnERC721Received(opts *bind.TransactOpts, arg0 common.Address, arg1 common.Address, arg2 *big.Int, arg3 []byte) (*types.Transaction, error) + + RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) + + RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) + + ScheduleBatch(opts *bind.TransactOpts, calls []RBACTimelockCall, predecessor [32]byte, salt [32]byte, delay *big.Int) (*types.Transaction, error) + + UnblockFunctionSelector(opts *bind.TransactOpts, selector [4]byte) (*types.Transaction, error) + + UpdateDelay(opts *bind.TransactOpts, newDelay *big.Int) (*types.Transaction, error) + + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + + FilterBypasserCallExecuted(opts *bind.FilterOpts, index []*big.Int) (*RBACTimelockBypasserCallExecutedIterator, error) + + WatchBypasserCallExecuted(opts *bind.WatchOpts, sink chan<- *RBACTimelockBypasserCallExecuted, index []*big.Int) (event.Subscription, error) + + ParseBypasserCallExecuted(log types.Log) (*RBACTimelockBypasserCallExecuted, error) + + FilterCallExecuted(opts *bind.FilterOpts, id [][32]byte, index []*big.Int) (*RBACTimelockCallExecutedIterator, error) + + WatchCallExecuted(opts *bind.WatchOpts, sink chan<- *RBACTimelockCallExecuted, id [][32]byte, index []*big.Int) (event.Subscription, error) + + ParseCallExecuted(log types.Log) (*RBACTimelockCallExecuted, error) + + FilterCallScheduled(opts *bind.FilterOpts, id [][32]byte, index []*big.Int) (*RBACTimelockCallScheduledIterator, error) + + WatchCallScheduled(opts *bind.WatchOpts, sink chan<- *RBACTimelockCallScheduled, id [][32]byte, index []*big.Int) (event.Subscription, error) + + ParseCallScheduled(log types.Log) (*RBACTimelockCallScheduled, error) + + FilterCancelled(opts *bind.FilterOpts, id [][32]byte) (*RBACTimelockCancelledIterator, error) + + WatchCancelled(opts *bind.WatchOpts, sink chan<- *RBACTimelockCancelled, id [][32]byte) (event.Subscription, error) + + ParseCancelled(log types.Log) (*RBACTimelockCancelled, error) + + FilterFunctionSelectorBlocked(opts *bind.FilterOpts, selector [][4]byte) (*RBACTimelockFunctionSelectorBlockedIterator, error) + + WatchFunctionSelectorBlocked(opts *bind.WatchOpts, sink chan<- *RBACTimelockFunctionSelectorBlocked, selector [][4]byte) (event.Subscription, error) + + ParseFunctionSelectorBlocked(log types.Log) (*RBACTimelockFunctionSelectorBlocked, error) + + FilterFunctionSelectorUnblocked(opts *bind.FilterOpts, selector [][4]byte) (*RBACTimelockFunctionSelectorUnblockedIterator, error) + + WatchFunctionSelectorUnblocked(opts *bind.WatchOpts, sink chan<- *RBACTimelockFunctionSelectorUnblocked, selector [][4]byte) (event.Subscription, error) + + ParseFunctionSelectorUnblocked(log types.Log) (*RBACTimelockFunctionSelectorUnblocked, error) + + FilterMinDelayChange(opts *bind.FilterOpts) (*RBACTimelockMinDelayChangeIterator, error) + + WatchMinDelayChange(opts *bind.WatchOpts, sink chan<- *RBACTimelockMinDelayChange) (event.Subscription, error) + + ParseMinDelayChange(log types.Log) (*RBACTimelockMinDelayChange, error) + + FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*RBACTimelockRoleAdminChangedIterator, error) + + WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *RBACTimelockRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) + + ParseRoleAdminChanged(log types.Log) (*RBACTimelockRoleAdminChanged, error) + + FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*RBACTimelockRoleGrantedIterator, error) + + WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *RBACTimelockRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) + + ParseRoleGranted(log types.Log) (*RBACTimelockRoleGranted, error) + + FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*RBACTimelockRoleRevokedIterator, error) + + WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *RBACTimelockRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) + + ParseRoleRevoked(log types.Log) (*RBACTimelockRoleRevoked, error) + + ParseLog(log types.Log) (AbigenLog, error) + + Address() common.Address +} diff --git a/pkg/contracts/abigen_log.go b/pkg/contracts/abigen_log.go new file mode 100644 index 0000000..7917325 --- /dev/null +++ b/pkg/contracts/abigen_log.go @@ -0,0 +1,10 @@ +package contracts + +import ( + "github.com/ethereum/go-ethereum/common" +) + +// AbigenLog is an interface for abigen generated log topics +type AbigenLog interface { + Topic() common.Hash +} diff --git a/pkg/timelock/timelock.go b/pkg/timelock/timelock.go index d09d3ab..f5fda9f 100644 --- a/pkg/timelock/timelock.go +++ b/pkg/timelock/timelock.go @@ -137,8 +137,8 @@ func NewTimelockWorker( // Listen is the main function of a Timelock Worker. // It handles the retrieval of old and new events, contexts and cancellations. -func (tw *Worker) Listen() error { - ctxwc, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) +func (tw *Worker) Listen(ctx context.Context) error { + ctxwc, cancel := signal.NotifyContext(ctx, syscall.SIGINT, syscall.SIGTERM) // Log timelock-worker configuration. tw.startLog() @@ -181,7 +181,7 @@ func (tw *Worker) Listen() error { shutdownCtx, cancel := context.WithTimeout(context.Background(), time.Second*5) defer cancel() - <-isclosed.All(shutdownCtx, schedulingDone, historyDone, newDone, processingDone) + <-isclosed.All(shutdownCtx, schedulingDone, historyDone, newDone, processingDone) //nolint:contextcheck return nil } @@ -348,10 +348,10 @@ func (tw *Worker) fetchAndDispatchLogs(ctx context.Context, logCh chan types.Log SetReadyStatus(HealthStatusOK) for _, log := range logs { - lastBlock = new(big.Int).SetUint64(max(lastBlock.Uint64(), log.BlockNumber + 1)) + lastBlock = new(big.Int).SetUint64(max(lastBlock.Uint64(), log.BlockNumber+1)) select { case logCh <- log: - tw.logger.Debug().Msgf("dispatching log: %+v", log) + tw.logger.Debug().Interface("log", log).Msg("dispatching log") case <-ctx.Done(): tw.logger.Debug().Msg("stopped while dispatching logs: incomplete retrieval.") break @@ -470,6 +470,8 @@ func (tw *Worker) handleLog(ctx context.Context, log types.Log) error { tw.logger.Info().Hex(fieldTXHash, cs.Raw.TxHash[:]).Uint64(fieldBlockNumber, cs.Raw.BlockNumber).Msgf("%s received, cancelling operation", eventCancelled) tw.delFromScheduler(cs.Id) } + default: + tw.logger.Info().Str("event", event.Name).Msgf("discarding event") } return nil diff --git a/scripts/golangci.yml b/scripts/golangci.yml index 9edbce9..88096f8 100644 --- a/scripts/golangci.yml +++ b/scripts/golangci.yml @@ -50,3 +50,6 @@ linters: max-same-issues: 0 severity: default-severity: error +issues: + exclude-dirs: + - pkg/contracts diff --git a/tests/containers/common.go b/tests/containers/common.go new file mode 100644 index 0000000..29036ad --- /dev/null +++ b/tests/containers/common.go @@ -0,0 +1,60 @@ +package containers + +import ( + "context" + "fmt" + "io" + "strings" + "time" + + "github.com/testcontainers/testcontainers-go" + tcexec "github.com/testcontainers/testcontainers-go/exec" +) + +// StdoutLogConsumer is a LogConsumer that prints the log to stdout. +type StdoutLogConsumer struct{ Prefix string } + +// Accept prints the log to stdout. +func (lc *StdoutLogConsumer) Accept(l testcontainers.Log) { + fmt.Printf("%s%v", lc.Prefix, string(l.Content)) //nolint:forbidigo +} + +// exec is a convenience function to execute a command in a container and +// return the output as a string. +func exec(container testcontainers.Container, ctx context.Context, command []string) (int, string, error) { + statusCode, outputReader, err := container.Exec(ctx, command, tcexec.Multiplexed()) + if err != nil { + return 0, "", fmt.Errorf("error executing command: %w", err) + } + + buf := new(strings.Builder) + _, err = io.Copy(buf, outputReader) + if err != nil { + return 0, "", fmt.Errorf("error reading balance from io.Reader: %w", err) + } + + return statusCode, buf.String(), nil +} + +// execUntil executes the given command in the container until the `until` +// function returns `true`. +func execUntil( + container testcontainers.Container, ctx context.Context, command []string, until func(int, string) error, + interval time.Duration, maxElapsedTime time.Duration, +) (statusCode int, output string, err error) { //nolint:unparam + maxTimestamp := time.Now().Add(maxElapsedTime) + for { + statusCode, output, err = exec(container, ctx, command) + if err == nil { + err = until(statusCode, output) + if err == nil { + return statusCode, output, nil + } + } + time.Sleep(interval) + if time.Now().After(maxTimestamp) { + break + } + } + return 0, "", err +} diff --git a/tests/containers/geth.go b/tests/containers/geth.go new file mode 100644 index 0000000..9e43869 --- /dev/null +++ b/tests/containers/geth.go @@ -0,0 +1,156 @@ +package containers + +import ( + "context" + "fmt" + "math/big" + "strings" + "testing" + "time" + + "github.com/docker/go-connections/nat" + "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" +) + +// GethContainer represents a go-ethereum container. +type GethContainer struct { + Container testcontainers.Container + HttpURL string + WsURL string + ChainID uint64 +} + +const ( + dataDir = "/tmp" + keystoreDir = dataDir + "/keystore" + timestampFormat = "2006-01-02T15-04-05.000000000Z" + chainID = 1337 + httpPort = "8545" + wsPort = "8546" +) + +// NewGethContainer creates a new geth container. +func NewGethContainer(ctx context.Context) (*GethContainer, error) { + request := testcontainers.ContainerRequest{ + Name: "geth", + Hostname: "geth", + Image: "ethereum/client-go:stable", + WaitingFor: wait.ForLog("Starting work on payload").WithStartupTimeout(15 * time.Second), + ExposedPorts: []string{httpPort, wsPort}, + Cmd: []string{ + "--dev", "--dev.period", "1", + "--http", "--http.addr", "0.0.0.0", "--http.vhosts", "*", + "--ws", "--ws.addr", "0.0.0.0", "--ws.origins", "*", + "--cache.blocklogs", "1024", + "--networkid", fmt.Sprintf("%d", chainID), + "--datadir", dataDir, + }, + // uncomment to print container logs to stdout + // LogConsumerCfg: &testcontainers.LogConsumerConfig{ + // Opts: []testcontainers.LogProductionOption{ + // testcontainers.WithLogProductionTimeout(10 * time.Second), + // }, + // Consumers: []testcontainers.LogConsumer{&StdoutLogConsumer{Prefix: "|| "}}, + // }, + } + gethContainer, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ + ContainerRequest: request, + Started: true, + }) + if err != nil { + return nil, fmt.Errorf("could not start geth container: %w", err) + } + + return &GethContainer{ + Container: gethContainer, + HttpURL: "http://geth:8545", + WsURL: "ws://geth:8546", + ChainID: chainID, + }, nil +} + +// HTTPConnStr returns the http connection string for the geth container (from the container host). +func (g *GethContainer) HTTPConnStr(t *testing.T, ctx context.Context) string { + t.Helper() + connStr, err := g.Container.PortEndpoint(ctx, nat.Port(httpPort), "http") + require.NoError(t, err) + return connStr +} + +// WSConnStr returns the websocket connection string for the geth container (from the container host). +func (g *GethContainer) WSConnStr(t *testing.T, ctx context.Context) string { + t.Helper() + connStr, err := g.Container.PortEndpoint(ctx, nat.Port(wsPort), "ws") + require.NoError(t, err) + return connStr +} + +func (g *GethContainer) Teardown(ctx context.Context) error { + return g.Container.Terminate(ctx) +} + +// CreateAccount creates and funds a new account in the geth container. +func (g *GethContainer) CreateAccount( + ctx context.Context, address, privateKey string, initialBalance uint64, +) (big.Int, error) { + keystorePath := fmt.Sprintf("%s/UTC--%s--%s", + keystoreDir, time.Now().UTC().Format(timestampFormat), strings.TrimLeft(address, "0x")) + + err := g.Container.CopyToContainer(ctx, []byte(privateKey), keystorePath, 0o600) + if err != nil { + return big.Int{}, fmt.Errorf("error copying private key to container: %w", err) + } + + // get list of accounts and ensure the given address was added + listAccountsCommand := []string{"geth", "attach", "--datadir", dataDir, "--exec", "eth.accounts"} + checkAccountsOutput := func(statusCode int, output string) error { + if strings.Contains(strings.ToLower(output), strings.ToLower(address)) { + return nil + } + return fmt.Errorf("new account (%s) is not found in geth instance: (%s)", address, output) + } + _, _, err = execUntil(g.Container, ctx, listAccountsCommand, checkAccountsOutput, + 200*time.Millisecond, 5000*time.Millisecond) + if err != nil { + return big.Int{}, err + } + + // send `initialBalance` eth from the genesis account to the new account + sendTransactionCommand := []string{ + "geth", "attach", "--datadir", dataDir, "--exec", + fmt.Sprintf(`eth.sendTransaction({ + from: eth.accounts[0], + to: %q, + value: web3.toWei(%d, "ether") + })`, address, initialBalance), + } + statusCode, _, err := exec(g.Container, ctx, sendTransactionCommand) + if err != nil || statusCode != 0 { + return big.Int{}, fmt.Errorf("failed to send funds to new account (code: %d): %w", statusCode, err) + } + + // get the balance of the new account and ensure it matches what we expect + expectedBalance := fmt.Sprintf("%d000000000000000000", initialBalance) + getBalanceCommand := []string{ + "geth", "attach", "--datadir", dataDir, "--exec", fmt.Sprintf(`eth.getBalance("%s")`, strings.ToLower(address)), + } + checkBalanceOutput := func(statusCode int, output string) error { + if strings.HasSuffix(output, expectedBalance+"\n") { + return nil + } + return fmt.Errorf("command output does not contain expected balance: %v", output) + } + _, _, err = execUntil(g.Container, ctx, getBalanceCommand, checkBalanceOutput, + 200*time.Millisecond, 5000*time.Millisecond) + if err != nil { + return big.Int{}, err + } + + expectedBalanceBigInt, ok := new(big.Int).SetString(expectedBalance, 10) + if !ok { + return big.Int{}, fmt.Errorf("unable to convert balance to a number: %v", expectedBalance) + } + return *expectedBalanceBigInt, nil +} diff --git a/tests/integration/account.go b/tests/integration/account.go new file mode 100644 index 0000000..ab60bb3 --- /dev/null +++ b/tests/integration/account.go @@ -0,0 +1,39 @@ +package integration + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +// Account #1. +var ( + account1 = common.HexToAddress("0x8aAfF1544c195Aa8719Fabd67253Fc366d38A563") + privateKey1 = "1921763610b80b2b147ca676c775c172ba6c037f6ba135792bed6bc458c660f0" + ecdsaPrivateKey1 = Must(crypto.HexToECDSA(privateKey1)) + keyFileJson1 = `{ + "version": 3, + "id": "a3ece80c-e259-4d3b-9125-b3fd9d7f0f57", + "address": "8aaff1544c195aa8719fabd67253fc366d38a563", + "crypto": { + "cipher": "aes-128-ctr", + "ciphertext": "6b3d12ab4e6b9e9c2df69d358d1e30d1dc51268fc8e72d20b866073e6d945e38", + "cipherparams": { "iv": "662529e8442f0c2ca108341b76e2e879" }, + "mac": "565585b4870acd67b6bb8a52db30a47316bc7f216fb98eb40e630f9801e878a8", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 262144, + "p": 1, + "r": 8, + "salt": "248621f31c264689c45956840ea18c8b9f109088dafbf99dfaaa491bbd4f1e8b" + } + } + }` +) + +func Must[T any](value T, err error) T { + if err != nil { + panic(err) + } + return value +} diff --git a/tests/integration/suite.go b/tests/integration/suite.go new file mode 100644 index 0000000..db9cda4 --- /dev/null +++ b/tests/integration/suite.go @@ -0,0 +1,121 @@ +package integration + +import ( + "context" + "crypto/ecdsa" + "math/big" + "testing" + + "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/ethclient" + "github.com/stretchr/testify/suite" + + "github.com/smartcontractkit/timelock-worker/pkg/contracts" + "github.com/smartcontractkit/timelock-worker/tests/containers" +) + +type integrationTestSuite struct { + suite.Suite + GethContainer *containers.GethContainer + Ctx context.Context //nolint:containedctx +} + +func (s *integrationTestSuite) SetupSuite() { + var err error + s.Ctx = context.Background() + s.GethContainer, err = containers.NewGethContainer(s.Ctx) + s.Require().NoError(err) +} + +func (s *integrationTestSuite) TearDownSuite() { + err := s.GethContainer.Teardown(context.Background()) + s.Require().NoError(err) +} + +func (s *integrationTestSuite) Log(format string) { + s.T().Log(format) +} + +func (s *integrationTestSuite) Logf(format string, args ...any) { + s.T().Logf(format, args...) +} + +func (s *integrationTestSuite) Run(name string, subtestFunc func(t *testing.T)) bool { + return s.T().Run(name, subtestFunc) +} + +func (s *integrationTestSuite) KeyedTransactor(privateKey *ecdsa.PrivateKey, chainID *big.Int) *bind.TransactOpts { + if chainID == nil { + chainID = big.NewInt(int64(s.GethContainer.ChainID)) + } + + transactor, err := bind.NewKeyedTransactorWithChainID(privateKey, chainID) + s.Require().NoError(err) + + // reset gas parameters and let go-ethereum estimate and set them automatically + transactor.Value = nil + transactor.GasPrice = nil + transactor.GasFeeCap = nil + transactor.GasTipCap = nil + transactor.GasLimit = 0 + + return transactor +} + +func (s *integrationTestSuite) DeployTimelock( + ctx context.Context, transactor *bind.TransactOpts, client *ethclient.Client, adminAccount common.Address, +) ( + common.Address, *types.Transaction, *types.Receipt, *contracts.RBACTimelock, +) { + proposers := []common.Address{adminAccount} + executors := []common.Address{adminAccount} + cancellers := []common.Address{adminAccount} + bypassers := []common.Address{} + + address, transaction, contract, err := contracts.DeployRBACTimelock( + transactor, client, big.NewInt(10800), adminAccount, proposers, executors, cancellers, bypassers) + s.Require().NoError(err) + + receipt, err := bind.WaitMined(ctx, client, transaction) + s.Require().NoError(err) + s.Require().Equal(receipt.Status, types.ReceiptStatusSuccessful) + + s.Logf("timelock address: %v; deploy transaction: %v", address, transaction.Hash()) + return address, transaction, receipt, contract +} + +func (s *integrationTestSuite) DeployCallProxy( + ctx context.Context, transactor *bind.TransactOpts, client *ethclient.Client, timelockAddress common.Address, +) ( + common.Address, *types.Transaction, *types.Receipt, *contracts.CallProxy, +) { + address, transaction, contract, err := contracts.DeployCallProxy( + transactor, client, timelockAddress) + s.Require().NoError(err) + + receipt, err := bind.WaitMined(ctx, client, transaction) + s.Require().NoError(err) + s.Require().Equal(receipt.Status, types.ReceiptStatusSuccessful) + + s.Logf("call proxy address: %v; deploy transaction: %v", address, transaction.Hash()) + return address, transaction, receipt, contract +} + +func (s *integrationTestSuite) UpdateDelay( + ctx context.Context, transactor *bind.TransactOpts, client *ethclient.Client, + timelockContract *contracts.RBACTimelock, delay *big.Int, +) ( + *types.Transaction, *types.Receipt, +) { + transaction, err := timelockContract.UpdateDelay(transactor, delay) + s.Require().NoError(err) + + receipt, err := bind.WaitMined(ctx, client, transaction) + s.Require().NoError(err) + s.Require().Equal(receipt.Status, types.ReceiptStatusSuccessful) + + s.Logf("update delay transaction: %v", transaction.Hash()) + return transaction, receipt +} diff --git a/tests/integration/suite_test.go b/tests/integration/suite_test.go new file mode 100644 index 0000000..cc01a7f --- /dev/null +++ b/tests/integration/suite_test.go @@ -0,0 +1,11 @@ +package integration + +import ( + "testing" + + "github.com/stretchr/testify/suite" +) + +func TestIntegrationTestSuite(t *testing.T) { + suite.Run(t, new(integrationTestSuite)) +} diff --git a/tests/integration/timelock_test.go b/tests/integration/timelock_test.go new file mode 100644 index 0000000..b1fae0f --- /dev/null +++ b/tests/integration/timelock_test.go @@ -0,0 +1,116 @@ +package integration + +import ( + "context" + "encoding/json" + "math/big" + "testing" + "time" + + "github.com/ethereum/go-ethereum/ethclient" + "github.com/rs/zerolog" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/timelock-worker/pkg/timelock" + timelockTests "github.com/smartcontractkit/timelock-worker/tests" +) + +func (s *integrationTestSuite) TestTimelockWorkerListen() { + ctx, cancel := context.WithCancel(s.Ctx) + defer cancel() + + _, err := s.GethContainer.CreateAccount(ctx, account1.String(), keyFileJson1, 1) + s.Require().NoError(err) + + // create geth rpc client + gethURL := s.GethContainer.HTTPConnStr(s.T(), ctx) + client, err := ethclient.DialContext(ctx, gethURL) + s.Require().NoError(err) + + transactor := s.KeyedTransactor(ecdsaPrivateKey1, nil) + + tests := []struct { + name string + url string + }{ + {name: "http connection", url: gethURL}, + {name: "websocket connection", url: s.GethContainer.WSConnStr(s.T(), ctx)}, + } + for _, tt := range tests { + s.Run(tt.name, func(t *testing.T) { + sctx, cancel := context.WithCancel(ctx) + defer cancel() + + logger := timelockTests.NewTestLogger(zerolog.Nop()) // "zerolog.TestWriter{T: t, Frame: 6}" when debugging + + timelockAddress, _, _, timelockContract := s.DeployTimelock(ctx, transactor, client, account1) + callProxyAddress, _, _, _ := s.DeployCallProxy(ctx, transactor, client, timelockAddress) + + go runTimelockWorker(s.T(), sctx, tt.url, timelockAddress.String(), callProxyAddress.String(), + privateKey1, big.NewInt(0), int64(60), int64(1), &logger.Logger) + + s.UpdateDelay(ctx, transactor, client, timelockContract, big.NewInt(10)) + + assertCapturedLogMessages(s.T(), logger) + }) + } +} + +// ----- helpers ----- + +func runTimelockWorker( + t *testing.T, ctx context.Context, nodeURL, timelockAddress, callProxyAddress, privateKey string, + fromBlock *big.Int, pollPeriod int64, listenerPollPeriod int64, logger *zerolog.Logger, +) { + t.Logf("TimelockWorker.Listen(%v, %v, %v, %v, %v, %v, %v)", nodeURL, timelockAddress, + callProxyAddress, privateKey, fromBlock, pollPeriod, listenerPollPeriod) + timelockWorker, err := timelock.NewTimelockWorker(nodeURL, timelockAddress, + callProxyAddress, privateKey, fromBlock, pollPeriod, listenerPollPeriod, logger) + require.NoError(t, err) + require.NotNil(t, timelockWorker) + + err = timelockWorker.Listen(ctx) + require.NoError(t, err) +} + +func assertCapturedLogMessages(t *testing.T, logger *timelockTests.TestLogger) { + t.Helper() + require.EventuallyWithT(t, func(collect *assert.CollectT) { + messages := selectDiscardingEventMessages(t, logger) + assert.ElementsMatch(collect, messages, []string{ + "RoleAdminChanged", // <--+ + "RoleAdminChanged", // | + "RoleAdminChanged", // | + "RoleAdminChanged", // | + "RoleAdminChanged", // | + "RoleGranted", // |-- contract deployment + "RoleGranted", // | + "RoleGranted", // | + "RoleGranted", // | + "MinDelayChange", // <--+ + "MinDelayChange", // <----- updateDelay call + }) + }, 5*time.Second, 200*time.Millisecond) +} + +func selectDiscardingEventMessages(t *testing.T, logger *timelockTests.TestLogger) []string { + t.Helper() + + selectedEvents := []string{} + + for _, entry := range logger.Messages() { + parsedEntry := struct { + Message string + Event string + }{} + err := json.Unmarshal([]byte(entry), &parsedEntry) + require.NoError(t, err) + + if parsedEntry.Message == "discarding event" { + selectedEvents = append(selectedEvents, parsedEntry.Event) + } + } + + return selectedEvents +} diff --git a/tests/logger.go b/tests/logger.go new file mode 100644 index 0000000..1af0dd7 --- /dev/null +++ b/tests/logger.go @@ -0,0 +1,54 @@ +package tests + +import ( + "io" + "sync" + + "github.com/rs/zerolog" +) + +type TestLogger struct { + zerolog.Logger + writer io.Writer + messages *[]string + mutex *sync.Mutex +} + +func NewTestLogger(writer io.Writer) *TestLogger { + logger := &TestLogger{ + writer: writer, + messages: &[]string{}, + mutex: new(sync.Mutex), + } + logger.Logger = zerolog.New(logger) + return logger +} + +func (tl TestLogger) Write(p []byte) (n int, err error) { + tl.mutex.Lock() + defer tl.mutex.Unlock() + + *tl.messages = append(*tl.messages, string(p)) + return tl.writer.Write(p) +} + +func (tl TestLogger) NumMessages() int { + tl.mutex.Lock() + defer tl.mutex.Unlock() + + return len(*tl.messages) +} + +func (tl TestLogger) LastMessage() string { + tl.mutex.Lock() + defer tl.mutex.Unlock() + + return (*tl.messages)[tl.NumMessages()-1] +} + +func (tl TestLogger) Messages() []string { + tl.mutex.Lock() + defer tl.mutex.Unlock() + + return append([]string{}, *tl.messages...) +}