From ae8bda194f5c09f2e9226b0af93f69e47f5e2f8a Mon Sep 17 00:00:00 2001 From: Prashant Yadav <34992934+prashantkumar1982@users.noreply.github.com> Date: Fri, 17 Mar 2023 06:29:18 -0700 Subject: [PATCH 01/25] Remove alexroan from CODEOWNERS (#8735) --- CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 081cb903c5a..da4da306ee7 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -51,7 +51,7 @@ /operator-ui/ @DeividasK @jkongie # Contracts -/contracts/ @alexroan @se3000 @connorwstein +/contracts/ @se3000 @connorwstein /contracts/**/*Keeper* @smartcontractkit/keepers /contracts/**/*Upkeep* @smartcontractkit/keepers @@ -61,7 +61,7 @@ /integration-tests/**/*automation* @smartcontractkit/keepers # CI/CD -/.github/** @alexroan @chainchad @javuto @jkongie @jmank88 @samsondav +/.github/** @chainchad @javuto @jkongie @jmank88 @samsondav /.github/workflows/integration-tests.yml @smartcontractkit/test-tooling-team /.github/workflows/integration-chaos-tests.yml @smartcontractkit/test-tooling-team /.github/workflows/integration-tests-publish.yml @smartcontractkit/test-tooling-team From 2c3e993e0e672633f4622525d3ba3e58d9a5bb23 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Fri, 17 Mar 2023 11:43:57 -0500 Subject: [PATCH 02/25] legacy config cleanup (#8738) --- core/chains/chain_set.go | 20 ++++----- core/chains/evm/chain_set.go | 8 ++-- core/chains/evm/config/v2/config.go | 6 +-- core/chains/evm/mocks/chain_set.go | 20 ++++----- core/chains/evm/types/types.go | 8 +--- core/chains/orm.go | 29 ++++++------- core/chains/orm_immutable.go | 16 ++++---- core/chains/solana/chain_set.go | 4 +- core/chains/solana/chain_test.go | 6 +-- core/chains/solana/config.go | 9 ++-- core/chains/solana/orm.go | 6 +-- core/chains/starknet/chain_set.go | 14 +++---- core/chains/starknet/config.go | 8 ++-- core/chains/starknet/orm.go | 2 +- core/chains/starknet/types/types.go | 4 +- core/cmd/chains_commands.go | 2 +- core/cmd/evm_node_commands.go | 4 +- core/cmd/solana_node_commands.go | 4 +- core/cmd/starknet_node_commands.go | 4 +- core/internal/cltest/cltest.go | 2 +- core/internal/testutils/evmtest/evmtest.go | 16 ++++---- core/web/chains_controller.go | 8 ++-- core/web/loader/getters.go | 4 +- core/web/loader/loader_test.go | 10 ++--- core/web/nodes_controller.go | 4 +- core/web/presenters/evm_chain.go | 16 ++------ core/web/presenters/solana_chain.go | 22 ++++------ core/web/presenters/starknet_chain.go | 30 +++++--------- core/web/resolver/eth_key_test.go | 8 ++-- core/web/resolver/eth_transaction_test.go | 4 +- core/web/resolver/evm_chain.go | 48 +++++++++------------- core/web/resolver/evm_chain_test.go | 18 +++----- core/web/resolver/node.go | 10 ----- core/web/resolver/node_test.go | 5 +-- core/web/schema/type/chain.graphql | 2 - core/web/schema/type/node.graphql | 2 - 36 files changed, 157 insertions(+), 226 deletions(-) diff --git a/core/chains/chain_set.go b/core/chains/chain_set.go index 7ada0450bc8..fa593e8ccd0 100644 --- a/core/chains/chain_set.go +++ b/core/chains/chain_set.go @@ -22,14 +22,14 @@ var ( ErrChainIDInvalid = errors.New("chain id does not match any local chains") ) -// DBChainSet is a generic interface for DBChain[I, C] configuration. -type DBChainSet[I ID, C Config] interface { - Show(id I) (DBChain[I, C], error) - Index(offset, limit int) ([]DBChain[I, C], int, error) +// ChainsConfig is a generic interface for ChainConfig[I, C] configuration. +type ChainsConfig[I ID, C Config] interface { + Show(id I) (ChainConfig[I, C], error) + Index(offset, limit int) ([]ChainConfig[I, C], int, error) } -// DBNodeSet is a generic interface for Node configuration. -type DBNodeSet[I ID, N Node] interface { +// NodesConfig is a generic interface for Node configuration. +type NodesConfig[I ID, N Node] interface { GetNodes(ctx context.Context, offset, limit int) (nodes []N, count int, err error) GetNodesForChain(ctx context.Context, chainID I, offset, limit int) (nodes []N, count int, err error) } @@ -45,9 +45,9 @@ type ChainSet[I ID, C Config, N Node, S ChainService[C]] interface { // https://smartcontract-it.atlassian.net/browse/BCF-2140 Healthy() error - DBChainSet[I, C] + ChainsConfig[I, C] - DBNodeSet[I, N] + NodesConfig[I, N] // Chain returns the ChainService for this ID (if a configuration is available), creating one if necessary. Chain(context.Context, I) (S, error) @@ -113,11 +113,11 @@ func (c *chainSet[I, C, N, S]) Chain(ctx context.Context, id I) (s S, err error) return ch, nil } -func (c *chainSet[I, C, N, S]) Show(id I) (DBChain[I, C], error) { +func (c *chainSet[I, C, N, S]) Show(id I) (ChainConfig[I, C], error) { return c.orm.Chain(id) } -func (c *chainSet[I, C, N, S]) Index(offset, limit int) ([]DBChain[I, C], int, error) { +func (c *chainSet[I, C, N, S]) Index(offset, limit int) ([]ChainConfig[I, C], int, error) { return c.orm.Chains(offset, limit) } diff --git a/core/chains/evm/chain_set.go b/core/chains/evm/chain_set.go index c66b6fe1a28..7f88b9becc0 100644 --- a/core/chains/evm/chain_set.go +++ b/core/chains/evm/chain_set.go @@ -37,8 +37,8 @@ type ChainConfigUpdater func(*types.ChainCfg) error //go:generate mockery --quiet --name ChainSet --output ./mocks/ --case=underscore type ChainSet interface { services.ServiceCtx - chains.DBChainSet[utils.Big, *types.ChainCfg] - chains.DBNodeSet[utils.Big, types.Node] + chains.ChainsConfig[utils.Big, *types.ChainCfg] + chains.NodesConfig[utils.Big, types.Node] Get(id *big.Int) (Chain, error) @@ -131,11 +131,11 @@ func (cll *chainSet) Get(id *big.Int) (Chain, error) { return nil, errors.Errorf("chain not found with id %v", id.String()) } -func (cll *chainSet) Show(id utils.Big) (types.DBChain, error) { +func (cll *chainSet) Show(id utils.Big) (types.ChainConfig, error) { return cll.opts.ORM.Chain(id) } -func (cll *chainSet) Index(offset, limit int) ([]types.DBChain, int, error) { +func (cll *chainSet) Index(offset, limit int) ([]types.ChainConfig, int, error) { return cll.opts.ORM.Chains(offset, limit) } diff --git a/core/chains/evm/config/v2/config.go b/core/chains/evm/config/v2/config.go index 930a790d38c..7e6963b729f 100644 --- a/core/chains/evm/config/v2/config.go +++ b/core/chains/evm/config/v2/config.go @@ -86,7 +86,7 @@ func (cs *EVMConfigs) SetFrom(fs *EVMConfigs) { } } -func (cs EVMConfigs) Chains(ids ...utils.Big) (chains []types.DBChain) { +func (cs EVMConfigs) Chains(ids ...utils.Big) (chains []types.ChainConfig) { for _, ch := range cs { if ch == nil { continue @@ -103,7 +103,7 @@ func (cs EVMConfigs) Chains(ids ...utils.Big) (chains []types.DBChain) { continue } } - dbc := types.DBChain{ + dbc := types.ChainConfig{ ID: *ch.ChainID, Cfg: ch.asV1(), } @@ -213,7 +213,7 @@ func (c *EVMConfig) SetFrom(f *EVMConfig) { c.Nodes.SetFrom(&f.Nodes) } -func (c *EVMConfig) SetFromDB(ch types.DBChain, nodes []types.Node) error { +func (c *EVMConfig) SetFromDB(ch types.ChainConfig, nodes []types.Node) error { c.ChainID = &ch.ID c.Enabled = &ch.Enabled diff --git a/core/chains/evm/mocks/chain_set.go b/core/chains/evm/mocks/chain_set.go index 2233e311ebe..dd645d1602d 100644 --- a/core/chains/evm/mocks/chain_set.go +++ b/core/chains/evm/mocks/chain_set.go @@ -227,20 +227,20 @@ func (_m *ChainSet) HealthReport() map[string]error { } // Index provides a mock function with given fields: offset, limit -func (_m *ChainSet) Index(offset int, limit int) ([]chains.DBChain[utils.Big, *types.ChainCfg], int, error) { +func (_m *ChainSet) Index(offset int, limit int) ([]chains.ChainConfig[utils.Big, *types.ChainCfg], int, error) { ret := _m.Called(offset, limit) - var r0 []chains.DBChain[utils.Big, *types.ChainCfg] + var r0 []chains.ChainConfig[utils.Big, *types.ChainCfg] var r1 int var r2 error - if rf, ok := ret.Get(0).(func(int, int) ([]chains.DBChain[utils.Big, *types.ChainCfg], int, error)); ok { + if rf, ok := ret.Get(0).(func(int, int) ([]chains.ChainConfig[utils.Big, *types.ChainCfg], int, error)); ok { return rf(offset, limit) } - if rf, ok := ret.Get(0).(func(int, int) []chains.DBChain[utils.Big, *types.ChainCfg]); ok { + if rf, ok := ret.Get(0).(func(int, int) []chains.ChainConfig[utils.Big, *types.ChainCfg]); ok { r0 = rf(offset, limit) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]chains.DBChain[utils.Big, *types.ChainCfg]) + r0 = ret.Get(0).([]chains.ChainConfig[utils.Big, *types.ChainCfg]) } } @@ -304,18 +304,18 @@ func (_m *ChainSet) Ready() error { } // Show provides a mock function with given fields: id -func (_m *ChainSet) Show(id utils.Big) (chains.DBChain[utils.Big, *types.ChainCfg], error) { +func (_m *ChainSet) Show(id utils.Big) (chains.ChainConfig[utils.Big, *types.ChainCfg], error) { ret := _m.Called(id) - var r0 chains.DBChain[utils.Big, *types.ChainCfg] + var r0 chains.ChainConfig[utils.Big, *types.ChainCfg] var r1 error - if rf, ok := ret.Get(0).(func(utils.Big) (chains.DBChain[utils.Big, *types.ChainCfg], error)); ok { + if rf, ok := ret.Get(0).(func(utils.Big) (chains.ChainConfig[utils.Big, *types.ChainCfg], error)); ok { return rf(id) } - if rf, ok := ret.Get(0).(func(utils.Big) chains.DBChain[utils.Big, *types.ChainCfg]); ok { + if rf, ok := ret.Get(0).(func(utils.Big) chains.ChainConfig[utils.Big, *types.ChainCfg]); ok { r0 = rf(id) } else { - r0 = ret.Get(0).(chains.DBChain[utils.Big, *types.ChainCfg]) + r0 = ret.Get(0).(chains.ChainConfig[utils.Big, *types.ChainCfg]) } if rf, ok := ret.Get(1).(func(utils.Big) error); ok { diff --git a/core/chains/evm/types/types.go b/core/chains/evm/types/types.go index 2476f87064b..6a323f123da 100644 --- a/core/chains/evm/types/types.go +++ b/core/chains/evm/types/types.go @@ -4,7 +4,6 @@ import ( "database/sql/driver" "encoding/json" "math/big" - "time" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -21,7 +20,7 @@ import ( ) type ORM interface { - chains.ChainsORM[utils.Big, *ChainCfg, DBChain] + chains.ChainsORM[utils.Big, *ChainCfg, ChainConfig] chains.NodesORM[utils.Big, Node] EnsureChains([]utils.Big, ...pg.QOpt) error @@ -86,9 +85,8 @@ func (c *ChainCfg) Value() (driver.Value, error) { return json.Marshal(c) } -type DBChain = chains.DBChain[utils.Big, *ChainCfg] +type ChainConfig = chains.ChainConfig[utils.Big, *ChainCfg] -// TODO: https://app.shortcut.com/chainlinklabs/story/33622/remove-legacy-config type Node struct { ID int32 Name string @@ -96,8 +94,6 @@ type Node struct { WSURL null.String `db:"ws_url"` HTTPURL null.String `db:"http_url"` SendOnly bool - CreatedAt time.Time - UpdatedAt time.Time // State doesn't exist in the DB, it's used to hold an in-memory state for // rendering State string `db:"-"` diff --git a/core/chains/orm.go b/core/chains/orm.go index af5800a0b47..54235e25df3 100644 --- a/core/chains/orm.go +++ b/core/chains/orm.go @@ -3,7 +3,6 @@ package chains import ( "fmt" "strings" - "time" "github.com/lib/pq" "github.com/pkg/errors" @@ -11,7 +10,7 @@ import ( "github.com/smartcontractkit/chainlink/core/services/pg" ) -type ChainsORM[I ID, CFG Config, C DBChain[I, CFG]] interface { +type ChainsORM[I ID, CFG Config, C ChainConfig[I, CFG]] interface { Chain(I, ...pg.QOpt) (C, error) Chains(offset, limit int, qopts ...pg.QOpt) ([]C, int, error) GetChainsByIDs(ids []I) (chains []C, err error) @@ -26,7 +25,7 @@ type NodesORM[I ID, N Node] interface { // ORM manages chains and nodes. type ORM[I ID, C Config, N Node] interface { - ChainsORM[I, C, DBChain[I, C]] + ChainsORM[I, C, ChainConfig[I, C]] NodesORM[I, N] @@ -48,17 +47,15 @@ func NewORM[I ID, C Config, N Node](q pg.Q, prefix string, nodeCols ...string) O } } -// DBChain is a generic DB chain for an ID and Config. +// ChainConfig is a generic DB chain for an ID and Config. // -// A DBChain type alias can be used for convenience: +// A ChainConfig type alias can be used for convenience: // -// type DBChain = chains.DBChain[string, pkg.ChainCfg] -type DBChain[I ID, C Config] struct { - ID I - Cfg C - CreatedAt time.Time - UpdatedAt time.Time - Enabled bool +// type ChainConfig = chains.ChainConfig[string, pkg.ChainCfg] +type ChainConfig[I ID, C Config] struct { + ID I + Cfg C + Enabled bool } // chainsORM is a generic ORM for chains. @@ -72,14 +69,14 @@ func newChainsORM[I ID, C Config](q pg.Q, prefix string) *chainsORM[I, C] { return &chainsORM[I, C]{q: q, prefix: prefix} } -func (o *chainsORM[I, C]) Chain(id I, qopts ...pg.QOpt) (dbchain DBChain[I, C], err error) { +func (o *chainsORM[I, C]) Chain(id I, qopts ...pg.QOpt) (cc ChainConfig[I, C], err error) { q := o.q.WithOpts(qopts...) chainSQL := fmt.Sprintf(`SELECT * FROM %s_chains WHERE id = $1;`, o.prefix) - err = q.Get(&dbchain, chainSQL, id) + err = q.Get(&cc, chainSQL, id) return } -func (o *chainsORM[I, C]) GetChainsByIDs(ids []I) (chains []DBChain[I, C], err error) { +func (o *chainsORM[I, C]) GetChainsByIDs(ids []I) (chains []ChainConfig[I, C], err error) { sql := fmt.Sprintf(`SELECT * FROM %s_chains WHERE id = ANY($1) ORDER BY created_at, id;`, o.prefix) chainIDs := pq.Array(ids) @@ -105,7 +102,7 @@ func (o *chainsORM[I, C]) EnsureChains(ids []I, qopts ...pg.QOpt) (err error) { return nil } -func (o *chainsORM[I, C]) Chains(offset, limit int, qopts ...pg.QOpt) (chains []DBChain[I, C], count int, err error) { +func (o *chainsORM[I, C]) Chains(offset, limit int, qopts ...pg.QOpt) (chains []ChainConfig[I, C], count int, err error) { err = o.q.WithOpts(qopts...).Transaction(func(q pg.Queryer) error { if err = q.Get(&count, fmt.Sprintf("SELECT COUNT(*) FROM %s_chains", o.prefix)); err != nil { return errors.Wrap(err, "failed to fetch chains count") diff --git a/core/chains/orm_immutable.go b/core/chains/orm_immutable.go index 0fdf1a3900e..820e474af13 100644 --- a/core/chains/orm_immutable.go +++ b/core/chains/orm_immutable.go @@ -12,14 +12,14 @@ type ormImmut[I ID, C Config, N Node] struct { *nodesORMImmut[I, N] } -type ChainConfig[I ID, C Config, N Node] interface { +type Configs[I ID, C Config, N Node] interface { chainData[I, C] nodeData[I, N] } // NewORMImmut returns an ORM backed by q, for the tables _chains and _nodes with column _chain_id. // Additional Node fields should be included in nodeCols. -func NewORMImmut[I ID, C Config, N Node](chainConfigs ChainConfig[I, C, N]) ORM[I, C, N] { +func NewORMImmut[I ID, C Config, N Node](chainConfigs Configs[I, C, N]) ORM[I, C, N] { return ormImmut[I, C, N]{ newChainsORMImmut[I, C](chainConfigs), newNodesORMImmut[I, N](chainConfigs), @@ -36,8 +36,8 @@ type chainsORMImmut[I ID, C Config] struct { } type chainData[I ID, C Config] interface { - // Chains returns a slice of DBChain for ids, or all if none are provided. - Chains(ids ...I) []DBChain[I, C] + // Chains returns a slice of ChainConfig for ids, or all if none are provided. + Chains(ids ...I) []ChainConfig[I, C] } // newChainsORMImmut returns an chainsORM backed by q, for the table _chains. @@ -45,7 +45,7 @@ func newChainsORMImmut[I ID, C Config](d chainData[I, C]) *chainsORMImmut[I, C] return &chainsORMImmut[I, C]{data: d} } -func (o *chainsORMImmut[I, C]) Chain(id I, _ ...pg.QOpt) (dbchain DBChain[I, C], err error) { +func (o *chainsORMImmut[I, C]) Chain(id I, _ ...pg.QOpt) (cc ChainConfig[I, C], err error) { chains := o.data.Chains(id) if len(chains) == 0 { err = errors.Errorf("chain not found: %v", id) @@ -54,15 +54,15 @@ func (o *chainsORMImmut[I, C]) Chain(id I, _ ...pg.QOpt) (dbchain DBChain[I, C], err = errors.Errorf("more than one chain found: %v", id) return } - dbchain = chains[0] + cc = chains[0] return } -func (o *chainsORMImmut[I, C]) GetChainsByIDs(ids []I) (chains []DBChain[I, C], err error) { +func (o *chainsORMImmut[I, C]) GetChainsByIDs(ids []I) (chains []ChainConfig[I, C], err error) { return o.data.Chains(ids...), nil } -func (o *chainsORMImmut[I, C]) Chains(offset, limit int, _ ...pg.QOpt) (chains []DBChain[I, C], count int, err error) { +func (o *chainsORMImmut[I, C]) Chains(offset, limit int, _ ...pg.QOpt) (chains []ChainConfig[I, C], count int, err error) { chains = o.data.Chains() count = len(chains) if offset < len(chains) { diff --git a/core/chains/solana/chain_set.go b/core/chains/solana/chain_set.go index 07a16f158d7..076ae2153e4 100644 --- a/core/chains/solana/chain_set.go +++ b/core/chains/solana/chain_set.go @@ -62,8 +62,8 @@ func (o *ChainSetOpts) NewTOMLChain(cfg *SolanaConfig) (solana.Chain, error) { // ChainSet extends solana.ChainSet with mutability. type ChainSet interface { solana.ChainSet - chains.DBChainSet[string, *db.ChainCfg] - chains.DBNodeSet[string, db.Node] + chains.ChainsConfig[string, *db.ChainCfg] + chains.NodesConfig[string, db.Node] } func NewChainSetImmut(opts ChainSetOpts, cfgs SolanaConfigs) (ChainSet, error) { diff --git a/core/chains/solana/chain_test.go b/core/chains/solana/chain_test.go index f456e6c7ca6..e96da598c8f 100644 --- a/core/chains/solana/chain_test.go +++ b/core/chains/solana/chain_test.go @@ -219,7 +219,7 @@ type mockORM struct { nodesForChain []db.Node } -func (m *mockORM) GetChainsByIDs(ids []string) (chains []DBChain, err error) { +func (m *mockORM) GetChainsByIDs(ids []string) (chains []ChainConfig, err error) { panic("implement me") } @@ -231,9 +231,9 @@ func (m *mockORM) NodesForChain(chainID string, offset, limit int, qopts ...pg.Q return m.nodesForChain, len(m.nodesForChain), nil } -func (m *mockORM) Chain(s string, opt ...pg.QOpt) (DBChain, error) { panic("unimplemented") } +func (m *mockORM) Chain(s string, opt ...pg.QOpt) (ChainConfig, error) { panic("unimplemented") } -func (m *mockORM) Chains(offset, limit int, qopts ...pg.QOpt) ([]DBChain, int, error) { +func (m *mockORM) Chains(offset, limit int, qopts ...pg.QOpt) ([]ChainConfig, int, error) { panic("unimplemented") } diff --git a/core/chains/solana/config.go b/core/chains/solana/config.go index 1f74fc51e0f..cc08d4aba91 100644 --- a/core/chains/solana/config.go +++ b/core/chains/solana/config.go @@ -12,6 +12,7 @@ import ( solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" soldb "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" + v2 "github.com/smartcontractkit/chainlink/core/config/v2" ) @@ -63,7 +64,7 @@ func (cs *SolanaConfigs) SetFrom(fs *SolanaConfigs) { } } -func (cs SolanaConfigs) Chains(ids ...string) (chains []DBChain) { +func (cs SolanaConfigs) Chains(ids ...string) (chains []ChainConfig) { for _, ch := range cs { if ch == nil { continue @@ -218,7 +219,7 @@ func setFromChain(c, f *solcfg.Chain) { } } -func (c *SolanaConfig) SetFromDB(ch DBChain, nodes []soldb.Node) error { +func (c *SolanaConfig) SetFromDB(ch ChainConfig, nodes []soldb.Node) error { c.ChainID = &ch.ID c.Enabled = &ch.Enabled @@ -248,8 +249,8 @@ func (c *SolanaConfig) ValidateConfig() (err error) { return } -func (c *SolanaConfig) AsV1() DBChain { - return DBChain{ +func (c *SolanaConfig) AsV1() ChainConfig { + return ChainConfig{ ID: *c.ChainID, Enabled: c.IsEnabled(), Cfg: &soldb.ChainCfg{ diff --git a/core/chains/solana/orm.go b/core/chains/solana/orm.go index b589dd9af87..e54ea82a99f 100644 --- a/core/chains/solana/orm.go +++ b/core/chains/solana/orm.go @@ -10,11 +10,11 @@ import ( "github.com/smartcontractkit/chainlink/core/services/pg" ) -type DBChain = chains.DBChain[string, *soldb.ChainCfg] +type ChainConfig = chains.ChainConfig[string, *soldb.ChainCfg] // ORM manages solana chains and nodes. type ORM interface { - chains.ChainsORM[string, *soldb.ChainCfg, DBChain] + chains.ChainsORM[string, *soldb.ChainCfg, ChainConfig] chains.NodesORM[string, soldb.Node] EnsureChains([]string, ...pg.QOpt) error @@ -29,6 +29,6 @@ func NewORM(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) ORM { return chains.NewORM[string, *soldb.ChainCfg, soldb.Node](q, "solana", "solana_url") } -func NewORMImmut(cfgs chains.ChainConfig[string, *soldb.ChainCfg, soldb.Node]) ORM { +func NewORMImmut(cfgs chains.Configs[string, *soldb.ChainCfg, soldb.Node]) ORM { return chains.NewORMImmut(cfgs) } diff --git a/core/chains/starknet/chain_set.go b/core/chains/starknet/chain_set.go index e7ae7cdad7f..726668dff56 100644 --- a/core/chains/starknet/chain_set.go +++ b/core/chains/starknet/chain_set.go @@ -49,12 +49,12 @@ func (o *ChainSetOpts) ORMAndLogger() (chains.ORM[string, *db.ChainCfg, db.Node] return o.ORM, o.Logger } -func (o *ChainSetOpts) NewChain(dbchain types.DBChain) (starkchain.Chain, error) { - if !dbchain.Enabled { - return nil, errors.Errorf("cannot create new chain with ID %s, the chain is disabled", dbchain.ID) +func (o *ChainSetOpts) NewChain(cc types.ChainConfig) (starkchain.Chain, error) { + if !cc.Enabled { + return nil, errors.Errorf("cannot create new chain with ID %s, the chain is disabled", cc.ID) } - cfg := config.NewConfig(*dbchain.Cfg, o.Logger) - return newChain(dbchain.ID, cfg, o.KeyStore, o.ORM, o.Logger) + cfg := config.NewConfig(*cc.Cfg, o.Logger) + return newChain(cc.ID, cfg, o.KeyStore, o.ORM, o.Logger) } func (o *ChainSetOpts) NewTOMLChain(cfg *StarknetConfig) (starkchain.Chain, error) { @@ -71,8 +71,8 @@ func (o *ChainSetOpts) NewTOMLChain(cfg *StarknetConfig) (starkchain.Chain, erro type ChainSet interface { starkchain.ChainSet - chains.DBChainSet[string, *db.ChainCfg] - chains.DBNodeSet[string, db.Node] + chains.ChainsConfig[string, *db.ChainCfg] + chains.NodesConfig[string, db.Node] } func NewChainSetImmut(opts ChainSetOpts, cfgs StarknetConfigs) (ChainSet, error) { diff --git a/core/chains/starknet/config.go b/core/chains/starknet/config.go index c35bafb8a4f..846f49071f4 100644 --- a/core/chains/starknet/config.go +++ b/core/chains/starknet/config.go @@ -65,7 +65,7 @@ func (cs *StarknetConfigs) SetFrom(fs *StarknetConfigs) { } } -func (cs StarknetConfigs) Chains(ids ...string) (chains []types.DBChain) { +func (cs StarknetConfigs) Chains(ids ...string) (chains []types.ChainConfig) { for _, ch := range cs { if ch == nil { continue @@ -175,7 +175,7 @@ func setFromChain(c, f *stkcfg.Chain) { } } -func (c *StarknetConfig) SetFromDB(ch types.DBChain, nodes []db.Node) error { +func (c *StarknetConfig) SetFromDB(ch types.ChainConfig, nodes []db.Node) error { c.ChainID = &ch.ID c.Enabled = &ch.Enabled @@ -207,8 +207,8 @@ func (c *StarknetConfig) ValidateConfig() (err error) { return } -func (c *StarknetConfig) AsV1() types.DBChain { - return types.DBChain{ +func (c *StarknetConfig) AsV1() types.ChainConfig { + return types.ChainConfig{ ID: *c.ChainID, Enabled: c.IsEnabled(), Cfg: &starknetdb.ChainCfg{ diff --git a/core/chains/starknet/orm.go b/core/chains/starknet/orm.go index 0dc53257823..9c1ac33e7a2 100644 --- a/core/chains/starknet/orm.go +++ b/core/chains/starknet/orm.go @@ -17,6 +17,6 @@ func NewORM(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) types.ORM { return chains.NewORM[string, *starknetdb.ChainCfg, starknetdb.Node](q, "starknet", "url") } -func NewORMImmut(cfgs chains.ChainConfig[string, *starknetdb.ChainCfg, starknetdb.Node]) types.ORM { +func NewORMImmut(cfgs chains.Configs[string, *starknetdb.ChainCfg, starknetdb.Node]) types.ORM { return chains.NewORMImmut(cfgs) } diff --git a/core/chains/starknet/types/types.go b/core/chains/starknet/types/types.go index 3dbd8e0d665..5794c49e1f2 100644 --- a/core/chains/starknet/types/types.go +++ b/core/chains/starknet/types/types.go @@ -8,10 +8,10 @@ import ( ) type ORM interface { - chains.ChainsORM[string, *db.ChainCfg, DBChain] + chains.ChainsORM[string, *db.ChainCfg, ChainConfig] chains.NodesORM[string, db.Node] EnsureChains([]string, ...pg.QOpt) error } -type DBChain = chains.DBChain[string, *db.ChainCfg] +type ChainConfig = chains.ChainConfig[string, *db.ChainCfg] diff --git a/core/cmd/chains_commands.go b/core/cmd/chains_commands.go index c2de3946ef5..551aaedb36c 100644 --- a/core/cmd/chains_commands.go +++ b/core/cmd/chains_commands.go @@ -10,7 +10,7 @@ import ( "github.com/smartcontractkit/chainlink/core/web/presenters" ) -var chainHeaders = []string{"ID", "Enabled", "Config", "Created", "Updated"} +var chainHeaders = []string{"ID", "Enabled", "Config"} // chainCommand returns a cli.Command with subcommands for the given ChainClient. // The chainId cli.Flag must be named "id", but may be String or Int. diff --git a/core/cmd/evm_node_commands.go b/core/cmd/evm_node_commands.go index aaadf08cd17..05b6798b069 100644 --- a/core/cmd/evm_node_commands.go +++ b/core/cmd/evm_node_commands.go @@ -24,14 +24,12 @@ func (p *EVMNodePresenter) ToRow() []string { p.EVMChainID.ToInt().String(), p.WSURL.ValueOrZero(), p.HTTPURL.ValueOrZero(), - p.CreatedAt.String(), - p.UpdatedAt.String(), p.State, } return row } -var evmNodeHeaders = []string{"ID", "Name", "Chain ID", "Websocket URL", "HTTP URL", "Created", "Updated", "State"} +var evmNodeHeaders = []string{"ID", "Name", "Chain ID", "Websocket URL", "HTTP URL", "State"} // RenderTable implements TableRenderer func (p EVMNodePresenter) RenderTable(rt RendererTable) error { diff --git a/core/cmd/solana_node_commands.go b/core/cmd/solana_node_commands.go index f669ec9c85e..67989f31936 100644 --- a/core/cmd/solana_node_commands.go +++ b/core/cmd/solana_node_commands.go @@ -23,13 +23,11 @@ func (p *SolanaNodePresenter) ToRow() []string { p.Name, p.SolanaChainID, p.SolanaURL, - p.CreatedAt.String(), - p.UpdatedAt.String(), } return row } -var solanaNodeHeaders = []string{"ID", "Name", "Chain ID", "URL", "Created", "Updated"} +var solanaNodeHeaders = []string{"ID", "Name", "Chain ID", "URL"} // RenderTable implements TableRenderer func (p SolanaNodePresenter) RenderTable(rt RendererTable) error { diff --git a/core/cmd/starknet_node_commands.go b/core/cmd/starknet_node_commands.go index dfbd24dca7e..dfb8ad8559c 100644 --- a/core/cmd/starknet_node_commands.go +++ b/core/cmd/starknet_node_commands.go @@ -23,13 +23,11 @@ func (p *StarkNetNodePresenter) ToRow() []string { p.Name, p.ChainID, p.URL, - p.CreatedAt.String(), - p.UpdatedAt.String(), } return row } -var starknetNodeHeaders = []string{"ID", "Name", "Chain ID", "URL", "Created", "Updated"} +var starknetNodeHeaders = []string{"ID", "Name", "Chain ID", "URL"} // RenderTable implements TableRenderer func (p StarkNetNodePresenter) RenderTable(rt RendererTable) error { diff --git a/core/internal/cltest/cltest.go b/core/internal/cltest/cltest.go index 18891ee31a5..190d96e1faa 100644 --- a/core/internal/cltest/cltest.go +++ b/core/internal/cltest/cltest.go @@ -279,7 +279,7 @@ func NewApplicationWithConfigAndKey(t testing.TB, c chainlink.GeneralConfig, fla chainID := *utils.NewBig(&FixtureChainID) for _, dep := range flagsAndDeps { switch v := dep.(type) { - case evmtypes.DBChain: + case evmtypes.ChainConfig: chainID = v.ID case *utils.Big: chainID = *v diff --git a/core/internal/testutils/evmtest/evmtest.go b/core/internal/testutils/evmtest/evmtest.go index 2b99406be72..2640b7fcc19 100644 --- a/core/internal/testutils/evmtest/evmtest.go +++ b/core/internal/testutils/evmtest/evmtest.go @@ -119,15 +119,15 @@ func MustGetDefaultChain(t testing.TB, cc evm.ChainSet) evm.Chain { type MockORM struct { mu sync.RWMutex - chains map[string]evmtypes.DBChain + chains map[string]evmtypes.ChainConfig nodes map[string][]evmtypes.Node } var _ evmtypes.ORM = &MockORM{} -func NewMockORM(chains []evmtypes.DBChain, nodes []evmtypes.Node) *MockORM { +func NewMockORM(chains []evmtypes.ChainConfig, nodes []evmtypes.Node) *MockORM { mo := &MockORM{ - chains: make(map[string]evmtypes.DBChain), + chains: make(map[string]evmtypes.ChainConfig), nodes: make(map[string][]evmtypes.Node), } mo.PutChains(chains...) @@ -135,7 +135,7 @@ func NewMockORM(chains []evmtypes.DBChain, nodes []evmtypes.Node) *MockORM { return mo } -func (mo *MockORM) PutChains(cs ...evmtypes.DBChain) { +func (mo *MockORM) PutChains(cs ...evmtypes.ChainConfig) { for _, c := range cs { mo.chains[c.ID.String()] = c } @@ -148,17 +148,17 @@ func (mo *MockORM) AddNodes(ns ...evmtypes.Node) { } } -func (mo *MockORM) Chain(id utils.Big, qopts ...pg.QOpt) (evmtypes.DBChain, error) { +func (mo *MockORM) Chain(id utils.Big, qopts ...pg.QOpt) (evmtypes.ChainConfig, error) { mo.mu.RLock() defer mo.mu.RUnlock() c, ok := mo.chains[id.String()] if !ok { - return evmtypes.DBChain{}, sql.ErrNoRows + return evmtypes.ChainConfig{}, sql.ErrNoRows } return c, nil } -func (mo *MockORM) Chains(offset int, limit int, qopts ...pg.QOpt) (chains []evmtypes.DBChain, count int, err error) { +func (mo *MockORM) Chains(offset int, limit int, qopts ...pg.QOpt) (chains []evmtypes.ChainConfig, count int, err error) { mo.mu.RLock() defer mo.mu.RUnlock() chains = maps.Values(mo.chains) @@ -166,7 +166,7 @@ func (mo *MockORM) Chains(offset int, limit int, qopts ...pg.QOpt) (chains []evm return } -func (mo *MockORM) GetChainsByIDs(ids []utils.Big) (chains []evmtypes.DBChain, err error) { +func (mo *MockORM) GetChainsByIDs(ids []utils.Big) (chains []evmtypes.ChainConfig, err error) { mo.mu.RLock() defer mo.mu.RUnlock() for _, id := range ids { diff --git a/core/web/chains_controller.go b/core/web/chains_controller.go index 1cfcf748574..009017ecd6c 100644 --- a/core/web/chains_controller.go +++ b/core/web/chains_controller.go @@ -21,10 +21,10 @@ type ChainsController interface { type chainsController[I chains.ID, C chains.Config, R jsonapi.EntityNamer] struct { resourceName string - chainSet chains.DBChainSet[I, C] + chainSet chains.ChainsConfig[I, C] errNotEnabled error parseChainID func(string) (I, error) - newResource func(chains.DBChain[I, C]) R + newResource func(chains.ChainConfig[I, C]) R lggr logger.Logger auditLogger audit.AuditLogger } @@ -38,8 +38,8 @@ func (e errChainDisabled) Error() string { return fmt.Sprintf("%s is disabled: Set %s=true to enable", e.name, e.envVar) } -func newChainsController[I chains.ID, C chains.Config, R jsonapi.EntityNamer](prefix string, chainSet chains.DBChainSet[I, C], errNotEnabled error, - parseChainID func(string) (I, error), newResource func(chains.DBChain[I, C]) R, lggr logger.Logger, auditLogger audit.AuditLogger) *chainsController[I, C, R] { +func newChainsController[I chains.ID, C chains.Config, R jsonapi.EntityNamer](prefix string, chainSet chains.ChainsConfig[I, C], errNotEnabled error, + parseChainID func(string) (I, error), newResource func(chains.ChainConfig[I, C]) R, lggr logger.Logger, auditLogger audit.AuditLogger) *chainsController[I, C, R] { return &chainsController[I, C, R]{ resourceName: prefix + "_chain", chainSet: chainSet, diff --git a/core/web/loader/getters.go b/core/web/loader/getters.go index 0769fc704a7..8364de99ff1 100644 --- a/core/web/loader/getters.go +++ b/core/web/loader/getters.go @@ -19,7 +19,7 @@ import ( var ErrInvalidType = errors.New("invalid type") // GetChainByID fetches the chain by it's id. -func GetChainByID(ctx context.Context, id string) (*types.DBChain, error) { +func GetChainByID(ctx context.Context, id string) (*types.ChainConfig, error) { ldr := For(ctx) thunk := ldr.ChainsByIDLoader.Load(ctx, dataloader.StringKey(id)) @@ -28,7 +28,7 @@ func GetChainByID(ctx context.Context, id string) (*types.DBChain, error) { return nil, err } - chain, ok := result.(types.DBChain) + chain, ok := result.(types.ChainConfig) if !ok { return nil, ErrInvalidType } diff --git a/core/web/loader/loader_test.go b/core/web/loader/loader_test.go index 0069a4c31f8..4fa29c18c9c 100644 --- a/core/web/loader/loader_test.go +++ b/core/web/loader/loader_test.go @@ -48,15 +48,15 @@ func TestLoader_Chains(t *testing.T) { err = chainId3.UnmarshalText([]byte("3")) require.NoError(t, err) - chain := types.DBChain{ + chain := types.ChainConfig{ ID: id, Enabled: true, } - chain2 := types.DBChain{ + chain2 := types.ChainConfig{ ID: id2, Enabled: true, } - evmORM := evmtest.NewMockORM([]types.DBChain{chain, chain2}, nil) + evmORM := evmtest.NewMockORM([]types.ChainConfig{chain, chain2}, nil) app.On("EVMORM").Return(evmORM) batcher := chainBatcher{app} @@ -65,8 +65,8 @@ func TestLoader_Chains(t *testing.T) { results := batcher.loadByIDs(ctx, keys) assert.Len(t, results, 3) - assert.Equal(t, chain2, results[0].Data.(types.DBChain)) - assert.Equal(t, chain, results[1].Data.(types.DBChain)) + assert.Equal(t, chain2, results[0].Data.(types.ChainConfig)) + assert.Equal(t, chain, results[1].Data.(types.ChainConfig)) assert.Nil(t, results[2].Data) assert.Error(t, results[2].Error) assert.Equal(t, "chain not found", results[2].Error.Error()) diff --git a/core/web/nodes_controller.go b/core/web/nodes_controller.go index c075465575d..38a03b73238 100644 --- a/core/web/nodes_controller.go +++ b/core/web/nodes_controller.go @@ -16,7 +16,7 @@ type NodesController interface { } type nodesController[I chains.ID, N chains.Node, R jsonapi.EntityNamer] struct { - nodeSet chains.DBNodeSet[I, N] + nodeSet chains.NodesConfig[I, N] parseChainID func(string) (I, error) errNotEnabled error newResource func(N) R @@ -24,7 +24,7 @@ type nodesController[I chains.ID, N chains.Node, R jsonapi.EntityNamer] struct { } func newNodesController[I chains.ID, N chains.Node, R jsonapi.EntityNamer]( - nodeSet chains.DBNodeSet[I, N], + nodeSet chains.NodesConfig[I, N], errNotEnabled error, parseChainID func(string) (I, error), newResource func(N) R, diff --git a/core/web/presenters/evm_chain.go b/core/web/presenters/evm_chain.go index b77c296d660..61645f8cff2 100644 --- a/core/web/presenters/evm_chain.go +++ b/core/web/presenters/evm_chain.go @@ -1,8 +1,6 @@ package presenters import ( - "time" - "gopkg.in/guregu/null.v4" evmtypes "github.com/smartcontractkit/chainlink/core/chains/evm/types" @@ -20,13 +18,11 @@ func (r EVMChainResource) GetName() string { } // NewEVMChainResource returns a new EVMChainResource for chain. -func NewEVMChainResource(chain evmtypes.DBChain) EVMChainResource { +func NewEVMChainResource(chain evmtypes.ChainConfig) EVMChainResource { return EVMChainResource{chainResource[*evmtypes.ChainCfg]{ - JAID: NewJAIDInt64(chain.ID.ToInt().Int64()), - Config: chain.Cfg, - Enabled: chain.Enabled, - CreatedAt: chain.CreatedAt, - UpdatedAt: chain.UpdatedAt, + JAID: NewJAIDInt64(chain.ID.ToInt().Int64()), + Config: chain.Cfg, + Enabled: chain.Enabled, }} } @@ -38,8 +34,6 @@ type EVMNodeResource struct { WSURL null.String `json:"wsURL"` HTTPURL null.String `json:"httpURL"` State string `json:"state"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` } // GetName implements the api2go EntityNamer interface @@ -56,7 +50,5 @@ func NewEVMNodeResource(node evmtypes.Node) EVMNodeResource { WSURL: node.WSURL, HTTPURL: node.HTTPURL, State: node.State, - CreatedAt: node.CreatedAt, - UpdatedAt: node.UpdatedAt, } } diff --git a/core/web/presenters/solana_chain.go b/core/web/presenters/solana_chain.go index cc5f96997f1..b07e16e7204 100644 --- a/core/web/presenters/solana_chain.go +++ b/core/web/presenters/solana_chain.go @@ -1,8 +1,6 @@ package presenters import ( - "time" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" "github.com/smartcontractkit/chainlink/core/chains/solana" @@ -19,24 +17,20 @@ func (r SolanaChainResource) GetName() string { } // NewSolanaChainResource returns a new SolanaChainResource for chain. -func NewSolanaChainResource(chain solana.DBChain) SolanaChainResource { +func NewSolanaChainResource(chain solana.ChainConfig) SolanaChainResource { return SolanaChainResource{chainResource[*db.ChainCfg]{ - JAID: NewJAID(chain.ID), - Config: chain.Cfg, - Enabled: chain.Enabled, - CreatedAt: chain.CreatedAt, - UpdatedAt: chain.UpdatedAt, + JAID: NewJAID(chain.ID), + Config: chain.Cfg, + Enabled: chain.Enabled, }} } // SolanaNodeResource is a Solana node JSONAPI resource. type SolanaNodeResource struct { JAID - Name string `json:"name"` - SolanaChainID string `json:"solanaChainID"` - SolanaURL string `json:"solanaURL"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` + Name string `json:"name"` + SolanaChainID string `json:"solanaChainID"` + SolanaURL string `json:"solanaURL"` } // GetName implements the api2go EntityNamer interface @@ -51,7 +45,5 @@ func NewSolanaNodeResource(node db.Node) SolanaNodeResource { Name: node.Name, SolanaChainID: node.SolanaChainID, SolanaURL: node.SolanaURL, - CreatedAt: node.CreatedAt, - UpdatedAt: node.UpdatedAt, } } diff --git a/core/web/presenters/starknet_chain.go b/core/web/presenters/starknet_chain.go index ad68f843362..c118987d6bc 100644 --- a/core/web/presenters/starknet_chain.go +++ b/core/web/presenters/starknet_chain.go @@ -1,8 +1,6 @@ package presenters import ( - "time" - "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/db" starknet "github.com/smartcontractkit/chainlink/core/chains/starknet/types" @@ -19,24 +17,20 @@ func (r StarkNetChainResource) GetName() string { } // NewStarkNetChainResource returns a new StarkNetChainResource for chain. -func NewStarkNetChainResource(chain starknet.DBChain) StarkNetChainResource { +func NewStarkNetChainResource(chain starknet.ChainConfig) StarkNetChainResource { return StarkNetChainResource{chainResource[*db.ChainCfg]{ - JAID: NewJAID(chain.ID), - Config: chain.Cfg, - Enabled: chain.Enabled, - CreatedAt: chain.CreatedAt, - UpdatedAt: chain.UpdatedAt, + JAID: NewJAID(chain.ID), + Config: chain.Cfg, + Enabled: chain.Enabled, }} } // StarkNetNodeResource is a StarkNet node JSONAPI resource. type StarkNetNodeResource struct { JAID - Name string `json:"name"` - ChainID string `json:"chainID"` - URL string `json:"url"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` + Name string `json:"name"` + ChainID string `json:"chainID"` + URL string `json:"url"` } // GetName implements the api2go EntityNamer interface @@ -47,11 +41,9 @@ func (r StarkNetNodeResource) GetName() string { // NewStarkNetNodeResource returns a new StarkNetNodeResource for node. func NewStarkNetNodeResource(node db.Node) StarkNetNodeResource { return StarkNetNodeResource{ - JAID: NewJAIDInt32(node.ID), - Name: node.Name, - ChainID: node.ChainID, - URL: node.URL, - CreatedAt: node.CreatedAt, - UpdatedAt: node.UpdatedAt, + JAID: NewJAIDInt32(node.ID), + Name: node.Name, + ChainID: node.ChainID, + URL: node.URL, } } diff --git a/core/web/resolver/eth_key_test.go b/core/web/resolver/eth_key_test.go index fedd85a05e4..2930a21f551 100644 --- a/core/web/resolver/eth_key_test.go +++ b/core/web/resolver/eth_key_test.go @@ -84,7 +84,7 @@ func TestResolver_ETHKeys(t *testing.T) { f.Mocks.scfg.On("KeySpecificMaxGasPriceWei", keys[0].Address).Return(assets.NewWeiI(1)) f.Mocks.chain.On("Config").Return(f.Mocks.scfg) f.Mocks.chainSet.On("Get", states[0].EVMChainID.ToInt()).Return(f.Mocks.chain, nil) - f.Mocks.evmORM.PutChains(types.DBChain{ID: chainID}) + f.Mocks.evmORM.PutChains(types.ChainConfig{ID: chainID}) f.Mocks.keystore.On("Eth").Return(f.Mocks.ethKs) f.App.On("GetKeyStore").Return(f.Mocks.keystore) f.App.On("EVMORM").Return(f.Mocks.evmORM) @@ -130,7 +130,7 @@ func TestResolver_ETHKeys(t *testing.T) { f.Mocks.ethKs.On("Get", keys[0].Address.Hex()).Return(keys[0], nil) f.Mocks.ethKs.On("GetAll").Return(keys, nil) f.Mocks.chainSet.On("Get", states[0].EVMChainID.ToInt()).Return(f.Mocks.chain, evm.ErrNoChains) - f.Mocks.evmORM.PutChains(types.DBChain{ID: chainID}) + f.Mocks.evmORM.PutChains(types.ChainConfig{ID: chainID}) f.Mocks.keystore.On("Eth").Return(f.Mocks.ethKs) f.App.On("GetKeyStore").Return(f.Mocks.keystore) f.App.On("EVMORM").Return(f.Mocks.evmORM) @@ -290,7 +290,7 @@ func TestResolver_ETHKeys(t *testing.T) { f.App.On("GetChains").Return(chainlink.Chains{EVM: f.Mocks.chainSet}) f.Mocks.scfg.On("KeySpecificMaxGasPriceWei", keys[0].Address).Return(assets.NewWeiI(1)) f.Mocks.chain.On("Config").Return(f.Mocks.scfg) - f.Mocks.evmORM.PutChains(types.DBChain{ID: chainID}) + f.Mocks.evmORM.PutChains(types.ChainConfig{ID: chainID}) f.App.On("EVMORM").Return(f.Mocks.evmORM) }, query: query, @@ -340,7 +340,7 @@ func TestResolver_ETHKeys(t *testing.T) { f.Mocks.scfg.On("KeySpecificMaxGasPriceWei", keys[0].Address).Return(assets.NewWeiI(1)) f.Mocks.chain.On("Config").Return(f.Mocks.scfg) f.Mocks.chainSet.On("Get", states[0].EVMChainID.ToInt()).Return(f.Mocks.chain, nil) - f.Mocks.evmORM.PutChains(types.DBChain{ID: chainID}) + f.Mocks.evmORM.PutChains(types.ChainConfig{ID: chainID}) f.Mocks.keystore.On("Eth").Return(f.Mocks.ethKs) f.App.On("GetKeyStore").Return(f.Mocks.keystore) f.App.On("EVMORM").Return(f.Mocks.evmORM) diff --git a/core/web/resolver/eth_transaction_test.go b/core/web/resolver/eth_transaction_test.go index 55300dc0fb3..d0d507452d0 100644 --- a/core/web/resolver/eth_transaction_test.go +++ b/core/web/resolver/eth_transaction_test.go @@ -80,7 +80,7 @@ func TestResolver_EthTransaction(t *testing.T) { }, }, nil) f.App.On("TxmORM").Return(f.Mocks.txmORM) - f.Mocks.evmORM.PutChains(types.DBChain{ID: chainID}) + f.Mocks.evmORM.PutChains(types.ChainConfig{ID: chainID}) f.App.On("EVMORM").Return(f.Mocks.evmORM) }, query: query, @@ -136,7 +136,7 @@ func TestResolver_EthTransaction(t *testing.T) { }, }, nil) f.App.On("TxmORM").Return(f.Mocks.txmORM) - f.Mocks.evmORM.PutChains(types.DBChain{ID: chainID}) + f.Mocks.evmORM.PutChains(types.ChainConfig{ID: chainID}) f.App.On("EVMORM").Return(f.Mocks.evmORM) }, query: query, diff --git a/core/web/resolver/evm_chain.go b/core/web/resolver/evm_chain.go index 619295a667c..e360a2e19ad 100644 --- a/core/web/resolver/evm_chain.go +++ b/core/web/resolver/evm_chain.go @@ -11,14 +11,14 @@ import ( // ChainResolver resolves the Chain type. type ChainResolver struct { - chain types.DBChain + chain types.ChainConfig } -func NewChain(chain types.DBChain) *ChainResolver { +func NewChain(chain types.ChainConfig) *ChainResolver { return &ChainResolver{chain: chain} } -func NewChains(chains []types.DBChain) []*ChainResolver { +func NewChains(chains []types.ChainConfig) []*ChainResolver { var resolvers []*ChainResolver for _, c := range chains { resolvers = append(resolvers, NewChain(c)) @@ -42,16 +42,6 @@ func (r *ChainResolver) Config() *ChainConfigResolver { return NewChainConfig(*r.chain.Cfg) } -// CreatedAt resolves the chain's created at field. -func (r *ChainResolver) CreatedAt() graphql.Time { - return graphql.Time{Time: r.chain.CreatedAt} -} - -// UpdatedAt resolves the chain's updated at field. -func (r *ChainResolver) UpdatedAt() graphql.Time { - return graphql.Time{Time: r.chain.UpdatedAt} -} - func (r *ChainResolver) Nodes(ctx context.Context) ([]*NodeResolver, error) { nodes, err := loader.GetNodesByChainID(ctx, r.chain.ID.String()) if err != nil { @@ -62,11 +52,11 @@ func (r *ChainResolver) Nodes(ctx context.Context) ([]*NodeResolver, error) { } type ChainPayloadResolver struct { - chain types.DBChain + chain types.ChainConfig NotFoundErrorUnionType } -func NewChainPayload(chain types.DBChain, err error) *ChainPayloadResolver { +func NewChainPayload(chain types.ChainConfig, err error) *ChainPayloadResolver { e := NotFoundErrorUnionType{err: err, message: "chain not found", isExpectedErrorFn: nil} return &ChainPayloadResolver{chain: chain, NotFoundErrorUnionType: e} @@ -81,11 +71,11 @@ func (r *ChainPayloadResolver) ToChain() (*ChainResolver, bool) { } type ChainsPayloadResolver struct { - chains []types.DBChain + chains []types.ChainConfig total int32 } -func NewChainsPayload(chains []types.DBChain, total int32) *ChainsPayloadResolver { +func NewChainsPayload(chains []types.ChainConfig, total int32) *ChainsPayloadResolver { return &ChainsPayloadResolver{chains: chains, total: total} } @@ -100,11 +90,11 @@ func (r *ChainsPayloadResolver) Metadata() *PaginationMetadataResolver { // -- CreateChain Mutation -- type CreateChainPayloadResolver struct { - chain *types.DBChain + chain *types.ChainConfig inputErrs map[string]string } -func NewCreateChainPayload(chain *types.DBChain, inputErrs map[string]string) *CreateChainPayloadResolver { +func NewCreateChainPayload(chain *types.ChainConfig, inputErrs map[string]string) *CreateChainPayloadResolver { return &CreateChainPayloadResolver{chain: chain, inputErrs: inputErrs} } @@ -131,10 +121,10 @@ func (r *CreateChainPayloadResolver) ToInputErrors() (*InputErrorsResolver, bool } type CreateChainSuccessResolver struct { - chain *types.DBChain + chain *types.ChainConfig } -func NewCreateChainSuccess(chain *types.DBChain) *CreateChainSuccessResolver { +func NewCreateChainSuccess(chain *types.ChainConfig) *CreateChainSuccessResolver { return &CreateChainSuccessResolver{chain: chain} } @@ -143,12 +133,12 @@ func (r *CreateChainSuccessResolver) Chain() *ChainResolver { } type UpdateChainPayloadResolver struct { - chain *types.DBChain + chain *types.ChainConfig inputErrs map[string]string NotFoundErrorUnionType } -func NewUpdateChainPayload(chain *types.DBChain, inputErrs map[string]string, err error) *UpdateChainPayloadResolver { +func NewUpdateChainPayload(chain *types.ChainConfig, inputErrs map[string]string, err error) *UpdateChainPayloadResolver { e := NotFoundErrorUnionType{err: err, message: "chain not found", isExpectedErrorFn: nil} return &UpdateChainPayloadResolver{chain: chain, inputErrs: inputErrs, NotFoundErrorUnionType: e} @@ -177,10 +167,10 @@ func (r *UpdateChainPayloadResolver) ToInputErrors() (*InputErrorsResolver, bool } type UpdateChainSuccessResolver struct { - chain types.DBChain + chain types.ChainConfig } -func NewUpdateChainSuccess(chain types.DBChain) *UpdateChainSuccessResolver { +func NewUpdateChainSuccess(chain types.ChainConfig) *UpdateChainSuccessResolver { return &UpdateChainSuccessResolver{chain: chain} } @@ -189,11 +179,11 @@ func (r *UpdateChainSuccessResolver) Chain() *ChainResolver { } type DeleteChainPayloadResolver struct { - chain *types.DBChain + chain *types.ChainConfig NotFoundErrorUnionType } -func NewDeleteChainPayload(chain *types.DBChain, err error) *DeleteChainPayloadResolver { +func NewDeleteChainPayload(chain *types.ChainConfig, err error) *DeleteChainPayloadResolver { e := NotFoundErrorUnionType{err: err, message: "chain not found", isExpectedErrorFn: nil} return &DeleteChainPayloadResolver{chain: chain, NotFoundErrorUnionType: e} @@ -208,10 +198,10 @@ func (r *DeleteChainPayloadResolver) ToDeleteChainSuccess() (*DeleteChainSuccess } type DeleteChainSuccessResolver struct { - chain types.DBChain + chain types.ChainConfig } -func NewDeleteChainSuccess(chain types.DBChain) *DeleteChainSuccessResolver { +func NewDeleteChainSuccess(chain types.ChainConfig) *DeleteChainSuccessResolver { return &DeleteChainSuccessResolver{chain: chain} } diff --git a/core/web/resolver/evm_chain_test.go b/core/web/resolver/evm_chain_test.go index ba0a2d1efe5..01230f0e0f0 100644 --- a/core/web/resolver/evm_chain_test.go +++ b/core/web/resolver/evm_chain_test.go @@ -29,7 +29,6 @@ func TestResolver_Chains(t *testing.T) { results { id enabled - createdAt nodes { id } @@ -70,10 +69,9 @@ func TestResolver_Chains(t *testing.T) { f.App.On("EVMORM").Return(f.Mocks.evmORM) - f.Mocks.evmORM.PutChains(types.DBChain{ - ID: chainID, - Enabled: true, - CreatedAt: f.Timestamp(), + f.Mocks.evmORM.PutChains(types.ChainConfig{ + ID: chainID, + Enabled: true, Cfg: &types.ChainCfg{ BlockHistoryEstimatorBlockDelay: null.IntFrom(1), EthTxReaperThreshold: &threshold, @@ -107,7 +105,6 @@ func TestResolver_Chains(t *testing.T) { "results": [{ "id": "1", "enabled": true, - "createdAt": "2021-01-01T00:00:00Z", "config": { "blockHistoryEstimatorBlockDelay": 1, "ethTxReaperThreshold": "1m0s", @@ -150,7 +147,6 @@ func TestResolver_Chain(t *testing.T) { ... on Chain { id enabled - createdAt nodes { id } @@ -191,10 +187,9 @@ func TestResolver_Chain(t *testing.T) { f.App.On("EVMORM").Return(f.Mocks.evmORM) f.App.On("GetChains").Return(chainlink.Chains{EVM: f.Mocks.chainSet}) - f.Mocks.evmORM.PutChains(types.DBChain{ - ID: chainID, - Enabled: true, - CreatedAt: f.Timestamp(), + f.Mocks.evmORM.PutChains(types.ChainConfig{ + ID: chainID, + Enabled: true, Cfg: &types.ChainCfg{ BlockHistoryEstimatorBlockDelay: null.IntFrom(1), EthTxReaperThreshold: &threshold, @@ -225,7 +220,6 @@ func TestResolver_Chain(t *testing.T) { "chain": { "id": "1", "enabled": true, - "createdAt": "2021-01-01T00:00:00Z", "config": { "blockHistoryEstimatorBlockDelay": 1, "ethTxReaperThreshold": "1m0s", diff --git a/core/web/resolver/node.go b/core/web/resolver/node.go index 314886af5b5..4fd2a55dc49 100644 --- a/core/web/resolver/node.go +++ b/core/web/resolver/node.go @@ -67,16 +67,6 @@ func (r *NodeResolver) Chain(ctx context.Context) (*ChainResolver, error) { return NewChain(*chain), nil } -// CreatedAt resolves the node's created at field. -func (r *NodeResolver) CreatedAt() graphql.Time { - return graphql.Time{Time: r.node.CreatedAt} -} - -// UpdatedAt resolves the node's updated at field. -func (r *NodeResolver) UpdatedAt() graphql.Time { - return graphql.Time{Time: r.node.UpdatedAt} -} - // -- Node Query -- type NodePayloadResolver struct { diff --git a/core/web/resolver/node_test.go b/core/web/resolver/node_test.go index fc38ee504dd..05c5c796739 100644 --- a/core/web/resolver/node_test.go +++ b/core/web/resolver/node_test.go @@ -26,7 +26,6 @@ func TestResolver_Nodes(t *testing.T) { results { id name - createdAt chain { id } @@ -51,11 +50,10 @@ func TestResolver_Nodes(t *testing.T) { ID: nodeID, Name: "node-name", EVMChainID: chainID, - CreatedAt: f.Timestamp(), }, }, 1, nil) f.App.On("EVMORM").Return(f.Mocks.evmORM) - f.Mocks.evmORM.PutChains(types.DBChain{ID: chainID}) + f.Mocks.evmORM.PutChains(types.ChainConfig{ID: chainID}) }, query: query, result: ` @@ -64,7 +62,6 @@ func TestResolver_Nodes(t *testing.T) { "results": [{ "id": "node-name", "name": "node-name", - "createdAt": "2021-01-01T00:00:00Z", "chain": { "id": "1" } diff --git a/core/web/schema/type/chain.graphql b/core/web/schema/type/chain.graphql index 2e3ed68e492..3cd64840ccb 100644 --- a/core/web/schema/type/chain.graphql +++ b/core/web/schema/type/chain.graphql @@ -3,8 +3,6 @@ type Chain { enabled: Boolean! config: ChainConfig! nodes: [Node!]! - createdAt: Time! - updatedAt: Time! } union ChainPayload = Chain | NotFoundError diff --git a/core/web/schema/type/node.graphql b/core/web/schema/type/node.graphql index 5e92f3e2248..893f6bf0260 100644 --- a/core/web/schema/type/node.graphql +++ b/core/web/schema/type/node.graphql @@ -4,8 +4,6 @@ type Node { wsURL: String! httpURL: String! chain: Chain! - createdAt: Time! - updatedAt: Time! state: String! sendOnly: Boolean! } From 8ffaa3d698a3d76fc920144bcff5b451c9c5bf0e Mon Sep 17 00:00:00 2001 From: krehermann Date: Fri, 17 Mar 2023 12:06:56 -0700 Subject: [PATCH 03/25] update wsrpc version to take race fixes (#8743) Co-authored-by: Jordan Krage --- go.mod | 2 +- go.sum | 4 ++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index d9f78751341..727c45369a0 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,7 @@ require ( github.com/smartcontractkit/ocr2keepers v0.6.14 github.com/smartcontractkit/ocr2vrf v0.0.0-20230313164535-dce9b4be73a3 github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb - github.com/smartcontractkit/wsrpc v0.6.2-0.20230309165410-41e1ab6128d9 + github.com/smartcontractkit/wsrpc v0.6.2-0.20230317160629-382a1ac921d8 github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.5.0 github.com/spf13/viper v1.12.0 diff --git a/go.sum b/go.sum index 14d5ae4f429..913c5ac43b7 100644 --- a/go.sum +++ b/go.sum @@ -1314,8 +1314,8 @@ github.com/smartcontractkit/ocr2vrf v0.0.0-20230313164535-dce9b4be73a3 h1:YqC6hC github.com/smartcontractkit/ocr2vrf v0.0.0-20230313164535-dce9b4be73a3/go.mod h1:NKkp8yf3trq+hJe/gn2Q1dd4abZvcYavUKPzYJCgVew= github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb h1:OMaBUb4X9IFPLbGbCHsMU+kw/BPCrewaVwWGIBc0I4A= github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb/go.mod h1:HNUu4cJekUdsJbwRBCiOybtkPJEfGRELQPe2tkoDEyk= -github.com/smartcontractkit/wsrpc v0.6.2-0.20230309165410-41e1ab6128d9 h1:KlmAiBKpckSwj8RhaRG8b/Huh0LjFilCqd7jMRX8tyQ= -github.com/smartcontractkit/wsrpc v0.6.2-0.20230309165410-41e1ab6128d9/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= +github.com/smartcontractkit/wsrpc v0.6.2-0.20230317160629-382a1ac921d8 h1:Wn9X8mOQoQzzh1kBK22EDDgyXAfVjDlFlqUQW5kyyGo= +github.com/smartcontractkit/wsrpc v0.6.2-0.20230317160629-382a1ac921d8/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 821cd47fc10..028e940445f 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -254,7 +254,7 @@ require ( github.com/sirupsen/logrus v1.9.0 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230223033525-5be75fb81118 // indirect github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb // indirect - github.com/smartcontractkit/wsrpc v0.6.2-0.20230309165410-41e1ab6128d9 // indirect + github.com/smartcontractkit/wsrpc v0.6.2-0.20230317160629-382a1ac921d8 // indirect github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/cobra v1.6.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index c7756f14686..1b351e83fed 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1799,8 +1799,8 @@ github.com/smartcontractkit/ocr2vrf v0.0.0-20230313164535-dce9b4be73a3 h1:YqC6hC github.com/smartcontractkit/ocr2vrf v0.0.0-20230313164535-dce9b4be73a3/go.mod h1:NKkp8yf3trq+hJe/gn2Q1dd4abZvcYavUKPzYJCgVew= github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb h1:OMaBUb4X9IFPLbGbCHsMU+kw/BPCrewaVwWGIBc0I4A= github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb/go.mod h1:HNUu4cJekUdsJbwRBCiOybtkPJEfGRELQPe2tkoDEyk= -github.com/smartcontractkit/wsrpc v0.6.2-0.20230309165410-41e1ab6128d9 h1:KlmAiBKpckSwj8RhaRG8b/Huh0LjFilCqd7jMRX8tyQ= -github.com/smartcontractkit/wsrpc v0.6.2-0.20230309165410-41e1ab6128d9/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= +github.com/smartcontractkit/wsrpc v0.6.2-0.20230317160629-382a1ac921d8 h1:Wn9X8mOQoQzzh1kBK22EDDgyXAfVjDlFlqUQW5kyyGo= +github.com/smartcontractkit/wsrpc v0.6.2-0.20230317160629-382a1ac921d8/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= From f7a43023ab748284e8fc99ca45b7b00331132e3a Mon Sep 17 00:00:00 2001 From: Tate Date: Fri, 17 Mar 2023 13:32:29 -0600 Subject: [PATCH 04/25] Dynamically Use Solana Version Based on Go Mod (#8745) * dynamically get the sha * pull the full sha --- .github/workflows/integration-tests.yml | 59 +++++++++++++++++++------ 1 file changed, 46 insertions(+), 13 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7211b64035d..978b0832375 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -13,7 +13,6 @@ concurrency: env: ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:ci.${{ github.sha }} CL_ECR: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink - SOLANA_REF: develop jobs: changes: @@ -245,10 +244,44 @@ jobs: run: exit 1 ### Solana Section + get_solana_sha: + name: Get Solana Sha From Go Mod + environment: Integration + runs-on: ubuntu-latest + outputs: + sha: ${{ steps.getsha.outputs.sha }} + steps: + - name: Checkout the repo + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Get the sha from go mod + id: getshortsha + run: | + sol_ver=$(go list -m -json github.com/smartcontractkit/chainlink-solana | jq -r .Version) + short_sha="${sol_ver##*-}" + echo "short sha is: ${short_sha}" + echo "short_sha=${short_sha}" >> "$GITHUB_OUTPUT" + - name: Checkout solana + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + repository: smartcontractkit/chainlink-solana + ref: develop + fetch-depth: 0 + path: solanapath + - name: Get long sha + id: getsha + run: | + cd solanapath + full_sha=$(git rev-parse ${{steps.getshortsha.outputs.short_sha}}) + echo "sha is: ${full_sha}" + echo "sha=${full_sha}" >> "$GITHUB_OUTPUT" + get_projectserum_version: name: Get ProjectSerum Version environment: integration runs-on: ubuntu-latest + needs: [get_solana_sha] outputs: projectserum_version: ${{ steps.psversion.outputs.projectserum_version }} steps: @@ -256,7 +289,7 @@ jobs: uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: repository: smartcontractkit/chainlink-solana - ref: ${{ env.SOLANA_REF }} + ref: ${{ needs.get_solana_sha.outputs.sha }} - name: Get ProjectSerum Version id: psversion uses: smartcontractkit/chainlink-solana/.github/actions/projectserum_version@4b971869e26b79c7ce3fb7c98005cc2e3f350915 # stable action on Oct 12 2022 @@ -270,7 +303,7 @@ jobs: contents: read name: Solana Build Artifacts runs-on: ubuntu20.04-16cores-64GB - needs: [changes, get_projectserum_version] + needs: [changes, get_projectserum_version, get_solana_sha] container: image: projectserum/build:${{ needs.get_projectserum_version.outputs.projectserum_version }} env: @@ -281,12 +314,12 @@ jobs: uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: repository: smartcontractkit/chainlink-solana - ref: ${{ env.SOLANA_REF }} + ref: ${{ needs.get_solana_sha.outputs.sha }} - name: Build contracts - if: ${{needs.changes.outputs.src == 'true' && env.SOLANA_REF != 'develop' }} + if: ${{needs.changes.outputs.src == 'true' && needs.get_solana_sha.outputs.sha != 'develop' }} uses: smartcontractkit/chainlink-solana/.github/actions/build_contract_artifacts@4b971869e26b79c7ce3fb7c98005cc2e3f350915 # stable action on Oct 12 2022 with: - ref: ${{ env.SOLANA_REF }} + ref: ${{ needs.get_solana_sha.outputs.sha }} - name: Collect Metrics if: always() id: collect-gha-metrics @@ -306,7 +339,7 @@ jobs: contents: read name: Solana Smoke Tests runs-on: ubuntu-latest - needs: [build-chainlink, solana-build-contracts, changes] + needs: [build-chainlink, solana-build-contracts, changes, get_solana_sha] env: TEST_SUITE: smoke TEST_ARGS: -test.timeout 30m @@ -319,18 +352,18 @@ jobs: uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 with: repository: smartcontractkit/chainlink-solana - ref: ${{ env.SOLANA_REF }} + ref: ${{ needs.get_solana_sha.outputs.sha }} - name: Download Artifacts - if: ${{ env.SOLANA_REF != 'develop' }} + if: ${{ needs.get_solana_sha.outputs.sha != 'develop' }} uses: actions/download-artifact@v3 with: name: artifacts path: ${{ env.CONTRACT_ARTIFACTS_PATH }} - name: Build Test Runner - if: ${{ env.SOLANA_REF != 'develop' }} + if: ${{ needs.get_solana_sha.outputs.sha != 'develop' }} uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 with: - tags: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ env.SOLANA_REF }} + tags: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:solana.${{ needs.get_solana_sha.outputs.sha }} file: ./integration-tests/test.Dockerfile build-args: | BASE_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image @@ -341,12 +374,12 @@ jobs: - name: Print Solana Tests Image run: | echo "### chainlink-solana-tests image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY - echo "\`${{ env.SOLANA_REF }}\`" >>$GITHUB_STEP_SUMMARY + echo "\`${{ needs.get_solana_sha.outputs.sha }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests if: needs.changes.outputs.src == 'true' uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 with: - test_command_to_run: export ENV_JOB_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ env.SOLANA_REF }} && make test_smoke + test_command_to_run: export ENV_JOB_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:solana.${{ needs.get_solana_sha.outputs.sha }} && make test_smoke cl_repo: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink cl_image_tag: latest.${{ github.sha }} artifacts_location: /home/runner/work/chainlink-solana/chainlink-solana/integration-tests/logs From fd5a79ef4d6a2622ac364f51408dafdc449649a1 Mon Sep 17 00:00:00 2001 From: krehermann Date: Fri, 17 Mar 2023 13:24:02 -0700 Subject: [PATCH 05/25] BCF-2000 skip unnecessary config (#8711) --- core/cmd/app.go | 51 +++++++++++++------------- core/cmd/client.go | 66 ++++++++++++++++++++++++++++++++++ core/cmd/local_client.go | 18 ++++++++-- core/cmd/remote_client.go | 57 +++++++++++++++++++++++------ core/cmd/remote_client_test.go | 21 ++++++++--- core/internal/cltest/cltest.go | 6 +++- core/main_test.go | 4 +-- docs/CHANGELOG.md | 5 +++ 8 files changed, 182 insertions(+), 46 deletions(-) diff --git a/core/cmd/app.go b/core/cmd/app.go index 33d9a502611..71256372ac9 100644 --- a/core/cmd/app.go +++ b/core/cmd/app.go @@ -32,6 +32,9 @@ func NewApp(client *Client) *cli.App { app := cli.NewApp() app.Usage = "CLI for Chainlink" app.Version = fmt.Sprintf("%v@%v", static.Version, static.Sha) + // TOML + var opts chainlink.GeneralConfigOpts + app.Flags = []cli.Flag{ cli.BoolFlag{ Name: "json, j", @@ -54,34 +57,18 @@ func NewApp(client *Client) *cli.App { Name: "config, c", Usage: "TOML configuration file(s) via flag, or raw TOML via env var. If used, legacy env vars must not be set. Multiple files can be used (-c configA.toml -c configB.toml), and they are applied in order with duplicated fields overriding any earlier values. If the 'CL_CONFIG' env var is specified, it is always processed last with the effect of being the final override. [$CL_CONFIG]", // Note: we cannot use the EnvVar field since it will combine with the flags. + Hidden: true, }, cli.StringFlag{ - Name: "secrets, s", - Usage: "TOML configuration file for secrets. Must be set if and only if config is set.", + Name: "secrets, s", + Usage: "TOML configuration file for secrets. Must be set if and only if config is set.", + Hidden: true, }, } app.Before = func(c *cli.Context) error { - // TOML - var opts chainlink.GeneralConfigOpts - - fileNames := c.StringSlice("config") - if err := loadOpts(&opts, fileNames...); err != nil { - return err - } - - secretsTOML := "" - if c.IsSet("secrets") { - secretsFileName := c.String("secrets") - b, err := os.ReadFile(secretsFileName) - if err != nil { - return errors.Wrapf(err, "failed to read secrets file: %s", secretsFileName) - } - secretsTOML = string(b) - } - if err := opts.ParseSecrets(secretsTOML); err != nil { - return err - } + // setup a default config and logger + // these will be overwritten later if a TOML config is specified if cfg, lggr, closeLggr, err := opts.NewAndLogger(); err != nil { return err } else { @@ -89,17 +76,30 @@ func NewApp(client *Client) *cli.App { client.Logger = lggr client.CloseLogger = closeLggr } + + err := client.setConfigFromFlags(&opts, c) + if err != nil { + return err + } + if c.Bool("json") { client.Renderer = RendererJSON{Writer: os.Stdout} } + + cookieJar, err := NewUserCache("cookies") + if err != nil { + return fmt.Errorf("error initialize chainlink cookie cache: %w", err) + } + urlStr := c.String("remote-node-url") remoteNodeURL, err := url.Parse(urlStr) if err != nil { return errors.Wrapf(err, "%s is not a valid URL", urlStr) } + insecureSkipVerify := c.Bool("insecure-skip-verify") clientOpts := ClientOpts{RemoteNodeURL: *remoteNodeURL, InsecureSkipVerify: insecureSkipVerify} - cookieAuth := NewSessionCookieAuthenticator(clientOpts, DiskCookieStore{Config: client.Config}, client.Logger) + cookieAuth := NewSessionCookieAuthenticator(clientOpts, DiskCookieStore{Config: cookieJar}, client.Logger) sessionRequestBuilder := NewFileSessionRequestBuilder(client.Logger) credentialsFile := c.String("admin-credentials-file") @@ -112,6 +112,7 @@ func NewApp(client *Client) *cli.App { client.CookieAuthenticator = cookieAuth client.FileSessionRequestBuilder = sessionRequestBuilder return nil + } app.After = func(c *cli.Context) error { if client.CloseLogger != nil { @@ -145,7 +146,7 @@ func NewApp(client *Client) *cli.App { { Name: "config", Usage: "Commands for the node's configuration", - Subcommands: initRemoteConfigSubCmds(client), + Subcommands: initRemoteConfigSubCmds(client, &opts), }, { Name: "jobs", @@ -177,7 +178,7 @@ func NewApp(client *Client) *cli.App { Aliases: []string{"local"}, Usage: "Commands for admin actions that must be run locally", Description: "Commands can only be run from on the same machine as the Chainlink node.", - Subcommands: initLocalSubCmds(client, devMode), + Subcommands: initLocalSubCmds(client, devMode, &opts), }, { Name: "initiators", diff --git a/core/cmd/client.go b/core/cmd/client.go index 9fbe1f50c3c..001ec1336c3 100644 --- a/core/cmd/client.go +++ b/core/cmd/client.go @@ -12,6 +12,7 @@ import ( "net/url" "os" "path" + "path/filepath" "strconv" "strings" "sync" @@ -22,6 +23,7 @@ import ( "github.com/getsentry/sentry-go" "github.com/gin-gonic/gin" "github.com/pkg/errors" + "github.com/urfave/cli" clipkg "github.com/urfave/cli" "go.uber.org/multierr" "go.uber.org/zap/zapcore" @@ -78,6 +80,8 @@ type Client struct { PromptingSessionRequestBuilder SessionRequestBuilder ChangePasswordPrompter ChangePasswordPrompter PasswordPrompter PasswordPrompter + + configInitialized bool } func (cli *Client) errorOut(err error) error { @@ -87,6 +91,47 @@ func (cli *Client) errorOut(err error) error { return nil } +func (cli *Client) setConfigFromFlags(opts *chainlink.GeneralConfigOpts, ctx *cli.Context) error { + + configToProcess := ctx.IsSet("config") || ctx.IsSet("secrets") + if !configToProcess { + return nil + } + + if cli.configInitialized && configToProcess { + return fmt.Errorf("multiple commands with --config or --secrets flags. only one command may specify these flags. when secrets are used, they must be specific together in the same command") + } + + cli.configInitialized = true + + fileNames := ctx.StringSlice("config") + if err := loadOpts(opts, fileNames...); err != nil { + return err + } + + secretsTOML := "" + if ctx.IsSet("secrets") { + secretsFileName := ctx.String("secrets") + b, err := os.ReadFile(secretsFileName) + if err != nil { + return errors.Wrapf(err, "failed to read secrets file: %s", secretsFileName) + } + secretsTOML = string(b) + } + err := opts.ParseSecrets(secretsTOML) + if err != nil { + return err + } + if cfg, lggr, closeLggr, err := opts.NewAndLogger(); err != nil { + return err + } else { + cli.Config = cfg + cli.Logger = lggr + cli.CloseLogger = closeLggr + } + return nil +} + // AppFactory implements the NewApplication method. type AppFactory interface { NewApplication(ctx context.Context, cfg chainlink.GeneralConfig, appLggr logger.Logger, db *sqlx.DB) (chainlink.Application, error) @@ -678,6 +723,27 @@ func (d DiskCookieStore) cookiePath() string { return path.Join(d.Config.RootDir(), "cookie") } +type UserCache struct { + dir string +} + +func NewUserCache(subdir string) (*UserCache, error) { + + cd, err := os.UserCacheDir() + if err != nil { + return nil, err + } + dir := filepath.Join(cd, "chainlink", subdir) + + return &UserCache{ + dir: dir, + }, nil +} + +func (cs *UserCache) RootDir() string { + return cs.dir +} + // SessionRequestBuilder is an interface that returns a SessionRequest, // abstracting how session requests are generated, whether they be from // the prompt or from a file. diff --git a/core/cmd/local_client.go b/core/cmd/local_client.go index 20a6a8593d8..45671241d2f 100644 --- a/core/cmd/local_client.go +++ b/core/cmd/local_client.go @@ -34,6 +34,7 @@ import ( "github.com/smartcontractkit/chainlink/core/chains/evm/txmgr" "github.com/smartcontractkit/chainlink/core/logger" "github.com/smartcontractkit/chainlink/core/services" + "github.com/smartcontractkit/chainlink/core/services/chainlink" "github.com/smartcontractkit/chainlink/core/services/pg" "github.com/smartcontractkit/chainlink/core/sessions" "github.com/smartcontractkit/chainlink/core/shutdown" @@ -44,7 +45,9 @@ import ( webPresenters "github.com/smartcontractkit/chainlink/core/web/presenters" ) -func initLocalSubCmds(client *Client, devMode bool) []cli.Command { +var ErrProfileTooLong = errors.New("requested profile duration too large") + +func initLocalSubCmds(client *Client, devMode bool, opts *chainlink.GeneralConfigOpts) []cli.Command { return []cli.Command{ { Name: "start", @@ -66,8 +69,19 @@ func initLocalSubCmds(client *Client, devMode bool) []cli.Command { Name: "vrfpassword, vp", Usage: "text file holding the password for the vrf keys; enables Chainlink VRF oracle", }, + cli.StringSliceFlag{ + Name: "config, c", + Usage: "TOML configuration file(s) via flag, or raw TOML via env var. If used, legacy env vars must not be set. Multiple files can be used (-c configA.toml -c configB.toml), and they are applied in order with duplicated fields overriding any earlier values. If the 'CL_CONFIG' env var is specified, it is always processed last with the effect of being the final override. [$CL_CONFIG]", + }, + cli.StringFlag{ + Name: "secrets, s", + Usage: "TOML configuration file for secrets. Must be set if and only if config is set.", + }, + }, + Usage: "Run the Chainlink node", + Before: func(c *cli.Context) error { + return client.setConfigFromFlags(opts, c) }, - Usage: "Run the Chainlink node", Action: client.RunNode, }, { diff --git a/core/cmd/remote_client.go b/core/cmd/remote_client.go index a4b631e1804..d313fe99d08 100644 --- a/core/cmd/remote_client.go +++ b/core/cmd/remote_client.go @@ -26,6 +26,7 @@ import ( "github.com/smartcontractkit/chainlink/core/bridges" "github.com/smartcontractkit/chainlink/core/logger" + "github.com/smartcontractkit/chainlink/core/services/chainlink" "github.com/smartcontractkit/chainlink/core/sessions" "github.com/smartcontractkit/chainlink/core/static" "github.com/smartcontractkit/chainlink/core/store/models" @@ -34,7 +35,7 @@ import ( webpresenters "github.com/smartcontractkit/chainlink/core/web/presenters" ) -func initRemoteConfigSubCmds(client *Client) []cli.Command { +func initRemoteConfigSubCmds(client *Client, opts *chainlink.GeneralConfigOpts) []cli.Command { return []cli.Command{ { Name: "show", @@ -77,6 +78,18 @@ func initRemoteConfigSubCmds(client *Client) []cli.Command { Name: "validate", Usage: "Validate provided TOML config file, and print the full effective configuration, with defaults included", Action: client.ConfigFileValidate, + Flags: []cli.Flag{cli.StringSliceFlag{ + Name: "config, c", + Usage: "TOML configuration file(s) via flag, or raw TOML via env var. If used, legacy env vars must not be set. Multiple files can be used (-c configA.toml -c configB.toml), and they are applied in order with duplicated fields overriding any earlier values. If the 'CL_CONFIG' env var is specified, it is always processed last with the effect of being the final override. [$CL_CONFIG]", + }, + cli.StringFlag{ + Name: "secrets, s", + Usage: "TOML configuration file for secrets. Must be set if and only if config is set.", + }, + }, + Before: func(c *cli.Context) error { + return client.setConfigFromFlags(opts, c) + }, }, } } @@ -84,6 +97,7 @@ func initRemoteConfigSubCmds(client *Client) []cli.Command { var ( errUnauthorized = errors.New(http.StatusText(http.StatusUnauthorized)) errForbidden = errors.New(http.StatusText(http.StatusForbidden)) + errBadRequest = errors.New(http.StatusText(http.StatusBadRequest)) ) // CreateExternalInitiator adds an external initiator @@ -251,10 +265,6 @@ func (cli *Client) Profile(c *clipkg.Context) error { seconds := c.Uint("seconds") baseDir := c.String("output_dir") - if seconds >= uint(cli.Config.HTTPServerWriteTimeout().Seconds()) { - return cli.errorOut(errors.New("profile duration should be less than server write timeout")) - } - genDir := filepath.Join(baseDir, fmt.Sprintf("debuginfo-%s", time.Now().Format(time.RFC3339))) err := os.Mkdir(genDir, 0o755) @@ -284,18 +294,43 @@ func (cli *Client) Profile(c *clipkg.Context) error { uri := fmt.Sprintf("/v2/debug/pprof/%s?seconds=%d", vt, seconds) resp, err := cli.HTTP.Get(uri) if err != nil { - errs <- errors.Wrapf(err, "error collecting %s", vt) + errs <- fmt.Errorf("error collecting %s: %w", vt, err) return } + defer func() { + if resp.Body != nil { + resp.Body.Close() + } + }() if resp.StatusCode == http.StatusUnauthorized { - errs <- errors.Wrapf(errUnauthorized, "error collecting %s", vt) + errs <- fmt.Errorf("error collecting %s: %w", vt, errUnauthorized) + return + } + if resp.StatusCode == http.StatusBadRequest { + // best effort to interpret the underlying problem + pprofVersion := resp.Header.Get("X-Go-Pprof") + if pprofVersion == "1" { + b, err := io.ReadAll(resp.Body) + if err != nil { + errs <- fmt.Errorf("error collecting %s: %w", vt, errBadRequest) + return + } + respContent := string(b) + // taken from pprof.Profile https://github.com/golang/go/blob/release-branch.go1.20/src/net/http/pprof/pprof.go#L133 + if strings.Contains(respContent, "profile duration exceeds server's WriteTimeout") { + errs <- fmt.Errorf("%w: %s", ErrProfileTooLong, respContent) + } else { + errs <- fmt.Errorf("error collecting %s: %w: %s", vt, errBadRequest, respContent) + } + } else { + errs <- fmt.Errorf("error collecting %s: %w", vt, errBadRequest) + } return } - defer resp.Body.Close() // write to file f, err := os.Create(filepath.Join(genDir, vt)) if err != nil { - errs <- errors.Wrapf(err, "error creating file for %s", vt) + errs <- fmt.Errorf("error creating file for %s: %w", vt, err) return } wc := utils.NewDeferableWriteCloser(f) @@ -303,12 +338,12 @@ func (cli *Client) Profile(c *clipkg.Context) error { _, err = io.Copy(wc, resp.Body) if err != nil { - errs <- errors.Wrapf(err, "error writing to file for %s", vt) + errs <- fmt.Errorf("error writing to file for %s: %w", vt, err) return } err = wc.Close() if err != nil { - errs <- errors.Wrapf(err, "error closing file for %s", vt) + errs <- fmt.Errorf("error closing file for %s: %w", vt, err) return } }(vt) diff --git a/core/cmd/remote_client_test.go b/core/cmd/remote_client_test.go index 1c6b0b41bf2..4c2068ad20f 100644 --- a/core/cmd/remote_client_test.go +++ b/core/cmd/remote_client_test.go @@ -470,11 +470,15 @@ func TestClient_Profile_InvalidSecondsParam(t *testing.T) { err := client.RemoteLogin(c) require.NoError(t, err) - set.Uint("seconds", 10, "") - + // pick a value larger than the default http service write timeout + d := app.Config.HTTPServerWriteTimeout() + 2*time.Second + set.Uint("seconds", uint(d.Seconds()), "") + tDir := t.TempDir() + set.String("output_dir", tDir, "") err = client.Profile(cli.NewContext(nil, set, nil)) - require.Error(t, err) - assert.Contains(t, err.Error(), "profile duration should be less than server write timeout") + wantErr := cmd.ErrProfileTooLong + require.ErrorAs(t, err, &wantErr) + } func TestClient_Profile(t *testing.T) { @@ -497,10 +501,17 @@ func TestClient_Profile(t *testing.T) { require.NoError(t, err) set.Uint("seconds", 1, "") - set.String("output_dir", t.TempDir(), "") + tDir := t.TempDir() + set.String("output_dir", tDir, "") + // we don't care about the cli behavior, i.e. the before func, + // so call the client func directly err = client.Profile(cli.NewContext(nil, set, nil)) require.NoError(t, err) + + ents, err := os.ReadDir(tDir) + require.NoError(t, err) + require.Greater(t, len(ents), 0, "ents %+v", ents) } func TestClient_Profile_Unauthenticated(t *testing.T) { diff --git a/core/internal/cltest/cltest.go b/core/internal/cltest/cltest.go index 190d96e1faa..559951a26d9 100644 --- a/core/internal/cltest/cltest.go +++ b/core/internal/cltest/cltest.go @@ -488,7 +488,11 @@ func NewApplicationWithConfig(t testing.TB, cfg chainlink.GeneralConfig, flagsAn ChainlinkApplication: app, Logger: lggr, } - ta.Server = httptest.NewServer(web.Router(t, app, nil)) + + srvr := httptest.NewUnstartedServer(web.Router(t, app, nil)) + srvr.Config.WriteTimeout = cfg.HTTPServerWriteTimeout() + srvr.Start() + ta.Server = srvr if !useRealExternalInitiatorManager { app.ExternalInitiatorManager = externalInitiatorManager diff --git a/core/main_test.go b/core/main_test.go index 5d43c2824b2..3a68a922942 100644 --- a/core/main_test.go +++ b/core/main_test.go @@ -76,8 +76,6 @@ func ExampleRun() { // --admin-credentials-file FILE optional, applies only in client mode when making remote API calls. If provided, FILE containing admin credentials will be used for logging in, allowing to avoid an additional login step. If `FILE` is missing, it will be ignored. Defaults to /apicredentials // --remote-node-url URL optional, applies only in client mode when making remote API calls. If provided, URL will be used as the remote Chainlink API endpoint (default: "http://localhost:6688") // --insecure-skip-verify optional, applies only in client mode when making remote API calls. If turned on, SSL certificate verification will be disabled. This is mostly useful for people who want to use Chainlink with a self-signed TLS certificate - // --config value, -c value TOML configuration file(s) via flag, or raw TOML via env var. If used, legacy env vars must not be set. Multiple files can be used (-c configA.toml -c configB.toml), and they are applied in order with duplicated fields overriding any earlier values. If the 'CL_CONFIG' env var is specified, it is always processed last with the effect of being the final override. [$CL_CONFIG] - // --secrets value, -s value TOML configuration file for secrets. Must be set if and only if config is set. // --help, -h show help // --version, -v print the version // core.test version 0.0.0@exampleSHA @@ -451,6 +449,8 @@ func ExampleRun_node_start() { // --debug, -d set logger level to debug // --password value, -p value text file holding the password for the node's account // --vrfpassword value, --vp value text file holding the password for the vrf keys; enables Chainlink VRF oracle + // --config value, -c value TOML configuration file(s) via flag, or raw TOML via env var. If used, legacy env vars must not be set. Multiple files can be used (-c configA.toml -c configB.toml), and they are applied in order with duplicated fields overriding any earlier values. If the 'CL_CONFIG' env var is specified, it is always processed last with the effect of being the final override. [$CL_CONFIG] + // --secrets value, -s value TOML configuration file for secrets. Must be set if and only if config is set. } func ExampleRun_node_db() { diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 99ae612121c..95a3cba48f2 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -8,7 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [dev] +### Changed + +- TOML configuration and secrets are now scoped to `chainlink node start` command rather than being global flags + ### Removed + - Configuration with legacy environment variables is no longer supported. TOML is required. ## 1.13.0 - UNRELEASED From 22d682feba469237c19b8e80be37bd491cf9fc25 Mon Sep 17 00:00:00 2001 From: Prashant Yadav <34992934+prashantkumar1982@users.noreply.github.com> Date: Fri, 17 Mar 2023 15:48:56 -0700 Subject: [PATCH 06/25] Introduce a chain agnostic Head interface in the core Transaction Manager (#8674) Co-authored-by: Jordan Krage --- common/txmgr/types/fee_estimator.go | 4 +- common/txmgr/types/head.go | 28 ++++ common/txmgr/types/head_trackable.go | 12 ++ common/txmgr/types/mocks/fee_estimator.go | 20 +-- common/txmgr/types/mocks/head.go | 122 ++++++++++++++++++ .../txmgr/types}/mocks/head_trackable.go | 11 +- core/chains/evm/chain.go | 12 +- core/chains/evm/evm_txm.go | 34 +++++ .../chains/evm/gas/block_history_estimator.go | 2 +- core/chains/evm/gas/l2_suggested_estimator.go | 2 +- core/chains/evm/gas/mocks/evm_estimator.go | 6 +- core/chains/evm/gas/models.go | 3 +- core/chains/evm/gas/models_test.go | 8 +- .../evm/headtracker/head_tracker_test.go | 21 +-- .../evm/headtracker/mocks/head_broadcaster.go | 11 +- core/chains/evm/headtracker/types/types.go | 7 +- core/chains/evm/txmgr/eth_broadcaster_test.go | 6 +- core/chains/evm/txmgr/eth_confirmer.go | 47 ++++--- core/chains/evm/txmgr/eth_confirmer_test.go | 6 +- core/chains/evm/txmgr/txmgr.go | 13 +- core/chains/evm/types/models.go | 25 +++- core/chains/evm/types/models_test.go | 2 +- core/internal/cltest/cltest.go | 8 +- 23 files changed, 313 insertions(+), 97 deletions(-) create mode 100644 common/txmgr/types/head.go create mode 100644 common/txmgr/types/head_trackable.go create mode 100644 common/txmgr/types/mocks/head.go rename {core/chains/evm/headtracker => common/txmgr/types}/mocks/head_trackable.go (68%) create mode 100644 core/chains/evm/evm_txm.go diff --git a/common/txmgr/types/fee_estimator.go b/common/txmgr/types/fee_estimator.go index c9f2b66872e..956690d4c11 100644 --- a/common/txmgr/types/fee_estimator.go +++ b/common/txmgr/types/fee_estimator.go @@ -22,8 +22,8 @@ type PriorAttempt[FEE any, HASH any] interface { // FeeEstimator provides a generic interface for fee estimation // //go:generate mockery --quiet --name FeeEstimator --output ./mocks/ --case=underscore -type FeeEstimator[HEAD any, FEE any, MAXPRICE any, HASH any] interface { - OnNewLongestChain(context.Context, HEAD) +type FeeEstimator[H Head, FEE any, MAXPRICE any, HASH any] interface { + HeadTrackable[H] Start(context.Context) error Close() error diff --git a/common/txmgr/types/head.go b/common/txmgr/types/head.go new file mode 100644 index 00000000000..9a9c7c08c22 --- /dev/null +++ b/common/txmgr/types/head.go @@ -0,0 +1,28 @@ +package types + +import "github.com/ethereum/go-ethereum/common" + +// Head provides access to a chain's head, as needed by the TxManager. +// This is a generic interface which ALL chains will implement. +// +//go:generate mockery --quiet --name Head --output ./mocks/ --case=underscore +type Head interface { + // BlockNumber is the head's block number + BlockNumber() int64 + + // ChainLength returns the length of the chain followed by recursively looking up parents + ChainLength() uint32 + + // EarliestInChain traverses through parents until it finds the earliest one + EarliestHeadInChain() Head + + // Hash is the head's block hash + BlockHash() common.Hash + + // Parent is the head's parent block + GetParent() Head + + // HashAtHeight returns the hash of the block at the given height, if it is in the chain. + // If not in chain, returns the zero hash + HashAtHeight(blockNum int64) common.Hash +} diff --git a/common/txmgr/types/head_trackable.go b/common/txmgr/types/head_trackable.go new file mode 100644 index 00000000000..b2846ef949d --- /dev/null +++ b/common/txmgr/types/head_trackable.go @@ -0,0 +1,12 @@ +package types + +import "context" + +// HeadTrackable is implemented by the core txm, +// to be able to receive head events from any chain. +// Chain implementations should notify head events to the core txm via this interface. +// +//go:generate mockery --quiet --name HeadTrackable --output ./mocks/ --case=underscore +type HeadTrackable[H Head] interface { + OnNewLongestChain(ctx context.Context, head H) +} diff --git a/common/txmgr/types/mocks/fee_estimator.go b/common/txmgr/types/mocks/fee_estimator.go index 1b37563fe1d..ad1da298b84 100644 --- a/common/txmgr/types/mocks/fee_estimator.go +++ b/common/txmgr/types/mocks/fee_estimator.go @@ -10,12 +10,12 @@ import ( ) // FeeEstimator is an autogenerated mock type for the FeeEstimator type -type FeeEstimator[HEAD interface{}, FEE interface{}, MAXPRICE interface{}, HASH interface{}] struct { +type FeeEstimator[H types.Head, FEE interface{}, MAXPRICE interface{}, HASH interface{}] struct { mock.Mock } // BumpFee provides a mock function with given fields: ctx, originalFee, feeLimit, maxFeePrice, attempts -func (_m *FeeEstimator[HEAD, FEE, MAXPRICE, HASH]) BumpFee(ctx context.Context, originalFee FEE, feeLimit uint32, maxFeePrice MAXPRICE, attempts []types.PriorAttempt[FEE, HASH]) (FEE, uint32, error) { +func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) BumpFee(ctx context.Context, originalFee FEE, feeLimit uint32, maxFeePrice MAXPRICE, attempts []types.PriorAttempt[FEE, HASH]) (FEE, uint32, error) { ret := _m.Called(ctx, originalFee, feeLimit, maxFeePrice, attempts) var r0 FEE @@ -46,7 +46,7 @@ func (_m *FeeEstimator[HEAD, FEE, MAXPRICE, HASH]) BumpFee(ctx context.Context, } // Close provides a mock function with given fields: -func (_m *FeeEstimator[HEAD, FEE, MAXPRICE, HASH]) Close() error { +func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) Close() error { ret := _m.Called() var r0 error @@ -60,7 +60,7 @@ func (_m *FeeEstimator[HEAD, FEE, MAXPRICE, HASH]) Close() error { } // GetFee provides a mock function with given fields: ctx, calldata, feeLimit, maxFeePrice, opts -func (_m *FeeEstimator[HEAD, FEE, MAXPRICE, HASH]) GetFee(ctx context.Context, calldata []byte, feeLimit uint32, maxFeePrice MAXPRICE, opts ...types.Opt) (FEE, uint32, error) { +func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) GetFee(ctx context.Context, calldata []byte, feeLimit uint32, maxFeePrice MAXPRICE, opts ...types.Opt) (FEE, uint32, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -97,13 +97,13 @@ func (_m *FeeEstimator[HEAD, FEE, MAXPRICE, HASH]) GetFee(ctx context.Context, c return r0, r1, r2 } -// OnNewLongestChain provides a mock function with given fields: _a0, _a1 -func (_m *FeeEstimator[HEAD, FEE, MAXPRICE, HASH]) OnNewLongestChain(_a0 context.Context, _a1 HEAD) { - _m.Called(_a0, _a1) +// OnNewLongestChain provides a mock function with given fields: ctx, head +func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) OnNewLongestChain(ctx context.Context, head H) { + _m.Called(ctx, head) } // Start provides a mock function with given fields: _a0 -func (_m *FeeEstimator[HEAD, FEE, MAXPRICE, HASH]) Start(_a0 context.Context) error { +func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) Start(_a0 context.Context) error { ret := _m.Called(_a0) var r0 error @@ -122,8 +122,8 @@ type mockConstructorTestingTNewFeeEstimator interface { } // NewFeeEstimator creates a new instance of FeeEstimator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewFeeEstimator[HEAD interface{}, FEE interface{}, MAXPRICE interface{}, HASH interface{}](t mockConstructorTestingTNewFeeEstimator) *FeeEstimator[HEAD, FEE, MAXPRICE, HASH] { - mock := &FeeEstimator[HEAD, FEE, MAXPRICE, HASH]{} +func NewFeeEstimator[H types.Head, FEE interface{}, MAXPRICE interface{}, HASH interface{}](t mockConstructorTestingTNewFeeEstimator) *FeeEstimator[H, FEE, MAXPRICE, HASH] { + mock := &FeeEstimator[H, FEE, MAXPRICE, HASH]{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/common/txmgr/types/mocks/head.go b/common/txmgr/types/mocks/head.go new file mode 100644 index 00000000000..441584c3d2b --- /dev/null +++ b/common/txmgr/types/mocks/head.go @@ -0,0 +1,122 @@ +// Code generated by mockery v2.22.1. DO NOT EDIT. + +package mocks + +import ( + common "github.com/ethereum/go-ethereum/common" + mock "github.com/stretchr/testify/mock" + + types "github.com/smartcontractkit/chainlink/common/txmgr/types" +) + +// Head is an autogenerated mock type for the Head type +type Head struct { + mock.Mock +} + +// BlockHash provides a mock function with given fields: +func (_m *Head) BlockHash() common.Hash { + ret := _m.Called() + + var r0 common.Hash + if rf, ok := ret.Get(0).(func() common.Hash); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Hash) + } + } + + return r0 +} + +// BlockNumber provides a mock function with given fields: +func (_m *Head) BlockNumber() int64 { + ret := _m.Called() + + var r0 int64 + if rf, ok := ret.Get(0).(func() int64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int64) + } + + return r0 +} + +// ChainLength provides a mock function with given fields: +func (_m *Head) ChainLength() uint32 { + ret := _m.Called() + + var r0 uint32 + if rf, ok := ret.Get(0).(func() uint32); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint32) + } + + return r0 +} + +// EarliestHeadInChain provides a mock function with given fields: +func (_m *Head) EarliestHeadInChain() types.Head { + ret := _m.Called() + + var r0 types.Head + if rf, ok := ret.Get(0).(func() types.Head); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.Head) + } + } + + return r0 +} + +// GetParent provides a mock function with given fields: +func (_m *Head) GetParent() types.Head { + ret := _m.Called() + + var r0 types.Head + if rf, ok := ret.Get(0).(func() types.Head); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.Head) + } + } + + return r0 +} + +// HashAtHeight provides a mock function with given fields: blockNum +func (_m *Head) HashAtHeight(blockNum int64) common.Hash { + ret := _m.Called(blockNum) + + var r0 common.Hash + if rf, ok := ret.Get(0).(func(int64) common.Hash); ok { + r0 = rf(blockNum) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Hash) + } + } + + return r0 +} + +type mockConstructorTestingTNewHead interface { + mock.TestingT + Cleanup(func()) +} + +// NewHead creates a new instance of Head. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewHead(t mockConstructorTestingTNewHead) *Head { + mock := &Head{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/chains/evm/headtracker/mocks/head_trackable.go b/common/txmgr/types/mocks/head_trackable.go similarity index 68% rename from core/chains/evm/headtracker/mocks/head_trackable.go rename to common/txmgr/types/mocks/head_trackable.go index 09c01bf8b1f..d2282bc1187 100644 --- a/core/chains/evm/headtracker/mocks/head_trackable.go +++ b/common/txmgr/types/mocks/head_trackable.go @@ -5,18 +5,17 @@ package mocks import ( context "context" + types "github.com/smartcontractkit/chainlink/common/txmgr/types" mock "github.com/stretchr/testify/mock" - - types "github.com/smartcontractkit/chainlink/core/chains/evm/types" ) // HeadTrackable is an autogenerated mock type for the HeadTrackable type -type HeadTrackable struct { +type HeadTrackable[H types.Head] struct { mock.Mock } // OnNewLongestChain provides a mock function with given fields: ctx, head -func (_m *HeadTrackable) OnNewLongestChain(ctx context.Context, head *types.Head) { +func (_m *HeadTrackable[H]) OnNewLongestChain(ctx context.Context, head H) { _m.Called(ctx, head) } @@ -26,8 +25,8 @@ type mockConstructorTestingTNewHeadTrackable interface { } // NewHeadTrackable creates a new instance of HeadTrackable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewHeadTrackable(t mockConstructorTestingTNewHeadTrackable) *HeadTrackable { - mock := &HeadTrackable{} +func NewHeadTrackable[H types.Head](t mockConstructorTestingTNewHeadTrackable) *HeadTrackable[H] { + mock := &HeadTrackable[H]{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/core/chains/evm/chain.go b/core/chains/evm/chain.go index 4e09cb57fff..69466ddbba5 100644 --- a/core/chains/evm/chain.go +++ b/core/chains/evm/chain.go @@ -115,15 +115,7 @@ func newChain(ctx context.Context, cfg evmconfig.ChainScopedConfig, nodes []*v2. } } - var txm txmgr.TxManager - if !cfg.EVMRPCEnabled() { - txm = &txmgr.NullTxManager{ErrMsg: fmt.Sprintf("Ethereum is disabled for chain %d", chainID)} - } else if opts.GenTxManager == nil { - checker := &txmgr.CheckerFactory{Client: client} - txm = txmgr.NewTxm(db, client, cfg, opts.KeyStore, opts.EventBroadcaster, l, checker, logPoller) - } else { - txm = opts.GenTxManager(chainID) - } + txm := newEvmTxm(db, cfg, client, l, logPoller, opts) headBroadcaster.Subscribe(txm) @@ -213,7 +205,7 @@ func (c *chain) Close() error { merr = multierr.Combine(merr, c.headTracker.Close()) c.logger.Debug("Chain: stopping headBroadcaster") merr = multierr.Combine(merr, c.headBroadcaster.Close()) - c.logger.Debug("Chain: stopping txm") + c.logger.Debug("Chain: stopping evmTxm") merr = multierr.Combine(merr, c.txm.Close()) c.logger.Debug("Chain: stopping client") c.client.Close() diff --git a/core/chains/evm/evm_txm.go b/core/chains/evm/evm_txm.go new file mode 100644 index 00000000000..1aa8a54056e --- /dev/null +++ b/core/chains/evm/evm_txm.go @@ -0,0 +1,34 @@ +package evm + +import ( + "fmt" + + "github.com/smartcontractkit/sqlx" + + evmclient "github.com/smartcontractkit/chainlink/core/chains/evm/client" + evmconfig "github.com/smartcontractkit/chainlink/core/chains/evm/config" + "github.com/smartcontractkit/chainlink/core/chains/evm/logpoller" + "github.com/smartcontractkit/chainlink/core/chains/evm/txmgr" + "github.com/smartcontractkit/chainlink/core/logger" +) + +func newEvmTxm( + db *sqlx.DB, + cfg evmconfig.ChainScopedConfig, + client evmclient.Client, + lggr logger.Logger, + logPoller logpoller.LogPoller, + opts ChainSetOpts, +) txmgr.TxManager { + chainID := cfg.ChainID() + var txm txmgr.TxManager + if !cfg.EVMRPCEnabled() { + txm = &txmgr.NullTxManager{ErrMsg: fmt.Sprintf("Ethereum is disabled for chain %d", chainID)} + } else if opts.GenTxManager == nil { + checker := &txmgr.CheckerFactory{Client: client} + txm = txmgr.NewTxm(db, client, cfg, opts.KeyStore, opts.EventBroadcaster, lggr, checker, logPoller) + } else { + txm = opts.GenTxManager(chainID) + } + return txm +} diff --git a/core/chains/evm/gas/block_history_estimator.go b/core/chains/evm/gas/block_history_estimator.go index 5d49c0064f1..f2d2496091e 100644 --- a/core/chains/evm/gas/block_history_estimator.go +++ b/core/chains/evm/gas/block_history_estimator.go @@ -581,7 +581,7 @@ func (b *BlockHistoryEstimator) FetchBlocks(ctx context.Context, head *evmtypes. // chain, refetch blocks that got re-org'd out. // NOTE: Any blocks in the history that are older than the oldest block // in the provided chain will be assumed final. - if block.Number < head.EarliestInChain().Number { + if block.Number < head.EarliestInChain().BlockNumber() { blocks[block.Number] = block } else if head.IsInChain(block.Hash) { blocks[block.Number] = block diff --git a/core/chains/evm/gas/l2_suggested_estimator.go b/core/chains/evm/gas/l2_suggested_estimator.go index e40d5e22f10..1a50eb45527 100644 --- a/core/chains/evm/gas/l2_suggested_estimator.go +++ b/core/chains/evm/gas/l2_suggested_estimator.go @@ -112,7 +112,7 @@ func (o *l2SuggestedPriceEstimator) refreshPrice() (t *time.Timer) { return } -func (o *l2SuggestedPriceEstimator) OnNewLongestChain(_ context.Context, _ *evmtypes.Head) {} +func (o *l2SuggestedPriceEstimator) OnNewLongestChain(context.Context, *evmtypes.Head) {} func (*l2SuggestedPriceEstimator) GetDynamicFee(_ context.Context, _ uint32, _ *assets.Wei) (fee DynamicFee, chainSpecificGasLimit uint32, err error) { err = errors.New("dynamic fees are not implemented for this layer 2") diff --git a/core/chains/evm/gas/mocks/evm_estimator.go b/core/chains/evm/gas/mocks/evm_estimator.go index 36557fdd65a..5bdb39a91ed 100644 --- a/core/chains/evm/gas/mocks/evm_estimator.go +++ b/core/chains/evm/gas/mocks/evm_estimator.go @@ -170,9 +170,9 @@ func (_m *EvmEstimator) GetLegacyGas(ctx context.Context, calldata []byte, gasLi return r0, r1, r2 } -// OnNewLongestChain provides a mock function with given fields: _a0, _a1 -func (_m *EvmEstimator) OnNewLongestChain(_a0 context.Context, _a1 *evmtypes.Head) { - _m.Called(_a0, _a1) +// OnNewLongestChain provides a mock function with given fields: ctx, head +func (_m *EvmEstimator) OnNewLongestChain(ctx context.Context, head *evmtypes.Head) { + _m.Called(ctx, head) } // Start provides a mock function with given fields: _a0 diff --git a/core/chains/evm/gas/models.go b/core/chains/evm/gas/models.go index d617bdb1a55..a8f81bc3aa1 100644 --- a/core/chains/evm/gas/models.go +++ b/core/chains/evm/gas/models.go @@ -111,7 +111,7 @@ func MakeEvmPriorAttempt(a txmgrtypes.PriorAttempt[EvmFee, common.Hash]) EvmPrio // //go:generate mockery --quiet --name EvmEstimator --output ./mocks/ --case=underscore type EvmEstimator interface { - OnNewLongestChain(context.Context, *evmtypes.Head) + txmgrtypes.HeadTrackable[*evmtypes.Head] Start(context.Context) error Close() error // GetLegacyGas Calculates initial gas fee for non-EIP1559 transaction @@ -145,7 +145,6 @@ type WrappedEvmEstimator struct { EIP1559Enabled bool } -// var _ FeeEstimator = (*WrappedEvmEstimator)(nil) var _ txmgrtypes.FeeEstimator[*evmtypes.Head, EvmFee, *assets.Wei, common.Hash] = (*WrappedEvmEstimator)(nil) func NewWrappedEvmEstimator(e EvmEstimator, cfg Config) txmgrtypes.FeeEstimator[*evmtypes.Head, EvmFee, *assets.Wei, common.Hash] { diff --git a/core/chains/evm/gas/models_test.go b/core/chains/evm/gas/models_test.go index 0b2df7e4051..8e51ba3a73d 100644 --- a/core/chains/evm/gas/models_test.go +++ b/core/chains/evm/gas/models_test.go @@ -4,13 +4,13 @@ import ( "context" "testing" - "github.com/smartcontractkit/chainlink/core/assets" - "github.com/smartcontractkit/chainlink/core/chains/evm/gas" - "github.com/smartcontractkit/chainlink/core/chains/evm/gas/mocks" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/core/assets" + "github.com/smartcontractkit/chainlink/core/chains/evm/gas" + "github.com/smartcontractkit/chainlink/core/chains/evm/gas/mocks" ) func TestWrappedEvmEstimator(t *testing.T) { diff --git a/core/chains/evm/headtracker/head_tracker_test.go b/core/chains/evm/headtracker/head_tracker_test.go index 0363f26d5ab..a31d4ff7cfd 100644 --- a/core/chains/evm/headtracker/head_tracker_test.go +++ b/core/chains/evm/headtracker/head_tracker_test.go @@ -8,12 +8,13 @@ import ( "testing" "time" + "golang.org/x/exp/maps" + "golang.org/x/exp/slices" + "github.com/smartcontractkit/chainlink/core/internal/testutils" configtest "github.com/smartcontractkit/chainlink/core/internal/testutils/configtest/v2" "github.com/smartcontractkit/chainlink/core/services/chainlink" "github.com/smartcontractkit/chainlink/core/store/models" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" "github.com/ethereum/go-ethereum" gethCommon "github.com/ethereum/go-ethereum/common" @@ -24,9 +25,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + txmmocks "github.com/smartcontractkit/chainlink/common/txmgr/types/mocks" evmclient "github.com/smartcontractkit/chainlink/core/chains/evm/client" "github.com/smartcontractkit/chainlink/core/chains/evm/headtracker" - htmocks "github.com/smartcontractkit/chainlink/core/chains/evm/headtracker/mocks" httypes "github.com/smartcontractkit/chainlink/core/chains/evm/headtracker/types" evmtypes "github.com/smartcontractkit/chainlink/core/chains/evm/types" "github.com/smartcontractkit/chainlink/core/internal/cltest" @@ -424,7 +425,7 @@ func TestHeadTracker_SwitchesToLongestChainWithHeadSamplingEnabled(t *testing.T) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - checker := htmocks.NewHeadTrackable(t) + checker := txmmocks.NewHeadTrackable[*evmtypes.Head](t) orm := headtracker.NewORM(db, logger, config, *config.DefaultChainID()) ht := createHeadTrackerWithChecker(t, ethClient, evmtest.NewChainScopedConfig(t, config), orm, checker) @@ -555,7 +556,7 @@ func TestHeadTracker_SwitchesToLongestChainWithHeadSamplingDisabled(t *testing.T ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - checker := htmocks.NewHeadTrackable(t) + checker := txmmocks.NewHeadTrackable[*evmtypes.Head](t) orm := headtracker.NewORM(db, logger, config, cltest.FixtureChainID) evmcfg := evmtest.NewChainScopedConfig(t, config) ht := createHeadTrackerWithChecker(t, ethClient, evmcfg, orm, checker) @@ -855,8 +856,8 @@ func TestHeadTracker_Backfill(t *testing.T) { require.Equal(t, uint32(8), h.ChainLength()) earliestInChain := h.EarliestInChain() - assert.Equal(t, head8.Number, earliestInChain.Number) - assert.Equal(t, head8.Hash, earliestInChain.Hash) + assert.Equal(t, head8.Number, earliestInChain.BlockNumber()) + assert.Equal(t, head8.Hash, earliestInChain.BlockHash()) }) t.Run("does not backfill if chain length is already greater than or equal to depth", func(t *testing.T) { @@ -902,7 +903,7 @@ func TestHeadTracker_Backfill(t *testing.T) { require.NotNil(t, h) require.Equal(t, uint32(2), h.ChainLength()) - require.Equal(t, int64(0), h.EarliestInChain().Number) + require.Equal(t, int64(0), h.EarliestInChain().BlockNumber()) }) t.Run("abandons backfill and returns error if the eth node returns not found", func(t *testing.T) { @@ -933,7 +934,7 @@ func TestHeadTracker_Backfill(t *testing.T) { // Should contain 12, 11, 10, 9 assert.Equal(t, 4, int(h.ChainLength())) - assert.Equal(t, int64(9), h.EarliestInChain().Number) + assert.Equal(t, int64(9), h.EarliestInChain().BlockNumber()) }) t.Run("abandons backfill and returns error if the context time budget is exceeded", func(t *testing.T) { @@ -962,7 +963,7 @@ func TestHeadTracker_Backfill(t *testing.T) { // Should contain 12, 11, 10, 9 assert.Equal(t, 4, int(h.ChainLength())) - assert.Equal(t, int64(9), h.EarliestInChain().Number) + assert.Equal(t, int64(9), h.EarliestInChain().BlockNumber()) }) } diff --git a/core/chains/evm/headtracker/mocks/head_broadcaster.go b/core/chains/evm/headtracker/mocks/head_broadcaster.go index 6c0f9f3fce7..8505fda58b7 100644 --- a/core/chains/evm/headtracker/mocks/head_broadcaster.go +++ b/core/chains/evm/headtracker/mocks/head_broadcaster.go @@ -5,9 +5,10 @@ package mocks import ( context "context" - headtrackertypes "github.com/smartcontractkit/chainlink/core/chains/evm/headtracker/types" mock "github.com/stretchr/testify/mock" + txmgrtypes "github.com/smartcontractkit/chainlink/common/txmgr/types" + types "github.com/smartcontractkit/chainlink/core/chains/evm/types" ) @@ -94,15 +95,15 @@ func (_m *HeadBroadcaster) Start(_a0 context.Context) error { } // Subscribe provides a mock function with given fields: callback -func (_m *HeadBroadcaster) Subscribe(callback headtrackertypes.HeadTrackable) (*types.Head, func()) { +func (_m *HeadBroadcaster) Subscribe(callback txmgrtypes.HeadTrackable[*types.Head]) (*types.Head, func()) { ret := _m.Called(callback) var r0 *types.Head var r1 func() - if rf, ok := ret.Get(0).(func(headtrackertypes.HeadTrackable) (*types.Head, func())); ok { + if rf, ok := ret.Get(0).(func(txmgrtypes.HeadTrackable[*types.Head]) (*types.Head, func())); ok { return rf(callback) } - if rf, ok := ret.Get(0).(func(headtrackertypes.HeadTrackable) *types.Head); ok { + if rf, ok := ret.Get(0).(func(txmgrtypes.HeadTrackable[*types.Head]) *types.Head); ok { r0 = rf(callback) } else { if ret.Get(0) != nil { @@ -110,7 +111,7 @@ func (_m *HeadBroadcaster) Subscribe(callback headtrackertypes.HeadTrackable) (* } } - if rf, ok := ret.Get(1).(func(headtrackertypes.HeadTrackable) func()); ok { + if rf, ok := ret.Get(1).(func(txmgrtypes.HeadTrackable[*types.Head]) func()); ok { r1 = rf(callback) } else { if ret.Get(1) != nil { diff --git a/core/chains/evm/headtracker/types/types.go b/core/chains/evm/headtracker/types/types.go index a392e045981..1485e0113be 100644 --- a/core/chains/evm/headtracker/types/types.go +++ b/core/chains/evm/headtracker/types/types.go @@ -5,6 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/chainlink/common/txmgr/types" evmtypes "github.com/smartcontractkit/chainlink/core/chains/evm/types" "github.com/smartcontractkit/chainlink/core/services" ) @@ -38,11 +39,7 @@ type HeadTracker interface { // HeadTrackable represents any object that wishes to respond to ethereum events, // after being subscribed to HeadBroadcaster -// -//go:generate mockery --quiet --name HeadTrackable --output ../mocks/ --case=underscore -type HeadTrackable interface { - OnNewLongestChain(ctx context.Context, head *evmtypes.Head) -} +type HeadTrackable = types.HeadTrackable[*evmtypes.Head] type HeadBroadcasterRegistry interface { Subscribe(callback HeadTrackable) (currentLongestChain *evmtypes.Head, unsubscribe func()) diff --git a/core/chains/evm/txmgr/eth_broadcaster_test.go b/core/chains/evm/txmgr/eth_broadcaster_test.go index ea0291eb976..f88dd88b66d 100644 --- a/core/chains/evm/txmgr/eth_broadcaster_test.go +++ b/core/chains/evm/txmgr/eth_broadcaster_test.go @@ -577,7 +577,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_OptimisticLockingOnEthTx(t *testi chStartEstimate := make(chan struct{}) chBlock := make(chan struct{}) - estimator := txmgrmocks.NewFeeEstimator[*evmtypes.Head, gas.EvmFee, *assets.Wei, gethCommon.Hash](t) + var estimator = txmgrmocks.NewFeeEstimator[*evmtypes.Head, gas.EvmFee, *assets.Wei, gethCommon.Hash](t) + estimator.On("GetFee", mock.Anything, mock.Anything, mock.Anything, evmcfg.KeySpecificMaxGasPriceWei(fromAddress)).Return(gas.EvmFee{Legacy: assets.GWei(32)}, uint32(500), nil).Run(func(_ mock.Arguments) { close(chStartEstimate) <-chBlock @@ -1140,8 +1141,9 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { require.NoError(t, err) t.Cleanup(func() { assert.NoError(t, eventBroadcaster.Close()) }) lggr := logger.TestLogger(t) + estimator := gas.NewWrappedEvmEstimator(gas.NewFixedPriceEstimator(evmcfg, lggr), evmcfg) eb = txmgr.NewEthBroadcaster(borm, ethClient, evmcfg, ethKeyStore, eventBroadcaster, - []ethkey.State{keyState}, gas.NewWrappedEvmEstimator(gas.NewFixedPriceEstimator(evmcfg, lggr), evmcfg), fn, lggr, + []ethkey.State{keyState}, estimator, fn, lggr, &testCheckerFactory{}, false) { diff --git a/core/chains/evm/txmgr/eth_confirmer.go b/core/chains/evm/txmgr/eth_confirmer.go index e96360c402f..b53768410f3 100644 --- a/core/chains/evm/txmgr/eth_confirmer.go +++ b/core/chains/evm/txmgr/eth_confirmer.go @@ -217,45 +217,44 @@ func (ec *EthConfirmer) runLoop() { } // ProcessHead takes all required transactions for the confirmer on a new head -func (ec *EthConfirmer) ProcessHead(ctx context.Context, head *evmtypes.Head) error { +func (ec *EthConfirmer) ProcessHead(ctx context.Context, head txmgrtypes.Head) error { ctx, cancel := context.WithTimeout(ctx, processHeadTimeout) defer cancel() - return ec.processHead(ctx, head) } // NOTE: This SHOULD NOT be run concurrently or it could behave badly -func (ec *EthConfirmer) processHead(ctx context.Context, head *evmtypes.Head) error { +func (ec *EthConfirmer) processHead(ctx context.Context, head txmgrtypes.Head) error { mark := time.Now() - ec.lggr.Debugw("processHead start", "headNum", head.Number, "id", "eth_confirmer") + ec.lggr.Debugw("processHead start", "headNum", head.BlockNumber(), "id", "eth_confirmer") - if err := ec.orm.SetBroadcastBeforeBlockNum(head.Number, ec.chainID); err != nil { + if err := ec.orm.SetBroadcastBeforeBlockNum(head.BlockNumber(), ec.chainID); err != nil { return errors.Wrap(err, "SetBroadcastBeforeBlockNum failed") } if err := ec.CheckConfirmedMissingReceipt(ctx); err != nil { return errors.Wrap(err, "CheckConfirmedMissingReceipt failed") } - if err := ec.CheckForReceipts(ctx, head.Number); err != nil { + if err := ec.CheckForReceipts(ctx, head.BlockNumber()); err != nil { return errors.Wrap(err, "CheckForReceipts failed") } - ec.lggr.Debugw("Finished CheckForReceipts", "headNum", head.Number, "time", time.Since(mark), "id", "eth_confirmer") + ec.lggr.Debugw("Finished CheckForReceipts", "headNum", head.BlockNumber(), "time", time.Since(mark), "id", "eth_confirmer") mark = time.Now() - if err := ec.RebroadcastWhereNecessary(ctx, head.Number); err != nil { + if err := ec.RebroadcastWhereNecessary(ctx, head.BlockNumber()); err != nil { return errors.Wrap(err, "RebroadcastWhereNecessary failed") } - ec.lggr.Debugw("Finished RebroadcastWhereNecessary", "headNum", head.Number, "time", time.Since(mark), "id", "eth_confirmer") + ec.lggr.Debugw("Finished RebroadcastWhereNecessary", "headNum", head.BlockNumber(), "time", time.Since(mark), "id", "eth_confirmer") mark = time.Now() if err := ec.EnsureConfirmedTransactionsInLongestChain(ctx, head); err != nil { return errors.Wrap(err, "EnsureConfirmedTransactionsInLongestChain failed") } - ec.lggr.Debugw("Finished EnsureConfirmedTransactionsInLongestChain", "headNum", head.Number, "time", time.Since(mark), "id", "eth_confirmer") + ec.lggr.Debugw("Finished EnsureConfirmedTransactionsInLongestChain", "headNum", head.BlockNumber(), "time", time.Since(mark), "id", "eth_confirmer") if ec.resumeCallback != nil { mark = time.Now() @@ -263,10 +262,10 @@ func (ec *EthConfirmer) processHead(ctx context.Context, head *evmtypes.Head) er return errors.Wrap(err, "ResumePendingTaskRuns failed") } - ec.lggr.Debugw("Finished ResumePendingTaskRuns", "headNum", head.Number, "time", time.Since(mark), "id", "eth_confirmer") + ec.lggr.Debugw("Finished ResumePendingTaskRuns", "headNum", head.BlockNumber(), "time", time.Since(mark), "id", "eth_confirmer") } - ec.lggr.Debugw("processHead finish", "headNum", head.Number, "id", "eth_confirmer") + ec.lggr.Debugw("processHead finish", "headNum", head.BlockNumber(), "id", "eth_confirmer") return nil } @@ -951,7 +950,7 @@ func (ec *EthConfirmer) handleInProgressAttempt(ctx context.Context, lggr logger // // If any of the confirmed transactions does not have a receipt in the chain, it has been // re-org'd out and will be rebroadcast. -func (ec *EthConfirmer) EnsureConfirmedTransactionsInLongestChain(ctx context.Context, head *evmtypes.Head) error { +func (ec *EthConfirmer) EnsureConfirmedTransactionsInLongestChain(ctx context.Context, head txmgrtypes.Head) error { if head.ChainLength() < ec.config.EvmFinalityDepth() { logArgs := []interface{}{ "chainLength", head.ChainLength(), "evmFinalityDepth", ec.config.EvmFinalityDepth(), @@ -967,7 +966,7 @@ func (ec *EthConfirmer) EnsureConfirmedTransactionsInLongestChain(ctx context.Co } else { ec.nConsecutiveBlocksChainTooShort = 0 } - etxs, err := ec.orm.FindTransactionsConfirmedInBlockRange(head.Number, head.EarliestInChain().Number, ec.chainID) + etxs, err := ec.orm.FindTransactionsConfirmedInBlockRange(head.BlockNumber(), head.EarliestHeadInChain().BlockNumber(), ec.chainID) if err != nil { return errors.Wrap(err, "findTransactionsConfirmedInBlockRange failed") } @@ -988,7 +987,7 @@ func (ec *EthConfirmer) EnsureConfirmedTransactionsInLongestChain(ctx context.Co wg.Add(len(ec.keyStates)) for _, key := range ec.keyStates { go func(fromAddress gethCommon.Address) { - if err := ec.handleAnyInProgressAttempts(ctx, fromAddress, head.Number); err != nil { + if err := ec.handleAnyInProgressAttempts(ctx, fromAddress, head.BlockNumber()); err != nil { errMu.Lock() errors = append(errors, err) errMu.Unlock() @@ -1004,23 +1003,23 @@ func (ec *EthConfirmer) EnsureConfirmedTransactionsInLongestChain(ctx context.Co return multierr.Combine(errors...) } -func hasReceiptInLongestChain(etx EthTx, head *evmtypes.Head) bool { +func hasReceiptInLongestChain(etx EthTx, head txmgrtypes.Head) bool { for { for _, attempt := range etx.EthTxAttempts { for _, receipt := range attempt.EthReceipts { - if receipt.BlockHash == head.Hash && receipt.BlockNumber == head.Number { + if receipt.BlockHash == head.BlockHash() && receipt.BlockNumber == head.BlockNumber() { return true } } } - if head.Parent == nil { + if head.GetParent() == nil { return false } - head = head.Parent + head = head.GetParent() } } -func (ec *EthConfirmer) markForRebroadcast(etx EthTx, head *evmtypes.Head) error { +func (ec *EthConfirmer) markForRebroadcast(etx EthTx, head txmgrtypes.Head) error { if len(etx.EthTxAttempts) == 0 { return errors.Errorf("invariant violation: expected eth_tx %v to have at least one attempt", etx.ID) } @@ -1034,8 +1033,8 @@ func (ec *EthConfirmer) markForRebroadcast(etx EthTx, head *evmtypes.Head) error ec.lggr.Infow(fmt.Sprintf("Re-org detected. Rebroadcasting transaction %s which may have been re-org'd out of the main chain", attempt.Hash.Hex()), "txhash", attempt.Hash.Hex(), - "currentBlockNum", head.Number, - "currentBlockHash", head.Hash.Hex(), + "currentBlockNum", head.BlockNumber(), + "currentBlockHash", head.BlockHash().Hex(), "replacementBlockHashAtConfirmedHeight", head.HashAtHeight(receipt.BlockNumber), "confirmedInBlockNum", receipt.BlockNumber, "confirmedInBlockHash", receipt.BlockHash, @@ -1106,9 +1105,9 @@ func (ec *EthConfirmer) sendEmptyTransaction(ctx context.Context, fromAddress ge } // ResumePendingTaskRuns issues callbacks to task runs that are pending waiting for receipts -func (ec *EthConfirmer) ResumePendingTaskRuns(ctx context.Context, head *evmtypes.Head) error { +func (ec *EthConfirmer) ResumePendingTaskRuns(ctx context.Context, head txmgrtypes.Head) error { - receiptsPlus, err := ec.orm.FindEthReceiptsPendingConfirmation(ctx, head.Number, ec.chainID) + receiptsPlus, err := ec.orm.FindEthReceiptsPendingConfirmation(ctx, head.BlockNumber(), ec.chainID) if err != nil { return err diff --git a/core/chains/evm/txmgr/eth_confirmer_test.go b/core/chains/evm/txmgr/eth_confirmer_test.go index 830e4554717..fb746c62c1c 100644 --- a/core/chains/evm/txmgr/eth_confirmer_test.go +++ b/core/chains/evm/txmgr/eth_confirmer_test.go @@ -1561,8 +1561,9 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WithConnectivityCheck(t *testing estimator := gasmocks.NewEvmEstimator(t) estimator.On("BumpLegacyGas", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, uint32(0), pkgerrors.Wrapf(gas.ErrConnectivity, "transaction...")) + feeEstimator := gas.NewWrappedEvmEstimator(estimator, evmcfg) // Create confirmer with necessary state - ec := txmgr.NewEthConfirmer(borm, ethClient, evmcfg, kst, keys, gas.NewWrappedEvmEstimator(estimator, evmcfg), nil, lggr) + ec := txmgr.NewEthConfirmer(borm, ethClient, evmcfg, kst, keys, feeEstimator, nil, lggr) currentHead := int64(30) oldEnough := int64(15) nonce := int64(0) @@ -1601,7 +1602,8 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WithConnectivityCheck(t *testing estimator := gasmocks.NewEvmEstimator(t) estimator.On("BumpDynamicFee", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(gas.DynamicFee{}, uint32(0), pkgerrors.Wrapf(gas.ErrConnectivity, "transaction...")) // Create confirmer with necessary state - ec := txmgr.NewEthConfirmer(borm, ethClient, evmcfg, kst, keys, gas.NewWrappedEvmEstimator(estimator, evmcfg), nil, lggr) + feeEstimator := gas.NewWrappedEvmEstimator(estimator, evmcfg) + ec := txmgr.NewEthConfirmer(borm, ethClient, evmcfg, kst, keys, feeEstimator, nil, lggr) currentHead := int64(30) oldEnough := int64(15) nonce := int64(0) diff --git a/core/chains/evm/txmgr/txmgr.go b/core/chains/evm/txmgr/txmgr.go index 142151140e0..b2e6dea1664 100644 --- a/core/chains/evm/txmgr/txmgr.go +++ b/core/chains/evm/txmgr/txmgr.go @@ -20,7 +20,6 @@ import ( evmclient "github.com/smartcontractkit/chainlink/core/chains/evm/client" "github.com/smartcontractkit/chainlink/core/chains/evm/forwarders" "github.com/smartcontractkit/chainlink/core/chains/evm/gas" - httypes "github.com/smartcontractkit/chainlink/core/chains/evm/headtracker/types" "github.com/smartcontractkit/chainlink/core/chains/evm/logpoller" evmtypes "github.com/smartcontractkit/chainlink/core/chains/evm/types" "github.com/smartcontractkit/chainlink/core/logger" @@ -72,9 +71,12 @@ var _ TxManager = &Txm{} // ResumeCallback is assumed to be idempotent type ResumeCallback func(id uuid.UUID, result interface{}, err error) error +// TxManager is the main component of the transaction manager. +// It is also the interface to external callers. +// //go:generate mockery --quiet --recursive --name TxManager --output ./mocks/ --case=underscore --structname TxManager --filename tx_manager.go type TxManager interface { - httypes.HeadTrackable + txmgrtypes.HeadTrackable[*evmtypes.Head] services.ServiceCtx Trigger(addr common.Address) CreateEthTransaction(newTx NewTx, qopts ...pg.QOpt) (etx EthTx, err error) @@ -138,6 +140,7 @@ func NewTxm(db *sqlx.DB, ethClient evmclient.Client, cfg Config, keyStore KeySto "nonceAutoSync", cfg.EvmNonceAutoSync(), "gasLimitDefault", cfg.EvmGasLimitDefault(), ) + estimator := gas.NewEstimator(lggr, ethClient, cfg) b := Txm{ StartStopOnce: utils.StartStopOnce{}, logger: lggr, @@ -148,7 +151,7 @@ func NewTxm(db *sqlx.DB, ethClient evmclient.Client, cfg Config, keyStore KeySto config: cfg, keyStore: keyStore, eventBroadcaster: eventBroadcaster, - gasEstimator: gas.NewEstimator(lggr, ethClient, cfg), + gasEstimator: estimator, chainID: *ethClient.ChainID(), checkerFactory: checkerFactory, chHeads: make(chan *evmtypes.Head), @@ -450,13 +453,13 @@ func (b *Txm) runLoop(eb *EthBroadcaster, ec *EthConfirmer, keyStates []ethkey.S func (b *Txm) OnNewLongestChain(ctx context.Context, head *evmtypes.Head) { ok := b.IfStarted(func() { if b.reaper != nil { - b.reaper.SetLatestBlockNum(head.Number) + b.reaper.SetLatestBlockNum(head.BlockNumber()) } b.gasEstimator.OnNewLongestChain(ctx, head) select { case b.chHeads <- head: case <-ctx.Done(): - b.logger.Errorw("Timed out handling head", "blockNum", head.Number, "ctxErr", ctx.Err()) + b.logger.Errorw("Timed out handling head", "blockNum", head.BlockNumber(), "ctxErr", ctx.Err()) } }) if !ok { diff --git a/core/chains/evm/types/models.go b/core/chains/evm/types/models.go index 53d7df78f5c..b21c8d25b2b 100644 --- a/core/chains/evm/types/models.go +++ b/core/chains/evm/types/models.go @@ -16,6 +16,7 @@ import ( "github.com/pkg/errors" "github.com/ugorji/go/codec" + txmgrtypes "github.com/smartcontractkit/chainlink/common/txmgr/types" "github.com/smartcontractkit/chainlink/core/assets" "github.com/smartcontractkit/chainlink/core/chains/evm/types/internal/blocks" "github.com/smartcontractkit/chainlink/core/null" @@ -41,6 +42,8 @@ type Head struct { TotalDifficulty *utils.Big } +var _ txmgrtypes.Head = &Head{} + // NewHead returns a Head instance. func NewHead(number *big.Int, blockHash common.Hash, parentHash common.Hash, timestamp uint64, chainID *utils.Big) Head { return Head{ @@ -52,6 +55,21 @@ func NewHead(number *big.Int, blockHash common.Hash, parentHash common.Hash, tim } } +func (h *Head) BlockNumber() int64 { + return h.Number +} + +func (h *Head) BlockHash() common.Hash { + return h.Hash +} + +func (h *Head) GetParent() txmgrtypes.Head { + if h.Parent == nil { + return nil + } + return h.Parent +} + // EarliestInChain recurses through parents until it finds the earliest one func (h *Head) EarliestInChain() *Head { for h.Parent != nil { @@ -60,6 +78,11 @@ func (h *Head) EarliestInChain() *Head { return h } +// EarliestHeadInChain recurses through parents until it finds the earliest one +func (h *Head) EarliestHeadInChain() txmgrtypes.Head { + return h.EarliestInChain() +} + // IsInChain returns true if the given hash matches the hash of a head in the chain func (h *Head) IsInChain(blockHash common.Hash) bool { for { @@ -150,7 +173,7 @@ func (h *Head) ChainString() string { } // String returns a string representation of this head -func (h Head) String() string { +func (h *Head) String() string { return fmt.Sprintf("Head{Number: %d, Hash: %s, ParentHash: %s}", h.ToInt(), h.Hash.Hex(), h.ParentHash.Hex()) } diff --git a/core/chains/evm/types/models_test.go b/core/chains/evm/types/models_test.go index 9a2718bb974..a2fcad060aa 100644 --- a/core/chains/evm/types/models_test.go +++ b/core/chains/evm/types/models_test.go @@ -223,7 +223,7 @@ func TestHead_EarliestInChain(t *testing.T) { }, } - assert.Equal(t, int64(1), head.EarliestInChain().Number) + assert.Equal(t, int64(1), head.EarliestInChain().BlockNumber()) } func TestHead_IsInChain(t *testing.T) { diff --git a/core/internal/cltest/cltest.go b/core/internal/cltest/cltest.go index 559951a26d9..75857d34b49 100644 --- a/core/internal/cltest/cltest.go +++ b/core/internal/cltest/cltest.go @@ -204,8 +204,9 @@ func NewEthBroadcaster(t testing.TB, orm txmgr.ORM, ethClient evmclient.Client, require.NoError(t, err) t.Cleanup(func() { assert.NoError(t, eventBroadcaster.Close()) }) lggr := logger.TestLogger(t) + estimator := gas.NewWrappedEvmEstimator(gas.NewFixedPriceEstimator(config, lggr), config) return txmgr.NewEthBroadcaster(orm, ethClient, config, keyStore, eventBroadcaster, - keyStates, gas.NewWrappedEvmEstimator(gas.NewFixedPriceEstimator(config, lggr), config), nil, lggr, + keyStates, estimator, nil, lggr, checkerFactory, nonceAutoSync) } @@ -217,8 +218,9 @@ func NewEventBroadcaster(t testing.TB, dbURL url.URL) pg.EventBroadcaster { func NewEthConfirmer(t testing.TB, orm txmgr.ORM, ethClient evmclient.Client, config evmconfig.ChainScopedConfig, ks keystore.Eth, keyStates []ethkey.State, fn txmgr.ResumeCallback) *txmgr.EthConfirmer { t.Helper() lggr := logger.TestLogger(t) - ec := txmgr.NewEthConfirmer(orm, ethClient, config, ks, keyStates, - gas.NewWrappedEvmEstimator(gas.NewFixedPriceEstimator(config, lggr), config), fn, lggr) + estimator := gas.NewWrappedEvmEstimator(gas.NewFixedPriceEstimator(config, lggr), config) + + ec := txmgr.NewEthConfirmer(orm, ethClient, config, ks, keyStates, estimator, fn, lggr) return ec } From b7a61bda6ba8c3e3f476212840c1f6a50d8318a9 Mon Sep 17 00:00:00 2001 From: Austin Born Date: Fri, 17 Mar 2023 16:21:52 -0700 Subject: [PATCH 07/25] Add Feed ID index to Verifier (#8746) * Add Feed ID index to Verifier * Generate contracts --------- Co-authored-by: Sam --- contracts/src/v0.8/Verifier.sol | 8 +- .../mercury_verifier/mercury_verifier.go | 92 +++++++++++++------ ...rapper-dependency-versions-do-not-edit.txt | 2 +- 3 files changed, 71 insertions(+), 31 deletions(-) diff --git a/contracts/src/v0.8/Verifier.sol b/contracts/src/v0.8/Verifier.sol index 3a58d288256..26e57e6db6d 100644 --- a/contracts/src/v0.8/Verifier.sol +++ b/contracts/src/v0.8/Verifier.sol @@ -63,11 +63,11 @@ contract Verifier is IVerifier, ConfirmedOwner, TypeAndVersionInterface { /// @notice This event is emitted when a new report is verified. /// It is used to keep a historical record of verified reports. - event ReportVerified(bytes32 feedId, bytes32 reportHash, address requester); + event ReportVerified(bytes32 indexed feedId, bytes32 reportHash, address requester); /// @notice This event is emitted whenever a new configuration is set for a feed. It triggers a new run of the offchain reporting protocol. event ConfigSet( - bytes32 feedId, + bytes32 indexed feedId, uint32 previousConfigBlockNumber, bytes32 configDigest, uint64 configCount, @@ -80,10 +80,10 @@ contract Verifier is IVerifier, ConfirmedOwner, TypeAndVersionInterface { ); /// @notice This event is emitted whenever a configuration is deactivated - event ConfigDeactivated(bytes32 feedId, bytes32 configDigest); + event ConfigDeactivated(bytes32 indexed feedId, bytes32 configDigest); /// @notice This event is emitted whenever a configuration is activated - event ConfigActivated(bytes32 feedId, bytes32 configDigest); + event ConfigActivated(bytes32 indexed feedId, bytes32 configDigest); /// @notice This error is thrown whenever an address tries /// to exeecute a transaction that it is not authorized to do so diff --git a/core/gethwrappers/generated/mercury_verifier/mercury_verifier.go b/core/gethwrappers/generated/mercury_verifier/mercury_verifier.go index f2e26157173..4c97039a022 100644 --- a/core/gethwrappers/generated/mercury_verifier/mercury_verifier.go +++ b/core/gethwrappers/generated/mercury_verifier/mercury_verifier.go @@ -30,8 +30,8 @@ var ( ) var MercuryVerifierMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifierProxyAddr\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"CannotDeactivateLatestConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DigestEmpty\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"DigestInactive\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"DigestNotSet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSigners\",\"type\":\"uint256\"}],\"name\":\"ExcessSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FaultToleranceMustBePositive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FeedIdEmpty\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedNumSigners\",\"type\":\"uint256\"}],\"name\":\"IncorrectSignatureCount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSigners\",\"type\":\"uint256\"}],\"name\":\"InsufficientSigners\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ssLength\",\"type\":\"uint256\"}],\"name\":\"MismatchedSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonUniqueSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"ConfigActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"ConfigDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bytes32[]\",\"name\":\"offchainTransmitters\",\"type\":\"bytes32[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"reportHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"}],\"name\":\"ReportVerified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"activateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"deactivateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"}],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"}],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"offchainTransmitters\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isVerifier\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"signedReport\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b5060405162001eb338038062001eb38339810160408190526200003491620001ab565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000ff565b5050506001600160a01b038116620000e95760405163d92e233d60e01b815260040160405180910390fd5b60601b6001600160601b031916608052620001dd565b6001600160a01b0381163314156200015a5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001be57600080fd5b81516001600160a01b0381168114620001d657600080fd5b9392505050565b60805160601c611cb062000203600039600081816102e101526108020152611cb06000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80638da5cb5b11610081578063ded6307c1161005b578063ded6307c14610244578063e84f128e14610257578063f2fde38b146102b457600080fd5b80638da5cb5b146101aa57806394d95980146101d2578063b70d929d146101e557600080fd5b80633d3ac1b5116100b25780633d3ac1b51461017a57806344a0b2ad1461018d57806379ba5097146101a257600080fd5b806301ffc9a7146100ce578063181f5a7714610138575b600080fd5b6101236100dc3660046116d7565b7fffffffff00000000000000000000000000000000000000000000000000000000167f3d3ac1b5000000000000000000000000000000000000000000000000000000001490565b60405190151581526020015b60405180910390f35b60408051808201909152600e81527f566572696669657220302e302e3200000000000000000000000000000000000060208201525b60405161012f91906119fc565b61016d610188366004611719565b6102c7565b6101a061019b3660046115dd565b610417565b005b6101a061092b565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012f565b6101a06101e03660046116b5565b610a28565b6102216101f33660046115c4565b6000908152600260205260408120600181015490549192909168010000000000000000900463ffffffff1690565b604080519315158452602084019290925263ffffffff169082015260600161012f565b6101a06102523660046116b5565b610b91565b6102916102653660046115c4565b6000908152600260205260409020805460019091015463ffffffff808316936401000000009093041691565b6040805163ffffffff94851681529390921660208401529082015260600161012f565b6101a06102c23660046114bd565b610ca8565b60603373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610338576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008080808061034a888a018a6114df565b9450945094509450945060008461036090611b25565b60008181526002602081815260408084208b5180865293810190925290922092935090916103918483898985610cbc565b61039b8984610dfb565b875160208901206103b0818b8a8a8a87610e63565b604080518681526020810183905273ffffffffffffffffffffffffffffffffffffffff8e168183015290517f5a779ad0380d86bfcdb2748a39a349fe4fda58c933a2df958ba997284db8a2699181900360600190a150969c9b505050505050505050505050565b855160ff851680610454576040517f0743bae600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601f82111561049e576040517f61750f4000000000000000000000000000000000000000000000000000000000815260048101839052601f60248201526044015b60405180910390fd5b6104a9816003611ae8565b821161050157816104bb826003611ae8565b6104c6906001611aab565b6040517f9dd9e6d800000000000000000000000000000000000000000000000000000000815260048101929092526024820152604401610495565b6105096110df565b60008981526002602052604081208054909163ffffffff90911690829061052f83611ba3565b82546101009290920a63ffffffff818102199093169183160217909155825460009250610564918d91168c8c8c8c8c8c611162565b6000818152600280850160205260408220805460ff8d167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009182161782559101805490911660011790559091505b8a518160ff1610156107b35760008b8260ff16815181106105d5576105d5611c45565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610646576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806000858152600287016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452600190810190925290912054610100900460ff169081111561069957610699611c16565b14801591506106d4576040517ff67bc7c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260ff8416815260208101600190526000858152600287016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684526001908101835292208351815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00821681178355928501519193919284927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909216179061010090849081111561079657610796611c16565b0217905550905050505080806107ab90611bc7565b9150506105b2565b508154600163ffffffff90911611156108745760018201546040517f2cc994770000000000000000000000000000000000000000000000000000000081526004810191909152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cc9947790604401600060405180830381600087803b15801561085b57600080fd5b505af115801561086f573d6000803e3d6000fd5b505050505b7fa23a88453230b183877098801ff5a8f771a120e2573eea559ce6c4c2e305a4da8b8360000160049054906101000a900463ffffffff16838560000160009054906101000a900463ffffffff168e8e8e8e8e8e6040516108dd9a9998979695949392919061196f565b60405180910390a181547fffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffff1664010000000063ffffffff431602178255600190910155505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610495565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610a306110df565b600082815260026020526040902081610a75576040517fe332262700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260028201602052604090205460ff16610ac9576040517f8bca63110000000000000000000000000000000000000000000000000000000081526004810184905260248101839052604401610495565b8060010154821415610b11576040517fa403c0160000000000000000000000000000000000000000000000000000000081526004810184905260248101839052604401610495565b600082815260028083016020526040918290200180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f0e173bea63a8c59ec70bf87043f2a729693790183f16a1a54b705de9e989cc4c90610b849085908590918252602082015260400190565b60405180910390a1505050565b610b996110df565b600082815260026020526040902081610bde576040517fe332262700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260028201602052604090205460ff16610c32576040517f8bca63110000000000000000000000000000000000000000000000000000000081526004810184905260248101839052604401610495565b600082815260028083016020526040918290200180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f54f8872b9b94ebea6577f33576d55847bd8ea22641ccc886b965f6e50bfe774690610b849085908590918252602082015260400190565b610cb06110df565b610cb98161120e565b50565b8054600090610ccf9060ff166001611ac3565b825490915060ff16610d17576040517f8bca63110000000000000000000000000000000000000000000000000000000081526004810187905260248101869052604401610495565b600282015460ff16610d5f576040517ffc10a2830000000000000000000000000000000000000000000000000000000081526004810187905260248101869052604401610495565b8060ff16845114610dab5783516040517f5348a282000000000000000000000000000000000000000000000000000000008152600481019190915260ff82166024820152604401610495565b8251845114610df357835183516040517ff0d3140800000000000000000000000000000000000000000000000000000000815260048101929092526024820152604401610495565b505050505050565b6020820151815463ffffffff600883901c81169168010000000000000000900416811115610e5d5782547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8316021783555b50505050565b60008686604051602001610e78929190611886565b6040516020818303038152906040528051906020012090506000610eac604080518082019091526000808252602082015290565b8651600090815b8181101561107757600186898360208110610ed057610ed0611c45565b610edd91901a601b611ac3565b8c8481518110610eef57610eef611c45565b60200260200101518c8581518110610f0957610f09611c45565b602002602001015160405160008152602001604052604051610f47949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015610f69573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526001808d01602090815291859020848601909552845460ff808216865293995093955090850192610100900490911690811115610fee57610fee611c16565b6001811115610fff57610fff611c16565b905250935060018460200151600181111561101c5761101c611c16565b14611053576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836000015160080260ff166001901b850194508061107090611b6a565b9050610eb3565b50837e010101010101010101010101010101010101010101010101010101010101018516146110d2576040517ff67bc7c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611160576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610495565b565b6000808946308b8b8b8b8b8b8b6040516020016111889a999897969594939291906118c2565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001791505098975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff811633141561128e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610495565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b803573ffffffffffffffffffffffffffffffffffffffff8116811461132857600080fd5b919050565b600082601f83011261133e57600080fd5b8135602061135361134e83611a87565b611a38565b80838252828201915082860187848660051b890101111561137357600080fd5b60005b858110156113995761138782611304565b84529284019290840190600101611376565b5090979650505050505050565b600082601f8301126113b757600080fd5b813560206113c761134e83611a87565b80838252828201915082860187848660051b89010111156113e757600080fd5b60005b85811015611399578135845292840192908401906001016113ea565b600082601f83011261141757600080fd5b813567ffffffffffffffff81111561143157611431611c74565b61146260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611a38565b81815284602083860101111561147757600080fd5b816020850160208301376000918101602001919091529392505050565b803567ffffffffffffffff8116811461132857600080fd5b803560ff8116811461132857600080fd5b6000602082840312156114cf57600080fd5b6114d882611304565b9392505050565b600080600080600060e086880312156114f757600080fd5b86601f87011261150657600080fd5b61150e611a0f565b8087606089018a81111561152157600080fd5b60005b6003811015611543578235855260209485019490920191600101611524565b509197505035905067ffffffffffffffff8082111561156157600080fd5b61156d89838a01611406565b9550608088013591508082111561158357600080fd5b61158f89838a016113a6565b945060a08801359150808211156115a557600080fd5b506115b2888289016113a6565b9598949750929560c001359392505050565b6000602082840312156115d657600080fd5b5035919050565b600080600080600080600060e0888a0312156115f857600080fd5b87359650602088013567ffffffffffffffff8082111561161757600080fd5b6116238b838c0161132d565b975060408a013591508082111561163957600080fd5b6116458b838c016113a6565b965061165360608b016114ac565b955060808a013591508082111561166957600080fd5b6116758b838c01611406565b945061168360a08b01611494565b935060c08a013591508082111561169957600080fd5b506116a68a828b01611406565b91505092959891949750929550565b600080604083850312156116c857600080fd5b50508035926020909101359150565b6000602082840312156116e957600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146114d857600080fd5b60008060006040848603121561172e57600080fd5b833567ffffffffffffffff8082111561174657600080fd5b818601915086601f83011261175a57600080fd5b81358181111561176957600080fd5b87602082850101111561177b57600080fd5b6020928301955093506117919186019050611304565b90509250925092565b600081518084526020808501945080840160005b838110156117e057815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016117ae565b509495945050505050565b600081518084526020808501945080840160005b838110156117e0578151875295820195908201906001016117ff565b6000815180845260005b8181101561184157602081850181015186830182015201611825565b81811115611853576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b828152600060208083018460005b60038110156118b157815183529183019190830190600101611894565b505050506080820190509392505050565b60006101408c83528b602084015273ffffffffffffffffffffffffffffffffffffffff8b16604084015267ffffffffffffffff808b16606085015281608085015261190f8285018b61179a565b915083820360a0850152611923828a6117eb565b915060ff881660c085015283820360e0850152611940828861181b565b908616610100850152838103610120850152905061195e818561181b565b9d9c50505050505050505050505050565b60006101408c835263ffffffff808d1660208501528b6040850152808b166060850152508060808401526119a58184018a61179a565b905082810360a08401526119b981896117eb565b905060ff871660c084015282810360e08401526119d6818761181b565b905067ffffffffffffffff851661010084015282810361012084015261195e818561181b565b6020815260006114d8602083018461181b565b6040516060810167ffffffffffffffff81118282101715611a3257611a32611c74565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611a7f57611a7f611c74565b604052919050565b600067ffffffffffffffff821115611aa157611aa1611c74565b5060051b60200190565b60008219821115611abe57611abe611be7565b500190565b600060ff821660ff84168060ff03821115611ae057611ae0611be7565b019392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b2057611b20611be7565b500290565b80516020808301519190811015611b64577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160200360031b1b821691505b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611b9c57611b9c611be7565b5060010190565b600063ffffffff80831681811415611bbd57611bbd611be7565b6001019392505050565b600060ff821660ff811415611bde57611bde611be7565b60010192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifierProxyAddr\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccessForbidden\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"CannotDeactivateLatestConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DigestEmpty\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"DigestInactive\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"DigestNotSet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSigners\",\"type\":\"uint256\"}],\"name\":\"ExcessSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FaultToleranceMustBePositive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FeedIdEmpty\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedNumSigners\",\"type\":\"uint256\"}],\"name\":\"IncorrectSignatureCount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSigners\",\"type\":\"uint256\"}],\"name\":\"InsufficientSigners\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ssLength\",\"type\":\"uint256\"}],\"name\":\"MismatchedSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonUniqueSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"ConfigActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"ConfigDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bytes32[]\",\"name\":\"offchainTransmitters\",\"type\":\"bytes32[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"reportHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"}],\"name\":\"ReportVerified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"activateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"deactivateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"}],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"}],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"feedId\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"offchainTransmitters\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isVerifier\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"signedReport\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162001ea838038062001ea88339810160408190526200003491620001ab565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000ff565b5050506001600160a01b038116620000e95760405163d92e233d60e01b815260040160405180910390fd5b60601b6001600160601b031916608052620001dd565b6001600160a01b0381163314156200015a5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001be57600080fd5b81516001600160a01b0381168114620001d657600080fd5b9392505050565b60805160601c611ca562000203600039600081816102e101526107fd0152611ca56000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80638da5cb5b11610081578063ded6307c1161005b578063ded6307c14610244578063e84f128e14610257578063f2fde38b146102b457600080fd5b80638da5cb5b146101aa57806394d95980146101d2578063b70d929d146101e557600080fd5b80633d3ac1b5116100b25780633d3ac1b51461017a57806344a0b2ad1461018d57806379ba5097146101a257600080fd5b806301ffc9a7146100ce578063181f5a7714610138575b600080fd5b6101236100dc3660046116c3565b7fffffffff00000000000000000000000000000000000000000000000000000000167f3d3ac1b5000000000000000000000000000000000000000000000000000000001490565b60405190151581526020015b60405180910390f35b60408051808201909152600e81527f566572696669657220302e302e3200000000000000000000000000000000000060208201525b60405161012f919061195b565b61016d610188366004611705565b6102c7565b6101a061019b3660046115c9565b610412565b005b6101a0610925565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012f565b6101a06101e03660046116a1565b610a22565b6102216101f33660046115b0565b6000908152600260205260408120600181015490549192909168010000000000000000900463ffffffff1690565b604080519315158452602084019290925263ffffffff169082015260600161012f565b6101a06102523660046116a1565b610b84565b6102916102653660046115b0565b6000908152600260205260409020805460019091015463ffffffff808316936401000000009093041691565b6040805163ffffffff94851681529390921660208401529082015260600161012f565b6101a06102c23660046114a9565b610c94565b60603373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610338576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008080808061034a888a018a6114cb565b9450945094509450945060008461036090611b1a565b60008181526002602081815260408084208b5180865293810190925290922092935090916103918483898985610ca8565b61039b8984610de7565b875160208901206103b0818b8a8a8a87610e4f565b6040805182815273ffffffffffffffffffffffffffffffffffffffff8e16602082015286917f5a779ad0380d86bfcdb2748a39a349fe4fda58c933a2df958ba997284db8a269910160405180910390a250969c9b505050505050505050505050565b855160ff85168061044f576040517f0743bae600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601f821115610499576040517f61750f4000000000000000000000000000000000000000000000000000000000815260048101839052601f60248201526044015b60405180910390fd5b6104a4816003611add565b82116104fc57816104b6826003611add565b6104c1906001611aa0565b6040517f9dd9e6d800000000000000000000000000000000000000000000000000000000815260048101929092526024820152604401610490565b6105046110cb565b60008981526002602052604081208054909163ffffffff90911690829061052a83611b98565b82546101009290920a63ffffffff81810219909316918316021790915582546000925061055f918d91168c8c8c8c8c8c61114e565b6000818152600280850160205260408220805460ff8d167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009182161782559101805490911660011790559091505b8a518160ff1610156107ae5760008b8260ff16815181106105d0576105d0611c3a565b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610641576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806000858152600287016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452600190810190925290912054610100900460ff169081111561069457610694611c0b565b14801591506106cf576040517ff67bc7c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805180820190915260ff8416815260208101600190526000858152600287016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684526001908101835292208351815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00821681178355928501519193919284927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909216179061010090849081111561079157610791611c0b565b0217905550905050505080806107a690611bbc565b9150506105ad565b508154600163ffffffff909116111561086f5760018201546040517f2cc994770000000000000000000000000000000000000000000000000000000081526004810191909152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632cc9947790604401600060405180830381600087803b15801561085657600080fd5b505af115801561086a573d6000803e3d6000fd5b505050505b8a7fa23a88453230b183877098801ff5a8f771a120e2573eea559ce6c4c2e305a4da8360000160049054906101000a900463ffffffff16838560000160009054906101000a900463ffffffff168e8e8e8e8e8e6040516108d79998979695949392919061196e565b60405180910390a281547fffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffff1664010000000063ffffffff431602178255600190910155505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146109a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610490565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610a2a6110cb565b600082815260026020526040902081610a6f576040517fe332262700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260028201602052604090205460ff16610ac3576040517f8bca63110000000000000000000000000000000000000000000000000000000081526004810184905260248101839052604401610490565b8060010154821415610b0b576040517fa403c0160000000000000000000000000000000000000000000000000000000081526004810184905260248101839052604401610490565b600082815260028083016020526040918290200180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555183907f0e173bea63a8c59ec70bf87043f2a729693790183f16a1a54b705de9e989cc4c90610b779085815260200190565b60405180910390a2505050565b610b8c6110cb565b600082815260026020526040902081610bd1576040517fe332262700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260028201602052604090205460ff16610c25576040517f8bca63110000000000000000000000000000000000000000000000000000000081526004810184905260248101839052604401610490565b600082815260028083016020526040918290200180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555183907f54f8872b9b94ebea6577f33576d55847bd8ea22641ccc886b965f6e50bfe774690610b779085815260200190565b610c9c6110cb565b610ca5816111fa565b50565b8054600090610cbb9060ff166001611ab8565b825490915060ff16610d03576040517f8bca63110000000000000000000000000000000000000000000000000000000081526004810187905260248101869052604401610490565b600282015460ff16610d4b576040517ffc10a2830000000000000000000000000000000000000000000000000000000081526004810187905260248101869052604401610490565b8060ff16845114610d975783516040517f5348a282000000000000000000000000000000000000000000000000000000008152600481019190915260ff82166024820152604401610490565b8251845114610ddf57835183516040517ff0d3140800000000000000000000000000000000000000000000000000000000815260048101929092526024820152604401610490565b505050505050565b6020820151815463ffffffff600883901c81169168010000000000000000900416811115610e495782547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8316021783555b50505050565b60008686604051602001610e64929190611872565b6040516020818303038152906040528051906020012090506000610e98604080518082019091526000808252602082015290565b8651600090815b8181101561106357600186898360208110610ebc57610ebc611c3a565b610ec991901a601b611ab8565b8c8481518110610edb57610edb611c3a565b60200260200101518c8581518110610ef557610ef5611c3a565b602002602001015160405160008152602001604052604051610f33949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015610f55573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526001808d01602090815291859020848601909552845460ff808216865293995093955090850192610100900490911690811115610fda57610fda611c0b565b6001811115610feb57610feb611c0b565b905250935060018460200151600181111561100857611008611c0b565b1461103f576040517fef67f5d800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836000015160080260ff166001901b850194508061105c90611b5f565b9050610e9f565b50837e010101010101010101010101010101010101010101010101010101010101018516146110be576040517ff67bc7c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461114c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610490565b565b6000808946308b8b8b8b8b8b8b6040516020016111749a999897969594939291906118ae565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000001791505098975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff811633141561127a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610490565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b803573ffffffffffffffffffffffffffffffffffffffff8116811461131457600080fd5b919050565b600082601f83011261132a57600080fd5b8135602061133f61133a83611a7c565b611a2d565b80838252828201915082860187848660051b890101111561135f57600080fd5b60005b8581101561138557611373826112f0565b84529284019290840190600101611362565b5090979650505050505050565b600082601f8301126113a357600080fd5b813560206113b361133a83611a7c565b80838252828201915082860187848660051b89010111156113d357600080fd5b60005b85811015611385578135845292840192908401906001016113d6565b600082601f83011261140357600080fd5b813567ffffffffffffffff81111561141d5761141d611c69565b61144e60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611a2d565b81815284602083860101111561146357600080fd5b816020850160208301376000918101602001919091529392505050565b803567ffffffffffffffff8116811461131457600080fd5b803560ff8116811461131457600080fd5b6000602082840312156114bb57600080fd5b6114c4826112f0565b9392505050565b600080600080600060e086880312156114e357600080fd5b86601f8701126114f257600080fd5b6114fa611a04565b8087606089018a81111561150d57600080fd5b60005b600381101561152f578235855260209485019490920191600101611510565b509197505035905067ffffffffffffffff8082111561154d57600080fd5b61155989838a016113f2565b9550608088013591508082111561156f57600080fd5b61157b89838a01611392565b945060a088013591508082111561159157600080fd5b5061159e88828901611392565b9598949750929560c001359392505050565b6000602082840312156115c257600080fd5b5035919050565b600080600080600080600060e0888a0312156115e457600080fd5b87359650602088013567ffffffffffffffff8082111561160357600080fd5b61160f8b838c01611319565b975060408a013591508082111561162557600080fd5b6116318b838c01611392565b965061163f60608b01611498565b955060808a013591508082111561165557600080fd5b6116618b838c016113f2565b945061166f60a08b01611480565b935060c08a013591508082111561168557600080fd5b506116928a828b016113f2565b91505092959891949750929550565b600080604083850312156116b457600080fd5b50508035926020909101359150565b6000602082840312156116d557600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146114c457600080fd5b60008060006040848603121561171a57600080fd5b833567ffffffffffffffff8082111561173257600080fd5b818601915086601f83011261174657600080fd5b81358181111561175557600080fd5b87602082850101111561176757600080fd5b60209283019550935061177d91860190506112f0565b90509250925092565b600081518084526020808501945080840160005b838110156117cc57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161179a565b509495945050505050565b600081518084526020808501945080840160005b838110156117cc578151875295820195908201906001016117eb565b6000815180845260005b8181101561182d57602081850181015186830182015201611811565b8181111561183f576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b828152600060208083018460005b600381101561189d57815183529183019190830190600101611880565b505050506080820190509392505050565b60006101408c83528b602084015273ffffffffffffffffffffffffffffffffffffffff8b16604084015267ffffffffffffffff808b1660608501528160808501526118fb8285018b611786565b915083820360a085015261190f828a6117d7565b915060ff881660c085015283820360e085015261192c8288611807565b908616610100850152838103610120850152905061194a8185611807565b9d9c50505050505050505050505050565b6020815260006114c46020830184611807565b600061012063ffffffff808d1684528b6020850152808b1660408501525080606084015261199e8184018a611786565b905082810360808401526119b281896117d7565b905060ff871660a084015282810360c08401526119cf8187611807565b905067ffffffffffffffff851660e08401528281036101008401526119f48185611807565b9c9b505050505050505050505050565b6040516060810167ffffffffffffffff81118282101715611a2757611a27611c69565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611a7457611a74611c69565b604052919050565b600067ffffffffffffffff821115611a9657611a96611c69565b5060051b60200190565b60008219821115611ab357611ab3611bdc565b500190565b600060ff821660ff84168060ff03821115611ad557611ad5611bdc565b019392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b1557611b15611bdc565b500290565b80516020808301519190811015611b59577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160200360031b1b821691505b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611b9157611b91611bdc565b5060010190565b600063ffffffff80831681811415611bb257611bb2611bdc565b6001019392505050565b600060ff821660ff811415611bd357611bd3611bdc565b60010192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var MercuryVerifierABI = MercuryVerifierMetaData.ABI @@ -436,18 +436,28 @@ type MercuryVerifierConfigActivated struct { Raw types.Log } -func (_MercuryVerifier *MercuryVerifierFilterer) FilterConfigActivated(opts *bind.FilterOpts) (*MercuryVerifierConfigActivatedIterator, error) { +func (_MercuryVerifier *MercuryVerifierFilterer) FilterConfigActivated(opts *bind.FilterOpts, feedId [][32]byte) (*MercuryVerifierConfigActivatedIterator, error) { - logs, sub, err := _MercuryVerifier.contract.FilterLogs(opts, "ConfigActivated") + var feedIdRule []interface{} + for _, feedIdItem := range feedId { + feedIdRule = append(feedIdRule, feedIdItem) + } + + logs, sub, err := _MercuryVerifier.contract.FilterLogs(opts, "ConfigActivated", feedIdRule) if err != nil { return nil, err } return &MercuryVerifierConfigActivatedIterator{contract: _MercuryVerifier.contract, event: "ConfigActivated", logs: logs, sub: sub}, nil } -func (_MercuryVerifier *MercuryVerifierFilterer) WatchConfigActivated(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigActivated) (event.Subscription, error) { +func (_MercuryVerifier *MercuryVerifierFilterer) WatchConfigActivated(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigActivated, feedId [][32]byte) (event.Subscription, error) { + + var feedIdRule []interface{} + for _, feedIdItem := range feedId { + feedIdRule = append(feedIdRule, feedIdItem) + } - logs, sub, err := _MercuryVerifier.contract.WatchLogs(opts, "ConfigActivated") + logs, sub, err := _MercuryVerifier.contract.WatchLogs(opts, "ConfigActivated", feedIdRule) if err != nil { return nil, err } @@ -554,18 +564,28 @@ type MercuryVerifierConfigDeactivated struct { Raw types.Log } -func (_MercuryVerifier *MercuryVerifierFilterer) FilterConfigDeactivated(opts *bind.FilterOpts) (*MercuryVerifierConfigDeactivatedIterator, error) { +func (_MercuryVerifier *MercuryVerifierFilterer) FilterConfigDeactivated(opts *bind.FilterOpts, feedId [][32]byte) (*MercuryVerifierConfigDeactivatedIterator, error) { - logs, sub, err := _MercuryVerifier.contract.FilterLogs(opts, "ConfigDeactivated") + var feedIdRule []interface{} + for _, feedIdItem := range feedId { + feedIdRule = append(feedIdRule, feedIdItem) + } + + logs, sub, err := _MercuryVerifier.contract.FilterLogs(opts, "ConfigDeactivated", feedIdRule) if err != nil { return nil, err } return &MercuryVerifierConfigDeactivatedIterator{contract: _MercuryVerifier.contract, event: "ConfigDeactivated", logs: logs, sub: sub}, nil } -func (_MercuryVerifier *MercuryVerifierFilterer) WatchConfigDeactivated(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigDeactivated) (event.Subscription, error) { +func (_MercuryVerifier *MercuryVerifierFilterer) WatchConfigDeactivated(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigDeactivated, feedId [][32]byte) (event.Subscription, error) { + + var feedIdRule []interface{} + for _, feedIdItem := range feedId { + feedIdRule = append(feedIdRule, feedIdItem) + } - logs, sub, err := _MercuryVerifier.contract.WatchLogs(opts, "ConfigDeactivated") + logs, sub, err := _MercuryVerifier.contract.WatchLogs(opts, "ConfigDeactivated", feedIdRule) if err != nil { return nil, err } @@ -680,18 +700,28 @@ type MercuryVerifierConfigSet struct { Raw types.Log } -func (_MercuryVerifier *MercuryVerifierFilterer) FilterConfigSet(opts *bind.FilterOpts) (*MercuryVerifierConfigSetIterator, error) { +func (_MercuryVerifier *MercuryVerifierFilterer) FilterConfigSet(opts *bind.FilterOpts, feedId [][32]byte) (*MercuryVerifierConfigSetIterator, error) { - logs, sub, err := _MercuryVerifier.contract.FilterLogs(opts, "ConfigSet") + var feedIdRule []interface{} + for _, feedIdItem := range feedId { + feedIdRule = append(feedIdRule, feedIdItem) + } + + logs, sub, err := _MercuryVerifier.contract.FilterLogs(opts, "ConfigSet", feedIdRule) if err != nil { return nil, err } return &MercuryVerifierConfigSetIterator{contract: _MercuryVerifier.contract, event: "ConfigSet", logs: logs, sub: sub}, nil } -func (_MercuryVerifier *MercuryVerifierFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigSet) (event.Subscription, error) { +func (_MercuryVerifier *MercuryVerifierFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigSet, feedId [][32]byte) (event.Subscription, error) { + + var feedIdRule []interface{} + for _, feedIdItem := range feedId { + feedIdRule = append(feedIdRule, feedIdItem) + } - logs, sub, err := _MercuryVerifier.contract.WatchLogs(opts, "ConfigSet") + logs, sub, err := _MercuryVerifier.contract.WatchLogs(opts, "ConfigSet", feedIdRule) if err != nil { return nil, err } @@ -1071,18 +1101,28 @@ type MercuryVerifierReportVerified struct { Raw types.Log } -func (_MercuryVerifier *MercuryVerifierFilterer) FilterReportVerified(opts *bind.FilterOpts) (*MercuryVerifierReportVerifiedIterator, error) { +func (_MercuryVerifier *MercuryVerifierFilterer) FilterReportVerified(opts *bind.FilterOpts, feedId [][32]byte) (*MercuryVerifierReportVerifiedIterator, error) { - logs, sub, err := _MercuryVerifier.contract.FilterLogs(opts, "ReportVerified") + var feedIdRule []interface{} + for _, feedIdItem := range feedId { + feedIdRule = append(feedIdRule, feedIdItem) + } + + logs, sub, err := _MercuryVerifier.contract.FilterLogs(opts, "ReportVerified", feedIdRule) if err != nil { return nil, err } return &MercuryVerifierReportVerifiedIterator{contract: _MercuryVerifier.contract, event: "ReportVerified", logs: logs, sub: sub}, nil } -func (_MercuryVerifier *MercuryVerifierFilterer) WatchReportVerified(opts *bind.WatchOpts, sink chan<- *MercuryVerifierReportVerified) (event.Subscription, error) { +func (_MercuryVerifier *MercuryVerifierFilterer) WatchReportVerified(opts *bind.WatchOpts, sink chan<- *MercuryVerifierReportVerified, feedId [][32]byte) (event.Subscription, error) { + + var feedIdRule []interface{} + for _, feedIdItem := range feedId { + feedIdRule = append(feedIdRule, feedIdItem) + } - logs, sub, err := _MercuryVerifier.contract.WatchLogs(opts, "ReportVerified") + logs, sub, err := _MercuryVerifier.contract.WatchLogs(opts, "ReportVerified", feedIdRule) if err != nil { return nil, err } @@ -1209,21 +1249,21 @@ type MercuryVerifierInterface interface { Verify(opts *bind.TransactOpts, signedReport []byte, sender common.Address) (*types.Transaction, error) - FilterConfigActivated(opts *bind.FilterOpts) (*MercuryVerifierConfigActivatedIterator, error) + FilterConfigActivated(opts *bind.FilterOpts, feedId [][32]byte) (*MercuryVerifierConfigActivatedIterator, error) - WatchConfigActivated(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigActivated) (event.Subscription, error) + WatchConfigActivated(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigActivated, feedId [][32]byte) (event.Subscription, error) ParseConfigActivated(log types.Log) (*MercuryVerifierConfigActivated, error) - FilterConfigDeactivated(opts *bind.FilterOpts) (*MercuryVerifierConfigDeactivatedIterator, error) + FilterConfigDeactivated(opts *bind.FilterOpts, feedId [][32]byte) (*MercuryVerifierConfigDeactivatedIterator, error) - WatchConfigDeactivated(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigDeactivated) (event.Subscription, error) + WatchConfigDeactivated(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigDeactivated, feedId [][32]byte) (event.Subscription, error) ParseConfigDeactivated(log types.Log) (*MercuryVerifierConfigDeactivated, error) - FilterConfigSet(opts *bind.FilterOpts) (*MercuryVerifierConfigSetIterator, error) + FilterConfigSet(opts *bind.FilterOpts, feedId [][32]byte) (*MercuryVerifierConfigSetIterator, error) - WatchConfigSet(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigSet) (event.Subscription, error) + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *MercuryVerifierConfigSet, feedId [][32]byte) (event.Subscription, error) ParseConfigSet(log types.Log) (*MercuryVerifierConfigSet, error) @@ -1239,9 +1279,9 @@ type MercuryVerifierInterface interface { ParseOwnershipTransferred(log types.Log) (*MercuryVerifierOwnershipTransferred, error) - FilterReportVerified(opts *bind.FilterOpts) (*MercuryVerifierReportVerifiedIterator, error) + FilterReportVerified(opts *bind.FilterOpts, feedId [][32]byte) (*MercuryVerifierReportVerifiedIterator, error) - WatchReportVerified(opts *bind.WatchOpts, sink chan<- *MercuryVerifierReportVerified) (event.Subscription, error) + WatchReportVerified(opts *bind.WatchOpts, sink chan<- *MercuryVerifierReportVerified, feedId [][32]byte) (event.Subscription, error) ParseReportVerified(log types.Log) (*MercuryVerifierReportVerified, error) diff --git a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt index c60bf711e11..abb10b45a74 100644 --- a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -22,7 +22,7 @@ keeper_registry_wrapper2_0: ../../contracts/solc/v0.8.6/KeeperRegistry2_0.abi .. keepers_vrf_consumer: ../../contracts/solc/v0.8.6/KeepersVRFConsumer.abi ../../contracts/solc/v0.8.6/KeepersVRFConsumer.bin fa75572e689c9e84705c63e8dbe1b7b8aa1a8fe82d66356c4873d024bb9166e8 log_emitter: ../../contracts/solc/v0.8.6/LogEmitter.abi ../../contracts/solc/v0.8.6/LogEmitter.bin 375488d19b6ee1c180d42048be10abea9146e2a58347fd180358850d435cb854 mercury_exposed_verifier: ../../contracts/solc/v0.8.6/ExposedVerifier.abi ../../contracts/solc/v0.8.6/ExposedVerifier.bin 66b77ef97f730e58e0c8646eebb2909be5abe78a5769427a531b8e7d075186ee -mercury_verifier: ../../contracts/solc/v0.8.6/Verifier.abi ../../contracts/solc/v0.8.6/Verifier.bin 5b8d60e6a6e62dd483850e110fa08ca726076ba427fb36dd1063e23c4264f7a8 +mercury_verifier: ../../contracts/solc/v0.8.6/Verifier.abi ../../contracts/solc/v0.8.6/Verifier.bin 8a9f905e6f0633d50ed8f1e86a7c6a445fd677210291dfb073b4cd0177ad2b6e mercury_verifier_proxy: ../../contracts/solc/v0.8.6/VerifierProxy.abi ../../contracts/solc/v0.8.6/VerifierProxy.bin 7a2ef1ee00d0f929a2e319a8da0cc252d2771318517da3679a04463e3e6b08e1 multiwordconsumer_wrapper: ../../contracts/solc/v0.7/MultiWordConsumer.abi ../../contracts/solc/v0.7/MultiWordConsumer.bin 6e68abdf614e3ed0f5066c1b5f9d7c1199f1e7c5c5251fe8a471344a59afc6ba ocr2dr: ../../contracts/solc/v0.8.6/Functions.abi ../../contracts/solc/v0.8.6/Functions.bin 3801bef7cad71068072098dabeab8d3f3f95d36fa8644ff8c617ccdc0b09ede0 From f2b10ae4d6e91159692e2a0e3757a2f694dc2d9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Mar 2023 08:09:13 -0500 Subject: [PATCH 08/25] Bump actions/checkout from 3.3.0 to 3.4.0 (#8716) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../workflows/automation-benchmark-tests.yml | 2 +- .github/workflows/bash-cicd-scripts.yml | 6 +++--- .github/workflows/build-publish-develop.yml | 2 +- .github/workflows/build-publish.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/ci-core.yml | 14 ++++++------- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/dependency-check.yml | 4 ++-- .../goreleaser-build-publish-develop.yml | 2 +- .github/workflows/integration-chaos-tests.yml | 6 +++--- .../workflows/integration-tests-publish.yml | 2 +- .github/workflows/integration-tests.yml | 20 +++++++++---------- .github/workflows/lint-gh-workflows.yml | 2 +- .github/workflows/on-demand-ocr-soak-test.yml | 2 +- .github/workflows/operator-ui.yml | 2 +- .github/workflows/performance-tests.yml | 4 ++-- .github/workflows/solidity-foundry.yml | 4 ++-- .github/workflows/solidity.yml | 20 +++++++++---------- ...evelop-from-smartcontractkit-chainlink.yml | 2 +- 19 files changed, 50 insertions(+), 50 deletions(-) diff --git a/.github/workflows/automation-benchmark-tests.yml b/.github/workflows/automation-benchmark-tests.yml index 16fdbe85d97..551ac99ad8a 100644 --- a/.github/workflows/automation-benchmark-tests.yml +++ b/.github/workflows/automation-benchmark-tests.yml @@ -96,7 +96,7 @@ jobs: echo EVM_KEYS=$EVM_KEYS >> $GITHUB_ENV echo SLACK_USER=$SLACK_USER >> $GITHUB_ENV - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: ref: ${{ env.REF_NAME }} - name: build test runner diff --git a/.github/workflows/bash-cicd-scripts.yml b/.github/workflows/bash-cicd-scripts.yml index 1fa82abfd88..7af6ab15154 100644 --- a/.github/workflows/bash-cicd-scripts.yml +++ b/.github/workflows/bash-cicd-scripts.yml @@ -11,7 +11,7 @@ jobs: bash-cicd-scripts-src: ${{ steps.bash-cicd-scripts.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 # v2.10.2 id: bash-cicd-scripts with: @@ -25,7 +25,7 @@ jobs: needs: [changes] steps: - name: Checkout the repo - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Run ShellCheck if: needs.changes.outputs.bash-cicd-scripts-src == 'true' uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0 @@ -40,7 +40,7 @@ jobs: shell: bash steps: - name: Checkout the repo - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Install shellspec if: needs.changes.outputs.bash-cicd-scripts-src == 'true' env: diff --git a/.github/workflows/build-publish-develop.yml b/.github/workflows/build-publish-develop.yml index c7603813081..389b343c1d1 100644 --- a/.github/workflows/build-publish-develop.yml +++ b/.github/workflows/build-publish-develop.yml @@ -14,7 +14,7 @@ jobs: contents: read steps: - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Build, sign and publish chainlink image uses: ./.github/actions/build-sign-publish-chainlink diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 66ed556c63c..72627514686 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -19,7 +19,7 @@ jobs: contents: read steps: - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Build, sign and publish chainlink image uses: ./.github/actions/build-sign-publish-chainlink diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cde04b31361..087b6cae4a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Build chainlink image uses: ./.github/actions/build-sign-publish-chainlink diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 4cbb6d8727f..9f52c7cee84 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -26,7 +26,7 @@ jobs: src: ${{ steps.golangci-changes.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 # v2.10.2 id: golangci-changes with: @@ -49,7 +49,7 @@ jobs: on_trigger_lint: ${{ steps.golangci-lint.outputs.on_trigger }} steps: - name: Checkout the repo - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Check if event should trigger lint id: golangci-lint env: @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest needs: [init] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: fetch-depth: 0 - uses: actions/setup-go@v3 @@ -106,7 +106,7 @@ jobs: splits: ${{ steps.split.outputs.splits }} steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Setup Go uses: ./.github/actions/setup-go with: @@ -141,7 +141,7 @@ jobs: CL_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Setup node uses: actions/setup-node@v3 - name: Setup NodeJS @@ -212,7 +212,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: fetch-depth: 0 # fetches all history for all tags and branches to provide more metadata for sonar reports - name: Download all workflow run artifacts @@ -250,7 +250,7 @@ jobs: run: shell: bash steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: fetch-depth: 0 - name: Setup Go diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 99c71420e3f..fd27332b953 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Set up Go if: ${{ matrix.language == 'go' }} diff --git a/.github/workflows/dependency-check.yml b/.github/workflows/dependency-check.yml index e4527bec449..c62e8179a46 100644 --- a/.github/workflows/dependency-check.yml +++ b/.github/workflows/dependency-check.yml @@ -11,7 +11,7 @@ jobs: changes: ${{ steps.changes.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 # v2.10.2 id: changes with: @@ -25,7 +25,7 @@ jobs: needs: [changes] steps: - name: Check out code - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Set up Go if: needs.changes.outputs.src == 'true' diff --git a/.github/workflows/goreleaser-build-publish-develop.yml b/.github/workflows/goreleaser-build-publish-develop.yml index 33195a60eb4..1eed79e7eb1 100644 --- a/.github/workflows/goreleaser-build-publish-develop.yml +++ b/.github/workflows/goreleaser-build-publish-develop.yml @@ -15,7 +15,7 @@ jobs: contents: read steps: - name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Configure aws credentials uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0 with: diff --git a/.github/workflows/integration-chaos-tests.yml b/.github/workflows/integration-chaos-tests.yml index f13add88700..87a90407360 100644 --- a/.github/workflows/integration-chaos-tests.yml +++ b/.github/workflows/integration-chaos-tests.yml @@ -31,7 +31,7 @@ jobs: push: ${{ steps.push.outputs.tag }} steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Build Image if: ${{ env.REF_NAME != env.DEVELOP_REF }} uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 @@ -75,7 +75,7 @@ jobs: testtag: ${{ steps.testtag.outputs.tag }} steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: build test runner if: ${{ env.REF_NAME != env.DEVELOP_REF }} uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 @@ -132,7 +132,7 @@ jobs: continue-on-error: true - run: echo "${{ needs.build-test-runner.outputs.testtag }}" - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Run Tests uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 with: diff --git a/.github/workflows/integration-tests-publish.yml b/.github/workflows/integration-tests-publish.yml index 730addb3bb9..18878f85bba 100644 --- a/.github/workflows/integration-tests-publish.yml +++ b/.github/workflows/integration-tests-publish.yml @@ -27,7 +27,7 @@ jobs: this-job-name: Publish Integration Test Image continue-on-error: true - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: ref: ${{ github.event.pull_request.head.sha }} - name: build test runner diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 978b0832375..0b5dfa72022 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 id: changes with: @@ -53,7 +53,7 @@ jobs: needs: [changes] steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: ref: ${{ github.event.pull_request.head.sha }} - name: Build Image @@ -97,7 +97,7 @@ jobs: this-job-name: Build Test Image continue-on-error: true - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: ref: ${{ github.event.pull_request.head.sha }} - name: build test runner @@ -177,7 +177,7 @@ jobs: name: ETH Smoke Tests ${{ matrix.product.name }} steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: ref: ${{ github.event.pull_request.head.sha }} ## Run this step when changes that require tests to be run are made @@ -252,7 +252,7 @@ jobs: sha: ${{ steps.getsha.outputs.sha }} steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: ref: ${{ github.event.pull_request.head.sha }} - name: Get the sha from go mod @@ -263,7 +263,7 @@ jobs: echo "short sha is: ${short_sha}" echo "short_sha=${short_sha}" >> "$GITHUB_OUTPUT" - name: Checkout solana - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: repository: smartcontractkit/chainlink-solana ref: develop @@ -286,7 +286,7 @@ jobs: projectserum_version: ${{ steps.psversion.outputs.projectserum_version }} steps: - name: Checkout the solana repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: repository: smartcontractkit/chainlink-solana ref: ${{ needs.get_solana_sha.outputs.sha }} @@ -311,7 +311,7 @@ jobs: FORCE_COLOR: 1 steps: - name: Checkout the solana repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: repository: smartcontractkit/chainlink-solana ref: ${{ needs.get_solana_sha.outputs.sha }} @@ -349,7 +349,7 @@ jobs: CONTRACT_ARTIFACTS_PATH: contracts/target/deploy steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: repository: smartcontractkit/chainlink-solana ref: ${{ needs.get_solana_sha.outputs.sha }} @@ -439,7 +439,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: ref: ${{ github.event.pull_request.head.sha }} ## Only run OCR smoke test for now diff --git a/.github/workflows/lint-gh-workflows.yml b/.github/workflows/lint-gh-workflows.yml index 0190aa7bc09..dd340fb5ffd 100644 --- a/.github/workflows/lint-gh-workflows.yml +++ b/.github/workflows/lint-gh-workflows.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out Code - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Run actionlint uses: reviewdog/action-actionlint@326cc761d95c903f29a111a44888be707f912684 # v1.35.0 - name: Collect Metrics diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml index 0e10ece8de8..1086cbcfe8f 100644 --- a/.github/workflows/on-demand-ocr-soak-test.yml +++ b/.github/workflows/on-demand-ocr-soak-test.yml @@ -84,7 +84,7 @@ jobs: this-job-name: ${{ inputs.network }} OCR Soak Test continue-on-error: true - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: ref: ${{ env.REF_NAME }} - name: Setup Push Tag diff --git a/.github/workflows/operator-ui.yml b/.github/workflows/operator-ui.yml index c6786419722..81e5b662ecd 100644 --- a/.github/workflows/operator-ui.yml +++ b/.github/workflows/operator-ui.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Update version id: update diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.yml index 3de0241685b..b0e45f397b5 100644 --- a/.github/workflows/performance-tests.yml +++ b/.github/workflows/performance-tests.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0 with: @@ -54,7 +54,7 @@ jobs: needs: build-chainlink steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Run Tests uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.0 with: diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml index 92dc2f7e56d..1d6819b8625 100644 --- a/.github/workflows/solidity-foundry.yml +++ b/.github/workflows/solidity-foundry.yml @@ -12,7 +12,7 @@ jobs: changes: ${{ steps.changes.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 # v2.10.2 id: changes with: @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: submodules: recursive diff --git a/.github/workflows/solidity.yml b/.github/workflows/solidity.yml index 35023e9f684..80a80aeb68f 100644 --- a/.github/workflows/solidity.yml +++ b/.github/workflows/solidity.yml @@ -18,7 +18,7 @@ jobs: changes: ${{ steps.changes.outputs.src }} steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721 # v2.10.2 id: changes with: @@ -34,7 +34,7 @@ jobs: splits: ${{ steps.split.outputs.splits }} steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Generate splits id: split uses: ./.github/actions/split-tests @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu20.04-4cores-16GB steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Setup NodeJS if: ${{ needs.changes.outputs.changes == 'true' }} uses: ./.github/actions/setup-nodejs @@ -103,7 +103,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Setup NodeJS if: ${{ needs.changes.outputs.changes == 'true' }} uses: ./.github/actions/setup-nodejs @@ -134,7 +134,7 @@ jobs: runs-on: ubuntu20.04-4cores-16GB steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Setup NodeJS if: ${{ needs.changes.outputs.changes == 'true' }} uses: ./.github/actions/setup-nodejs @@ -172,7 +172,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Setup NodeJS if: ${{ needs.changes.outputs.changes == 'true' }} uses: ./.github/actions/setup-nodejs @@ -196,9 +196,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Checkout diff-so-fancy - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: repository: so-fancy/diff-so-fancy ref: a673cb4d2707f64d92b86498a2f5f71c8e2643d5 # v1.4.3 @@ -246,7 +246,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Setup NodeJS if: ${{ needs.changes.outputs.changes == 'true' }} uses: ./.github/actions/setup-nodejs @@ -272,7 +272,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Setup NodeJS if: ${{ needs.changes.outputs.changes == 'true' }} uses: ./.github/actions/setup-nodejs diff --git a/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml b/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml index 15cee70b31a..3c8162b4a47 100644 --- a/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml +++ b/.github/workflows/sync-develop-from-smartcontractkit-chainlink.yml @@ -10,7 +10,7 @@ jobs: name: Sync runs-on: ubuntu-latest steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: ref: develop if: env.GITHUB_REPOSITORY != 'smartcontractkit/chainlink' From c1ab7749fa9b225d7717407daef3d69c78f37867 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 18 Mar 2023 08:37:30 -0500 Subject: [PATCH 09/25] Bump smartcontractkit/chainlink-github-actions from 2.1.2 to 2.1.3 (#8690) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/automation-benchmark-tests.yml | 4 ++-- .github/workflows/integration-chaos-tests.yml | 6 +++--- .github/workflows/integration-tests-publish.yml | 2 +- .github/workflows/integration-tests.yml | 14 +++++++------- .github/workflows/on-demand-ocr-soak-test.yml | 4 ++-- .github/workflows/performance-tests.yml | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/automation-benchmark-tests.yml b/.github/workflows/automation-benchmark-tests.yml index 551ac99ad8a..68bcb573ec6 100644 --- a/.github/workflows/automation-benchmark-tests.yml +++ b/.github/workflows/automation-benchmark-tests.yml @@ -101,7 +101,7 @@ jobs: ref: ${{ env.REF_NAME }} - name: build test runner if: ${{ env.REF_NAME != 'develop' }} - uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: tags: ${{ steps.push.outputs.tag }} file: ./integration-tests/test.Dockerfile @@ -112,7 +112,7 @@ jobs: AWS_REGION: ${{ secrets.QA_AWS_REGION }} AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 env: DETACH_RUNNER: true TEST_SUITE: benchmark diff --git a/.github/workflows/integration-chaos-tests.yml b/.github/workflows/integration-chaos-tests.yml index 87a90407360..9a4da4d977c 100644 --- a/.github/workflows/integration-chaos-tests.yml +++ b/.github/workflows/integration-chaos-tests.yml @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Build Image if: ${{ env.REF_NAME != env.DEVELOP_REF }} - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: cl_repo: smartcontractkit/chainlink cl_ref: ${{ github.sha }} @@ -78,7 +78,7 @@ jobs: uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: build test runner if: ${{ env.REF_NAME != env.DEVELOP_REF }} - uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: tags: ${{ env.ENV_JOB_IMAGE_BASE }}:${{ env.BUILD_SHA_REF }} file: ./integration-tests/test.Dockerfile @@ -134,7 +134,7 @@ jobs: - name: Checkout the repo uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: test_command_to_run: export ENV_JOB_IMAGE=${{ env.ENV_JOB_IMAGE_BASE }}:${{ needs.build-test-runner.outputs.testtag }} && make test_need_operator_assets && cd integration-tests && go test -timeout 1h -count=1 -json -test.parallel 11 ./chaos 2>&1 | tee /tmp/gotest.log | gotestfmt test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/integration-tests-publish.yml b/.github/workflows/integration-tests-publish.yml index 18878f85bba..e6d60efb6d3 100644 --- a/.github/workflows/integration-tests-publish.yml +++ b/.github/workflows/integration-tests-publish.yml @@ -31,7 +31,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - name: build test runner - uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: tags: ${{ env.ECR_TAG }} file: ./integration-tests/test.Dockerfile diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 0b5dfa72022..0c8f9d37d80 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -58,7 +58,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: Build Image if: needs.changes.outputs.src == 'true' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: cl_repo: smartcontractkit/chainlink cl_ref: ${{ github.sha }} @@ -101,7 +101,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - name: build test runner - uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: tags: ${{ env.ENV_JOB_IMAGE }} file: ./integration-tests/test.Dockerfile @@ -183,7 +183,7 @@ jobs: ## Run this step when changes that require tests to be run are made - name: Run Tests if: needs.changes.outputs.src == 'true' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 env: TEST_SUITE: smoke TEST_ARGS: -test.timeout 30m @@ -208,7 +208,7 @@ jobs: ## Run this step when changes that do not need the test to run are made - name: Run Setup if: needs.changes.outputs.src == 'false' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: test_download_vendor_packages_command: cd ./integration-tests && go mod download go_mod_path: ./integration-tests/go.mod @@ -361,7 +361,7 @@ jobs: path: ${{ env.CONTRACT_ARTIFACTS_PATH }} - name: Build Test Runner if: ${{ needs.get_solana_sha.outputs.sha != 'develop' }} - uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: tags: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:solana.${{ needs.get_solana_sha.outputs.sha }} file: ./integration-tests/test.Dockerfile @@ -377,7 +377,7 @@ jobs: echo "\`${{ needs.get_solana_sha.outputs.sha }}\`" >>$GITHUB_STEP_SUMMARY - name: Run Tests if: needs.changes.outputs.src == 'true' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: test_command_to_run: export ENV_JOB_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:solana.${{ needs.get_solana_sha.outputs.sha }} && make test_smoke cl_repo: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink @@ -444,7 +444,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} ## Only run OCR smoke test for now - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 env: TEST_SUITE: smoke TEST_ARGS: -test.timeout 30m diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml index 1086cbcfe8f..2b08095e025 100644 --- a/.github/workflows/on-demand-ocr-soak-test.yml +++ b/.github/workflows/on-demand-ocr-soak-test.yml @@ -105,7 +105,7 @@ jobs: fi - name: build test runner if: ${{ env.REF_NAME != 'develop' }} - uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: tags: ${{ steps.push.outputs.tag }} file: ./integration-tests/test.Dockerfile @@ -116,7 +116,7 @@ jobs: AWS_REGION: ${{ secrets.QA_AWS_REGION }} AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 env: DETACH_RUNNER: true TEST_SUITE: soak diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.yml index b0e45f397b5..354f2773725 100644 --- a/.github/workflows/performance-tests.yml +++ b/.github/workflows/performance-tests.yml @@ -56,7 +56,7 @@ jobs: - name: Checkout the repo uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.0 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: test_command_to_run: cd integration-tests && go test -timeout 1h -count=1 -json -test.parallel 10 ./performance 2>&1 | tee /tmp/gotest.log | gotestfmt test_download_vendor_packages_command: make gomod From 1ad6beaa88459ed45ed01c6ff21a09e60e8b4e68 Mon Sep 17 00:00:00 2001 From: Tate Date: Sun, 19 Mar 2023 19:26:58 -0600 Subject: [PATCH 10/25] The if statements are incorrect now that we aren't always using the cached version (#8753) --- .github/workflows/integration-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 0c8f9d37d80..8bcec10acad 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -354,13 +354,13 @@ jobs: repository: smartcontractkit/chainlink-solana ref: ${{ needs.get_solana_sha.outputs.sha }} - name: Download Artifacts - if: ${{ needs.get_solana_sha.outputs.sha != 'develop' }} + if: ${{ needs.changes.outputs.src == 'true' && needs.get_solana_sha.outputs.sha != 'develop' }} uses: actions/download-artifact@v3 with: name: artifacts path: ${{ env.CONTRACT_ARTIFACTS_PATH }} - name: Build Test Runner - if: ${{ needs.get_solana_sha.outputs.sha != 'develop' }} + if: ${{ needs.changes.outputs.src == 'true' && needs.get_solana_sha.outputs.sha != 'develop' }} uses: smartcontractkit/chainlink-github-actions/docker/build-push@09358ba70818d6252aa3f7b8ba6022192f716e71 # v2.1.3 with: tags: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:solana.${{ needs.get_solana_sha.outputs.sha }} From d6bee4e26cb9de61718312ccdb3bc40c9f44d459 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:13:07 -0500 Subject: [PATCH 11/25] Bump peter-evans/create-pull-request from 4.2.3 to 4.2.4 (#8717) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/operator-ui.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/operator-ui.yml b/.github/workflows/operator-ui.yml index 81e5b662ecd..a5b7b8d4b1d 100644 --- a/.github/workflows/operator-ui.yml +++ b/.github/workflows/operator-ui.yml @@ -23,7 +23,7 @@ jobs: run: ./operator_ui/check.sh - name: Open PR - uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3 + uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # v4.2.4 with: title: Update Operator UI from ${{ steps.update.outputs.current_tag }} to ${{ steps.update.outputs.latest_tag }} branch: chore/update-operator-ui From bdf2f4cea7d21cfe52a3ec37538ce1462e5e6ca7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:24:21 -0500 Subject: [PATCH 12/25] Bump github/codeql-action from 2.2.6 to 2.2.7 (#8714) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jordan Krage --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index fd27332b953..ce7e0bf23e2 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,12 +38,12 @@ jobs: run: mkdir -p core/web/assets && touch core/web/assets/index.html - name: Initialize CodeQL - uses: github/codeql-action/init@16964e90ba004cdf0cd845b866b5df21038b7723 # v2.2.6 + uses: github/codeql-action/init@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7 with: languages: ${{ matrix.language }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@16964e90ba004cdf0cd845b866b5df21038b7723 # v2.2.6 + uses: github/codeql-action/analyze@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7 - name: Collect Metrics if: always() From afcfbf12ef4beae8a19b503404820d2de3a7e415 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 06:13:30 -0500 Subject: [PATCH 13/25] Bump actions/setup-go from 3 to 4 (#8715) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jordan Krage --- .github/workflows/ci-core.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/dependency-check.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 9f52c7cee84..43f8fee58af 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -67,7 +67,7 @@ jobs: - uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 with: fetch-depth: 0 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 if: needs.init.outputs.on_trigger_lint == 'true' with: go-version-file: 'go.mod' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ce7e0bf23e2..762f948b6d3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Go if: ${{ matrix.language == 'go' }} - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: 'go.mod' diff --git a/.github/workflows/dependency-check.yml b/.github/workflows/dependency-check.yml index c62e8179a46..91b055f58dc 100644 --- a/.github/workflows/dependency-check.yml +++ b/.github/workflows/dependency-check.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Go if: needs.changes.outputs.src == 'true' - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version-file: 'go.mod' id: go From 1506f5360780b1e0f38596e5d3aa83767c8a332b Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 20 Mar 2023 06:26:45 -0500 Subject: [PATCH 14/25] .github/workflows: fix clean and sonar job names (#8752) --- .github/workflows/ci-core.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 43f8fee58af..d2b140016fa 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -240,7 +240,7 @@ jobs: with: basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} - this-job-name: sonarqube-scan + this-job-name: SonarQube Scan continue-on-error: true clean: @@ -272,5 +272,5 @@ jobs: with: basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} - this-job-name: clean + this-job-name: Clean Go Tidy & Generate continue-on-error: true From 5d4cf761476e0f02717d9aaa117cf4325dc6fb37 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 20 Mar 2023 07:10:43 -0500 Subject: [PATCH 15/25] bump pyroscope, sentry, color (#8749) --- core/scripts/chaincli/handler/handler.go | 4 +- go.mod | 36 +++++----- go.sum | 83 ++++++++++++++---------- integration-tests/go.mod | 22 +++---- integration-tests/go.sum | 55 +++++++++------- 5 files changed, 111 insertions(+), 89 deletions(-) diff --git a/core/scripts/chaincli/handler/handler.go b/core/scripts/chaincli/handler/handler.go index e053c49e23a..f4ff99cb2cb 100644 --- a/core/scripts/chaincli/handler/handler.go +++ b/core/scripts/chaincli/handler/handler.go @@ -355,14 +355,14 @@ func (h *baseHandler) launchChainlinkNode(ctx context.Context, port int, contain stdErr.Close() } - if err = dockerClient.ContainerStop(ctx, nodeContainerResp.ID, nil); err != nil { + if err = dockerClient.ContainerStop(ctx, nodeContainerResp.ID, container.StopOptions{}); err != nil { log.Fatal("Failed to stop node container: ", err) } if err = dockerClient.ContainerRemove(ctx, nodeContainerResp.ID, types.ContainerRemoveOptions{}); err != nil { log.Fatal("Failed to remove node container: ", err) } - if err = dockerClient.ContainerStop(ctx, dbContainerResp.ID, nil); err != nil { + if err = dockerClient.ContainerStop(ctx, dbContainerResp.ID, container.StopOptions{}); err != nil { log.Fatal("Failed to stop DB container: ", err) } if err = dockerClient.ContainerRemove(ctx, dbContainerResp.ID, types.ContainerRemoveOptions{}); err != nil { diff --git a/go.mod b/go.mod index 727c45369a0..3e74cff1d02 100644 --- a/go.mod +++ b/go.mod @@ -8,14 +8,14 @@ require ( github.com/ava-labs/coreth v0.11.0-rc.4 github.com/btcsuite/btcd v0.23.4 github.com/danielkov/gin-helmet v0.0.0-20171108135313-1387e224435e - github.com/docker/docker v20.10.18+incompatible + github.com/docker/docker v23.0.1+incompatible github.com/docker/go-connections v0.4.0 github.com/duo-labs/webauthn v0.0.0-20210727191636-9f1b88ef44cc github.com/ethereum/go-ethereum v1.10.26 - github.com/fatih/color v1.13.0 + github.com/fatih/color v1.15.0 github.com/fxamacker/cbor/v2 v2.4.0 github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 - github.com/getsentry/sentry-go v0.15.0 + github.com/getsentry/sentry-go v0.19.0 github.com/gin-contrib/cors v1.4.0 github.com/gin-contrib/expvar v0.0.1 github.com/gin-contrib/sessions v0.0.5 @@ -28,9 +28,9 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/graph-gophers/dataloader v5.0.0+incompatible github.com/graph-gophers/graphql-go v1.3.0 - github.com/jackc/pgconn v1.13.0 - github.com/jackc/pgtype v1.12.0 - github.com/jackc/pgx/v4 v4.17.2 + github.com/jackc/pgconn v1.14.0 + github.com/jackc/pgtype v1.14.0 + github.com/jackc/pgx/v4 v4.18.1 github.com/jpillora/backoff v1.0.0 github.com/kylelemons/godebug v1.1.0 github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a @@ -50,7 +50,7 @@ require ( github.com/pressly/goose/v3 v3.5.3 github.com/prometheus/client_golang v1.14.0 github.com/prometheus/client_model v0.3.0 - github.com/pyroscope-io/client v0.4.0 + github.com/pyroscope-io/client v0.7.0 github.com/robfig/cron/v3 v3.0.1 github.com/satori/go.uuid v1.2.0 github.com/scylladb/go-reflectx v1.0.1 @@ -80,7 +80,7 @@ require ( go.dedis.ch/kyber/v3 v3.0.14 go.uber.org/multierr v1.10.0 go.uber.org/zap v1.24.0 - golang.org/x/crypto v0.6.0 + golang.org/x/crypto v0.7.0 golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 golang.org/x/sync v0.1.0 golang.org/x/term v0.6.0 @@ -96,7 +96,7 @@ require ( require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.4 // indirect filippo.io/edwards25519 v1.0.0-rc.1 // indirect - github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/Microsoft/go-winio v0.6.0 // indirect github.com/NethermindEth/juno v0.0.0-20220630151419-cbd368b222ac // indirect github.com/VictoriaMetrics/fastcache v1.10.0 // indirect github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect @@ -119,7 +119,7 @@ require ( github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/dontpanicdao/caigo v0.4.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect @@ -166,14 +166,14 @@ require ( github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect + github.com/jackc/pgproto3/v2 v2.3.2 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/jmoiron/sqlx v1.3.5 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.15.11 // indirect + github.com/klauspost/compress v1.16.0 // indirect github.com/koron/go-ssdp v0.0.2 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/libp2p/go-addr-util v0.0.2 // indirect @@ -215,7 +215,7 @@ require ( github.com/logrusorgru/aurora v2.0.3+incompatible // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect @@ -236,15 +236,15 @@ require ( github.com/multiformats/go-multistream v0.2.0 // indirect github.com/multiformats/go-varint v0.0.6 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect - github.com/opencontainers/runc v1.0.3 // indirect + github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/prometheus/tsdb v0.10.0 // indirect + github.com/pyroscope-io/godeltaprof v0.1.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rjeczalik/notify v0.9.3 // indirect github.com/rs/cors v1.8.0 // indirect @@ -277,6 +277,7 @@ require ( go.opencensus.io v0.23.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect + golang.org/x/mod v0.9.0 // indirect golang.org/x/net v0.8.0 // indirect golang.org/x/sys v0.6.0 // indirect golang.org/x/time v0.1.0 // indirect @@ -284,6 +285,7 @@ require ( gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.4.0 // indirect ) replace ( diff --git a/go.sum b/go.sum index 913c5ac43b7..8bb6d9a99d0 100644 --- a/go.sum +++ b/go.sum @@ -84,8 +84,8 @@ github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7Y github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/NethermindEth/juno v0.0.0-20220630151419-cbd368b222ac h1:TQ2m26VW06Df1P82Ed/jZhBtf13pReWyl2XQ8hy+J08= github.com/NethermindEth/juno v0.0.0-20220630151419-cbd368b222ac/go.mod h1:FTk2+xybtQe5X+oNFx+a0n5EeZMD9Nc+LCH4fxFwrEE= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= @@ -254,12 +254,13 @@ github.com/docker/cli v20.10.11+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hH github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.18+incompatible h1:SN84VYXTBNGn92T/QwIRPlum9zfemfitN7pbsp26WSc= -github.com/docker/docker v20.10.18+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= +github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dontpanicdao/caigo v0.4.0 h1:S0wRKh2EZ9qj6IfHZIGXxiJF37emRCqnZwDhRb1+DJ4= github.com/dontpanicdao/caigo v0.4.0/go.mod h1:1YuwgcVLODaS/n0vfuYN/Q0mdWs8UDfDMkSpUdkKXD4= github.com/duo-labs/webauthn v0.0.0-20210727191636-9f1b88ef44cc h1:mLNknBMRNrYNf16wFFUyhSAe1tISZN7oAfal4CZ2OxY= @@ -287,8 +288,8 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+ne github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as= @@ -323,8 +324,8 @@ github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89 github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 h1:Uc+IZ7gYqAf/rSGFplbWBSHaGolEQlNLgMgSE3ccnIQ= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9yhSRvsmYyZsshflcR6ePWYLql6UU1amW13IM= -github.com/getsentry/sentry-go v0.15.0 h1:CP9bmA7pralrVUedYZsmIHWpq/pBtXTSew7xvVpfLaA= -github.com/getsentry/sentry-go v0.15.0/go.mod h1:RZPJKSw+adu8PBNygiri/A98FqVr2HtRckJk9XVxJ9I= +github.com/getsentry/sentry-go v0.19.0 h1:BcCH3CN5tXt5aML+gwmbFwVptLLQA+eT866fCO9wVOM= +github.com/getsentry/sentry-go v0.19.0/go.mod h1:y3+lGEFEFexZtpbG1GUE2WD/f9zGyKYwpEqryTOC/nE= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g= github.com/gin-contrib/cors v1.4.0/go.mod h1:bs9pNM0x/UsmHPBWT2xZz9ROh8xYjYkiURUfmBoMlcs= @@ -634,8 +635,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= -github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= +github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= +github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -651,22 +652,23 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= -github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0= +github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= -github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= -github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= +github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0= +github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -719,8 +721,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -977,7 +979,6 @@ github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcncea github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -990,8 +991,9 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -1157,11 +1159,10 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runc v1.0.3 h1:1hbqejyQWCJBvtKAfdO0b1FmaEf2z/bxnjqbARass5k= -github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1238,13 +1239,15 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= -github.com/pyroscope-io/client v0.4.0 h1:Jofj0/9lW84wtUGlKzXwY1Bc6GJxo1PM/Q4r+w7AwXY= -github.com/pyroscope-io/client v0.4.0/go.mod h1:zRdQXIGxy0H2QbKEkCmZBR6KOLLIFYLWsdzVI0MRm2E= +github.com/pyroscope-io/client v0.7.0 h1:LWuuqPQ1oa6x7BnmUOuo/aGwdX85QGhWZUBYWWW3zdk= +github.com/pyroscope-io/client v0.7.0/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU= +github.com/pyroscope-io/godeltaprof v0.1.0 h1:UBqtjt0yZi4jTxqZmLAs34XG6ycS3vUTlhEUSq4NHLE= +github.com/pyroscope-io/godeltaprof v0.1.0/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= @@ -1467,6 +1470,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= @@ -1566,12 +1570,13 @@ golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220210151621-f4118a5b28e2/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1614,7 +1619,9 @@ 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -1678,6 +1685,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1708,6 +1717,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1819,15 +1829,18 @@ golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBc 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-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1839,6 +1852,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1921,6 +1935,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2127,11 +2142,11 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= 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/integration-tests/go.mod b/integration-tests/go.mod index 028e940445f..795ad418934 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -61,7 +61,7 @@ require ( github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/dontpanicdao/caigo v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect @@ -70,7 +70,7 @@ require ( github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect github.com/fatih/camelcase v1.0.0 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fvbommel/sortorder v1.0.2 // indirect @@ -78,7 +78,7 @@ require ( github.com/gagliardetto/binary v0.7.1 // indirect github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 // indirect github.com/gagliardetto/treeout v0.1.4 // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect + github.com/getsentry/sentry-go v0.19.0 // indirect github.com/gin-contrib/sessions v0.0.5 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/gin-gonic/gin v1.8.1 // indirect @@ -134,13 +134,13 @@ require ( github.com/ipfs/go-log v1.0.4 // indirect github.com/ipfs/go-log/v2 v2.1.1 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.13.0 // indirect + github.com/jackc/pgconn v1.14.0 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/pgtype v1.12.0 // indirect - github.com/jackc/pgx/v4 v4.17.2 // indirect + github.com/jackc/pgproto3/v2 v2.3.2 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/pgtype v1.14.0 // indirect + github.com/jackc/pgx/v4 v4.18.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect @@ -148,7 +148,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.15.15 // indirect + github.com/klauspost/compress v1.16.0 // indirect github.com/koron/go-ssdp v0.0.2 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/leanovate/gopter v0.2.10-0.20210127095200-9abe2343507a // indirect @@ -240,7 +240,7 @@ require ( github.com/prometheus/procfs v0.9.0 // indirect github.com/prometheus/prometheus v1.8.2-0.20200727090838-6f296594a852 // indirect github.com/prometheus/tsdb v0.10.0 // indirect - github.com/pyroscope-io/client v0.6.0 // indirect + github.com/pyroscope-io/client v0.7.0 // indirect github.com/pyroscope-io/godeltaprof v0.1.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rjeczalik/notify v0.9.3 // indirect @@ -289,7 +289,7 @@ require ( go.uber.org/goleak v1.2.0 // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect - golang.org/x/crypto v0.6.0 // indirect + golang.org/x/crypto v0.7.0 // indirect golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect golang.org/x/mod v0.9.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 1b351e83fed..4af89884780 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -124,7 +124,7 @@ github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYr github.com/Masterminds/squirrel v0.0.0-20161115235646-20f192218cf5/go.mod h1:xnKTFzjGUiZtiOagBsfnvomW+nJg2usB1ZpordQWqNM= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/NethermindEth/juno v0.0.0-20220630151419-cbd368b222ac h1:TQ2m26VW06Df1P82Ed/jZhBtf13pReWyl2XQ8hy+J08= @@ -369,8 +369,9 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-plugins-helpers v0.0.0-20181025120712-1e6269c305b8/go.mod h1:LFyLie6XcDbyKGeVK6bHe+9aJTYCxWLBg5IrJZOaXKA= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dontpanicdao/caigo v0.4.0 h1:S0wRKh2EZ9qj6IfHZIGXxiJF37emRCqnZwDhRb1+DJ4= @@ -417,8 +418,8 @@ github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8 github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= @@ -453,8 +454,8 @@ github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89 github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 h1:Uc+IZ7gYqAf/rSGFplbWBSHaGolEQlNLgMgSE3ccnIQ= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/getsentry/sentry-go v0.19.0 h1:BcCH3CN5tXt5aML+gwmbFwVptLLQA+eT866fCO9wVOM= +github.com/getsentry/sentry-go v0.19.0/go.mod h1:y3+lGEFEFexZtpbG1GUE2WD/f9zGyKYwpEqryTOC/nE= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g= @@ -968,8 +969,8 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= -github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= +github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= +github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -985,23 +986,24 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= -github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0= +github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= -github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= -github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= +github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0= +github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -1072,8 +1074,8 @@ github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= -github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -1352,7 +1354,6 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -1582,8 +1583,8 @@ github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= -github.com/opencontainers/runc v1.0.3 h1:1hbqejyQWCJBvtKAfdO0b1FmaEf2z/bxnjqbARass5k= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y= github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02 h1:0R5mDLI66Qw13qN80TRz85zthQ2nf2+uDyiV23w6c3Q= github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -1696,8 +1697,8 @@ github.com/prometheus/prometheus v1.8.2-0.20200727090838-6f296594a852/go.mod h1: github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= -github.com/pyroscope-io/client v0.6.0 h1:rcUFgcnfmuyVYDYT+4d0zfqc8YedOyruHSsUb9ImaBw= -github.com/pyroscope-io/client v0.6.0/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU= +github.com/pyroscope-io/client v0.7.0 h1:LWuuqPQ1oa6x7BnmUOuo/aGwdX85QGhWZUBYWWW3zdk= +github.com/pyroscope-io/client v0.7.0/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU= github.com/pyroscope-io/godeltaprof v0.1.0 h1:UBqtjt0yZi4jTxqZmLAs34XG6ycS3vUTlhEUSq4NHLE= github.com/pyroscope-io/godeltaprof v0.1.0/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE= github.com/rafaeljusto/redigomock v0.0.0-20190202135759-257e089e14a1/go.mod h1:JaY6n2sDr+z2WTsXkOmNRUfDy6FN0L6Nk7x06ndm4tY= @@ -2084,9 +2085,9 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2204,6 +2205,7 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2363,12 +2365,14 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2382,6 +2386,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2693,7 +2698,7 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 8ef12e1eae37bbb976651be2486f7fa98130f489 Mon Sep 17 00:00:00 2001 From: george-dorin <120329946+george-dorin@users.noreply.github.com> Date: Mon, 20 Mar 2023 14:46:42 +0200 Subject: [PATCH 16/25] Set node name as JAID to prevent overwrite (#8737) --- core/cmd/evm_node_commands_test.go | 29 ++++++++---- core/cmd/solana_node_commands_test.go | 25 ++++++---- core/cmd/starknet_node_commands_test.go | 61 +++++++++++++++++++++++++ core/web/presenters/evm_chain.go | 2 +- core/web/presenters/solana_chain.go | 2 +- core/web/presenters/starknet_chain.go | 2 +- 6 files changed, 101 insertions(+), 20 deletions(-) create mode 100644 core/cmd/starknet_node_commands_test.go diff --git a/core/cmd/evm_node_commands_test.go b/core/cmd/evm_node_commands_test.go index 5e823f27568..83ba35e4225 100644 --- a/core/cmd/evm_node_commands_test.go +++ b/core/cmd/evm_node_commands_test.go @@ -27,16 +27,22 @@ func TestClient_IndexEVMNodes(t *testing.T) { t.Parallel() chainID := newRandChainID() - node := evmcfg.Node{ - Name: ptr("Test node"), + node1 := evmcfg.Node{ + Name: ptr("Test node 1"), WSURL: models.MustParseURL("ws://localhost:8546"), HTTPURL: models.MustParseURL("http://localhost:8546"), SendOnly: ptr(false), } + node2 := evmcfg.Node{ + Name: ptr("Test node 2"), + WSURL: models.MustParseURL("ws://localhost:8547"), + HTTPURL: models.MustParseURL("http://localhost:8547"), + SendOnly: ptr(false), + } chain := evmcfg.EVMConfig{ ChainID: chainID, Chain: evmcfg.Defaults(chainID), - Nodes: evmcfg.EVMNodes{&node}, + Nodes: evmcfg.EVMNodes{&node1, &node2}, } app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.EVM = evmcfg.EVMConfigs{&chain} @@ -46,11 +52,16 @@ func TestClient_IndexEVMNodes(t *testing.T) { require.Nil(t, cmd.NewEVMNodeClient(client).IndexNodes(cltest.EmptyCLIContext())) require.NotEmpty(t, r.Renders) nodes := *r.Renders[0].(*cmd.EVMNodePresenters) - require.Len(t, nodes, 1) - n := nodes[0] - assert.Equal(t, "0", n.ID) - assert.Equal(t, *node.Name, n.Name) - assert.Equal(t, node.WSURL.String(), n.WSURL.String) - assert.Equal(t, node.HTTPURL.String(), n.HTTPURL.String) + require.Len(t, nodes, 2) + n1 := nodes[0] + n2 := nodes[1] + assert.Equal(t, "Test node 1", n1.ID) + assert.Equal(t, *node1.Name, n1.Name) + assert.Equal(t, node1.WSURL.String(), n1.WSURL.String) + assert.Equal(t, node1.HTTPURL.String(), n1.HTTPURL.String) + assert.Equal(t, "Test node 2", n2.ID) + assert.Equal(t, *node2.Name, n2.Name) + assert.Equal(t, node2.WSURL.String(), n2.WSURL.String) + assert.Equal(t, node2.HTTPURL.String(), n2.HTTPURL.String) assertTableRenders(t, r) } diff --git a/core/cmd/solana_node_commands_test.go b/core/cmd/solana_node_commands_test.go index c70105486d6..6a126fea0ea 100644 --- a/core/cmd/solana_node_commands_test.go +++ b/core/cmd/solana_node_commands_test.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-relay/pkg/utils" solcfg "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" + "github.com/smartcontractkit/chainlink/core/chains/solana" "github.com/smartcontractkit/chainlink/core/cmd" "github.com/smartcontractkit/chainlink/core/internal/cltest" @@ -30,13 +31,17 @@ func TestClient_IndexSolanaNodes(t *testing.T) { t.Parallel() id := solanatest.RandomChainID() - node := solcfg.Node{ + node1 := solcfg.Node{ + Name: ptr("first"), + URL: utils.MustParseURL("https://solana1.example"), + } + node2 := solcfg.Node{ Name: ptr("second"), - URL: utils.MustParseURL("https://solana.example"), + URL: utils.MustParseURL("https://solana2.example"), } chain := solana.SolanaConfig{ ChainID: &id, - Nodes: solana.SolanaNodes{&node}, + Nodes: solana.SolanaNodes{&node1, &node2}, } app := solanaStartNewApplication(t, &chain) client, r := app.NewClientAndRenderer() @@ -44,10 +49,14 @@ func TestClient_IndexSolanaNodes(t *testing.T) { require.Nil(t, cmd.NewSolanaNodeClient(client).IndexNodes(cltest.EmptyCLIContext())) require.NotEmpty(t, r.Renders) nodes := *r.Renders[0].(*cmd.SolanaNodePresenters) - require.Len(t, nodes, 1) - n := nodes[0] - assert.Equal(t, "0", n.ID) - assert.Equal(t, *node.Name, n.Name) - assert.Equal(t, (*url.URL)(node.URL).String(), n.SolanaURL) + require.Len(t, nodes, 2) + n1 := nodes[0] + n2 := nodes[1] + assert.Equal(t, "first", n1.ID) + assert.Equal(t, *node1.Name, n1.Name) + assert.Equal(t, (*url.URL)(node1.URL).String(), n1.SolanaURL) + assert.Equal(t, "second", n2.ID) + assert.Equal(t, *node2.Name, n2.Name) + assert.Equal(t, (*url.URL)(node2.URL).String(), n2.SolanaURL) assertTableRenders(t, r) } diff --git a/core/cmd/starknet_node_commands_test.go b/core/cmd/starknet_node_commands_test.go new file mode 100644 index 00000000000..9110566e740 --- /dev/null +++ b/core/cmd/starknet_node_commands_test.go @@ -0,0 +1,61 @@ +package cmd_test + +import ( + "net/url" + "testing" + + "github.com/smartcontractkit/chainlink-relay/pkg/utils" + "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/config" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/core/chains/starknet" + "github.com/smartcontractkit/chainlink/core/cmd" + "github.com/smartcontractkit/chainlink/core/internal/cltest" + "github.com/smartcontractkit/chainlink/core/services/chainlink" +) + +func starknetStartNewApplication(t *testing.T, cfgs ...*starknet.StarknetConfig) *cltest.TestApplication { + for i := range cfgs { + cfgs[i].SetDefaults() + } + return startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { + c.Starknet = cfgs + c.EVM = nil + c.Solana = nil + }) +} + +func TestClient_IndexStarkNetNodes(t *testing.T) { + t.Parallel() + + id := "starknet chain ID" + node1 := config.Node{ + Name: ptr("first"), + URL: utils.MustParseURL("https://starknet1.example"), + } + node2 := config.Node{ + Name: ptr("second"), + URL: utils.MustParseURL("https://starknet2.example"), + } + chain := starknet.StarknetConfig{ + ChainID: &id, + Nodes: starknet.StarknetNodes{&node1, &node2}, + } + app := starknetStartNewApplication(t, &chain) + client, r := app.NewClientAndRenderer() + + require.Nil(t, cmd.NewStarkNetNodeClient(client).IndexNodes(cltest.EmptyCLIContext())) + require.NotEmpty(t, r.Renders) + nodes := *r.Renders[0].(*cmd.StarkNetNodePresenters) + require.Len(t, nodes, 2) + n1 := nodes[0] + n2 := nodes[1] + assert.Equal(t, "first", n1.ID) + assert.Equal(t, *node1.Name, n1.Name) + assert.Equal(t, (*url.URL)(node1.URL).String(), n1.URL) + assert.Equal(t, "second", n2.ID) + assert.Equal(t, *node2.Name, n2.Name) + assert.Equal(t, (*url.URL)(node2.URL).String(), n2.URL) + assertTableRenders(t, r) +} diff --git a/core/web/presenters/evm_chain.go b/core/web/presenters/evm_chain.go index 61645f8cff2..a9f24b6e756 100644 --- a/core/web/presenters/evm_chain.go +++ b/core/web/presenters/evm_chain.go @@ -44,7 +44,7 @@ func (r EVMNodeResource) GetName() string { // NewEVMNodeResource returns a new EVMNodeResource for node. func NewEVMNodeResource(node evmtypes.Node) EVMNodeResource { return EVMNodeResource{ - JAID: NewJAIDInt32(node.ID), + JAID: NewJAID(node.Name), Name: node.Name, EVMChainID: node.EVMChainID, WSURL: node.WSURL, diff --git a/core/web/presenters/solana_chain.go b/core/web/presenters/solana_chain.go index b07e16e7204..48e389b5ee0 100644 --- a/core/web/presenters/solana_chain.go +++ b/core/web/presenters/solana_chain.go @@ -41,7 +41,7 @@ func (r SolanaNodeResource) GetName() string { // NewSolanaNodeResource returns a new SolanaNodeResource for node. func NewSolanaNodeResource(node db.Node) SolanaNodeResource { return SolanaNodeResource{ - JAID: NewJAIDInt32(node.ID), + JAID: NewJAID(node.Name), Name: node.Name, SolanaChainID: node.SolanaChainID, SolanaURL: node.SolanaURL, diff --git a/core/web/presenters/starknet_chain.go b/core/web/presenters/starknet_chain.go index c118987d6bc..ebc2b2caf3d 100644 --- a/core/web/presenters/starknet_chain.go +++ b/core/web/presenters/starknet_chain.go @@ -41,7 +41,7 @@ func (r StarkNetNodeResource) GetName() string { // NewStarkNetNodeResource returns a new StarkNetNodeResource for node. func NewStarkNetNodeResource(node db.Node) StarkNetNodeResource { return StarkNetNodeResource{ - JAID: NewJAIDInt32(node.ID), + JAID: NewJAID(node.Name), Name: node.Name, ChainID: node.ChainID, URL: node.URL, From 988b0fe1105fbeeac3c464e05f7dc0cf161e1410 Mon Sep 17 00:00:00 2001 From: "Essam A. Hassan" Date: Mon, 20 Mar 2023 14:14:37 +0100 Subject: [PATCH 17/25] Integrate Gas estimators healthcheck in txmgr (#8726) --- common/txmgr/types/fee_estimator.go | 10 +++-- common/txmgr/types/mocks/fee_estimator.go | 44 +++++++++++++++++++ core/chains/evm/gas/arbitrum_estimator.go | 14 +++++- core/chains/evm/gas/fixed_price_estimator.go | 3 ++ core/chains/evm/gas/l2_suggested_estimator.go | 8 ++++ core/chains/evm/gas/mocks/evm_estimator.go | 44 +++++++++++++++++++ core/chains/evm/gas/models.go | 5 ++- core/chains/evm/txmgr/txmgr.go | 1 + 8 files changed, 122 insertions(+), 7 deletions(-) diff --git a/common/txmgr/types/fee_estimator.go b/common/txmgr/types/fee_estimator.go index 956690d4c11..3199870bf3f 100644 --- a/common/txmgr/types/fee_estimator.go +++ b/common/txmgr/types/fee_estimator.go @@ -1,6 +1,10 @@ package types -import "context" +import ( + "context" + + "github.com/smartcontractkit/chainlink/core/services" +) // Opt is an option for a gas estimator type Opt int @@ -22,10 +26,10 @@ type PriorAttempt[FEE any, HASH any] interface { // FeeEstimator provides a generic interface for fee estimation // //go:generate mockery --quiet --name FeeEstimator --output ./mocks/ --case=underscore + type FeeEstimator[H Head, FEE any, MAXPRICE any, HASH any] interface { + services.ServiceCtx HeadTrackable[H] - Start(context.Context) error - Close() error GetFee(ctx context.Context, calldata []byte, feeLimit uint32, maxFeePrice MAXPRICE, opts ...Opt) (fee FEE, chainSpecificFeeLimit uint32, err error) BumpFee(ctx context.Context, originalFee FEE, feeLimit uint32, maxFeePrice MAXPRICE, attempts []PriorAttempt[FEE, HASH]) (bumpedFee FEE, chainSpecificFeeLimit uint32, err error) diff --git a/common/txmgr/types/mocks/fee_estimator.go b/common/txmgr/types/mocks/fee_estimator.go index ad1da298b84..6b30d81bf27 100644 --- a/common/txmgr/types/mocks/fee_estimator.go +++ b/common/txmgr/types/mocks/fee_estimator.go @@ -97,11 +97,55 @@ func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) GetFee(ctx context.Context, call return r0, r1, r2 } +// HealthReport provides a mock function with given fields: +func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) HealthReport() map[string]error { + ret := _m.Called() + + var r0 map[string]error + if rf, ok := ret.Get(0).(func() map[string]error); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]error) + } + } + + return r0 +} + +// Name provides a mock function with given fields: +func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + // OnNewLongestChain provides a mock function with given fields: ctx, head func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) OnNewLongestChain(ctx context.Context, head H) { _m.Called(ctx, head) } +// Ready provides a mock function with given fields: +func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) Ready() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + // Start provides a mock function with given fields: _a0 func (_m *FeeEstimator[H, FEE, MAXPRICE, HASH]) Start(_a0 context.Context) error { ret := _m.Called(_a0) diff --git a/core/chains/evm/gas/arbitrum_estimator.go b/core/chains/evm/gas/arbitrum_estimator.go index 4e51ec93560..4a826c7d1f8 100644 --- a/core/chains/evm/gas/arbitrum_estimator.go +++ b/core/chains/evm/gas/arbitrum_estimator.go @@ -31,8 +31,6 @@ type ethClient interface { // arbitrumEstimator is an Estimator which extends l2SuggestedPriceEstimator to use getPricesInArbGas() for gas limit estimation. type arbitrumEstimator struct { - utils.StartStopOnce - cfg ArbConfig EvmEstimator // *l2SuggestedPriceEstimator @@ -49,6 +47,8 @@ type arbitrumEstimator struct { chInitialised chan struct{} chStop chan struct{} chDone chan struct{} + + utils.StartStopOnce } func NewArbitrumEstimator(lggr logger.Logger, cfg ArbConfig, rpcClient rpcClient, ethClient ethClient) EvmEstimator { @@ -66,6 +66,10 @@ func NewArbitrumEstimator(lggr logger.Logger, cfg ArbConfig, rpcClient rpcClient } } +func (a *arbitrumEstimator) Name() string { + return a.logger.Name() +} + func (a *arbitrumEstimator) Start(ctx context.Context) error { return a.StartOnce("ArbitrumEstimator", func() error { if err := a.EvmEstimator.Start(ctx); err != nil { @@ -85,6 +89,12 @@ func (a *arbitrumEstimator) Close() error { }) } +func (a *arbitrumEstimator) Ready() error { return a.StartStopOnce.Ready() } + +func (a *arbitrumEstimator) HealthReport() map[string]error { + return map[string]error{a.Name(): a.StartStopOnce.Healthy()} +} + // GetLegacyGas estimates both the gas price and the gas limit. // - Price is delegated to the embedded l2SuggestedPriceEstimator. // - Limit is computed from the dynamic values perL2Tx and perL1CalldataUnit, provided by the getPricesInArbGas() method diff --git a/core/chains/evm/gas/fixed_price_estimator.go b/core/chains/evm/gas/fixed_price_estimator.go index cae703446e9..cc9523f0b22 100644 --- a/core/chains/evm/gas/fixed_price_estimator.go +++ b/core/chains/evm/gas/fixed_price_estimator.go @@ -33,6 +33,9 @@ func (f *fixedPriceEstimator) Start(context.Context) error { } return nil } +func (f *fixedPriceEstimator) Name() string { return f.lggr.Name() } +func (f *fixedPriceEstimator) Ready() error { return nil } +func (f *fixedPriceEstimator) HealthReport() map[string]error { return map[string]error{} } func (f *fixedPriceEstimator) Close() error { return nil } func (f *fixedPriceEstimator) OnNewLongestChain(_ context.Context, _ *evmtypes.Head) {} diff --git a/core/chains/evm/gas/l2_suggested_estimator.go b/core/chains/evm/gas/l2_suggested_estimator.go index 1a50eb45527..5a8c1269eff 100644 --- a/core/chains/evm/gas/l2_suggested_estimator.go +++ b/core/chains/evm/gas/l2_suggested_estimator.go @@ -56,6 +56,10 @@ func NewL2SuggestedPriceEstimator(lggr logger.Logger, client rpcClient) EvmEstim } } +func (o *l2SuggestedPriceEstimator) Name() string { + return o.logger.Name() +} + func (o *l2SuggestedPriceEstimator) Start(context.Context) error { return o.StartOnce("L2SuggestedEstimator", func() error { go o.run() @@ -71,6 +75,10 @@ func (o *l2SuggestedPriceEstimator) Close() error { }) } +func (o *l2SuggestedPriceEstimator) HealthReport() map[string]error { + return map[string]error{o.Name(): o.StartStopOnce.Healthy()} +} + func (o *l2SuggestedPriceEstimator) run() { defer close(o.chDone) diff --git a/core/chains/evm/gas/mocks/evm_estimator.go b/core/chains/evm/gas/mocks/evm_estimator.go index 5bdb39a91ed..2df63962131 100644 --- a/core/chains/evm/gas/mocks/evm_estimator.go +++ b/core/chains/evm/gas/mocks/evm_estimator.go @@ -170,11 +170,55 @@ func (_m *EvmEstimator) GetLegacyGas(ctx context.Context, calldata []byte, gasLi return r0, r1, r2 } +// HealthReport provides a mock function with given fields: +func (_m *EvmEstimator) HealthReport() map[string]error { + ret := _m.Called() + + var r0 map[string]error + if rf, ok := ret.Get(0).(func() map[string]error); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]error) + } + } + + return r0 +} + +// Name provides a mock function with given fields: +func (_m *EvmEstimator) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + // OnNewLongestChain provides a mock function with given fields: ctx, head func (_m *EvmEstimator) OnNewLongestChain(ctx context.Context, head *evmtypes.Head) { _m.Called(ctx, head) } +// Ready provides a mock function with given fields: +func (_m *EvmEstimator) Ready() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + // Start provides a mock function with given fields: _a0 func (_m *EvmEstimator) Start(_a0 context.Context) error { ret := _m.Called(_a0) diff --git a/core/chains/evm/gas/models.go b/core/chains/evm/gas/models.go index a8f81bc3aa1..b92e3590317 100644 --- a/core/chains/evm/gas/models.go +++ b/core/chains/evm/gas/models.go @@ -17,6 +17,7 @@ import ( evmtypes "github.com/smartcontractkit/chainlink/core/chains/evm/types" "github.com/smartcontractkit/chainlink/core/config" "github.com/smartcontractkit/chainlink/core/logger" + "github.com/smartcontractkit/chainlink/core/services" ) var ( @@ -112,8 +113,8 @@ func MakeEvmPriorAttempt(a txmgrtypes.PriorAttempt[EvmFee, common.Hash]) EvmPrio //go:generate mockery --quiet --name EvmEstimator --output ./mocks/ --case=underscore type EvmEstimator interface { txmgrtypes.HeadTrackable[*evmtypes.Head] - Start(context.Context) error - Close() error + services.ServiceCtx + // GetLegacyGas Calculates initial gas fee for non-EIP1559 transaction // maxGasPriceWei parameter is the highest possible gas fee cap that the function will return GetLegacyGas(ctx context.Context, calldata []byte, gasLimit uint32, maxGasPriceWei *assets.Wei, opts ...txmgrtypes.Opt) (gasPrice *assets.Wei, chainSpecificGasLimit uint32, err error) diff --git a/core/chains/evm/txmgr/txmgr.go b/core/chains/evm/txmgr/txmgr.go index b2e6dea1664..ab19320b325 100644 --- a/core/chains/evm/txmgr/txmgr.go +++ b/core/chains/evm/txmgr/txmgr.go @@ -297,6 +297,7 @@ func (b *Txm) HealthReport() map[string]error { b.IfStarted(func() { maps.Copy(report, b.ethBroadcaster.HealthReport()) maps.Copy(report, b.ethConfirmer.HealthReport()) + maps.Copy(report, b.gasEstimator.HealthReport()) }) if b.config.EvmUseForwarders() { From e2d01b52e9bed9ace1c0b955fbc43b43f8a4a162 Mon Sep 17 00:00:00 2001 From: "Essam A. Hassan" Date: Mon, 20 Mar 2023 14:36:15 +0100 Subject: [PATCH 18/25] Remove references for healthy calls in relayer ifaces (#8755) --- core/chains/chain_set.go | 16 ++-------------- core/chains/solana/mocks/chain.go | 14 -------------- core/chains/solana/mocks/chain_set.go | 14 -------------- core/services/relay/evm/evm.go | 12 ------------ core/services/relay/evm/mercury_provider.go | 6 ------ go.mod | 6 +++--- go.sum | 12 ++++++------ integration-tests/go.mod | 4 ++-- integration-tests/go.sum | 10 +++++----- 9 files changed, 18 insertions(+), 76 deletions(-) diff --git a/core/chains/chain_set.go b/core/chains/chain_set.go index fa593e8ccd0..f11de943a96 100644 --- a/core/chains/chain_set.go +++ b/core/chains/chain_set.go @@ -37,18 +37,12 @@ type NodesConfig[I ID, N Node] interface { // ChainSet manages a live set of ChainService instances. type ChainSet[I ID, C Config, N Node, S ChainService[C]] interface { services.ServiceCtx + ChainsConfig[I, C] + NodesConfig[I, N] Name() string HealthReport() map[string]error - // FIXME: for backward compat we will leave this until relayer libs remove Healthy refs - // https://smartcontract-it.atlassian.net/browse/BCF-2140 - Healthy() error - - ChainsConfig[I, C] - - NodesConfig[I, N] - // Chain returns the ChainService for this ID (if a configuration is available), creating one if necessary. Chain(context.Context, I) (S, error) } @@ -169,12 +163,6 @@ func (c *chainSet[I, C, N, S]) Ready() (err error) { return } -// FIXME: for backward compat we will leave this until relayer libs remove Healthy refs -// https://smartcontract-it.atlassian.net/browse/BCF-2140 -func (c *chainSet[I, C, N, S]) Healthy() error { - return nil -} - func (c *chainSet[I, C, N, S]) Name() string { return c.lggr.Name() } diff --git a/core/chains/solana/mocks/chain.go b/core/chains/solana/mocks/chain.go index 070719dd3ac..bdac9e79224 100644 --- a/core/chains/solana/mocks/chain.go +++ b/core/chains/solana/mocks/chain.go @@ -66,20 +66,6 @@ func (_m *Chain) HealthReport() map[string]error { return r0 } -// Healthy provides a mock function with given fields: -func (_m *Chain) Healthy() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - // ID provides a mock function with given fields: func (_m *Chain) ID() string { ret := _m.Called() diff --git a/core/chains/solana/mocks/chain_set.go b/core/chains/solana/mocks/chain_set.go index ddbf6a6aeae..c8c39582b8f 100644 --- a/core/chains/solana/mocks/chain_set.go +++ b/core/chains/solana/mocks/chain_set.go @@ -70,20 +70,6 @@ func (_m *ChainSet) HealthReport() map[string]error { return r0 } -// Healthy provides a mock function with given fields: -func (_m *ChainSet) Healthy() error { - ret := _m.Called() - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - // Name provides a mock function with given fields: func (_m *ChainSet) Name() string { ret := _m.Called() diff --git a/core/services/relay/evm/evm.go b/core/services/relay/evm/evm.go index 864bce0c47a..062913910be 100644 --- a/core/services/relay/evm/evm.go +++ b/core/services/relay/evm/evm.go @@ -79,12 +79,6 @@ func (r *Relayer) Ready() error { return nil } -// FIXME: for backward compat we will leave this until relayer libs remove Healthy refs -// https://smartcontract-it.atlassian.net/browse/BCF-2140 -func (r *Relayer) Healthy() error { - return nil -} - func (r *Relayer) HealthReport() map[string]error { return r.chainSet.HealthReport() } @@ -447,12 +441,6 @@ func (p *medianProvider) Ready() error { return multierr.Combine(p.configWatcher.Ready(), p.contractTransmitter.Ready()) } -// FIXME: for backward compat we will leave this until relayer libs remove Healthy refs -// https://smartcontract-it.atlassian.net/browse/BCF-2140 -func (p *medianProvider) Healthy() error { - return nil -} - func (p *medianProvider) HealthReport() map[string]error { report := p.configWatcher.HealthReport() maps.Copy(report, p.contractTransmitter.HealthReport()) diff --git a/core/services/relay/evm/mercury_provider.go b/core/services/relay/evm/mercury_provider.go index a4fa19af538..53a4787ca9b 100644 --- a/core/services/relay/evm/mercury_provider.go +++ b/core/services/relay/evm/mercury_provider.go @@ -53,12 +53,6 @@ func (p *mercuryProvider) Ready() error { return errors.Join(p.configWatcher.Ready(), p.transmitter.Ready()) } -// FIXME: for backward compat we will leave this until relayer libs remove Healthy refs -// https://smartcontract-it.atlassian.net/browse/BCF-2140 -func (p *mercuryProvider) Healthy() error { - return nil -} - func (p *mercuryProvider) Name() string { return p.logger.Name() } diff --git a/go.mod b/go.mod index 3e74cff1d02..795cea61c41 100644 --- a/go.mod +++ b/go.mod @@ -56,9 +56,9 @@ require ( github.com/scylladb/go-reflectx v1.0.1 github.com/shirou/gopsutil/v3 v3.22.12 github.com/shopspring/decimal v1.3.1 - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230315152308-58f7fae0fe5f - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230313192900-6270bc7c445f - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230223033525-5be75fb81118 + github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230317181219-4334c233b581 + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1 github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 github.com/smartcontractkit/ocr2keepers v0.6.14 github.com/smartcontractkit/ocr2vrf v0.0.0-20230313164535-dce9b4be73a3 diff --git a/go.sum b/go.sum index 8bb6d9a99d0..655d1a9770f 100644 --- a/go.sum +++ b/go.sum @@ -1302,13 +1302,13 @@ github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230315152308-58f7fae0fe5f h1:T/MZCIbCUYhqePSu1ZeHIfm5wYhEV4IrRMwbt7f7g+o= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230315152308-58f7fae0fe5f/go.mod h1:Uqt8amCr4U4/6n+pvr1OMlNBzSqYSr6oeWAaBsBdPYE= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230313192900-6270bc7c445f h1:8u/sTyTOcokP/QQH0IW1ifzwxSk3eT+MntovfirkCgE= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230313192900-6270bc7c445f/go.mod h1:cigIrApl6WcvLhaYeevIWc91PyW2NAJRcmbmBMaIZg4= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 h1:TClDxiM7MbjYlmEjqel7npTveEEhCZ4uNH6e94qw4u0= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7/go.mod h1:Uqt8amCr4U4/6n+pvr1OMlNBzSqYSr6oeWAaBsBdPYE= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230317181219-4334c233b581 h1:3I+/UdaDU2o0hcMzTLEhcxF7uvwVhCKgcciuzV1E9nw= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230317181219-4334c233b581/go.mod h1:iHMsx8HUSpq//xsC19+IexGtJ8GQWe7aMdsYjwr/Kug= github.com/smartcontractkit/chainlink-starknet/ops v0.0.0-20230214070706-9544d04bb4d8 h1:GRx8L71lgGIeTYIbgsXGQ/JFWKPEnAmJVO42zQ3n69A= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230223033525-5be75fb81118 h1:Srn9VdZq4xYuFWm96AvzmYTvg8Q7P3Eu7ztdVxtZsrU= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230223033525-5be75fb81118/go.mod h1:UPMx1+qH6/T+6DMf3x3ReiD2EJuQOuaG5iIUUPEKL9U= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1 h1:K5OvP64RJgJa8OGbsle5jzt6V/Mpqzl5sbx9wZH8oGE= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1/go.mod h1:3xUS0kadHzpEM7JtoTHUJkSkByHCU+LbxnQVgCaLNJA= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 h1:P3dhh6UkjA6Fxj39y4vQflv7GoDCa+QC/Du7CCDxjfQ= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407/go.mod h1:5JnCHuYgmIP9ZyXzgAfI5Iwu0WxBtBKp+ApeT5o1Cjw= github.com/smartcontractkit/ocr2keepers v0.6.14 h1:Rg+SYd8PCyd4CcCetwnRKjVEQsHVsV6QOaWcLhi+6sg= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 795ad418934..22bdc9d9851 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -15,7 +15,7 @@ require ( github.com/slack-go/slack v0.12.1 github.com/smartcontractkit/chainlink v1.10.0 github.com/smartcontractkit/chainlink-env v0.30.20 - github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230315152308-58f7fae0fe5f + github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 github.com/smartcontractkit/chainlink-testing-framework v1.10.9 github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 github.com/smartcontractkit/ocr2keepers v0.6.14 @@ -252,7 +252,7 @@ require ( github.com/shirou/gopsutil/v3 v3.22.12 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230223033525-5be75fb81118 // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1 // indirect github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb // indirect github.com/smartcontractkit/wsrpc v0.6.2-0.20230317160629-382a1ac921d8 // indirect github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 4af89884780..59f04a16c97 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1785,11 +1785,11 @@ github.com/slack-go/slack v0.12.1 h1:X97b9g2hnITDtNsNe5GkGx6O2/Sz/uC20ejRZN6QxOw github.com/slack-go/slack v0.12.1/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= github.com/smartcontractkit/chainlink-env v0.30.20 h1:3VQIQcXoprC3AIq1lVhiby3ZEWokuKhVTlCToIvt2uc= github.com/smartcontractkit/chainlink-env v0.30.20/go.mod h1:9c0Czq4a6wZKY20BcoAlK29DnejQIiLo/MwKYtSFnHk= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230315152308-58f7fae0fe5f h1:T/MZCIbCUYhqePSu1ZeHIfm5wYhEV4IrRMwbt7f7g+o= -github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230315152308-58f7fae0fe5f/go.mod h1:Uqt8amCr4U4/6n+pvr1OMlNBzSqYSr6oeWAaBsBdPYE= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230313192900-6270bc7c445f h1:8u/sTyTOcokP/QQH0IW1ifzwxSk3eT+MntovfirkCgE= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230223033525-5be75fb81118 h1:Srn9VdZq4xYuFWm96AvzmYTvg8Q7P3Eu7ztdVxtZsrU= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230223033525-5be75fb81118/go.mod h1:UPMx1+qH6/T+6DMf3x3ReiD2EJuQOuaG5iIUUPEKL9U= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 h1:TClDxiM7MbjYlmEjqel7npTveEEhCZ4uNH6e94qw4u0= +github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7/go.mod h1:Uqt8amCr4U4/6n+pvr1OMlNBzSqYSr6oeWAaBsBdPYE= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230317181219-4334c233b581 h1:3I+/UdaDU2o0hcMzTLEhcxF7uvwVhCKgcciuzV1E9nw= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1 h1:K5OvP64RJgJa8OGbsle5jzt6V/Mpqzl5sbx9wZH8oGE= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1/go.mod h1:3xUS0kadHzpEM7JtoTHUJkSkByHCU+LbxnQVgCaLNJA= github.com/smartcontractkit/chainlink-testing-framework v1.10.9 h1:F3b1xkXM/iRJX4PSlb3MxqtjfqwqCAfQsSddRtdeHf0= github.com/smartcontractkit/chainlink-testing-framework v1.10.9/go.mod h1:fofuQ/GhaV1dRA4wyF4ZSwpvLsqJE4vvk7Ei5rcL4SA= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 h1:P3dhh6UkjA6Fxj39y4vQflv7GoDCa+QC/Du7CCDxjfQ= From 35f07906064dbefb6050d9bb4e7bf3223e6f8624 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 20 Mar 2023 09:33:40 -0500 Subject: [PATCH 19/25] remove config mutations; clean up interfaces (#8751) --- core/chains/chain_set.go | 31 +++++---------- core/chains/constraints.go | 2 - core/chains/evm/chain_set.go | 6 +-- core/chains/evm/types/types.go | 4 +- core/chains/orm.go | 10 +++-- core/chains/orm_immutable.go | 58 ++++++++++++++--------------- core/chains/orm_test.go | 3 -- core/chains/solana/chain.go | 10 ----- core/chains/solana/chain_set.go | 4 +- core/chains/solana/config.go | 4 -- core/chains/solana/mocks/chain.go | 7 ---- core/chains/solana/orm.go | 4 +- core/chains/starknet/chain.go | 9 ----- core/chains/starknet/chain_set.go | 4 +- core/chains/starknet/config.go | 4 -- core/chains/starknet/types/types.go | 4 +- core/web/chains_controller.go | 4 +- core/web/nodes_controller.go | 4 +- go.mod | 4 +- go.sum | 8 ++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 6 +-- 22 files changed, 70 insertions(+), 122 deletions(-) diff --git a/core/chains/chain_set.go b/core/chains/chain_set.go index f11de943a96..5fdbd93372b 100644 --- a/core/chains/chain_set.go +++ b/core/chains/chain_set.go @@ -3,7 +3,6 @@ package chains import ( "context" "fmt" - "sync" "github.com/pkg/errors" "go.uber.org/multierr" @@ -22,14 +21,14 @@ var ( ErrChainIDInvalid = errors.New("chain id does not match any local chains") ) -// ChainsConfig is a generic interface for ChainConfig[I, C] configuration. -type ChainsConfig[I ID, C Config] interface { +// Chains is a generic interface for ChainConfig[I, C] configuration. +type Chains[I ID, C Config] interface { Show(id I) (ChainConfig[I, C], error) Index(offset, limit int) ([]ChainConfig[I, C], int, error) } -// NodesConfig is a generic interface for Node configuration. -type NodesConfig[I ID, N Node] interface { +// Nodes is a generic interface for Node configuration. +type Nodes[I ID, N Node] interface { GetNodes(ctx context.Context, offset, limit int) (nodes []N, count int, err error) GetNodesForChain(ctx context.Context, chainID I, offset, limit int) (nodes []N, count int, err error) } @@ -37,8 +36,8 @@ type NodesConfig[I ID, N Node] interface { // ChainSet manages a live set of ChainService instances. type ChainSet[I ID, C Config, N Node, S ChainService[C]] interface { services.ServiceCtx - ChainsConfig[I, C] - NodesConfig[I, N] + Chains[I, C] + Nodes[I, N] Name() string HealthReport() map[string]error @@ -53,25 +52,23 @@ type ChainService[C Config] interface { } // ChainSetOpts holds options for configuring a ChainSet via NewChainSet. -type ChainSetOpts[I ID, C Config, N Node, S ChainService[C]] interface { +type ChainSetOpts[I ID, C Config, N Node] interface { Validate() error ORMAndLogger() (ORM[I, C, N], logger.Logger) } type chainSet[I ID, C Config, N Node, S ChainService[C]] struct { utils.StartStopOnce - opts ChainSetOpts[I, C, N, S] + opts ChainSetOpts[I, C, N] formatID func(I) string orm ORM[I, C, N] lggr logger.Logger - - chainsMu sync.RWMutex chains map[string]S } // NewChainSetImmut returns a new immutable ChainSet for the given ChainSetOpts. func NewChainSetImmut[I ID, C Config, N Node, S ChainService[C]](chains map[string]S, - opts ChainSetOpts[I, C, N, S], formatID func(I) string, + opts ChainSetOpts[I, C, N], formatID func(I) string, ) (ChainSet[I, C, N, S], error) { if err := opts.Validate(); err != nil { return nil, err @@ -97,9 +94,7 @@ func (c *chainSet[I, C, N, S]) Chain(ctx context.Context, id I) (s S, err error) if err = c.StartStopOnce.Ready(); err != nil { return } - c.chainsMu.RLock() ch, ok := c.chains[sid] - c.chainsMu.RUnlock() if !ok { err = ErrChainIDInvalid return @@ -127,8 +122,6 @@ func (c *chainSet[I, C, N, S]) Start(ctx context.Context) error { return c.StartOnce("ChainSet", func() error { c.lggr.Debug("Starting") - c.chainsMu.Lock() - defer c.chainsMu.Unlock() var ms services.MultiStart for id, ch := range c.chains { if err := ms.Start(ctx, ch); err != nil { @@ -144,8 +137,6 @@ func (c *chainSet[I, C, N, S]) Close() error { return c.StopOnce("ChainSet", func() (err error) { c.lggr.Debug("Stopping") - c.chainsMu.Lock() - defer c.chainsMu.Unlock() for _, c := range c.chains { err = multierr.Combine(err, c.Close()) } @@ -155,8 +146,6 @@ func (c *chainSet[I, C, N, S]) Close() error { func (c *chainSet[I, C, N, S]) Ready() (err error) { err = c.StartStopOnce.Ready() - c.chainsMu.RLock() - defer c.chainsMu.RUnlock() for _, c := range c.chains { err = multierr.Combine(err, c.Ready()) } @@ -169,8 +158,6 @@ func (c *chainSet[I, C, N, S]) Name() string { func (c *chainSet[I, C, N, S]) HealthReport() map[string]error { report := map[string]error{c.Name(): c.StartStopOnce.Healthy()} - c.chainsMu.RLock() - defer c.chainsMu.RUnlock() for _, c := range c.chains { maps.Copy(report, c.HealthReport()) } diff --git a/core/chains/constraints.go b/core/chains/constraints.go index 58cc25fc618..89690afb11a 100644 --- a/core/chains/constraints.go +++ b/core/chains/constraints.go @@ -18,6 +18,4 @@ type Config interface { // // ID int32 // Name string -// CreatedAt time.Time -// UpdatedAt time.Time type Node any diff --git a/core/chains/evm/chain_set.go b/core/chains/evm/chain_set.go index 7f88b9becc0..a52130a5355 100644 --- a/core/chains/evm/chain_set.go +++ b/core/chains/evm/chain_set.go @@ -32,13 +32,11 @@ var ErrNoChains = errors.New("no EVM chains loaded") var _ ChainSet = &chainSet{} -type ChainConfigUpdater func(*types.ChainCfg) error - //go:generate mockery --quiet --name ChainSet --output ./mocks/ --case=underscore type ChainSet interface { services.ServiceCtx - chains.ChainsConfig[utils.Big, *types.ChainCfg] - chains.NodesConfig[utils.Big, types.Node] + chains.Chains[utils.Big, *types.ChainCfg] + chains.Nodes[utils.Big, types.Node] Get(id *big.Int) (Chain, error) diff --git a/core/chains/evm/types/types.go b/core/chains/evm/types/types.go index 6a323f123da..60b3ad66c3d 100644 --- a/core/chains/evm/types/types.go +++ b/core/chains/evm/types/types.go @@ -20,8 +20,8 @@ import ( ) type ORM interface { - chains.ChainsORM[utils.Big, *ChainCfg, ChainConfig] - chains.NodesORM[utils.Big, Node] + chains.ChainConfigs[utils.Big, *ChainCfg, ChainConfig] + chains.NodeConfigs[utils.Big, Node] EnsureChains([]utils.Big, ...pg.QOpt) error } diff --git a/core/chains/orm.go b/core/chains/orm.go index 54235e25df3..bfd29d66c45 100644 --- a/core/chains/orm.go +++ b/core/chains/orm.go @@ -10,13 +10,13 @@ import ( "github.com/smartcontractkit/chainlink/core/services/pg" ) -type ChainsORM[I ID, CFG Config, C ChainConfig[I, CFG]] interface { +type ChainConfigs[I ID, CFG Config, C ChainConfig[I, CFG]] interface { Chain(I, ...pg.QOpt) (C, error) Chains(offset, limit int, qopts ...pg.QOpt) ([]C, int, error) GetChainsByIDs(ids []I) (chains []C, err error) } -type NodesORM[I ID, N Node] interface { +type NodeConfigs[I ID, N Node] interface { GetNodesByChainIDs(chainIDs []I, qopts ...pg.QOpt) (nodes []N, err error) NodeNamed(string, ...pg.QOpt) (N, error) Nodes(offset, limit int, qopts ...pg.QOpt) (nodes []N, count int, err error) @@ -25,10 +25,12 @@ type NodesORM[I ID, N Node] interface { // ORM manages chains and nodes. type ORM[I ID, C Config, N Node] interface { - ChainsORM[I, C, ChainConfig[I, C]] + ChainConfigs[I, C, ChainConfig[I, C]] - NodesORM[I, N] + NodeConfigs[I, N] + // EnsureChains creates an entry for any chain IDs which don't already exist. + // TODO remove with https://smartcontract-it.atlassian.net/browse/BCF-1474 EnsureChains([]I, ...pg.QOpt) error } diff --git a/core/chains/orm_immutable.go b/core/chains/orm_immutable.go index 820e474af13..45966259755 100644 --- a/core/chains/orm_immutable.go +++ b/core/chains/orm_immutable.go @@ -7,45 +7,45 @@ import ( "github.com/smartcontractkit/chainlink/core/services/pg" ) -type ormImmut[I ID, C Config, N Node] struct { - *chainsORMImmut[I, C] - *nodesORMImmut[I, N] +type configs[I ID, C Config, N Node] struct { + *configChains[I, C] + *configNodes[I, N] } type Configs[I ID, C Config, N Node] interface { - chainData[I, C] - nodeData[I, N] + chains[I, C] + nodes[I, N] } // NewORMImmut returns an ORM backed by q, for the tables _chains and _nodes with column _chain_id. // Additional Node fields should be included in nodeCols. func NewORMImmut[I ID, C Config, N Node](chainConfigs Configs[I, C, N]) ORM[I, C, N] { - return ormImmut[I, C, N]{ - newChainsORMImmut[I, C](chainConfigs), - newNodesORMImmut[I, N](chainConfigs), + return configs[I, C, N]{ + newConfigChains[I, C](chainConfigs), + newConfigNodes[I, N](chainConfigs), } } -func (o ormImmut[I, C, N]) EnsureChains(_ []I, _ ...pg.QOpt) error { +func (o configs[I, C, N]) EnsureChains(_ []I, _ ...pg.QOpt) error { return v2.ErrUnsupported } -// chainsORMImmut is a generic, immutable ORM for chains. -type chainsORMImmut[I ID, C Config] struct { - data chainData[I, C] +// configChains is a generic, immutable ORM for chains. +type configChains[I ID, C Config] struct { + data chains[I, C] } -type chainData[I ID, C Config] interface { +type chains[I ID, C Config] interface { // Chains returns a slice of ChainConfig for ids, or all if none are provided. Chains(ids ...I) []ChainConfig[I, C] } -// newChainsORMImmut returns an chainsORM backed by q, for the table _chains. -func newChainsORMImmut[I ID, C Config](d chainData[I, C]) *chainsORMImmut[I, C] { - return &chainsORMImmut[I, C]{data: d} +// newConfigChains returns a chains backed by chains. +func newConfigChains[I ID, C Config](d chains[I, C]) *configChains[I, C] { + return &configChains[I, C]{data: d} } -func (o *chainsORMImmut[I, C]) Chain(id I, _ ...pg.QOpt) (cc ChainConfig[I, C], err error) { +func (o *configChains[I, C]) Chain(id I, _ ...pg.QOpt) (cc ChainConfig[I, C], err error) { chains := o.data.Chains(id) if len(chains) == 0 { err = errors.Errorf("chain not found: %v", id) @@ -58,11 +58,11 @@ func (o *chainsORMImmut[I, C]) Chain(id I, _ ...pg.QOpt) (cc ChainConfig[I, C], return } -func (o *chainsORMImmut[I, C]) GetChainsByIDs(ids []I) (chains []ChainConfig[I, C], err error) { +func (o *configChains[I, C]) GetChainsByIDs(ids []I) (chains []ChainConfig[I, C], err error) { return o.data.Chains(ids...), nil } -func (o *chainsORMImmut[I, C]) Chains(offset, limit int, _ ...pg.QOpt) (chains []ChainConfig[I, C], count int, err error) { +func (o *configChains[I, C]) Chains(offset, limit int, _ ...pg.QOpt) (chains []ChainConfig[I, C], count int, err error) { chains = o.data.Chains() count = len(chains) if offset < len(chains) { @@ -76,26 +76,26 @@ func (o *chainsORMImmut[I, C]) Chains(offset, limit int, _ ...pg.QOpt) (chains [ return } -// nodesORMImmut is a generic ORM for nodes. -type nodesORMImmut[I ID, N Node] struct { - data nodeData[I, N] +// configNodes is a generic ORM for nodes. +type configNodes[I ID, N Node] struct { + data nodes[I, N] } -type nodeData[I ID, N Node] interface { +type nodes[I ID, N Node] interface { Node(name string) (N, error) Nodes() []N NodesByID(...I) []N } -func newNodesORMImmut[I ID, N Node](d nodeData[I, N]) *nodesORMImmut[I, N] { - return &nodesORMImmut[I, N]{data: d} +func newConfigNodes[I ID, N Node](d nodes[I, N]) *configNodes[I, N] { + return &configNodes[I, N]{data: d} } -func (o *nodesORMImmut[I, N]) NodeNamed(name string, _ ...pg.QOpt) (node N, err error) { +func (o *configNodes[I, N]) NodeNamed(name string, _ ...pg.QOpt) (node N, err error) { return o.data.Node(name) } -func (o *nodesORMImmut[I, N]) Nodes(offset, limit int, _ ...pg.QOpt) (nodes []N, count int, err error) { +func (o *configNodes[I, N]) Nodes(offset, limit int, _ ...pg.QOpt) (nodes []N, count int, err error) { nodes = o.data.Nodes() count = len(nodes) if offset < len(nodes) { @@ -109,7 +109,7 @@ func (o *nodesORMImmut[I, N]) Nodes(offset, limit int, _ ...pg.QOpt) (nodes []N, return } -func (o *nodesORMImmut[I, N]) NodesForChain(chainID I, offset, limit int, _ ...pg.QOpt) (nodes []N, count int, err error) { +func (o *configNodes[I, N]) NodesForChain(chainID I, offset, limit int, _ ...pg.QOpt) (nodes []N, count int, err error) { nodes = o.data.NodesByID(chainID) count = len(nodes) if offset < len(nodes) { @@ -123,7 +123,7 @@ func (o *nodesORMImmut[I, N]) NodesForChain(chainID I, offset, limit int, _ ...p return } -func (o *nodesORMImmut[I, N]) GetNodesByChainIDs(chainIDs []I, _ ...pg.QOpt) (nodes []N, err error) { +func (o *configNodes[I, N]) GetNodesByChainIDs(chainIDs []I, _ ...pg.QOpt) (nodes []N, err error) { nodes = o.data.NodesByID(chainIDs...) return } diff --git a/core/chains/orm_test.go b/core/chains/orm_test.go index dafd2b0842c..7e59d4a9409 100644 --- a/core/chains/orm_test.go +++ b/core/chains/orm_test.go @@ -3,7 +3,6 @@ package chains_test import ( "database/sql/driver" "encoding/json" - "time" "github.com/pkg/errors" "gopkg.in/guregu/null.v4" @@ -36,8 +35,6 @@ func ExampleNewORM() { ExampleChainID string URL string Bar null.Int - CreatedAt time.Time - UpdatedAt time.Time } var q pg.Q _ = chains.NewORM[string, *Config, Node](q, "example", "url", "bar") diff --git a/core/chains/solana/chain.go b/core/chains/solana/chain.go index df7020bf1c1..db3fc8e3ad3 100644 --- a/core/chains/solana/chain.go +++ b/core/chains/solana/chain.go @@ -20,8 +20,6 @@ import ( "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" soltxm "github.com/smartcontractkit/chainlink-solana/pkg/solana/txm" - v2 "github.com/smartcontractkit/chainlink/core/config/v2" - "github.com/smartcontractkit/chainlink/core/chains/solana/monitor" "github.com/smartcontractkit/chainlink/core/logger" "github.com/smartcontractkit/chainlink/core/services" @@ -204,14 +202,6 @@ func (c *chain) Config() config.Config { return c.cfg } -func (c *chain) UpdateConfig(cfg *db.ChainCfg) { - if c.cfgImmutable { - c.lggr.Criticalw("TOML configuration cannot be updated", "err", v2.ErrUnsupported) - return - } - c.cfg.Update(*cfg) -} - func (c *chain) TxManager() solana.TxManager { return c.txm } diff --git a/core/chains/solana/chain_set.go b/core/chains/solana/chain_set.go index 076ae2153e4..8192241a97c 100644 --- a/core/chains/solana/chain_set.go +++ b/core/chains/solana/chain_set.go @@ -62,8 +62,8 @@ func (o *ChainSetOpts) NewTOMLChain(cfg *SolanaConfig) (solana.Chain, error) { // ChainSet extends solana.ChainSet with mutability. type ChainSet interface { solana.ChainSet - chains.ChainsConfig[string, *db.ChainCfg] - chains.NodesConfig[string, db.Node] + chains.Chains[string, *db.ChainCfg] + chains.Nodes[string, db.Node] } func NewChainSetImmut(opts ChainSetOpts, cfgs SolanaConfigs) (ChainSet, error) { diff --git a/core/chains/solana/config.go b/core/chains/solana/config.go index cc08d4aba91..8c0657ab6c8 100644 --- a/core/chains/solana/config.go +++ b/core/chains/solana/config.go @@ -338,7 +338,3 @@ func (c *SolanaConfig) ComputeUnitPriceDefault() uint64 { func (c *SolanaConfig) FeeBumpPeriod() time.Duration { return c.Chain.FeeBumpPeriod.Duration() } - -func (c *SolanaConfig) Update(cfg soldb.ChainCfg) { - panic(fmt.Errorf("cannot update: %v", v2.ErrUnsupported)) -} diff --git a/core/chains/solana/mocks/chain.go b/core/chains/solana/mocks/chain.go index bdac9e79224..45b7130ec91 100644 --- a/core/chains/solana/mocks/chain.go +++ b/core/chains/solana/mocks/chain.go @@ -8,8 +8,6 @@ import ( context "context" - db "github.com/smartcontractkit/chainlink-solana/pkg/solana/db" - mock "github.com/stretchr/testify/mock" solana "github.com/smartcontractkit/chainlink-solana/pkg/solana" @@ -164,11 +162,6 @@ func (_m *Chain) TxManager() solana.TxManager { return r0 } -// UpdateConfig provides a mock function with given fields: _a0 -func (_m *Chain) UpdateConfig(_a0 *db.ChainCfg) { - _m.Called(_a0) -} - type mockConstructorTestingTNewChain interface { mock.TestingT Cleanup(func()) diff --git a/core/chains/solana/orm.go b/core/chains/solana/orm.go index e54ea82a99f..5c3768874ea 100644 --- a/core/chains/solana/orm.go +++ b/core/chains/solana/orm.go @@ -14,8 +14,8 @@ type ChainConfig = chains.ChainConfig[string, *soldb.ChainCfg] // ORM manages solana chains and nodes. type ORM interface { - chains.ChainsORM[string, *soldb.ChainCfg, ChainConfig] - chains.NodesORM[string, soldb.Node] + chains.ChainConfigs[string, *soldb.ChainCfg, ChainConfig] + chains.NodeConfigs[string, soldb.Node] EnsureChains([]string, ...pg.QOpt) error } diff --git a/core/chains/starknet/chain.go b/core/chains/starknet/chain.go index a9655141b5f..57f5c567104 100644 --- a/core/chains/starknet/chain.go +++ b/core/chains/starknet/chain.go @@ -14,7 +14,6 @@ import ( "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/db" "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/chainlink/txm" "github.com/smartcontractkit/chainlink-starknet/relayer/pkg/starknet" - v2 "github.com/smartcontractkit/chainlink/core/config/v2" "github.com/smartcontractkit/chainlink/core/chains/starknet/types" "github.com/smartcontractkit/chainlink/core/logger" @@ -63,14 +62,6 @@ func (c *chain) Config() config.Config { return c.cfg } -func (c *chain) UpdateConfig(cfg *db.ChainCfg) { - if c.cfgImmutable { - c.lggr.Criticalw("TOML configuration cannot be updated", "err", v2.ErrUnsupported) - return - } - c.cfg.Update(*cfg) -} - func (c *chain) TxManager() txm.TxManager { return c.txm } diff --git a/core/chains/starknet/chain_set.go b/core/chains/starknet/chain_set.go index 726668dff56..e84b7d96e50 100644 --- a/core/chains/starknet/chain_set.go +++ b/core/chains/starknet/chain_set.go @@ -71,8 +71,8 @@ func (o *ChainSetOpts) NewTOMLChain(cfg *StarknetConfig) (starkchain.Chain, erro type ChainSet interface { starkchain.ChainSet - chains.ChainsConfig[string, *db.ChainCfg] - chains.NodesConfig[string, db.Node] + chains.Chains[string, *db.ChainCfg] + chains.Nodes[string, db.Node] } func NewChainSetImmut(opts ChainSetOpts, cfgs StarknetConfigs) (ChainSet, error) { diff --git a/core/chains/starknet/config.go b/core/chains/starknet/config.go index 846f49071f4..4043660320b 100644 --- a/core/chains/starknet/config.go +++ b/core/chains/starknet/config.go @@ -280,7 +280,3 @@ func (c *StarknetConfig) OCR2CacheTTL() time.Duration { func (c *StarknetConfig) RequestTimeout() time.Duration { return c.Chain.RequestTimeout.Duration() } - -func (c *StarknetConfig) Update(cfg db.ChainCfg) { - panic(fmt.Errorf("cannot update: %v", v2.ErrUnsupported)) -} diff --git a/core/chains/starknet/types/types.go b/core/chains/starknet/types/types.go index 5794c49e1f2..4065d971967 100644 --- a/core/chains/starknet/types/types.go +++ b/core/chains/starknet/types/types.go @@ -8,8 +8,8 @@ import ( ) type ORM interface { - chains.ChainsORM[string, *db.ChainCfg, ChainConfig] - chains.NodesORM[string, db.Node] + chains.ChainConfigs[string, *db.ChainCfg, ChainConfig] + chains.NodeConfigs[string, db.Node] EnsureChains([]string, ...pg.QOpt) error } diff --git a/core/web/chains_controller.go b/core/web/chains_controller.go index 009017ecd6c..34d10c2e363 100644 --- a/core/web/chains_controller.go +++ b/core/web/chains_controller.go @@ -21,7 +21,7 @@ type ChainsController interface { type chainsController[I chains.ID, C chains.Config, R jsonapi.EntityNamer] struct { resourceName string - chainSet chains.ChainsConfig[I, C] + chainSet chains.Chains[I, C] errNotEnabled error parseChainID func(string) (I, error) newResource func(chains.ChainConfig[I, C]) R @@ -38,7 +38,7 @@ func (e errChainDisabled) Error() string { return fmt.Sprintf("%s is disabled: Set %s=true to enable", e.name, e.envVar) } -func newChainsController[I chains.ID, C chains.Config, R jsonapi.EntityNamer](prefix string, chainSet chains.ChainsConfig[I, C], errNotEnabled error, +func newChainsController[I chains.ID, C chains.Config, R jsonapi.EntityNamer](prefix string, chainSet chains.Chains[I, C], errNotEnabled error, parseChainID func(string) (I, error), newResource func(chains.ChainConfig[I, C]) R, lggr logger.Logger, auditLogger audit.AuditLogger) *chainsController[I, C, R] { return &chainsController[I, C, R]{ resourceName: prefix + "_chain", diff --git a/core/web/nodes_controller.go b/core/web/nodes_controller.go index 38a03b73238..0df7b03e18a 100644 --- a/core/web/nodes_controller.go +++ b/core/web/nodes_controller.go @@ -16,7 +16,7 @@ type NodesController interface { } type nodesController[I chains.ID, N chains.Node, R jsonapi.EntityNamer] struct { - nodeSet chains.NodesConfig[I, N] + nodeSet chains.Nodes[I, N] parseChainID func(string) (I, error) errNotEnabled error newResource func(N) R @@ -24,7 +24,7 @@ type nodesController[I chains.ID, N chains.Node, R jsonapi.EntityNamer] struct { } func newNodesController[I chains.ID, N chains.Node, R jsonapi.EntityNamer]( - nodeSet chains.NodesConfig[I, N], + nodeSet chains.Nodes[I, N], errNotEnabled error, parseChainID func(string) (I, error), newResource func(N) R, diff --git a/go.mod b/go.mod index 795cea61c41..a8dffa1fed3 100644 --- a/go.mod +++ b/go.mod @@ -57,8 +57,8 @@ require ( github.com/shirou/gopsutil/v3 v3.22.12 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230317181219-4334c233b581 - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1 + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230320130046-4d37840c6c1b + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 github.com/smartcontractkit/ocr2keepers v0.6.14 github.com/smartcontractkit/ocr2vrf v0.0.0-20230313164535-dce9b4be73a3 diff --git a/go.sum b/go.sum index 655d1a9770f..ef532c121a2 100644 --- a/go.sum +++ b/go.sum @@ -1304,11 +1304,11 @@ github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0 github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 h1:TClDxiM7MbjYlmEjqel7npTveEEhCZ4uNH6e94qw4u0= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7/go.mod h1:Uqt8amCr4U4/6n+pvr1OMlNBzSqYSr6oeWAaBsBdPYE= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230317181219-4334c233b581 h1:3I+/UdaDU2o0hcMzTLEhcxF7uvwVhCKgcciuzV1E9nw= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230317181219-4334c233b581/go.mod h1:iHMsx8HUSpq//xsC19+IexGtJ8GQWe7aMdsYjwr/Kug= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230320130046-4d37840c6c1b h1:EptRlfHmVygt29kSYkzzPWah5WgQEuI7//YkLKTH5JY= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230320130046-4d37840c6c1b/go.mod h1:iHMsx8HUSpq//xsC19+IexGtJ8GQWe7aMdsYjwr/Kug= github.com/smartcontractkit/chainlink-starknet/ops v0.0.0-20230214070706-9544d04bb4d8 h1:GRx8L71lgGIeTYIbgsXGQ/JFWKPEnAmJVO42zQ3n69A= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1 h1:K5OvP64RJgJa8OGbsle5jzt6V/Mpqzl5sbx9wZH8oGE= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1/go.mod h1:3xUS0kadHzpEM7JtoTHUJkSkByHCU+LbxnQVgCaLNJA= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c h1:zQpo+pI1tFmh++wEqhif28cpTKM2cI8zkSHcOgk1qgI= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c/go.mod h1:3xUS0kadHzpEM7JtoTHUJkSkByHCU+LbxnQVgCaLNJA= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 h1:P3dhh6UkjA6Fxj39y4vQflv7GoDCa+QC/Du7CCDxjfQ= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407/go.mod h1:5JnCHuYgmIP9ZyXzgAfI5Iwu0WxBtBKp+ApeT5o1Cjw= github.com/smartcontractkit/ocr2keepers v0.6.14 h1:Rg+SYd8PCyd4CcCetwnRKjVEQsHVsV6QOaWcLhi+6sg= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 22bdc9d9851..ed3af69789b 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -252,7 +252,7 @@ require ( github.com/shirou/gopsutil/v3 v3.22.12 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1 // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c // indirect github.com/smartcontractkit/sqlx v1.3.5-0.20210805004948-4be295aacbeb // indirect github.com/smartcontractkit/wsrpc v0.6.2-0.20230317160629-382a1ac921d8 // indirect github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 59f04a16c97..1a0f2d71c19 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1787,9 +1787,9 @@ github.com/smartcontractkit/chainlink-env v0.30.20 h1:3VQIQcXoprC3AIq1lVhiby3ZEW github.com/smartcontractkit/chainlink-env v0.30.20/go.mod h1:9c0Czq4a6wZKY20BcoAlK29DnejQIiLo/MwKYtSFnHk= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 h1:TClDxiM7MbjYlmEjqel7npTveEEhCZ4uNH6e94qw4u0= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7/go.mod h1:Uqt8amCr4U4/6n+pvr1OMlNBzSqYSr6oeWAaBsBdPYE= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230317181219-4334c233b581 h1:3I+/UdaDU2o0hcMzTLEhcxF7uvwVhCKgcciuzV1E9nw= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1 h1:K5OvP64RJgJa8OGbsle5jzt6V/Mpqzl5sbx9wZH8oGE= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230317132141-3038a5ec45a1/go.mod h1:3xUS0kadHzpEM7JtoTHUJkSkByHCU+LbxnQVgCaLNJA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230320130046-4d37840c6c1b h1:EptRlfHmVygt29kSYkzzPWah5WgQEuI7//YkLKTH5JY= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c h1:zQpo+pI1tFmh++wEqhif28cpTKM2cI8zkSHcOgk1qgI= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c/go.mod h1:3xUS0kadHzpEM7JtoTHUJkSkByHCU+LbxnQVgCaLNJA= github.com/smartcontractkit/chainlink-testing-framework v1.10.9 h1:F3b1xkXM/iRJX4PSlb3MxqtjfqwqCAfQsSddRtdeHf0= github.com/smartcontractkit/chainlink-testing-framework v1.10.9/go.mod h1:fofuQ/GhaV1dRA4wyF4ZSwpvLsqJE4vvk7Ei5rcL4SA= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 h1:P3dhh6UkjA6Fxj39y4vQflv7GoDCa+QC/Du7CCDxjfQ= From 05408e5a146dfa5759a855135d795549536a90b0 Mon Sep 17 00:00:00 2001 From: Gheorghe Strimtu Date: Mon, 20 Mar 2023 17:08:58 +0200 Subject: [PATCH 20/25] TT-181 use GetTestLogger from CTF (#8756) --- integration-tests/actions/actions.go | 21 +++---------------- .../actions/automation_ocr_helpers.go | 5 +++-- .../actions/keeper_benchmark_helpers.go | 5 +++-- integration-tests/actions/keeper_helpers.go | 13 ++++++------ .../ocr2vrf_actions/ocr2vrf_config_helpers.go | 9 ++++---- .../actions/ocr2vrf_actions/ocr2vrf_steps.go | 9 ++++---- integration-tests/actions/ocr_helpers.go | 5 +++-- .../actions/operator_forwarder_helpers.go | 7 ++++--- integration-tests/actions/vrfv2_helpers.go | 8 +++++-- integration-tests/benchmark/keeper_test.go | 5 +++-- .../chaos/automation_chaos_test.go | 2 +- integration-tests/chaos/ocr2vrf_chaos_test.go | 2 +- integration-tests/chaos/ocr_chaos_test.go | 2 +- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- .../migration/migration_up_test.go | 5 ++--- .../performance/directrequest_test.go | 3 ++- integration-tests/performance/flux_test.go | 3 ++- integration-tests/performance/keeper_test.go | 3 ++- integration-tests/performance/vrf_test.go | 3 ++- integration-tests/smoke/automation_test.go | 12 +++++------ integration-tests/smoke/flux_test.go | 2 +- integration-tests/smoke/keeper_test.go | 16 +++++++------- integration-tests/smoke/mercury_test.go | 4 ++-- integration-tests/smoke/ocr2vrf_test.go | 4 ++-- integration-tests/smoke/ocr_test.go | 2 +- integration-tests/smoke/runlog_test.go | 2 +- integration-tests/smoke/vrf_test.go | 2 +- integration-tests/smoke/vrfv2_test.go | 7 ++++--- integration-tests/soak/forwarder_ocr_test.go | 3 ++- integration-tests/soak/ocr_test.go | 3 ++- .../testsetups/keeper_benchmark.go | 7 ++++--- integration-tests/testsetups/ocr.go | 13 ++++++------ integration-tests/testsetups/vrfv2.go | 4 ++-- 34 files changed, 100 insertions(+), 97 deletions(-) diff --git a/integration-tests/actions/actions.go b/integration-tests/actions/actions.go index 119d20ee61f..f0f4cf97041 100644 --- a/integration-tests/actions/actions.go +++ b/integration-tests/actions/actions.go @@ -5,18 +5,15 @@ import ( "encoding/json" "fmt" "math/big" - "os" "strings" "testing" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" - "github.com/rs/zerolog" "github.com/rs/zerolog/log" uuid "github.com/satori/go.uuid" - envConf "github.com/smartcontractkit/chainlink-env/config" - "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "go.uber.org/zap/zapcore" "github.com/smartcontractkit/chainlink-env/environment" @@ -235,7 +232,7 @@ func TeardownSuite( failingLogLevel zapcore.Level, // Examines logs after the test, and fails the test if any Chainlink logs are found at or above provided level clients ...blockchain.EVMClient, ) error { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) if err := testreporters.WriteTeardownLogs(t, env, optionalTestReporter, failingLogLevel); err != nil { return errors.Wrap(err, "Error dumping environment logs, leaving environment running for manual retrieval") } @@ -273,7 +270,7 @@ func TeardownRemoteSuite( optionalTestReporter testreporters.TestReporter, // Optionally pass in a test reporter to log further metrics client blockchain.EVMClient, ) error { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) var err error if err = testreporters.SendReport(t, env, "./", optionalTestReporter); err != nil { l.Warn().Err(err).Msg("Error writing test report") @@ -339,15 +336,3 @@ func EncodeOnChainExternalJobID(jobID uuid.UUID) [32]byte { copy(ji[:], strings.Replace(jobID.String(), "-", "", 4)) return ji } - -// GetTestLogger instantiates a logger that takes into account the test context and the log level -func GetTestLogger(t *testing.T) zerolog.Logger { - lvlStr := os.Getenv(envConf.EnvVarLogLevel) - if lvlStr == "" { - lvlStr = "info" - } - lvl, err := zerolog.ParseLevel(lvlStr) - require.NoError(t, err, "error parsing log level") - l := zerolog.New(zerolog.NewTestWriter(t)).Output(zerolog.ConsoleWriter{Out: os.Stderr}).Level(lvl).With().Timestamp().Logger() - return l -} diff --git a/integration-tests/actions/automation_ocr_helpers.go b/integration-tests/actions/automation_ocr_helpers.go index 2526e9e6bae..88f368ad471 100644 --- a/integration-tests/actions/automation_ocr_helpers.go +++ b/integration-tests/actions/automation_ocr_helpers.go @@ -12,6 +12,7 @@ import ( "github.com/lib/pq" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/smartcontractkit/libocr/offchainreporting2/confighelper" types2 "github.com/smartcontractkit/ocr2keepers/pkg/types" "github.com/stretchr/testify/require" @@ -31,7 +32,7 @@ func BuildAutoOCR2ConfigVars( registrar string, deltaStage time.Duration, ) contracts.OCRConfig { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) S, oracleIdentities := getOracleIdentities(t, chainlinkNodes) signerOnchainPublicKeys, transmitterAccounts, f, _, offchainConfigVersion, offchainConfig, err := confighelper.ContractSetConfigArgsForTests( @@ -97,7 +98,7 @@ func CreateOCRKeeperJobs( chainID int64, keyIndex int, ) { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) bootstrapNode := chainlinkNodes[0] bootstrapNode.RemoteIP() bootstrapP2PIds, err := bootstrapNode.MustReadP2PKeys() diff --git a/integration-tests/actions/keeper_benchmark_helpers.go b/integration-tests/actions/keeper_benchmark_helpers.go index 05bf104ce6f..a5a6d7ce489 100644 --- a/integration-tests/actions/keeper_benchmark_helpers.go +++ b/integration-tests/actions/keeper_benchmark_helpers.go @@ -8,6 +8,7 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink/integration-tests/client" @@ -116,7 +117,7 @@ func ResetUpkeeps( predeployedContracts []contracts.KeeperConsumerBenchmark, upkeepResetterAddr string, ) { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) contractLoader, err := contracts.NewContractLoader(client) require.NoError(t, err, "Error loading upkeep contract") upkeepChunkSize := 500 @@ -174,7 +175,7 @@ func DeployKeeperConsumersBenchmark( predeployedContracts []string, upkeepResetterAddr string, ) []contracts.KeeperConsumerBenchmark { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) upkeeps := make([]contracts.KeeperConsumerBenchmark, 0) firstEligibleBuffer = 10000 diff --git a/integration-tests/actions/keeper_helpers.go b/integration-tests/actions/keeper_helpers.go index 870cb8cb49a..80b18a0f56c 100644 --- a/integration-tests/actions/keeper_helpers.go +++ b/integration-tests/actions/keeper_helpers.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink/integration-tests/client" @@ -337,7 +338,7 @@ func RegisterUpkeepContracts( numberOfContracts int, upkeepAddresses []string, ) []*big.Int { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) registrationTxHashes := make([]common.Hash, 0) upkeepIds := make([]*big.Int, 0) for contractCount, upkeepAddress := range upkeepAddresses { @@ -399,7 +400,7 @@ func DeployKeeperConsumers( client blockchain.EVMClient, numberOfContracts int, ) []contracts.KeeperConsumer { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) keeperConsumerContracts := make([]contracts.KeeperConsumer, 0) for contractCount := 0; contractCount < numberOfContracts; contractCount++ { @@ -434,7 +435,7 @@ func DeployKeeperConsumersPerformance( checkGasToBurn, // How much gas should be burned on checkUpkeep() calls performGasToBurn int64, // How much gas should be burned on performUpkeep() calls ) []contracts.KeeperConsumerPerformance { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) upkeeps := make([]contracts.KeeperConsumerPerformance, 0) for contractCount := 0; contractCount < numberOfContracts; contractCount++ { @@ -471,7 +472,7 @@ func DeployPerformDataChecker( numberOfContracts int, expectedData []byte, ) []contracts.KeeperPerformDataChecker { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) upkeeps := make([]contracts.KeeperPerformDataChecker, 0) for contractCount := 0; contractCount < numberOfContracts; contractCount++ { @@ -503,7 +504,7 @@ func DeployUpkeepCounters( testRange *big.Int, interval *big.Int, ) []contracts.UpkeepCounter { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) upkeepCounters := make([]contracts.UpkeepCounter, 0) for contractCount := 0; contractCount < numberOfContracts; contractCount++ { @@ -536,7 +537,7 @@ func DeployUpkeepPerformCounterRestrictive( testRange *big.Int, averageEligibilityCadence *big.Int, ) []contracts.UpkeepPerformCounterRestrictive { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) upkeepCounters := make([]contracts.UpkeepPerformCounterRestrictive, 0) for contractCount := 0; contractCount < numberOfContracts; contractCount++ { diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go b/integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go index 71b50a6b8ac..e3ea2209336 100644 --- a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go +++ b/integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/lib/pq" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/smartcontractkit/libocr/offchainreporting2/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/smartcontractkit/ocr2vrf/altbn_128" @@ -24,8 +25,6 @@ import ( "github.com/smartcontractkit/chainlink/core/services/job" "github.com/smartcontractkit/chainlink/core/services/keystore/chaintype" - "github.com/smartcontractkit/chainlink/integration-tests/actions" - "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" ) @@ -39,7 +38,7 @@ func CreateOCR2VRFJobs( chainID int64, keyIndex int, ) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) p2pV2Bootstrapper := createBootstrapJob(t, bootstrapNode, OCR2VRFPluginConfig.DKGConfig.DKGContractAddress, chainID) createNonBootstrapJobs(t, nonBootstrapNodes, OCR2VRFPluginConfig, chainID, keyIndex, p2pV2Bootstrapper) @@ -120,7 +119,7 @@ func BuildOCR2DKGConfigVars( t *testing.T, ocr2VRFPluginConfig *OCR2VRFPluginConfig, ) contracts.OCRConfig { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) var onchainPublicKeys []common.Address for _, onchainPublicKey := range ocr2VRFPluginConfig.OCR2Config.OnchainPublicKeys { onchainPublicKeys = append(onchainPublicKeys, common.HexToAddress(onchainPublicKey)) @@ -266,7 +265,7 @@ func BuildOCR2VRFConfigVars( t *testing.T, ocr2VRFPluginConfig *OCR2VRFPluginConfig, ) contracts.OCRConfig { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) var onchainPublicKeys []common.Address for _, onchainPublicKey := range ocr2VRFPluginConfig.OCR2Config.OnchainPublicKeys { onchainPublicKeys = append(onchainPublicKeys, common.HexToAddress(onchainPublicKey)) diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go b/integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go index 9d905d1862b..a124d7a9ee3 100644 --- a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go +++ b/integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/smartcontractkit/chainlink-testing-framework/utils" ocr2vrftypes "github.com/smartcontractkit/ocr2vrf/types" "github.com/stretchr/testify/require" @@ -23,7 +24,7 @@ import ( ) func SetAndWaitForVRFBeaconProcessToFinish(t *testing.T, ocr2VRFPluginConfig *OCR2VRFPluginConfig, vrfBeacon contracts.VRFBeacon) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) ocr2VrfConfig := BuildOCR2VRFConfigVars(t, ocr2VRFPluginConfig) l.Debug().Interface("OCR2 VRF Config", ocr2VrfConfig).Msg("OCR2 VRF Config prepared") @@ -43,7 +44,7 @@ func SetAndWaitForVRFBeaconProcessToFinish(t *testing.T, ocr2VRFPluginConfig *OC } func SetAndWaitForDKGProcessToFinish(t *testing.T, ocr2VRFPluginConfig *OCR2VRFPluginConfig, dkg contracts.DKG) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) ocr2DkgConfig := BuildOCR2DKGConfigVars(t, ocr2VRFPluginConfig) // set config for DKG OCR @@ -200,7 +201,7 @@ func RequestAndRedeemRandomness( subscriptionID, confirmationDelay *big.Int, ) *big.Int { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) receipt, err := consumer.RequestRandomness( numberOfRandomWordsToRequest, subscriptionID, @@ -235,7 +236,7 @@ func RequestRandomnessFulfillment( subscriptionID *big.Int, confirmationDelay *big.Int, ) *big.Int { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) receipt, err := consumer.RequestRandomnessFulfillment( numberOfRandomWordsToRequest, subscriptionID, diff --git a/integration-tests/actions/ocr_helpers.go b/integration-tests/actions/ocr_helpers.go index 330b75c9408..1a6c16e017f 100644 --- a/integration-tests/actions/ocr_helpers.go +++ b/integration-tests/actions/ocr_helpers.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/common" uuid "github.com/satori/go.uuid" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" @@ -441,7 +442,7 @@ func BuildGeneralOCR2Config( f int, onchainConfig []byte, ) contracts.OCRConfig { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) _, oracleIdentities := getOracleIdentities(t, chainlinkNodes) signerOnchainPublicKeys, transmitterAccounts, f_, onchainConfig_, offchainConfigVersion, offchainConfig, err := confighelper.ContractSetConfigArgsForTests( @@ -488,7 +489,7 @@ func BuildGeneralOCR2Config( } func getOracleIdentities(t *testing.T, chainlinkNodes []*client.Chainlink) ([]int, []confighelper.OracleIdentityExtra) { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) S := make([]int, len(chainlinkNodes)) oracleIdentities := make([]confighelper.OracleIdentityExtra, len(chainlinkNodes)) sharedSecretEncryptionPublicKeys := make([]types.ConfigEncryptionPublicKey, len(chainlinkNodes)) diff --git a/integration-tests/actions/operator_forwarder_helpers.go b/integration-tests/actions/operator_forwarder_helpers.go index d285198a8cf..b6453d42010 100644 --- a/integration-tests/actions/operator_forwarder_helpers.go +++ b/integration-tests/actions/operator_forwarder_helpers.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" @@ -90,7 +91,7 @@ func ProcessNewEvent( contractABI *abi.ABI, chainClient blockchain.EVMClient, ) { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) errorChan := make(chan error) eventConfirmed := make(chan bool) err := chainClient.ProcessEvent(eventDetails.Name, event, eventConfirmed, errorChan) @@ -137,7 +138,7 @@ func SubscribeOperatorFactoryEvents( chainClient blockchain.EVMClient, operatorFactoryInstance contracts.OperatorFactory, ) { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) contractABI, err := operator_factory.OperatorFactoryMetaData.GetAbi() require.NoError(t, err, "Getting contract abi for OperatorFactory shouldn't fail") latestBlockNum, err := chainClient.LatestBlockNumber(context.Background()) @@ -185,7 +186,7 @@ func TrackForwarder( authorizedForwarder common.Address, node *client.Chainlink, ) { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) chainID := chainClient.GetChainID() _, _, err := node.TrackForwarder(chainID, authorizedForwarder) require.NoError(t, err, "Forwarder track should be created") diff --git a/integration-tests/actions/vrfv2_helpers.go b/integration-tests/actions/vrfv2_helpers.go index 64ae99988d9..5da5b602046 100644 --- a/integration-tests/actions/vrfv2_helpers.go +++ b/integration-tests/actions/vrfv2_helpers.go @@ -3,10 +3,14 @@ package actions import ( "context" "fmt" - chainlinkutils "github.com/smartcontractkit/chainlink/core/utils" + + "github.com/smartcontractkit/chainlink-testing-framework/utils" + "math/big" "testing" + chainlinkutils "github.com/smartcontractkit/chainlink/core/utils" + uuid "github.com/satori/go.uuid" "github.com/stretchr/testify/require" @@ -52,7 +56,7 @@ func CreateVRFV2Jobs( c blockchain.EVMClient, minIncomingConfirmations int, ) []VRFV2JobInfo { - l := GetTestLogger(t) + l := utils.GetTestLogger(t) jobInfo := make([]VRFV2JobInfo, 0) for _, n := range chainlinkNodes { vrfKey, err := n.MustCreateVRFKey() diff --git a/integration-tests/benchmark/keeper_test.go b/integration-tests/benchmark/keeper_test.go index 3692ad2010f..8e89c8ecf86 100644 --- a/integration-tests/benchmark/keeper_test.go +++ b/integration-tests/benchmark/keeper_test.go @@ -9,6 +9,7 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" env_client "github.com/smartcontractkit/chainlink-env/client" @@ -157,7 +158,7 @@ type BenchmarkTestEntry struct { } func TestAutomationBenchmark(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, benchmarkNetwork, registryToTest := SetupAutomationBenchmarkEnv(t) if testEnvironment.WillUseRemoteRunner() { return @@ -347,7 +348,7 @@ func getEnv(key, fallback string) string { } func SetupAutomationBenchmarkEnv(t *testing.T) (*environment.Environment, blockchain.EVMNetwork, string) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) registryToTest := getEnv("AUTOMATION_REGISTRY_TO_TEST", "Registry_2_0") activeEVMNetwork := networks.SelectedNetwork // Environment currently being used to run benchmark test on blockTime := "1" diff --git a/integration-tests/chaos/automation_chaos_test.go b/integration-tests/chaos/automation_chaos_test.go index d3df09149e7..d48e485673a 100644 --- a/integration-tests/chaos/automation_chaos_test.go +++ b/integration-tests/chaos/automation_chaos_test.go @@ -106,7 +106,7 @@ const ( func TestAutomationChaos(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testCases := map[string]struct { networkChart environment.ConnectedChart clChart environment.ConnectedChart diff --git a/integration-tests/chaos/ocr2vrf_chaos_test.go b/integration-tests/chaos/ocr2vrf_chaos_test.go index bd65b28a61f..d62c76ff012 100644 --- a/integration-tests/chaos/ocr2vrf_chaos_test.go +++ b/integration-tests/chaos/ocr2vrf_chaos_test.go @@ -44,7 +44,7 @@ var ( func TestOCR2VRFChaos(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testCases := map[string]struct { networkChart environment.ConnectedChart clChart environment.ConnectedChart diff --git a/integration-tests/chaos/ocr_chaos_test.go b/integration-tests/chaos/ocr_chaos_test.go index 3fb8f0456c3..ff55113e96c 100644 --- a/integration-tests/chaos/ocr_chaos_test.go +++ b/integration-tests/chaos/ocr_chaos_test.go @@ -61,7 +61,7 @@ func TestMain(m *testing.M) { func TestOCRChaos(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testCases := map[string]struct { networkChart environment.ConnectedChart clChart environment.ConnectedChart diff --git a/integration-tests/go.mod b/integration-tests/go.mod index ed3af69789b..ac68d6ed9f8 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -16,7 +16,7 @@ require ( github.com/smartcontractkit/chainlink v1.10.0 github.com/smartcontractkit/chainlink-env v0.30.20 github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 - github.com/smartcontractkit/chainlink-testing-framework v1.10.9 + github.com/smartcontractkit/chainlink-testing-framework v1.10.10 github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 github.com/smartcontractkit/ocr2keepers v0.6.14 github.com/smartcontractkit/ocr2vrf v0.0.0-20230313164535-dce9b4be73a3 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 1a0f2d71c19..5016c97a9ba 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1790,8 +1790,8 @@ github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230320130046-4d37840c6c1b h1:EptRlfHmVygt29kSYkzzPWah5WgQEuI7//YkLKTH5JY= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c h1:zQpo+pI1tFmh++wEqhif28cpTKM2cI8zkSHcOgk1qgI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c/go.mod h1:3xUS0kadHzpEM7JtoTHUJkSkByHCU+LbxnQVgCaLNJA= -github.com/smartcontractkit/chainlink-testing-framework v1.10.9 h1:F3b1xkXM/iRJX4PSlb3MxqtjfqwqCAfQsSddRtdeHf0= -github.com/smartcontractkit/chainlink-testing-framework v1.10.9/go.mod h1:fofuQ/GhaV1dRA4wyF4ZSwpvLsqJE4vvk7Ei5rcL4SA= +github.com/smartcontractkit/chainlink-testing-framework v1.10.10 h1:UR3KepUvk/x7eGYhvCI86zNWL2DlWLJflwBkNrhE/6Y= +github.com/smartcontractkit/chainlink-testing-framework v1.10.10/go.mod h1:LgVtlLXWsClw4AkYXMMu4q7feVPfJfXQOC+rWYPwV2E= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 h1:P3dhh6UkjA6Fxj39y4vQflv7GoDCa+QC/Du7CCDxjfQ= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407/go.mod h1:5JnCHuYgmIP9ZyXzgAfI5Iwu0WxBtBKp+ApeT5o1Cjw= github.com/smartcontractkit/ocr2keepers v0.6.14 h1:Rg+SYd8PCyd4CcCetwnRKjVEQsHVsV6QOaWcLhi+6sg= diff --git a/integration-tests/migration/migration_up_test.go b/integration-tests/migration/migration_up_test.go index 29e4c94a2b1..b626726cbee 100644 --- a/integration-tests/migration/migration_up_test.go +++ b/integration-tests/migration/migration_up_test.go @@ -6,14 +6,13 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-env/environment" "github.com/smartcontractkit/chainlink-env/logging" ctfClient "github.com/smartcontractkit/chainlink-testing-framework/client" "github.com/smartcontractkit/chainlink-testing-framework/testsetups" - - "github.com/smartcontractkit/chainlink/integration-tests/actions" ) type Data struct { @@ -30,7 +29,7 @@ func TestMain(m *testing.M) { } func TestMigrationDatabase(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, err := testsetups.DBMigration(&testsetups.DBMigrationSpec{ FromSpec: testsetups.FromVersionSpec{ Image: "public.ecr.aws/chainlink/chainlink", diff --git a/integration-tests/performance/directrequest_test.go b/integration-tests/performance/directrequest_test.go index 1c7156b8425..d97a04dc173 100644 --- a/integration-tests/performance/directrequest_test.go +++ b/integration-tests/performance/directrequest_test.go @@ -16,6 +16,7 @@ import ( mockservercfg "github.com/smartcontractkit/chainlink-env/pkg/helm/mockserver-cfg" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" ctfClient "github.com/smartcontractkit/chainlink-testing-framework/client" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" networks "github.com/smartcontractkit/chainlink/integration-tests" @@ -28,7 +29,7 @@ import ( ) func TestDirectRequestPerformance(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment := setupDirectRequestTest(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/performance/flux_test.go b/integration-tests/performance/flux_test.go index f5b35522cad..acfdab77838 100644 --- a/integration-tests/performance/flux_test.go +++ b/integration-tests/performance/flux_test.go @@ -9,6 +9,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-env/environment" @@ -29,7 +30,7 @@ import ( ) func TestFluxPerformance(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, testNetwork := setupFluxTest(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/performance/keeper_test.go b/integration-tests/performance/keeper_test.go index fde847fb97c..be02a69ef48 100644 --- a/integration-tests/performance/keeper_test.go +++ b/integration-tests/performance/keeper_test.go @@ -17,6 +17,7 @@ import ( mockservercfg "github.com/smartcontractkit/chainlink-env/pkg/helm/mockserver-cfg" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" networks "github.com/smartcontractkit/chainlink/integration-tests" @@ -42,7 +43,7 @@ var keeperDefaultRegistryConfig = contracts.KeeperRegistrySettings{ } func TestKeeperPerformance(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, chainClient, chainlinkNodes, contractDeployer, linkToken := setupKeeperTest(t, "basic-smoke") if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/performance/vrf_test.go b/integration-tests/performance/vrf_test.go index e7b1489603f..3bca8acb6a5 100644 --- a/integration-tests/performance/vrf_test.go +++ b/integration-tests/performance/vrf_test.go @@ -10,6 +10,7 @@ import ( "github.com/onsi/gomega" uuid "github.com/satori/go.uuid" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-env/environment" @@ -26,7 +27,7 @@ import ( func TestVRFBasic(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, testNetwork := setupVRFTest(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/smoke/automation_test.go b/integration-tests/smoke/automation_test.go index 37d5e8829ef..a7374533b18 100644 --- a/integration-tests/smoke/automation_test.go +++ b/integration-tests/smoke/automation_test.go @@ -114,7 +114,7 @@ func TestMain(m *testing.M) { func TestAutomatedBasic(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) chainClient, _, contractDeployer, linkToken, registry, registrar, onlyStartRunner := setupAutomationTest( t, "basic-upkeep", ethereum.RegistryVersion_2_0, defaultOCRRegistryConfig, ) @@ -233,7 +233,7 @@ func TestAutomatedAddFunds(t *testing.T) { func TestAutomatedPauseUnPause(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) chainClient, _, contractDeployer, linkToken, registry, registrar, onlyStartRunner := setupAutomationTest( t, "pause-unpause", ethereum.RegistryVersion_2_0, defaultOCRRegistryConfig, ) @@ -317,7 +317,7 @@ func TestAutomatedPauseUnPause(t *testing.T) { func TestAutomatedRegisterUpkeep(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) chainClient, _, contractDeployer, linkToken, registry, registrar, onlyStartRunner := setupAutomationTest( t, "register-upkeep", ethereum.RegistryVersion_2_0, defaultOCRRegistryConfig, ) @@ -449,7 +449,7 @@ func TestAutomatedPauseRegistry(t *testing.T) { func TestAutomatedKeeperNodesDown(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) chainClient, chainlinkNodes, contractDeployer, linkToken, registry, registrar, onlyStartRunner := setupAutomationTest( t, "keeper-nodes-down", ethereum.RegistryVersion_2_0, defaultOCRRegistryConfig, ) @@ -591,7 +591,7 @@ func TestAutomatedPerformSimulation(t *testing.T) { func TestAutomatedCheckPerformGasLimit(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) chainClient, chainlinkNodes, contractDeployer, linkToken, registry, registrar, onlyStartRunner := setupAutomationTest( t, "gas-limit", ethereum.RegistryVersion_2_0, defaultOCRRegistryConfig, ) @@ -692,7 +692,7 @@ func TestAutomatedCheckPerformGasLimit(t *testing.T) { func TestUpdateCheckData(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) chainClient, _, contractDeployer, linkToken, registry, registrar, onlyStartRunner := setupAutomationTest( t, "update-check-data", ethereum.RegistryVersion_2_0, defaultOCRRegistryConfig, ) diff --git a/integration-tests/smoke/flux_test.go b/integration-tests/smoke/flux_test.go index 9799955afb8..8056e2baa04 100644 --- a/integration-tests/smoke/flux_test.go +++ b/integration-tests/smoke/flux_test.go @@ -31,7 +31,7 @@ import ( func TestFluxBasic(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, testNetwork := setupFluxTest(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/smoke/keeper_test.go b/integration-tests/smoke/keeper_test.go index 588d66994bc..42c39c29d5c 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -91,7 +91,7 @@ var ( func TestKeeperBasicSmoke(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) registryVersions := map[string]ethereum.KeeperRegistryVersion{ "registry_1_1": ethereum.RegistryVersion_1_1, "registry_1_2": ethereum.RegistryVersion_1_2, @@ -169,7 +169,7 @@ func TestKeeperBasicSmoke(t *testing.T) { func TestKeeperBlockCountPerTurn(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) registryVersions := map[string]ethereum.KeeperRegistryVersion{ "registry_1_1": ethereum.RegistryVersion_1_1, "registry_1_2": ethereum.RegistryVersion_1_2, @@ -348,7 +348,7 @@ func TestKeeperSimulation(t *testing.T) { func TestKeeperCheckPerformGasLimit(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) registryVersions := map[string]ethereum.KeeperRegistryVersion{ "registry_1_2": ethereum.RegistryVersion_1_2, "registry_1_3": ethereum.RegistryVersion_1_3, @@ -462,7 +462,7 @@ func TestKeeperCheckPerformGasLimit(t *testing.T) { func TestKeeperRegisterUpkeep(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) registryVersions := map[string]ethereum.KeeperRegistryVersion{ "registry_1_1": ethereum.RegistryVersion_1_1, "registry_1_2": ethereum.RegistryVersion_1_2, @@ -616,7 +616,7 @@ func TestKeeperAddFunds(t *testing.T) { func TestKeeperRemove(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) registryVersions := map[string]ethereum.KeeperRegistryVersion{ "registry_1_1": ethereum.RegistryVersion_1_1, "registry_1_2": ethereum.RegistryVersion_1_2, @@ -847,7 +847,7 @@ func TestKeeperMigrateRegistry(t *testing.T) { func TestKeeperNodeDown(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) registryVersions := map[string]ethereum.KeeperRegistryVersion{ "registry_1_1": ethereum.RegistryVersion_1_1, "registry_1_2": ethereum.RegistryVersion_1_2, @@ -955,7 +955,7 @@ func TestKeeperNodeDown(t *testing.T) { func TestKeeperPauseUnPauseUpkeep(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) chainClient, chainlinkNodes, contractDeployer, linkToken, onlyStartRunner := setupKeeperTest(t, "pause-upkeep") if onlyStartRunner { return @@ -1045,7 +1045,7 @@ func TestKeeperPauseUnPauseUpkeep(t *testing.T) { func TestKeeperUpdateCheckData(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) chainClient, chainlinkNodes, contractDeployer, linkToken, onlyStartRunner := setupKeeperTest(t, "pause-upkeep") if onlyStartRunner { return diff --git a/integration-tests/smoke/mercury_test.go b/integration-tests/smoke/mercury_test.go index e23f347f72b..f133a345137 100644 --- a/integration-tests/smoke/mercury_test.go +++ b/integration-tests/smoke/mercury_test.go @@ -10,9 +10,9 @@ import ( "github.com/ava-labs/coreth/accounts/abi" "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink/integration-tests/actions" mercuryactions "github.com/smartcontractkit/chainlink/integration-tests/actions/mercury" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum/mercury/exchanger" @@ -20,7 +20,7 @@ import ( ) func TestMercurySmoke(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnv, err := mercury.SetupMercuryTestEnv("smoke", nil, nil) require.NoError(t, err) diff --git a/integration-tests/smoke/ocr2vrf_test.go b/integration-tests/smoke/ocr2vrf_test.go index 8575e4cca5b..c406fc39426 100644 --- a/integration-tests/smoke/ocr2vrf_test.go +++ b/integration-tests/smoke/ocr2vrf_test.go @@ -26,7 +26,7 @@ import ( func TestOCR2VRFRedeemModel(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, testNetwork := setupOCR2VRFEnvironment(t) if testEnvironment.WillUseRemoteRunner() { return @@ -86,7 +86,7 @@ func TestOCR2VRFRedeemModel(t *testing.T) { func TestOCR2VRFFulfillmentModel(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, testNetwork := setupOCR2VRFEnvironment(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/smoke/ocr_test.go b/integration-tests/smoke/ocr_test.go index 3e3912372be..f5edecd02bd 100644 --- a/integration-tests/smoke/ocr_test.go +++ b/integration-tests/smoke/ocr_test.go @@ -87,7 +87,7 @@ func setupOCRTest(t *testing.T) ( testEnvironment *environment.Environment, testNetwork blockchain.EVMNetwork, ) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testNetwork = networks.SelectedNetwork evmConfig := ethereum.New(nil) if !testNetwork.Simulated { diff --git a/integration-tests/smoke/runlog_test.go b/integration-tests/smoke/runlog_test.go index 44bc2f04412..be3b69ff423 100644 --- a/integration-tests/smoke/runlog_test.go +++ b/integration-tests/smoke/runlog_test.go @@ -29,7 +29,7 @@ import ( func TestRunLogBasic(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, testNetwork := setupRunLogTest(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/smoke/vrf_test.go b/integration-tests/smoke/vrf_test.go index 3d05a979a24..92c55fb56f8 100644 --- a/integration-tests/smoke/vrf_test.go +++ b/integration-tests/smoke/vrf_test.go @@ -27,7 +27,7 @@ import ( func TestVRFBasic(t *testing.T) { t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, testNetwork := setupVRFTest(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/smoke/vrfv2_test.go b/integration-tests/smoke/vrfv2_test.go index 620dacf1546..c1ae1bd88ca 100644 --- a/integration-tests/smoke/vrfv2_test.go +++ b/integration-tests/smoke/vrfv2_test.go @@ -3,13 +3,14 @@ package smoke import ( "context" "fmt" - "github.com/smartcontractkit/chainlink-testing-framework/utils" - "go.uber.org/zap/zapcore" "math/big" "strings" "testing" "time" + "github.com/smartcontractkit/chainlink-testing-framework/utils" + "go.uber.org/zap/zapcore" + "github.com/onsi/gomega" "github.com/stretchr/testify/require" @@ -36,7 +37,7 @@ func TestVRFv2Basic(t *testing.T) { numberOfWords := uint32(3) t.Parallel() - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, testNetwork := setupVRFv2Test(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/soak/forwarder_ocr_test.go b/integration-tests/soak/forwarder_ocr_test.go index bedd4da642b..7604bc038fc 100644 --- a/integration-tests/soak/forwarder_ocr_test.go +++ b/integration-tests/soak/forwarder_ocr_test.go @@ -8,6 +8,7 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-env/environment" @@ -30,7 +31,7 @@ func TestMain(m *testing.M) { } func TestForwarderOCRSoak(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, network := SetupForwarderOCRSoakEnv(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/soak/ocr_test.go b/integration-tests/soak/ocr_test.go index 175b3b1c031..d7d0f297259 100644 --- a/integration-tests/soak/ocr_test.go +++ b/integration-tests/soak/ocr_test.go @@ -10,6 +10,7 @@ import ( "time" "github.com/kelseyhightower/envconfig" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-env/environment" @@ -27,7 +28,7 @@ import ( ) func TestOCRSoak(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) testEnvironment, network, testInputs := SetupOCRSoakEnv(t) if testEnvironment.WillUseRemoteRunner() { return diff --git a/integration-tests/testsetups/keeper_benchmark.go b/integration-tests/testsetups/keeper_benchmark.go index c1b5e4f8825..173e47c8d38 100644 --- a/integration-tests/testsetups/keeper_benchmark.go +++ b/integration-tests/testsetups/keeper_benchmark.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" reportModel "github.com/smartcontractkit/chainlink-testing-framework/testreporters" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink/integration-tests/actions" @@ -70,7 +71,7 @@ func NewKeeperBenchmarkTest(inputs KeeperBenchmarkTestInputs) *KeeperBenchmarkTe // Setup prepares contracts for the test func (k *KeeperBenchmarkTest) Setup(t *testing.T, env *environment.Environment) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) startTime := time.Now() k.TestReporter.Summary.StartTime = startTime.UnixMilli() k.ensureInputValues(t) @@ -148,7 +149,7 @@ func (k *KeeperBenchmarkTest) Setup(t *testing.T, env *environment.Environment) // Run runs the keeper benchmark test func (k *KeeperBenchmarkTest) Run(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) k.TestReporter.Summary.Load.TotalCheckGasPerBlock = int64(k.Inputs.NumberOfContracts) * k.Inputs.CheckGasToBurn k.TestReporter.Summary.Load.TotalPerformGasPerBlock = int64((float64(k.Inputs.NumberOfContracts) / float64(k.Inputs.BlockInterval)) * float64(k.Inputs.PerformGasToBurn)) k.TestReporter.Summary.Load.AverageExpectedPerformsPerBlock = float64(k.Inputs.NumberOfContracts) / float64(k.Inputs.BlockInterval) @@ -259,7 +260,7 @@ func (k *KeeperBenchmarkTest) subscribeToUpkeepPerformedEvent( metricsReporter *testreporters.KeeperBenchmarkTestReporter, rIndex int, ) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) contractABI, err := ethereum.KeeperRegistry11MetaData.GetAbi() require.NoError(t, err, "Error getting ABI") switch k.Inputs.RegistryVersions[rIndex] { diff --git a/integration-tests/testsetups/ocr.go b/integration-tests/testsetups/ocr.go index 696b5859f7a..29a2d2340ce 100644 --- a/integration-tests/testsetups/ocr.go +++ b/integration-tests/testsetups/ocr.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-env/environment" @@ -70,7 +71,7 @@ func NewOCRSoakTest(inputs *OCRSoakTestInputs) *OCRSoakTest { // Setup sets up the test environment, deploying contracts and funding chainlink nodes func (o *OCRSoakTest) Setup(t *testing.T, env *environment.Environment) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) o.ensureInputValues(t) o.testEnvironment = env var err error @@ -145,7 +146,7 @@ func (o *OCRSoakTest) Setup(t *testing.T, env *environment.Environment) { // Run starts the OCR soak test func (o *OCRSoakTest) Run(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) // Set initial value and create jobs err := actions.SetAllAdapterResponsesToTheSameValue(o.Inputs.StartingAdapterValue, o.ocrInstances, o.chainlinkNodes, o.mockServer) require.NoError(t, err, "Error setting adapter responses") @@ -229,7 +230,7 @@ func (o *OCRSoakTest) processNewEvent( ocrInstance contracts.OffchainAggregator, contractABI *abi.ABI, ) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) errorChan := make(chan error) eventConfirmed := make(chan bool) err := o.chainClient.ProcessEvent(eventDetails.Name, event, eventConfirmed, errorChan) @@ -267,7 +268,7 @@ func (o *OCRSoakTest) processNewEvent( // marshalls new answer events into manageable Go struct for further processing and reporting func (o *OCRSoakTest) processNewAnswer(t *testing.T, newAnswer *ethereum.OffchainAggregatorAnswerUpdated) bool { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) // Updated Info answerAddress := newAnswer.Raw.Address.Hex() _, tracked := o.TestReporter.ContractReports[answerAddress] @@ -296,7 +297,7 @@ func (o *OCRSoakTest) processNewAnswer(t *testing.T, newAnswer *ethereum.Offchai // triggers a new OCR round by setting a new mock adapter value func (o *OCRSoakTest) triggerNewRound(t *testing.T, currentAdapterValue int) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) startingBlockNum, err := o.chainClient.LatestBlockNumber(context.Background()) require.NoError(t, err, "Error retrieving latest block number") @@ -331,7 +332,7 @@ func (o *OCRSoakTest) subscribeOCREvents( t *testing.T, answerUpdated chan *ethereum.OffchainAggregatorAnswerUpdated, ) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) contractABI, err := ethereum.OffchainAggregatorMetaData.GetAbi() require.NoError(t, err, "Getting contract abi for OCR shouldn't fail") latestBlockNum, err := o.chainClient.LatestBlockNumber(context.Background()) diff --git a/integration-tests/testsetups/vrfv2.go b/integration-tests/testsetups/vrfv2.go index 0f2ae2c2209..1b8d12d33eb 100644 --- a/integration-tests/testsetups/vrfv2.go +++ b/integration-tests/testsetups/vrfv2.go @@ -8,6 +8,7 @@ import ( "time" "github.com/rs/zerolog/log" + "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-env/environment" @@ -15,7 +16,6 @@ import ( ctfClient "github.com/smartcontractkit/chainlink-testing-framework/client" reportModel "github.com/smartcontractkit/chainlink-testing-framework/testreporters" - "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/testreporters" ) @@ -79,7 +79,7 @@ func (v *VRFV2SoakTest) Setup(t *testing.T, env *environment.Environment, isLoca // Run starts the VRFV2 soak test func (v *VRFV2SoakTest) Run(t *testing.T) { - l := actions.GetTestLogger(t) + l := utils.GetTestLogger(t) l.Info(). Str("Test Duration", v.Inputs.TestDuration.Truncate(time.Second).String()). Int("Max number of requests per minute wanted", v.Inputs.RequestsPerMinute). From ef7ab922cfecc38f05060051cc9b086bdf84f58a Mon Sep 17 00:00:00 2001 From: george-dorin <120329946+george-dorin@users.noreply.github.com> Date: Mon, 20 Mar 2023 17:52:33 +0200 Subject: [PATCH 21/25] Move Enhanced EA telemetry protobuf to own file (#8741) --- core/services/ocrcommon/telemetry.go | 2 +- core/services/ocrcommon/telemetry_test.go | 2 +- .../synchronization/telem/telem.pb.go | 265 +-------------- .../synchronization/telem/telem.proto | 19 -- .../telem/telem_enahced_ea.pb.go | 313 ++++++++++++++++++ .../telem/telem_enahced_ea.proto | 24 ++ 6 files changed, 357 insertions(+), 268 deletions(-) create mode 100644 core/services/synchronization/telem/telem_enahced_ea.pb.go create mode 100644 core/services/synchronization/telem/telem_enahced_ea.proto diff --git a/core/services/ocrcommon/telemetry.go b/core/services/ocrcommon/telemetry.go index e50e2ebcec9..af18dda7ee6 100644 --- a/core/services/ocrcommon/telemetry.go +++ b/core/services/ocrcommon/telemetry.go @@ -145,7 +145,7 @@ func collectAndSend(ds *inMemoryDataSource, trrs *pipeline.TaskRunResults, final } value := getParsedValue(ds, trrs, trr) - t := &telem.TelemEnhancedEA{ + t := &telem.EnhancedEA{ DataSource: eaTelemetry.DataSource, Value: value, BridgeTaskRunStartedTimestamp: trr.CreatedAt.UnixMilli(), diff --git a/core/services/ocrcommon/telemetry_test.go b/core/services/ocrcommon/telemetry_test.go index 451d4dd92d1..6df7c83f2b3 100644 --- a/core/services/ocrcommon/telemetry_test.go +++ b/core/services/ocrcommon/telemetry_test.go @@ -224,7 +224,7 @@ func TestSendEATelemetry(t *testing.T) { wg.Add(1) collectEATelemetry(&ds, &trrs, &fr) - expectedTelemetry := telem.TelemEnhancedEA{ + expectedTelemetry := telem.EnhancedEA{ DataSource: "data_source_test", Value: 1234567890, BridgeTaskRunStartedTimestamp: trrs[0].CreatedAt.UnixMilli(), diff --git a/core/services/synchronization/telem/telem.pb.go b/core/services/synchronization/telem/telem.pb.go index b7325731ca6..ef413f2434d 100644 --- a/core/services/synchronization/telem/telem.pb.go +++ b/core/services/synchronization/telem/telem.pb.go @@ -7,11 +7,10 @@ package telem import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -210,173 +209,6 @@ func (x *TelemResponse) GetBody() string { return "" } -type TelemEnhancedEA struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DataSource string `protobuf:"bytes,1,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"` - Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` - BridgeTaskRunStartedTimestamp int64 `protobuf:"varint,3,opt,name=bridge_task_run_started_timestamp,json=bridgeTaskRunStartedTimestamp,proto3" json:"bridge_task_run_started_timestamp,omitempty"` - BridgeTaskRunEndedTimestamp int64 `protobuf:"varint,4,opt,name=bridge_task_run_ended_timestamp,json=bridgeTaskRunEndedTimestamp,proto3" json:"bridge_task_run_ended_timestamp,omitempty"` - ProviderRequestedProtocol string `protobuf:"bytes,5,opt,name=provider_requested_protocol,json=providerRequestedProtocol,proto3" json:"provider_requested_protocol,omitempty"` - ProviderRequestedTimestamp int64 `protobuf:"varint,6,opt,name=provider_requested_timestamp,json=providerRequestedTimestamp,proto3" json:"provider_requested_timestamp,omitempty"` - ProviderReceivedTimestamp int64 `protobuf:"varint,7,opt,name=provider_received_timestamp,json=providerReceivedTimestamp,proto3" json:"provider_received_timestamp,omitempty"` - ProviderDataStreamEstablished int64 `protobuf:"varint,8,opt,name=provider_data_stream_established,json=providerDataStreamEstablished,proto3" json:"provider_data_stream_established,omitempty"` - ProviderDataReceived int64 `protobuf:"varint,9,opt,name=provider_data_received,json=providerDataReceived,proto3" json:"provider_data_received,omitempty"` - ProviderIndicatedTime int64 `protobuf:"varint,10,opt,name=provider_indicated_time,json=providerIndicatedTime,proto3" json:"provider_indicated_time,omitempty"` - Feed string `protobuf:"bytes,11,opt,name=feed,proto3" json:"feed,omitempty"` - ChainId string `protobuf:"bytes,12,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Observation int64 `protobuf:"varint,13,opt,name=observation,proto3" json:"observation,omitempty"` - ConfigDigest string `protobuf:"bytes,14,opt,name=config_digest,json=configDigest,proto3" json:"config_digest,omitempty"` - Round int64 `protobuf:"varint,15,opt,name=round,proto3" json:"round,omitempty"` - Epoch int64 `protobuf:"varint,16,opt,name=epoch,proto3" json:"epoch,omitempty"` -} - -func (x *TelemEnhancedEA) Reset() { - *x = TelemEnhancedEA{} - if protoimpl.UnsafeEnabled { - mi := &file_core_services_synchronization_telem_telem_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TelemEnhancedEA) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TelemEnhancedEA) ProtoMessage() {} - -func (x *TelemEnhancedEA) ProtoReflect() protoreflect.Message { - mi := &file_core_services_synchronization_telem_telem_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TelemEnhancedEA.ProtoReflect.Descriptor instead. -func (*TelemEnhancedEA) Descriptor() ([]byte, []int) { - return file_core_services_synchronization_telem_telem_proto_rawDescGZIP(), []int{3} -} - -func (x *TelemEnhancedEA) GetDataSource() string { - if x != nil { - return x.DataSource - } - return "" -} - -func (x *TelemEnhancedEA) GetValue() int64 { - if x != nil { - return x.Value - } - return 0 -} - -func (x *TelemEnhancedEA) GetBridgeTaskRunStartedTimestamp() int64 { - if x != nil { - return x.BridgeTaskRunStartedTimestamp - } - return 0 -} - -func (x *TelemEnhancedEA) GetBridgeTaskRunEndedTimestamp() int64 { - if x != nil { - return x.BridgeTaskRunEndedTimestamp - } - return 0 -} - -func (x *TelemEnhancedEA) GetProviderRequestedProtocol() string { - if x != nil { - return x.ProviderRequestedProtocol - } - return "" -} - -func (x *TelemEnhancedEA) GetProviderRequestedTimestamp() int64 { - if x != nil { - return x.ProviderRequestedTimestamp - } - return 0 -} - -func (x *TelemEnhancedEA) GetProviderReceivedTimestamp() int64 { - if x != nil { - return x.ProviderReceivedTimestamp - } - return 0 -} - -func (x *TelemEnhancedEA) GetProviderDataStreamEstablished() int64 { - if x != nil { - return x.ProviderDataStreamEstablished - } - return 0 -} - -func (x *TelemEnhancedEA) GetProviderDataReceived() int64 { - if x != nil { - return x.ProviderDataReceived - } - return 0 -} - -func (x *TelemEnhancedEA) GetProviderIndicatedTime() int64 { - if x != nil { - return x.ProviderIndicatedTime - } - return 0 -} - -func (x *TelemEnhancedEA) GetFeed() string { - if x != nil { - return x.Feed - } - return "" -} - -func (x *TelemEnhancedEA) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *TelemEnhancedEA) GetObservation() int64 { - if x != nil { - return x.Observation - } - return 0 -} - -func (x *TelemEnhancedEA) GetConfigDigest() string { - if x != nil { - return x.ConfigDigest - } - return "" -} - -func (x *TelemEnhancedEA) GetRound() int64 { - if x != nil { - return x.Round - } - return 0 -} - -func (x *TelemEnhancedEA) GetEpoch() int64 { - if x != nil { - return x.Epoch - } - return 0 -} - var File_core_services_synchronization_telem_telem_proto protoreflect.FileDescriptor var file_core_services_synchronization_telem_telem_proto_rawDesc = []byte{ @@ -403,68 +235,20 @@ var file_core_services_synchronization_telem_telem_proto_rawDesc = []byte{ 0x07, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x22, 0x23, 0x0a, 0x0d, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xf3, 0x05, 0x0a, 0x0f, - 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x45, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x45, 0x41, 0x12, - 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x48, 0x0a, 0x21, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x1d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x44, 0x0a, 0x1f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x72, 0x75, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x40, 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x47, 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x5f, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x1d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, - 0x65, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x20, - 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, - 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, - 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x32, 0x79, 0x0a, 0x05, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x12, 0x32, 0x0a, 0x05, 0x54, 0x65, - 0x6c, 0x65, 0x6d, 0x12, 0x13, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x54, 0x65, 0x6c, 0x65, - 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, - 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, - 0x0a, 0x0a, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x18, 0x2e, 0x74, - 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x54, - 0x65, 0x6c, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4b, 0x5a, 0x49, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6b, 0x69, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x32, 0x79, 0x0a, 0x05, 0x54, + 0x65, 0x6c, 0x65, 0x6d, 0x12, 0x32, 0x0a, 0x05, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x12, 0x13, 0x2e, + 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x6d, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x54, 0x65, 0x6c, 0x65, + 0x6d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x18, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x54, + 0x65, 0x6c, 0x65, 0x6d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x14, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4b, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x6b, 0x69, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x79, + 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, + 0x6c, 0x65, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -479,12 +263,11 @@ func file_core_services_synchronization_telem_telem_proto_rawDescGZIP() []byte { return file_core_services_synchronization_telem_telem_proto_rawDescData } -var file_core_services_synchronization_telem_telem_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_core_services_synchronization_telem_telem_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_core_services_synchronization_telem_telem_proto_goTypes = []interface{}{ (*TelemRequest)(nil), // 0: telem.TelemRequest (*TelemBatchRequest)(nil), // 1: telem.TelemBatchRequest (*TelemResponse)(nil), // 2: telem.TelemResponse - (*TelemEnhancedEA)(nil), // 3: telem.TelemEnhancedEA } var file_core_services_synchronization_telem_telem_proto_depIdxs = []int32{ 0, // 0: telem.Telem.Telem:input_type -> telem.TelemRequest @@ -540,18 +323,6 @@ func file_core_services_synchronization_telem_telem_proto_init() { return nil } } - file_core_services_synchronization_telem_telem_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TelemEnhancedEA); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -559,7 +330,7 @@ func file_core_services_synchronization_telem_telem_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_core_services_synchronization_telem_telem_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 3, NumExtensions: 0, NumServices: 1, }, diff --git a/core/services/synchronization/telem/telem.proto b/core/services/synchronization/telem/telem.proto index e5c89963d2c..805f947abae 100644 --- a/core/services/synchronization/telem/telem.proto +++ b/core/services/synchronization/telem/telem.proto @@ -26,22 +26,3 @@ message TelemBatchRequest { message TelemResponse { string body = 1; } - -message TelemEnhancedEA { - string data_source=1; - int64 value=2; - int64 bridge_task_run_started_timestamp=3; - int64 bridge_task_run_ended_timestamp=4; - string provider_requested_protocol=5; - int64 provider_requested_timestamp=6; - int64 provider_received_timestamp=7; - int64 provider_data_stream_established=8; - int64 provider_data_received=9; - int64 provider_indicated_time=10; - string feed=11; - string chain_id=12; - int64 observation=13; - string config_digest = 14; - int64 round=15; - int64 epoch=16; -} diff --git a/core/services/synchronization/telem/telem_enahced_ea.pb.go b/core/services/synchronization/telem/telem_enahced_ea.pb.go new file mode 100644 index 00000000000..7c67a4e4e37 --- /dev/null +++ b/core/services/synchronization/telem/telem_enahced_ea.pb.go @@ -0,0 +1,313 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: core/services/synchronization/telem/telem_enahced_ea.proto + +package telem + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type EnhancedEA struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DataSource string `protobuf:"bytes,1,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"` + Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + BridgeTaskRunStartedTimestamp int64 `protobuf:"varint,3,opt,name=bridge_task_run_started_timestamp,json=bridgeTaskRunStartedTimestamp,proto3" json:"bridge_task_run_started_timestamp,omitempty"` + BridgeTaskRunEndedTimestamp int64 `protobuf:"varint,4,opt,name=bridge_task_run_ended_timestamp,json=bridgeTaskRunEndedTimestamp,proto3" json:"bridge_task_run_ended_timestamp,omitempty"` + ProviderRequestedProtocol string `protobuf:"bytes,5,opt,name=provider_requested_protocol,json=providerRequestedProtocol,proto3" json:"provider_requested_protocol,omitempty"` + ProviderRequestedTimestamp int64 `protobuf:"varint,6,opt,name=provider_requested_timestamp,json=providerRequestedTimestamp,proto3" json:"provider_requested_timestamp,omitempty"` + ProviderReceivedTimestamp int64 `protobuf:"varint,7,opt,name=provider_received_timestamp,json=providerReceivedTimestamp,proto3" json:"provider_received_timestamp,omitempty"` + ProviderDataStreamEstablished int64 `protobuf:"varint,8,opt,name=provider_data_stream_established,json=providerDataStreamEstablished,proto3" json:"provider_data_stream_established,omitempty"` + ProviderDataReceived int64 `protobuf:"varint,9,opt,name=provider_data_received,json=providerDataReceived,proto3" json:"provider_data_received,omitempty"` + ProviderIndicatedTime int64 `protobuf:"varint,10,opt,name=provider_indicated_time,json=providerIndicatedTime,proto3" json:"provider_indicated_time,omitempty"` + Feed string `protobuf:"bytes,11,opt,name=feed,proto3" json:"feed,omitempty"` + ChainId string `protobuf:"bytes,12,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Observation int64 `protobuf:"varint,13,opt,name=observation,proto3" json:"observation,omitempty"` + ConfigDigest string `protobuf:"bytes,14,opt,name=config_digest,json=configDigest,proto3" json:"config_digest,omitempty"` + Round int64 `protobuf:"varint,15,opt,name=round,proto3" json:"round,omitempty"` + Epoch int64 `protobuf:"varint,16,opt,name=epoch,proto3" json:"epoch,omitempty"` +} + +func (x *EnhancedEA) Reset() { + *x = EnhancedEA{} + if protoimpl.UnsafeEnabled { + mi := &file_core_services_synchronization_telem_telem_enahced_ea_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnhancedEA) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnhancedEA) ProtoMessage() {} + +func (x *EnhancedEA) ProtoReflect() protoreflect.Message { + mi := &file_core_services_synchronization_telem_telem_enahced_ea_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnhancedEA.ProtoReflect.Descriptor instead. +func (*EnhancedEA) Descriptor() ([]byte, []int) { + return file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDescGZIP(), []int{0} +} + +func (x *EnhancedEA) GetDataSource() string { + if x != nil { + return x.DataSource + } + return "" +} + +func (x *EnhancedEA) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *EnhancedEA) GetBridgeTaskRunStartedTimestamp() int64 { + if x != nil { + return x.BridgeTaskRunStartedTimestamp + } + return 0 +} + +func (x *EnhancedEA) GetBridgeTaskRunEndedTimestamp() int64 { + if x != nil { + return x.BridgeTaskRunEndedTimestamp + } + return 0 +} + +func (x *EnhancedEA) GetProviderRequestedProtocol() string { + if x != nil { + return x.ProviderRequestedProtocol + } + return "" +} + +func (x *EnhancedEA) GetProviderRequestedTimestamp() int64 { + if x != nil { + return x.ProviderRequestedTimestamp + } + return 0 +} + +func (x *EnhancedEA) GetProviderReceivedTimestamp() int64 { + if x != nil { + return x.ProviderReceivedTimestamp + } + return 0 +} + +func (x *EnhancedEA) GetProviderDataStreamEstablished() int64 { + if x != nil { + return x.ProviderDataStreamEstablished + } + return 0 +} + +func (x *EnhancedEA) GetProviderDataReceived() int64 { + if x != nil { + return x.ProviderDataReceived + } + return 0 +} + +func (x *EnhancedEA) GetProviderIndicatedTime() int64 { + if x != nil { + return x.ProviderIndicatedTime + } + return 0 +} + +func (x *EnhancedEA) GetFeed() string { + if x != nil { + return x.Feed + } + return "" +} + +func (x *EnhancedEA) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *EnhancedEA) GetObservation() int64 { + if x != nil { + return x.Observation + } + return 0 +} + +func (x *EnhancedEA) GetConfigDigest() string { + if x != nil { + return x.ConfigDigest + } + return "" +} + +func (x *EnhancedEA) GetRound() int64 { + if x != nil { + return x.Round + } + return 0 +} + +func (x *EnhancedEA) GetEpoch() int64 { + if x != nil { + return x.Epoch + } + return 0 +} + +var File_core_services_synchronization_telem_telem_enahced_ea_proto protoreflect.FileDescriptor + +var file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x5f, 0x65, 0x6e, 0x61, 0x68, + 0x63, 0x65, 0x64, 0x5f, 0x65, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x65, + 0x6c, 0x65, 0x6d, 0x22, 0xee, 0x05, 0x0a, 0x0a, 0x45, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, + 0x45, 0x41, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x48, 0x0a, 0x21, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x44, 0x0a, 0x1f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x64, 0x65, 0x64, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x1b, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x40, 0x0a, 0x1c, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x1a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x1b, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x19, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x47, 0x0a, 0x20, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x66, 0x65, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, + 0x67, 0x65, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x42, 0x4b, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x6b, 0x69, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x6e, 0x63, + 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x6c, 0x65, + 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDescOnce sync.Once + file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDescData = file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDesc +) + +func file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDescGZIP() []byte { + file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDescOnce.Do(func() { + file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDescData) + }) + return file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDescData +} + +var file_core_services_synchronization_telem_telem_enahced_ea_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_core_services_synchronization_telem_telem_enahced_ea_proto_goTypes = []interface{}{ + (*EnhancedEA)(nil), // 0: telem.EnhancedEA +} +var file_core_services_synchronization_telem_telem_enahced_ea_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_core_services_synchronization_telem_telem_enahced_ea_proto_init() } +func file_core_services_synchronization_telem_telem_enahced_ea_proto_init() { + if File_core_services_synchronization_telem_telem_enahced_ea_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_core_services_synchronization_telem_telem_enahced_ea_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnhancedEA); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_core_services_synchronization_telem_telem_enahced_ea_proto_goTypes, + DependencyIndexes: file_core_services_synchronization_telem_telem_enahced_ea_proto_depIdxs, + MessageInfos: file_core_services_synchronization_telem_telem_enahced_ea_proto_msgTypes, + }.Build() + File_core_services_synchronization_telem_telem_enahced_ea_proto = out.File + file_core_services_synchronization_telem_telem_enahced_ea_proto_rawDesc = nil + file_core_services_synchronization_telem_telem_enahced_ea_proto_goTypes = nil + file_core_services_synchronization_telem_telem_enahced_ea_proto_depIdxs = nil +} diff --git a/core/services/synchronization/telem/telem_enahced_ea.proto b/core/services/synchronization/telem/telem_enahced_ea.proto new file mode 100644 index 00000000000..f3b2cf92b97 --- /dev/null +++ b/core/services/synchronization/telem/telem_enahced_ea.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +option go_package = "github.com/smartcontractkit/chainlink/core/services/synchronization/telem"; + +package telem; + +message EnhancedEA { + string data_source=1; + int64 value=2; + int64 bridge_task_run_started_timestamp=3; + int64 bridge_task_run_ended_timestamp=4; + string provider_requested_protocol=5; + int64 provider_requested_timestamp=6; + int64 provider_received_timestamp=7; + int64 provider_data_stream_established=8; + int64 provider_data_received=9; + int64 provider_indicated_time=10; + string feed=11; + string chain_id=12; + int64 observation=13; + string config_digest = 14; + int64 round=15; + int64 epoch=16; +} From 3435ac699f3491cf72ea831cf9ba0afb92e8f65a Mon Sep 17 00:00:00 2001 From: krehermann Date: Mon, 20 Mar 2023 09:10:14 -0700 Subject: [PATCH 22/25] remove codecgen from .tool-versions (#8729) * Remove codecgen from .tool-versions --- .tool-versions | 1 - 1 file changed, 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 86ef23b5b66..552d40d4c94 100644 --- a/.tool-versions +++ b/.tool-versions @@ -6,4 +6,3 @@ helm 3.10.3 zig 0.10.1 golangci-lint 1.51.2 shellspec 0.28.1 -codecgen 1.2.10 From 5fca3c604522244704184f6b057f561757695ce2 Mon Sep 17 00:00:00 2001 From: Anirudh Warrier Date: Mon, 20 Mar 2023 22:20:51 +0530 Subject: [PATCH 23/25] AUTO-2156 Cleanup automation integration tests contracts (#8754) --- contracts/scripts/native_solc_compile_all | 3 + .../keeper_registrar_wrapper1_2.go | 1492 ++++++++++++++++ .../keeper_registrar_wrapper2_0.go | 1506 +++++++++++++++++ .../upkeep_transcoder/upkeep_transcoder.go | 225 +++ ...rapper-dependency-versions-do-not-edit.txt | 3 + core/gethwrappers/go_generate.go | 3 + .../actions/automation_ocr_helpers.go | 2 +- .../actions/keeper_benchmark_helpers.go | 2 +- integration-tests/actions/keeper_helpers.go | 2 +- integration-tests/benchmark/keeper_test.go | 2 +- .../chaos/automation_chaos_test.go | 2 +- .../contracts/contract_deployer.go | 112 +- .../contracts/contract_loader.go | 11 +- .../contracts/ethereum/KeeperConsumer.go | 361 ++++ .../ethereum/KeeperConsumerBenchmark.go | 869 ++++++++++ .../ethereum/KeeperConsumerPerformance.go | 787 +++++++++ .../ethereum/KeeperRegistryVersions.go | 20 + .../contracts/ethereum/PerformDataChecker.go | 292 ++++ .../contracts/ethereum/UpkeepCounter.go | 641 +++++++ .../UpkeepPerformCounterRestrictive.go | 756 +++++++++ .../contracts/ethereum/src/KeeperBase.sol | 1 + .../src/KeeperCompatibleInterface.sol | 1 + .../contracts/ethereum/src/KeeperConsumer.sol | 31 + .../ethereum/src/KeeperConsumerBenchmark.sol | 95 ++ .../src/KeeperConsumerPerformance.sol | 83 + .../ethereum/src/PerformDataChecker.sol | 32 + .../contracts/ethereum/src/UpkeepCounter.sol | 57 + .../src/UpkeepPerformCounterRestrictive.sol | 85 + .../contracts/ethereum_contracts.go | 6 +- .../contracts/ethereum_keeper_contracts.go | 34 +- .../contracts/ethereum_vrf_contracts.go | 8 +- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 +- integration-tests/performance/keeper_test.go | 2 +- integration-tests/smoke/automation_test.go | 2 +- integration-tests/smoke/keeper_test.go | 2 +- integration-tests/testreporters/keeper.go | 2 +- .../testreporters/keeper_benchmark.go | 2 +- integration-tests/testreporters/ocr.go | 2 +- integration-tests/testreporters/vrfv2.go | 2 +- .../testsetups/keeper_benchmark.go | 19 +- 41 files changed, 7462 insertions(+), 101 deletions(-) create mode 100644 core/gethwrappers/generated/keeper_registrar_wrapper1_2/keeper_registrar_wrapper1_2.go create mode 100644 core/gethwrappers/generated/keeper_registrar_wrapper2_0/keeper_registrar_wrapper2_0.go create mode 100644 core/gethwrappers/generated/upkeep_transcoder/upkeep_transcoder.go create mode 100644 integration-tests/contracts/ethereum/KeeperConsumer.go create mode 100644 integration-tests/contracts/ethereum/KeeperConsumerBenchmark.go create mode 100644 integration-tests/contracts/ethereum/KeeperConsumerPerformance.go create mode 100644 integration-tests/contracts/ethereum/KeeperRegistryVersions.go create mode 100644 integration-tests/contracts/ethereum/PerformDataChecker.go create mode 100644 integration-tests/contracts/ethereum/UpkeepCounter.go create mode 100644 integration-tests/contracts/ethereum/UpkeepPerformCounterRestrictive.go create mode 120000 integration-tests/contracts/ethereum/src/KeeperBase.sol create mode 120000 integration-tests/contracts/ethereum/src/KeeperCompatibleInterface.sol create mode 100644 integration-tests/contracts/ethereum/src/KeeperConsumer.sol create mode 100644 integration-tests/contracts/ethereum/src/KeeperConsumerBenchmark.sol create mode 100644 integration-tests/contracts/ethereum/src/KeeperConsumerPerformance.sol create mode 100644 integration-tests/contracts/ethereum/src/PerformDataChecker.sol create mode 100644 integration-tests/contracts/ethereum/src/UpkeepCounter.sol create mode 100644 integration-tests/contracts/ethereum/src/UpkeepPerformCounterRestrictive.sol diff --git a/contracts/scripts/native_solc_compile_all b/contracts/scripts/native_solc_compile_all index e48c3a82b84..c666cf3db83 100755 --- a/contracts/scripts/native_solc_compile_all +++ b/contracts/scripts/native_solc_compile_all @@ -37,12 +37,15 @@ $SCRIPTPATH/native_solc7_compile UpkeepRegistrationRequests.sol $SCRIPTPATH/native_solc7_compile tests/UpkeepPerformCounterRestrictive.sol $SCRIPTPATH/native_solc7_compile tests/UpkeepCounter.sol $SCRIPTPATH/native_solc8_6_compile automation/upkeeps/CronUpkeepFactory.sol +$SCRIPTPATH/native_solc8_6_compile automation/1_2/KeeperRegistrar1_2.sol $SCRIPTPATH/native_solc8_6_compile automation/1_2/KeeperRegistry1_2.sol $SCRIPTPATH/native_solc8_6_compile automation/1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.sol $SCRIPTPATH/native_solc8_6_compile automation/1_3/KeeperRegistry1_3.sol $SCRIPTPATH/native_solc8_6_compile automation/1_3/KeeperRegistryLogic1_3.sol +$SCRIPTPATH/native_solc8_6_compile automation/2_0/KeeperRegistrar2_0.sol $SCRIPTPATH/native_solc8_6_compile automation/2_0/KeeperRegistry2_0.sol $SCRIPTPATH/native_solc8_6_compile automation/2_0/KeeperRegistryLogic2_0.sol +$SCRIPTPATH/native_solc8_6_compile automation/UpkeepTranscoder.sol # Aggregators $SCRIPTPATH/native_solc8_6_compile interfaces/AggregatorV2V3Interface.sol diff --git a/core/gethwrappers/generated/keeper_registrar_wrapper1_2/keeper_registrar_wrapper1_2.go b/core/gethwrappers/generated/keeper_registrar_wrapper1_2/keeper_registrar_wrapper1_2.go new file mode 100644 index 00000000000..7da88ceb7c4 --- /dev/null +++ b/core/gethwrappers/generated/keeper_registrar_wrapper1_2/keeper_registrar_wrapper1_2.go @@ -0,0 +1,1492 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package keeper_registrar_wrapper1_2 + +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" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +var KeeperRegistrarMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"LINKAddress\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistrar.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FunctionNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HashMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientPayment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAdminAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"LinkTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdminOrOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistrationRequestFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequestNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SenderMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AutoApproveAllowedSenderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enumKeeperRegistrar.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"displayName\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"RegistrationApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"RegistrationRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"source\",\"type\":\"uint8\"}],\"name\":\"RegistrationRequested\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"cancel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"getAutoApproveAllowedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getPendingRequest\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistrationConfig\",\"outputs\":[{\"internalType\":\"enumKeeperRegistrar.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"approvedCount\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minLINKJuels\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint8\",\"name\":\"source\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"setAutoApproveAllowedSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumKeeperRegistrar.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"setRegistrationConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b506040516200234638038062002346833981016040819052620000349162000394565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000ec565b5050506001600160601b0319606086901b16608052620000e18484848462000198565b50505050506200048d565b6001600160a01b038116331415620001475760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001a262000319565b6003546040805160a081019091526501000000000090910463ffffffff169080866002811115620001d757620001d762000477565b815261ffff8616602082015263ffffffff831660408201526001600160a01b03851660608201526001600160601b038416608090910152805160038054909190829060ff1916600183600281111562000234576200023462000477565b0217905550602082015181546040808501516060860151610100600160481b031990931661010063ffffffff9586160263ffffffff60281b19161765010000000000949091169390930292909217600160481b600160e81b03191669010000000000000000006001600160a01b0390921691909102178255608090920151600190910180546001600160601b0319166001600160601b03909216919091179055517f6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd906200030a90879087908790879062000422565b60405180910390a15050505050565b6000546001600160a01b03163314620003755760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b03811681146200038f57600080fd5b919050565b600080600080600060a08688031215620003ad57600080fd5b620003b88662000377565b9450602086015160038110620003cd57600080fd5b604087015190945061ffff81168114620003e657600080fd5b9250620003f66060870162000377565b60808701519092506001600160601b03811681146200041457600080fd5b809150509295509295909350565b60808101600386106200044557634e487b7160e01b600052602160045260246000fd5b94815261ffff9390931660208401526001600160a01b039190911660408301526001600160601b031660609091015290565b634e487b7160e01b600052602160045260246000fd5b60805160601c611e7e620004c86000396000818161015b015281816104a601528181610a410152818161110b01526113500152611e7e6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063850af0cb1161008c578063a4c0ed3611610066578063a4c0ed36146102fd578063a793ab8b14610310578063c4d252f514610323578063f2fde38b1461033657600080fd5b8063850af0cb1461021957806388b12d55146102325780638da5cb5b146102df57600080fd5b80633659d666116100c85780633659d666146101a2578063367b9b4f146101b557806379ba5097146101c85780637e776f7f146101d057600080fd5b8063181f5a77146100ef578063183310b3146101415780631b6b6d2314610156575b600080fd5b61012b6040518060400160405280601581526020017f4b656570657252656769737472617220312e312e30000000000000000000000081525081565b6040516101389190611cf1565b60405180910390f35b61015461014f3660046118fc565b610349565b005b61017d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610138565b6101546101b03660046119a1565b61048e565b6101546101c33660046117d2565b6107b4565b610154610846565b6102096101de3660046117b0565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6040519015158152602001610138565b610221610948565b604051610138959493929190611ca1565b6102a6610240366004611880565b60009081526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169290910182905291565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff909116602083015201610138565b60005473ffffffffffffffffffffffffffffffffffffffff1661017d565b61015461030b366004611809565b610a29565b61015461031e366004611899565b610d7c565b610154610331366004611880565b610f91565b6101546103443660046117b0565b6111f2565b610351611206565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16918301919091526103ea576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008787878787604051602001610405959493929190611bb3565b604051602081830303815290604052805190602001209050808314610456576040517f3f4d605300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600260209081526040822091909155820151610483908a908a908a908a908a908a908a611289565b505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146104fd576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff861661054a576040517f05bb467c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008888888888604051602001610565959493929190611bb3565b6040516020818303038152906040528051906020012090508260ff168973ffffffffffffffffffffffffffffffffffffffff16827fc3f5df4aefec026f610a3fcb08f19476492d69d2cb78b1c2eba259a8820e6a788f8f8f8e8e8e8e8e6040516105d6989796959493929190611d04565b60405180910390a46040805160a08101909152600380546000929190829060ff16600281111561060857610608611e05565b600281111561061957610619611e05565b8152815463ffffffff61010082048116602084015265010000000000820416604083015273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff16608090910152905061068c81846114b5565b156106f55760408101516106a1906001611d8b565b6003805463ffffffff9290921665010000000000027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff9092169190911790556106f08d8b8b8b8b8b8b89611289565b6107a5565b6000828152600260205260408120546107359087907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16611db3565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff808d1682526bffffffffffffffffffffffff9384166020808401918252600089815260029091529390932091519251909316740100000000000000000000000000000000000000000291909216179055505b50505050505050505050505050565b6107bc611206565b73ffffffffffffffffffffffffffffffffffffffff821660008181526005602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356910160405180910390a25050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146108cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6040805160a081019091526003805460009283928392839283928392829060ff16600281111561097a5761097a611e05565b600281111561098b5761098b611e05565b81528154610100810463ffffffff908116602080850191909152650100000000008304909116604080850191909152690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060808501919091526001909401546bffffffffffffffffffffffff90811660809485015285519186015192860151948601519590930151909b919a50929850929650169350915050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610a98576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81818080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208101517fffffffff0000000000000000000000000000000000000000000000000000000081167f3659d6660000000000000000000000000000000000000000000000000000000014610b4e576040517fe3d6792100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060e4810151828114610bc3576040517f55e97b0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8887878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505061012481015173ffffffffffffffffffffffffffffffffffffffff83811690821614610c52576040517ff8c5638e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610124891015610c8e576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004546bffffffffffffffffffffffff168b1015610cd8576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff168b8b604051610d01929190611ba3565b600060405180830381855af49150503d8060008114610d3c576040519150601f19603f3d011682016040523d82523d6000602084013e610d41565b606091505b50509050806107a5576040517f649bf81000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d84611206565b6003546040805160a081019091526501000000000090910463ffffffff169080866002811115610db657610db6611e05565b815261ffff8616602082015263ffffffff8316604082015273ffffffffffffffffffffffffffffffffffffffff851660608201526bffffffffffffffffffffffff841660809091015280516003805490919082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610e4057610e40611e05565b02179055506020820151815460408085015160608601517fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff90931661010063ffffffff958616027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff1617650100000000009490911693909302929092177fffffff0000000000000000000000000000000000000000ffffffffffffffffff16690100000000000000000073ffffffffffffffffffffffffffffffffffffffff90921691909102178255608090920151600190910180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff909216919091179055517f6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd90610f82908790879087908790611c50565b60405180910390a15050505050565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152331480611018575060005473ffffffffffffffffffffffffffffffffffffffff1633145b61104e576040517f61685c2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff1661109c576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526002602090815260408083208390559083015190517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff909116602482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111879190611863565b9050806111c2576040517fc2e4dce80000000000000000000000000000000000000000000000000000000081523360048201526024016108c3565b60405183907f3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a2290600090a2505050565b6111fa611206565b6112038161155c565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108c3565b565b6003546040517fda5c6741000000000000000000000000000000000000000000000000000000008152690100000000000000000090910473ffffffffffffffffffffffffffffffffffffffff1690600090829063da5c6741906112f8908c908c908c908c908c90600401611bb3565b602060405180830381600087803b15801561131257600080fd5b505af1158015611326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134a9190611a9b565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea084878560405160200161139f91815260200190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016113cc93929190611c04565b602060405180830381600087803b1580156113e657600080fd5b505af11580156113fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141e9190611863565b90508061146f576040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016108c3565b81847fb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b8d6040516114a09190611cf1565b60405180910390a35050505050505050505050565b600080835160028111156114cb576114cb611e05565b14156114d957506000611556565b6001835160028111156114ee576114ee611e05565b148015611521575073ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090205460ff16155b1561152e57506000611556565b826020015163ffffffff16836040015163ffffffff16101561155257506001611556565b5060005b92915050565b73ffffffffffffffffffffffffffffffffffffffff81163314156115dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108c3565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b803573ffffffffffffffffffffffffffffffffffffffff8116811461167657600080fd5b919050565b60008083601f84011261168d57600080fd5b50813567ffffffffffffffff8111156116a557600080fd5b6020830191508360208285010111156116bd57600080fd5b9250929050565b600082601f8301126116d557600080fd5b813567ffffffffffffffff808211156116f0576116f0611e34565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561173657611736611e34565b8160405283815286602085880101111561174f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803563ffffffff8116811461167657600080fd5b803560ff8116811461167657600080fd5b80356bffffffffffffffffffffffff8116811461167657600080fd5b6000602082840312156117c257600080fd5b6117cb82611652565b9392505050565b600080604083850312156117e557600080fd5b6117ee83611652565b915060208301356117fe81611e63565b809150509250929050565b6000806000806060858703121561181f57600080fd5b61182885611652565b935060208501359250604085013567ffffffffffffffff81111561184b57600080fd5b6118578782880161167b565b95989497509550505050565b60006020828403121561187557600080fd5b81516117cb81611e63565b60006020828403121561189257600080fd5b5035919050565b600080600080608085870312156118af57600080fd5b8435600381106118be57600080fd5b9350602085013561ffff811681146118d557600080fd5b92506118e360408601611652565b91506118f160608601611794565b905092959194509250565b600080600080600080600060c0888a03121561191757600080fd5b873567ffffffffffffffff8082111561192f57600080fd5b61193b8b838c016116c4565b985061194960208b01611652565b975061195760408b0161176f565b965061196560608b01611652565b955060808a013591508082111561197b57600080fd5b506119888a828b0161167b565b989b979a5095989497959660a090950135949350505050565b60008060008060008060008060008060006101208c8e0312156119c357600080fd5b67ffffffffffffffff808d3511156119da57600080fd5b6119e78e8e358f016116c4565b9b508060208e013511156119fa57600080fd5b611a0a8e60208f01358f0161167b565b909b509950611a1b60408e01611652565b9850611a2960608e0161176f565b9750611a3760808e01611652565b96508060a08e01351115611a4a57600080fd5b50611a5b8d60a08e01358e0161167b565b9095509350611a6c60c08d01611794565b9250611a7a60e08d01611783565b9150611a896101008d01611652565b90509295989b509295989b9093969950565b600060208284031215611aad57600080fd5b5051919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6000815180845260005b81811015611b2357602081850181015186830182015201611b07565b81811115611b35576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611b9f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b8183823760009101908152919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835263ffffffff8716602084015280861660408401525060806060830152611bf9608083018486611ab4565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000611c476060830184611afd565b95945050505050565b60808101611c5e8287611b68565b61ffff8516602083015273ffffffffffffffffffffffffffffffffffffffff841660408301526bffffffffffffffffffffffff8316606083015295945050505050565b60a08101611caf8288611b68565b63ffffffff808716602084015280861660408401525073ffffffffffffffffffffffffffffffffffffffff841660608301528260808301529695505050505050565b6020815260006117cb6020830184611afd565b60c081526000611d1760c083018b611afd565b8281036020840152611d2a818a8c611ab4565b905063ffffffff8816604084015273ffffffffffffffffffffffffffffffffffffffff871660608401528281036080840152611d67818688611ab4565b9150506bffffffffffffffffffffffff831660a08301529998505050505050505050565b600063ffffffff808316818516808303821115611daa57611daa611dd6565b01949350505050565b60006bffffffffffffffffffffffff808316818516808303821115611daa57611daa5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461120357600080fdfea164736f6c6343000806000a", +} + +var KeeperRegistrarABI = KeeperRegistrarMetaData.ABI + +var KeeperRegistrarBin = KeeperRegistrarMetaData.Bin + +func DeployKeeperRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, LINKAddress common.Address, autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (common.Address, *types.Transaction, *KeeperRegistrar, error) { + parsed, err := KeeperRegistrarMetaData.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(KeeperRegistrarBin), backend, LINKAddress, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &KeeperRegistrar{KeeperRegistrarCaller: KeeperRegistrarCaller{contract: contract}, KeeperRegistrarTransactor: KeeperRegistrarTransactor{contract: contract}, KeeperRegistrarFilterer: KeeperRegistrarFilterer{contract: contract}}, nil +} + +type KeeperRegistrar struct { + address common.Address + abi abi.ABI + KeeperRegistrarCaller + KeeperRegistrarTransactor + KeeperRegistrarFilterer +} + +type KeeperRegistrarCaller struct { + contract *bind.BoundContract +} + +type KeeperRegistrarTransactor struct { + contract *bind.BoundContract +} + +type KeeperRegistrarFilterer struct { + contract *bind.BoundContract +} + +type KeeperRegistrarSession struct { + Contract *KeeperRegistrar + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type KeeperRegistrarCallerSession struct { + Contract *KeeperRegistrarCaller + CallOpts bind.CallOpts +} + +type KeeperRegistrarTransactorSession struct { + Contract *KeeperRegistrarTransactor + TransactOpts bind.TransactOpts +} + +type KeeperRegistrarRaw struct { + Contract *KeeperRegistrar +} + +type KeeperRegistrarCallerRaw struct { + Contract *KeeperRegistrarCaller +} + +type KeeperRegistrarTransactorRaw struct { + Contract *KeeperRegistrarTransactor +} + +func NewKeeperRegistrar(address common.Address, backend bind.ContractBackend) (*KeeperRegistrar, error) { + abi, err := abi.JSON(strings.NewReader(KeeperRegistrarABI)) + if err != nil { + return nil, err + } + contract, err := bindKeeperRegistrar(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &KeeperRegistrar{address: address, abi: abi, KeeperRegistrarCaller: KeeperRegistrarCaller{contract: contract}, KeeperRegistrarTransactor: KeeperRegistrarTransactor{contract: contract}, KeeperRegistrarFilterer: KeeperRegistrarFilterer{contract: contract}}, nil +} + +func NewKeeperRegistrarCaller(address common.Address, caller bind.ContractCaller) (*KeeperRegistrarCaller, error) { + contract, err := bindKeeperRegistrar(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &KeeperRegistrarCaller{contract: contract}, nil +} + +func NewKeeperRegistrarTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperRegistrarTransactor, error) { + contract, err := bindKeeperRegistrar(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &KeeperRegistrarTransactor{contract: contract}, nil +} + +func NewKeeperRegistrarFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperRegistrarFilterer, error) { + contract, err := bindKeeperRegistrar(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &KeeperRegistrarFilterer{contract: contract}, nil +} + +func bindKeeperRegistrar(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(KeeperRegistrarABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +func (_KeeperRegistrar *KeeperRegistrarRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperRegistrar.Contract.KeeperRegistrarCaller.contract.Call(opts, result, method, params...) +} + +func (_KeeperRegistrar *KeeperRegistrarRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.KeeperRegistrarTransactor.contract.Transfer(opts) +} + +func (_KeeperRegistrar *KeeperRegistrarRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.KeeperRegistrarTransactor.contract.Transact(opts, method, params...) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperRegistrar.Contract.contract.Call(opts, result, method, params...) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.contract.Transfer(opts) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.contract.Transact(opts, method, params...) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) LINK(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "LINK") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) LINK() (common.Address, error) { + return _KeeperRegistrar.Contract.LINK(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) LINK() (common.Address, error) { + return _KeeperRegistrar.Contract.LINK(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) GetAutoApproveAllowedSender(opts *bind.CallOpts, senderAddress common.Address) (bool, error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "getAutoApproveAllowedSender", senderAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) GetAutoApproveAllowedSender(senderAddress common.Address) (bool, error) { + return _KeeperRegistrar.Contract.GetAutoApproveAllowedSender(&_KeeperRegistrar.CallOpts, senderAddress) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) GetAutoApproveAllowedSender(senderAddress common.Address) (bool, error) { + return _KeeperRegistrar.Contract.GetAutoApproveAllowedSender(&_KeeperRegistrar.CallOpts, senderAddress) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "getPendingRequest", hash) + + if err != nil { + return *new(common.Address), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return out0, out1, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) GetPendingRequest(hash [32]byte) (common.Address, *big.Int, error) { + return _KeeperRegistrar.Contract.GetPendingRequest(&_KeeperRegistrar.CallOpts, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) GetPendingRequest(hash [32]byte) (common.Address, *big.Int, error) { + return _KeeperRegistrar.Contract.GetPendingRequest(&_KeeperRegistrar.CallOpts, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) GetRegistrationConfig(opts *bind.CallOpts) (GetRegistrationConfig, + + error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "getRegistrationConfig") + + outstruct := new(GetRegistrationConfig) + if err != nil { + return *outstruct, err + } + + outstruct.AutoApproveConfigType = *abi.ConvertType(out[0], new(uint8)).(*uint8) + outstruct.AutoApproveMaxAllowed = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.ApprovedCount = *abi.ConvertType(out[2], new(uint32)).(*uint32) + outstruct.KeeperRegistry = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) + outstruct.MinLINKJuels = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) GetRegistrationConfig() (GetRegistrationConfig, + + error) { + return _KeeperRegistrar.Contract.GetRegistrationConfig(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) GetRegistrationConfig() (GetRegistrationConfig, + + error) { + return _KeeperRegistrar.Contract.GetRegistrationConfig(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _KeeperRegistrar.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 (_KeeperRegistrar *KeeperRegistrarSession) Owner() (common.Address, error) { + return _KeeperRegistrar.Contract.Owner(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) Owner() (common.Address, error) { + return _KeeperRegistrar.Contract.Owner(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) TypeAndVersion() (string, error) { + return _KeeperRegistrar.Contract.TypeAndVersion(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) TypeAndVersion() (string, error) { + return _KeeperRegistrar.Contract.TypeAndVersion(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "acceptOwnership") +} + +func (_KeeperRegistrar *KeeperRegistrarSession) AcceptOwnership() (*types.Transaction, error) { + return _KeeperRegistrar.Contract.AcceptOwnership(&_KeeperRegistrar.TransactOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _KeeperRegistrar.Contract.AcceptOwnership(&_KeeperRegistrar.TransactOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "approve", name, upkeepContract, gasLimit, adminAddress, checkData, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Approve(&_KeeperRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, checkData, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Approve(&_KeeperRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, checkData, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "cancel", hash) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) Cancel(hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Cancel(&_KeeperRegistrar.TransactOpts, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) Cancel(hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Cancel(&_KeeperRegistrar.TransactOpts, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "onTokenTransfer", sender, amount, data) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.OnTokenTransfer(&_KeeperRegistrar.TransactOpts, sender, amount, data) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.OnTokenTransfer(&_KeeperRegistrar.TransactOpts, sender, amount, data) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8, sender common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "register", name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source, sender) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8, sender common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Register(&_KeeperRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source, sender) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8, sender common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Register(&_KeeperRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source, sender) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) SetAutoApproveAllowedSender(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "setAutoApproveAllowedSender", senderAddress, allowed) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) SetAutoApproveAllowedSender(senderAddress common.Address, allowed bool) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.SetAutoApproveAllowedSender(&_KeeperRegistrar.TransactOpts, senderAddress, allowed) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) SetAutoApproveAllowedSender(senderAddress common.Address, allowed bool) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.SetAutoApproveAllowedSender(&_KeeperRegistrar.TransactOpts, senderAddress, allowed) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) SetRegistrationConfig(opts *bind.TransactOpts, autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "setRegistrationConfig", autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) SetRegistrationConfig(autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.SetRegistrationConfig(&_KeeperRegistrar.TransactOpts, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) SetRegistrationConfig(autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.SetRegistrationConfig(&_KeeperRegistrar.TransactOpts, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "transferOwnership", to) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.TransferOwnership(&_KeeperRegistrar.TransactOpts, to) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.TransferOwnership(&_KeeperRegistrar.TransactOpts, to) +} + +type KeeperRegistrarAutoApproveAllowedSenderSetIterator struct { + Event *KeeperRegistrarAutoApproveAllowedSenderSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarAutoApproveAllowedSenderSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarAutoApproveAllowedSenderSet) + 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(KeeperRegistrarAutoApproveAllowedSenderSet) + 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 *KeeperRegistrarAutoApproveAllowedSenderSetIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarAutoApproveAllowedSenderSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarAutoApproveAllowedSenderSet struct { + SenderAddress common.Address + Allowed bool + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*KeeperRegistrarAutoApproveAllowedSenderSetIterator, error) { + + var senderAddressRule []interface{} + for _, senderAddressItem := range senderAddress { + senderAddressRule = append(senderAddressRule, senderAddressItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarAutoApproveAllowedSenderSetIterator{contract: _KeeperRegistrar.contract, event: "AutoApproveAllowedSenderSet", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) { + + var senderAddressRule []interface{} + for _, senderAddressItem := range senderAddress { + senderAddressRule = append(senderAddressRule, senderAddressItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarAutoApproveAllowedSenderSet) + if err := _KeeperRegistrar.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseAutoApproveAllowedSenderSet(log types.Log) (*KeeperRegistrarAutoApproveAllowedSenderSet, error) { + event := new(KeeperRegistrarAutoApproveAllowedSenderSet) + if err := _KeeperRegistrar.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarConfigChangedIterator struct { + Event *KeeperRegistrarConfigChanged + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarConfigChangedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarConfigChanged) + 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(KeeperRegistrarConfigChanged) + 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 *KeeperRegistrarConfigChangedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarConfigChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarConfigChanged struct { + AutoApproveConfigType uint8 + AutoApproveMaxAllowed uint32 + KeeperRegistry common.Address + MinLINKJuels *big.Int + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterConfigChanged(opts *bind.FilterOpts) (*KeeperRegistrarConfigChangedIterator, error) { + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "ConfigChanged") + if err != nil { + return nil, err + } + return &KeeperRegistrarConfigChangedIterator{contract: _KeeperRegistrar.contract, event: "ConfigChanged", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarConfigChanged) (event.Subscription, error) { + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "ConfigChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarConfigChanged) + if err := _KeeperRegistrar.contract.UnpackLog(event, "ConfigChanged", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseConfigChanged(log types.Log) (*KeeperRegistrarConfigChanged, error) { + event := new(KeeperRegistrarConfigChanged) + if err := _KeeperRegistrar.contract.UnpackLog(event, "ConfigChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarOwnershipTransferRequestedIterator struct { + Event *KeeperRegistrarOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarOwnershipTransferRequested) + 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(KeeperRegistrarOwnershipTransferRequested) + 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 *KeeperRegistrarOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarOwnershipTransferRequestedIterator{contract: _KeeperRegistrar.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarOwnershipTransferRequested) + if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferRequested", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistrarOwnershipTransferRequested, error) { + event := new(KeeperRegistrarOwnershipTransferRequested) + if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarOwnershipTransferredIterator struct { + Event *KeeperRegistrarOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarOwnershipTransferred) + 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(KeeperRegistrarOwnershipTransferred) + 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 *KeeperRegistrarOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarOwnershipTransferredIterator{contract: _KeeperRegistrar.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarOwnershipTransferred) + if err := _KeeperRegistrar.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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseOwnershipTransferred(log types.Log) (*KeeperRegistrarOwnershipTransferred, error) { + event := new(KeeperRegistrarOwnershipTransferred) + if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarRegistrationApprovedIterator struct { + Event *KeeperRegistrarRegistrationApproved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarRegistrationApprovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarRegistrationApproved) + 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(KeeperRegistrarRegistrationApproved) + 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 *KeeperRegistrarRegistrationApprovedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarRegistrationApprovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarRegistrationApproved struct { + Hash [32]byte + DisplayName string + UpkeepId *big.Int + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*KeeperRegistrarRegistrationApprovedIterator, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + var upkeepIdRule []interface{} + for _, upkeepIdItem := range upkeepId { + upkeepIdRule = append(upkeepIdRule, upkeepIdItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarRegistrationApprovedIterator{contract: _KeeperRegistrar.contract, event: "RegistrationApproved", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + var upkeepIdRule []interface{} + for _, upkeepIdItem := range upkeepId { + upkeepIdRule = append(upkeepIdRule, upkeepIdItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarRegistrationApproved) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationApproved", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseRegistrationApproved(log types.Log) (*KeeperRegistrarRegistrationApproved, error) { + event := new(KeeperRegistrarRegistrationApproved) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationApproved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarRegistrationRejectedIterator struct { + Event *KeeperRegistrarRegistrationRejected + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarRegistrationRejectedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarRegistrationRejected) + 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(KeeperRegistrarRegistrationRejected) + 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 *KeeperRegistrarRegistrationRejectedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarRegistrationRejectedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarRegistrationRejected struct { + Hash [32]byte + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*KeeperRegistrarRegistrationRejectedIterator, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "RegistrationRejected", hashRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarRegistrationRejectedIterator{contract: _KeeperRegistrar.contract, event: "RegistrationRejected", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRejected, hash [][32]byte) (event.Subscription, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "RegistrationRejected", hashRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarRegistrationRejected) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRejected", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseRegistrationRejected(log types.Log) (*KeeperRegistrarRegistrationRejected, error) { + event := new(KeeperRegistrarRegistrationRejected) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRejected", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarRegistrationRequestedIterator struct { + Event *KeeperRegistrarRegistrationRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarRegistrationRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarRegistrationRequested) + 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(KeeperRegistrarRegistrationRequested) + 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 *KeeperRegistrarRegistrationRequestedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarRegistrationRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarRegistrationRequested struct { + Hash [32]byte + Name string + EncryptedEmail []byte + UpkeepContract common.Address + GasLimit uint32 + AdminAddress common.Address + CheckData []byte + Amount *big.Int + Source uint8 + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address, source []uint8) (*KeeperRegistrarRegistrationRequestedIterator, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + var upkeepContractRule []interface{} + for _, upkeepContractItem := range upkeepContract { + upkeepContractRule = append(upkeepContractRule, upkeepContractItem) + } + + var sourceRule []interface{} + for _, sourceItem := range source { + sourceRule = append(sourceRule, sourceItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule, sourceRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarRegistrationRequestedIterator{contract: _KeeperRegistrar.contract, event: "RegistrationRequested", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRequested, hash [][32]byte, upkeepContract []common.Address, source []uint8) (event.Subscription, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + var upkeepContractRule []interface{} + for _, upkeepContractItem := range upkeepContract { + upkeepContractRule = append(upkeepContractRule, upkeepContractItem) + } + + var sourceRule []interface{} + for _, sourceItem := range source { + sourceRule = append(sourceRule, sourceItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule, sourceRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarRegistrationRequested) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRequested", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseRegistrationRequested(log types.Log) (*KeeperRegistrarRegistrationRequested, error) { + event := new(KeeperRegistrarRegistrationRequested) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type GetRegistrationConfig struct { + AutoApproveConfigType uint8 + AutoApproveMaxAllowed uint32 + ApprovedCount uint32 + KeeperRegistry common.Address + MinLINKJuels *big.Int +} + +func (_KeeperRegistrar *KeeperRegistrar) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _KeeperRegistrar.abi.Events["AutoApproveAllowedSenderSet"].ID: + return _KeeperRegistrar.ParseAutoApproveAllowedSenderSet(log) + case _KeeperRegistrar.abi.Events["ConfigChanged"].ID: + return _KeeperRegistrar.ParseConfigChanged(log) + case _KeeperRegistrar.abi.Events["OwnershipTransferRequested"].ID: + return _KeeperRegistrar.ParseOwnershipTransferRequested(log) + case _KeeperRegistrar.abi.Events["OwnershipTransferred"].ID: + return _KeeperRegistrar.ParseOwnershipTransferred(log) + case _KeeperRegistrar.abi.Events["RegistrationApproved"].ID: + return _KeeperRegistrar.ParseRegistrationApproved(log) + case _KeeperRegistrar.abi.Events["RegistrationRejected"].ID: + return _KeeperRegistrar.ParseRegistrationRejected(log) + case _KeeperRegistrar.abi.Events["RegistrationRequested"].ID: + return _KeeperRegistrar.ParseRegistrationRequested(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (KeeperRegistrarAutoApproveAllowedSenderSet) Topic() common.Hash { + return common.HexToHash("0x20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356") +} + +func (KeeperRegistrarConfigChanged) Topic() common.Hash { + return common.HexToHash("0x6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd") +} + +func (KeeperRegistrarOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (KeeperRegistrarOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (KeeperRegistrarRegistrationApproved) Topic() common.Hash { + return common.HexToHash("0xb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b") +} + +func (KeeperRegistrarRegistrationRejected) Topic() common.Hash { + return common.HexToHash("0x3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a22") +} + +func (KeeperRegistrarRegistrationRequested) Topic() common.Hash { + return common.HexToHash("0xc3f5df4aefec026f610a3fcb08f19476492d69d2cb78b1c2eba259a8820e6a78") +} + +func (_KeeperRegistrar *KeeperRegistrar) Address() common.Address { + return _KeeperRegistrar.address +} + +type KeeperRegistrarInterface interface { + LINK(opts *bind.CallOpts) (common.Address, error) + + GetAutoApproveAllowedSender(opts *bind.CallOpts, senderAddress common.Address) (bool, error) + + GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) + + GetRegistrationConfig(opts *bind.CallOpts) (GetRegistrationConfig, + + error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, hash [32]byte) (*types.Transaction, error) + + Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) + + OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) + + Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8, sender common.Address) (*types.Transaction, error) + + SetAutoApproveAllowedSender(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) + + SetRegistrationConfig(opts *bind.TransactOpts, autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*KeeperRegistrarAutoApproveAllowedSenderSetIterator, error) + + WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) + + ParseAutoApproveAllowedSenderSet(log types.Log) (*KeeperRegistrarAutoApproveAllowedSenderSet, error) + + FilterConfigChanged(opts *bind.FilterOpts) (*KeeperRegistrarConfigChangedIterator, error) + + WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarConfigChanged) (event.Subscription, error) + + ParseConfigChanged(log types.Log) (*KeeperRegistrarConfigChanged, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistrarOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*KeeperRegistrarOwnershipTransferred, error) + + FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*KeeperRegistrarRegistrationApprovedIterator, error) + + WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) + + ParseRegistrationApproved(log types.Log) (*KeeperRegistrarRegistrationApproved, error) + + FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*KeeperRegistrarRegistrationRejectedIterator, error) + + WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRejected, hash [][32]byte) (event.Subscription, error) + + ParseRegistrationRejected(log types.Log) (*KeeperRegistrarRegistrationRejected, error) + + FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address, source []uint8) (*KeeperRegistrarRegistrationRequestedIterator, error) + + WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRequested, hash [][32]byte, upkeepContract []common.Address, source []uint8) (event.Subscription, error) + + ParseRegistrationRequested(log types.Log) (*KeeperRegistrarRegistrationRequested, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/keeper_registrar_wrapper2_0/keeper_registrar_wrapper2_0.go b/core/gethwrappers/generated/keeper_registrar_wrapper2_0/keeper_registrar_wrapper2_0.go new file mode 100644 index 00000000000..f2a8c77e506 --- /dev/null +++ b/core/gethwrappers/generated/keeper_registrar_wrapper2_0/keeper_registrar_wrapper2_0.go @@ -0,0 +1,1506 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package keeper_registrar_wrapper2_0 + +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" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +type KeeperRegistrar20RegistrationParams struct { + Name string + EncryptedEmail []byte + UpkeepContract common.Address + GasLimit uint32 + AdminAddress common.Address + CheckData []byte + OffchainConfig []byte + Amount *big.Int +} + +var KeeperRegistrarMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"LINKAddress\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistrar2_0.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FunctionNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HashMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientPayment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAdminAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"LinkTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdminOrOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistrationRequestFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequestNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SenderMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AutoApproveAllowedSenderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enumKeeperRegistrar2_0.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"displayName\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"RegistrationApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"RegistrationRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"RegistrationRequested\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"cancel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"getAutoApproveAllowedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getPendingRequest\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistrationConfig\",\"outputs\":[{\"internalType\":\"enumKeeperRegistrar2_0.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"approvedCount\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minLINKJuels\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"internalType\":\"structKeeperRegistrar2_0.RegistrationParams\",\"name\":\"requestParams\",\"type\":\"tuple\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"setAutoApproveAllowedSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumKeeperRegistrar2_0.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"setRegistrationConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162002b0538038062002b05833981016040819052620000349162000394565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000ec565b5050506001600160601b0319606086901b16608052620000e18484848462000198565b50505050506200048d565b6001600160a01b038116331415620001475760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001a262000319565b6003546040805160a081019091526501000000000090910463ffffffff169080866002811115620001d757620001d762000477565b815261ffff8616602082015263ffffffff831660408201526001600160a01b03851660608201526001600160601b038416608090910152805160038054909190829060ff1916600183600281111562000234576200023462000477565b0217905550602082015181546040808501516060860151610100600160481b031990931661010063ffffffff9586160263ffffffff60281b19161765010000000000949091169390930292909217600160481b600160e81b03191669010000000000000000006001600160a01b0390921691909102178255608090920151600190910180546001600160601b0319166001600160601b03909216919091179055517f6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd906200030a90879087908790879062000422565b60405180910390a15050505050565b6000546001600160a01b03163314620003755760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b03811681146200038f57600080fd5b919050565b600080600080600060a08688031215620003ad57600080fd5b620003b88662000377565b9450602086015160038110620003cd57600080fd5b604087015190945061ffff81168114620003e657600080fd5b9250620003f66060870162000377565b60808701519092506001600160601b03811681146200041457600080fd5b809150509295509295909350565b60808101600386106200044557634e487b7160e01b600052602160045260246000fd5b94815261ffff9390931660208401526001600160a01b039190911660408301526001600160601b031660609091015290565b634e487b7160e01b600052602160045260246000fd5b60805160601c612636620004cf6000396000818161016e015281816103f30152818161099f01528181610cfd015281816111d9015261178301526126366000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063850af0cb11610097578063a611ea5611610066578063a611ea5614610325578063a793ab8b14610338578063c4d252f51461034b578063f2fde38b1461035e57600080fd5b8063850af0cb1461022e57806388b12d55146102475780638da5cb5b146102f4578063a4c0ed361461031257600080fd5b8063367b9b4f116100d3578063367b9b4f146101b557806362105854146101ca57806379ba5097146101dd5780637e776f7f146101e557600080fd5b806308b79da4146100fa578063181f5a77146101205780631b6b6d2314610169575b600080fd5b61010d610108366004612011565b610371565b6040519081526020015b60405180910390f35b61015c6040518060400160405280601581526020017f4b656570657252656769737472617220322e302e30000000000000000000000081525081565b6040516101179190612337565b6101907f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610117565b6101c86101c3366004611be0565b6104fe565b005b6101c86101d8366004611d10565b610590565b6101c86107a4565b61021e6101f3366004611bbc565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6040519015158152602001610117565b6102366108a6565b6040516101179594939291906122e7565b6102bb610255366004611c92565b60009081526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169290910182905291565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff909116602083015201610117565b60005473ffffffffffffffffffffffffffffffffffffffff16610190565b6101c8610320366004611c19565b610987565b6101c8610333366004611de7565b610ce5565b6101c8610346366004611cab565b610e78565b6101c8610359366004611c92565b61108d565b6101c861036c366004611bbc565b611326565b6004546000906bffffffffffffffffffffffff16610396610100840160e08501612066565b6bffffffffffffffffffffffff1610156103dc576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166323b872dd333061042b610100870160e08801612066565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815273ffffffffffffffffffffffffffffffffffffffff93841660048201529290911660248301526bffffffffffffffffffffffff166044820152606401602060405180830381600087803b1580156104ad57600080fd5b505af11580156104c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e59190611c75565b506104f86104f283612470565b3361133a565b92915050565b610506611622565b73ffffffffffffffffffffffffffffffffffffffff821660008181526005602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356910160405180910390a25050565b610598611622565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152610631576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000898989898989896040516020016106509796959493929190612180565b6040516020818303038152906040528051906020012090508083146106a1576040517f3f4d605300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526002602090815260408083208390558051610100810182528e8152815180840183529384528083019390935273ffffffffffffffffffffffffffffffffffffffff8d81168483015263ffffffff8d1660608501528b1660808401528051601f8a01839004830281018301909152888152610796929160a0830191908b908b9081908401838280828437600092019190915250505090825250604080516020601f8a01819004810282018101909252888152918101919089908990819084018382808284376000920191909152505050908252506020858101516bffffffffffffffffffffffff16910152826116a5565b505050505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461082a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6040805160a081019091526003805460009283928392839283928392829060ff1660028111156108d8576108d861259b565b60028111156108e9576108e961259b565b81528154610100810463ffffffff908116602080850191909152650100000000008304909116604080850191909152690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060808501919091526001909401546bffffffffffffffffffffffff90811660809485015285519186015192860151948601519590930151909b919a50929850929650169350915050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146109f6576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81818080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208101517fffffffff0000000000000000000000000000000000000000000000000000000081167fa611ea560000000000000000000000000000000000000000000000000000000014610aac576040517fe3d6792100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8484846000610abe82600481866123f7565b810190610acb9190611f10565b50975050505050505050806bffffffffffffffffffffffff168414610b1c576040517f55e97b0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8988886000610b2e82600481866123f7565b810190610b3b9190611f10565b985050505050505050508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610baa576040517ff8c5638e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101248b1015610be6576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004546bffffffffffffffffffffffff168d1015610c30576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff168d8d604051610c59929190612170565b600060405180830381855af49150503d8060008114610c94576040519150601f19603f3d011682016040523d82523d6000602084013e610c99565b606091505b5050905080610cd4576040517f649bf81000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d54576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e696040518061010001604052808e81526020018d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525073ffffffffffffffffffffffffffffffffffffffff808d1660208084019190915263ffffffff8d16604080850191909152918c1660608401528151601f8b018290048202810182019092528982526080909201918a908a9081908401838280828437600092019190915250505090825250604080516020601f8901819004810282018101909252878152918101919088908890819084018382808284376000920191909152505050908252506bffffffffffffffffffffffff85166020909101528261133a565b50505050505050505050505050565b610e80611622565b6003546040805160a081019091526501000000000090910463ffffffff169080866002811115610eb257610eb261259b565b815261ffff8616602082015263ffffffff8316604082015273ffffffffffffffffffffffffffffffffffffffff851660608201526bffffffffffffffffffffffff841660809091015280516003805490919082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610f3c57610f3c61259b565b02179055506020820151815460408085015160608601517fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff90931661010063ffffffff958616027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff1617650100000000009490911693909302929092177fffffff0000000000000000000000000000000000000000ffffffffffffffffff16690100000000000000000073ffffffffffffffffffffffffffffffffffffffff90921691909102178255608090920151600190910180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff909216919091179055517f6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd9061107e908790879087908790612296565b60405180910390a15050505050565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152331480611114575060005473ffffffffffffffffffffffffffffffffffffffff1633145b61114a576040517f61685c2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff16611198576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260026020908152604080832083905583519184015190517fa9059cbb0000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169263a9059cbb926112509260040173ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b602060405180830381600087803b15801561126a57600080fd5b505af115801561127e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a29190611c75565b9050806112f65781516040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602401610821565b60405183907f3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a2290600090a2505050565b61132e611622565b611337816118ec565b50565b608082015160009073ffffffffffffffffffffffffffffffffffffffff1661138e576040517f05bb467c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008360400151846060015185608001518660a001518760c001516040516020016113bd9594939291906121e7565b604051602081830303815290604052805190602001209050836040015173ffffffffffffffffffffffffffffffffffffffff16817f9b8456f925542af2c5fb15ff4be32cc8f209dda96c544766e301367df40f499886600001518760200151886060015189608001518a60a001518b60e001516040516114429695949392919061234a565b60405180910390a36040805160a081019091526003805460009283929091829060ff1660028111156114765761147661259b565b60028111156114875761148761259b565b8152815463ffffffff61010082048116602084015265010000000000820416604083015273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff1660809091015290506114fa81866119e2565b1561155f57604081015161150f906001612421565b6003805463ffffffff9290921665010000000000027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff90921691909117905561155886846116a5565b9150611619565b60e086015160008481526002602052604081205490916115a4917401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16612449565b60408051808201825260808a015173ffffffffffffffffffffffffffffffffffffffff90811682526bffffffffffffffffffffffff938416602080840191825260008a815260029091529390932091519251909316740100000000000000000000000000000000000000000291909216179055505b50949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610821565b565b6003546040838101516060850151608086015160a087015160c088015194517f6ded9eae0000000000000000000000000000000000000000000000000000000081526000966901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff169587958795636ded9eae9561172b95929491939092916004016121e7565b602060405180830381600087803b15801561174557600080fd5b505af1158015611759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177d919061204d565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea0848860e00151856040516020016117d691815260200190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016118039392919061224a565b602060405180830381600087803b15801561181d57600080fd5b505af1158015611831573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118559190611c75565b9050806118a6576040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610821565b81857fb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b88600001516040516118db9190612337565b60405180910390a350949350505050565b73ffffffffffffffffffffffffffffffffffffffff811633141561196c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610821565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080835160028111156119f8576119f861259b565b1415611a06575060006104f8565b600183516002811115611a1b57611a1b61259b565b148015611a4e575073ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090205460ff16155b15611a5b575060006104f8565b826020015163ffffffff16836040015163ffffffff161015611a7f575060016104f8565b50600092915050565b8035611a93816125f9565b919050565b60008083601f840112611aaa57600080fd5b50813567ffffffffffffffff811115611ac257600080fd5b602083019150836020828501011115611ada57600080fd5b9250929050565b600082601f830112611af257600080fd5b813567ffffffffffffffff80821115611b0d57611b0d6125ca565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611b5357611b536125ca565b81604052838152866020858801011115611b6c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803563ffffffff81168114611a9357600080fd5b80356bffffffffffffffffffffffff81168114611a9357600080fd5b600060208284031215611bce57600080fd5b8135611bd9816125f9565b9392505050565b60008060408385031215611bf357600080fd5b8235611bfe816125f9565b91506020830135611c0e8161261b565b809150509250929050565b60008060008060608587031215611c2f57600080fd5b8435611c3a816125f9565b935060208501359250604085013567ffffffffffffffff811115611c5d57600080fd5b611c6987828801611a98565b95989497509550505050565b600060208284031215611c8757600080fd5b8151611bd98161261b565b600060208284031215611ca457600080fd5b5035919050565b60008060008060808587031215611cc157600080fd5b843560038110611cd057600080fd5b9350602085013561ffff81168114611ce757600080fd5b92506040850135611cf7816125f9565b9150611d0560608601611ba0565b905092959194509250565b600080600080600080600080600060e08a8c031215611d2e57600080fd5b893567ffffffffffffffff80821115611d4657600080fd5b611d528d838e01611ae1565b9a5060208c01359150611d64826125f9565b819950611d7360408d01611b8c565b985060608c01359150611d85826125f9565b90965060808b01359080821115611d9b57600080fd5b611da78d838e01611a98565b909750955060a08c0135915080821115611dc057600080fd5b50611dcd8c828d01611a98565b9a9d999c50979a9699959894979660c00135949350505050565b6000806000806000806000806000806000806101208d8f031215611e0a57600080fd5b67ffffffffffffffff8d351115611e2057600080fd5b611e2d8e8e358f01611ae1565b9b5067ffffffffffffffff60208e01351115611e4857600080fd5b611e588e60208f01358f01611a98565b909b509950611e6960408e01611a88565b9850611e7760608e01611b8c565b9750611e8560808e01611a88565b965067ffffffffffffffff60a08e01351115611ea057600080fd5b611eb08e60a08f01358f01611a98565b909650945067ffffffffffffffff60c08e01351115611ece57600080fd5b611ede8e60c08f01358f01611a98565b9094509250611eef60e08e01611ba0565b9150611efe6101008e01611a88565b90509295989b509295989b509295989b565b60008060008060008060008060006101208a8c031215611f2f57600080fd5b893567ffffffffffffffff80821115611f4757600080fd5b611f538d838e01611ae1565b9a5060208c0135915080821115611f6957600080fd5b611f758d838e01611ae1565b9950611f8360408d01611a88565b9850611f9160608d01611b8c565b9750611f9f60808d01611a88565b965060a08c0135915080821115611fb557600080fd5b611fc18d838e01611ae1565b955060c08c0135915080821115611fd757600080fd5b50611fe48c828d01611ae1565b935050611ff360e08b01611ba0565b91506120026101008b01611a88565b90509295985092959850929598565b60006020828403121561202357600080fd5b813567ffffffffffffffff81111561203a57600080fd5b82016101008185031215611bd957600080fd5b60006020828403121561205f57600080fd5b5051919050565b60006020828403121561207857600080fd5b611bd982611ba0565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6000815180845260005b818110156120f0576020818501810151868301820152016120d4565b81811115612102576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6003811061216c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b8183823760009101908152919050565b600073ffffffffffffffffffffffffffffffffffffffff808a16835263ffffffff8916602084015280881660408401525060a060608301526121c660a083018688612081565b82810360808401526121d9818587612081565b9a9950505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835263ffffffff8716602084015280861660408401525060a0606083015261222c60a08301856120ca565b828103608084015261223e81856120ca565b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff8316602082015260606040820152600061228d60608301846120ca565b95945050505050565b608081016122a48287612135565b61ffff8516602083015273ffffffffffffffffffffffffffffffffffffffff841660408301526bffffffffffffffffffffffff8316606083015295945050505050565b60a081016122f58288612135565b63ffffffff808716602084015280861660408401525073ffffffffffffffffffffffffffffffffffffffff841660608301528260808301529695505050505050565b602081526000611bd960208301846120ca565b60c08152600061235d60c08301896120ca565b828103602084015261236f81896120ca565b905063ffffffff8716604084015273ffffffffffffffffffffffffffffffffffffffff8616606084015282810360808401526123ab81866120ca565b9150506bffffffffffffffffffffffff831660a0830152979650505050505050565b604051610100810167ffffffffffffffff811182821017156123f1576123f16125ca565b60405290565b6000808585111561240757600080fd5b8386111561241457600080fd5b5050820193919092039150565b600063ffffffff8083168185168083038211156124405761244061256c565b01949350505050565b60006bffffffffffffffffffffffff8083168185168083038211156124405761244061256c565b6000610100823603121561248357600080fd5b61248b6123cd565b823567ffffffffffffffff808211156124a357600080fd5b6124af36838701611ae1565b835260208501359150808211156124c557600080fd5b6124d136838701611ae1565b60208401526124e260408601611a88565b60408401526124f360608601611b8c565b606084015261250460808601611a88565b608084015260a085013591508082111561251d57600080fd5b61252936838701611ae1565b60a084015260c085013591508082111561254257600080fd5b5061254f36828601611ae1565b60c08301525061256160e08401611ba0565b60e082015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461133757600080fd5b801515811461133757600080fdfea164736f6c6343000806000a", +} + +var KeeperRegistrarABI = KeeperRegistrarMetaData.ABI + +var KeeperRegistrarBin = KeeperRegistrarMetaData.Bin + +func DeployKeeperRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, LINKAddress common.Address, autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (common.Address, *types.Transaction, *KeeperRegistrar, error) { + parsed, err := KeeperRegistrarMetaData.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(KeeperRegistrarBin), backend, LINKAddress, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &KeeperRegistrar{KeeperRegistrarCaller: KeeperRegistrarCaller{contract: contract}, KeeperRegistrarTransactor: KeeperRegistrarTransactor{contract: contract}, KeeperRegistrarFilterer: KeeperRegistrarFilterer{contract: contract}}, nil +} + +type KeeperRegistrar struct { + address common.Address + abi abi.ABI + KeeperRegistrarCaller + KeeperRegistrarTransactor + KeeperRegistrarFilterer +} + +type KeeperRegistrarCaller struct { + contract *bind.BoundContract +} + +type KeeperRegistrarTransactor struct { + contract *bind.BoundContract +} + +type KeeperRegistrarFilterer struct { + contract *bind.BoundContract +} + +type KeeperRegistrarSession struct { + Contract *KeeperRegistrar + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type KeeperRegistrarCallerSession struct { + Contract *KeeperRegistrarCaller + CallOpts bind.CallOpts +} + +type KeeperRegistrarTransactorSession struct { + Contract *KeeperRegistrarTransactor + TransactOpts bind.TransactOpts +} + +type KeeperRegistrarRaw struct { + Contract *KeeperRegistrar +} + +type KeeperRegistrarCallerRaw struct { + Contract *KeeperRegistrarCaller +} + +type KeeperRegistrarTransactorRaw struct { + Contract *KeeperRegistrarTransactor +} + +func NewKeeperRegistrar(address common.Address, backend bind.ContractBackend) (*KeeperRegistrar, error) { + abi, err := abi.JSON(strings.NewReader(KeeperRegistrarABI)) + if err != nil { + return nil, err + } + contract, err := bindKeeperRegistrar(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &KeeperRegistrar{address: address, abi: abi, KeeperRegistrarCaller: KeeperRegistrarCaller{contract: contract}, KeeperRegistrarTransactor: KeeperRegistrarTransactor{contract: contract}, KeeperRegistrarFilterer: KeeperRegistrarFilterer{contract: contract}}, nil +} + +func NewKeeperRegistrarCaller(address common.Address, caller bind.ContractCaller) (*KeeperRegistrarCaller, error) { + contract, err := bindKeeperRegistrar(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &KeeperRegistrarCaller{contract: contract}, nil +} + +func NewKeeperRegistrarTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperRegistrarTransactor, error) { + contract, err := bindKeeperRegistrar(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &KeeperRegistrarTransactor{contract: contract}, nil +} + +func NewKeeperRegistrarFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperRegistrarFilterer, error) { + contract, err := bindKeeperRegistrar(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &KeeperRegistrarFilterer{contract: contract}, nil +} + +func bindKeeperRegistrar(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(KeeperRegistrarABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +func (_KeeperRegistrar *KeeperRegistrarRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperRegistrar.Contract.KeeperRegistrarCaller.contract.Call(opts, result, method, params...) +} + +func (_KeeperRegistrar *KeeperRegistrarRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.KeeperRegistrarTransactor.contract.Transfer(opts) +} + +func (_KeeperRegistrar *KeeperRegistrarRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.KeeperRegistrarTransactor.contract.Transact(opts, method, params...) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperRegistrar.Contract.contract.Call(opts, result, method, params...) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.contract.Transfer(opts) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.contract.Transact(opts, method, params...) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) LINK(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "LINK") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) LINK() (common.Address, error) { + return _KeeperRegistrar.Contract.LINK(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) LINK() (common.Address, error) { + return _KeeperRegistrar.Contract.LINK(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) GetAutoApproveAllowedSender(opts *bind.CallOpts, senderAddress common.Address) (bool, error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "getAutoApproveAllowedSender", senderAddress) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) GetAutoApproveAllowedSender(senderAddress common.Address) (bool, error) { + return _KeeperRegistrar.Contract.GetAutoApproveAllowedSender(&_KeeperRegistrar.CallOpts, senderAddress) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) GetAutoApproveAllowedSender(senderAddress common.Address) (bool, error) { + return _KeeperRegistrar.Contract.GetAutoApproveAllowedSender(&_KeeperRegistrar.CallOpts, senderAddress) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "getPendingRequest", hash) + + if err != nil { + return *new(common.Address), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return out0, out1, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) GetPendingRequest(hash [32]byte) (common.Address, *big.Int, error) { + return _KeeperRegistrar.Contract.GetPendingRequest(&_KeeperRegistrar.CallOpts, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) GetPendingRequest(hash [32]byte) (common.Address, *big.Int, error) { + return _KeeperRegistrar.Contract.GetPendingRequest(&_KeeperRegistrar.CallOpts, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) GetRegistrationConfig(opts *bind.CallOpts) (GetRegistrationConfig, + + error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "getRegistrationConfig") + + outstruct := new(GetRegistrationConfig) + if err != nil { + return *outstruct, err + } + + outstruct.AutoApproveConfigType = *abi.ConvertType(out[0], new(uint8)).(*uint8) + outstruct.AutoApproveMaxAllowed = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.ApprovedCount = *abi.ConvertType(out[2], new(uint32)).(*uint32) + outstruct.KeeperRegistry = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) + outstruct.MinLINKJuels = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) GetRegistrationConfig() (GetRegistrationConfig, + + error) { + return _KeeperRegistrar.Contract.GetRegistrationConfig(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) GetRegistrationConfig() (GetRegistrationConfig, + + error) { + return _KeeperRegistrar.Contract.GetRegistrationConfig(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _KeeperRegistrar.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 (_KeeperRegistrar *KeeperRegistrarSession) Owner() (common.Address, error) { + return _KeeperRegistrar.Contract.Owner(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) Owner() (common.Address, error) { + return _KeeperRegistrar.Contract.Owner(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _KeeperRegistrar.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_KeeperRegistrar *KeeperRegistrarSession) TypeAndVersion() (string, error) { + return _KeeperRegistrar.Contract.TypeAndVersion(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarCallerSession) TypeAndVersion() (string, error) { + return _KeeperRegistrar.Contract.TypeAndVersion(&_KeeperRegistrar.CallOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "acceptOwnership") +} + +func (_KeeperRegistrar *KeeperRegistrarSession) AcceptOwnership() (*types.Transaction, error) { + return _KeeperRegistrar.Contract.AcceptOwnership(&_KeeperRegistrar.TransactOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _KeeperRegistrar.Contract.AcceptOwnership(&_KeeperRegistrar.TransactOpts) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "approve", name, upkeepContract, gasLimit, adminAddress, checkData, offchainConfig, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Approve(&_KeeperRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, checkData, offchainConfig, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Approve(&_KeeperRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, checkData, offchainConfig, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "cancel", hash) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) Cancel(hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Cancel(&_KeeperRegistrar.TransactOpts, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) Cancel(hash [32]byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Cancel(&_KeeperRegistrar.TransactOpts, hash) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "onTokenTransfer", sender, amount, data) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.OnTokenTransfer(&_KeeperRegistrar.TransactOpts, sender, amount, data) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.OnTokenTransfer(&_KeeperRegistrar.TransactOpts, sender, amount, data) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "register", name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, offchainConfig, amount, sender) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Register(&_KeeperRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, offchainConfig, amount, sender) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.Register(&_KeeperRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, offchainConfig, amount, sender) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) RegisterUpkeep(opts *bind.TransactOpts, requestParams KeeperRegistrar20RegistrationParams) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "registerUpkeep", requestParams) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) RegisterUpkeep(requestParams KeeperRegistrar20RegistrationParams) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.RegisterUpkeep(&_KeeperRegistrar.TransactOpts, requestParams) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) RegisterUpkeep(requestParams KeeperRegistrar20RegistrationParams) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.RegisterUpkeep(&_KeeperRegistrar.TransactOpts, requestParams) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) SetAutoApproveAllowedSender(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "setAutoApproveAllowedSender", senderAddress, allowed) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) SetAutoApproveAllowedSender(senderAddress common.Address, allowed bool) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.SetAutoApproveAllowedSender(&_KeeperRegistrar.TransactOpts, senderAddress, allowed) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) SetAutoApproveAllowedSender(senderAddress common.Address, allowed bool) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.SetAutoApproveAllowedSender(&_KeeperRegistrar.TransactOpts, senderAddress, allowed) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) SetRegistrationConfig(opts *bind.TransactOpts, autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "setRegistrationConfig", autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) SetRegistrationConfig(autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.SetRegistrationConfig(&_KeeperRegistrar.TransactOpts, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) SetRegistrationConfig(autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.SetRegistrationConfig(&_KeeperRegistrar.TransactOpts, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.contract.Transact(opts, "transferOwnership", to) +} + +func (_KeeperRegistrar *KeeperRegistrarSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.TransferOwnership(&_KeeperRegistrar.TransactOpts, to) +} + +func (_KeeperRegistrar *KeeperRegistrarTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _KeeperRegistrar.Contract.TransferOwnership(&_KeeperRegistrar.TransactOpts, to) +} + +type KeeperRegistrarAutoApproveAllowedSenderSetIterator struct { + Event *KeeperRegistrarAutoApproveAllowedSenderSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarAutoApproveAllowedSenderSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarAutoApproveAllowedSenderSet) + 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(KeeperRegistrarAutoApproveAllowedSenderSet) + 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 *KeeperRegistrarAutoApproveAllowedSenderSetIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarAutoApproveAllowedSenderSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarAutoApproveAllowedSenderSet struct { + SenderAddress common.Address + Allowed bool + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*KeeperRegistrarAutoApproveAllowedSenderSetIterator, error) { + + var senderAddressRule []interface{} + for _, senderAddressItem := range senderAddress { + senderAddressRule = append(senderAddressRule, senderAddressItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarAutoApproveAllowedSenderSetIterator{contract: _KeeperRegistrar.contract, event: "AutoApproveAllowedSenderSet", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) { + + var senderAddressRule []interface{} + for _, senderAddressItem := range senderAddress { + senderAddressRule = append(senderAddressRule, senderAddressItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarAutoApproveAllowedSenderSet) + if err := _KeeperRegistrar.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseAutoApproveAllowedSenderSet(log types.Log) (*KeeperRegistrarAutoApproveAllowedSenderSet, error) { + event := new(KeeperRegistrarAutoApproveAllowedSenderSet) + if err := _KeeperRegistrar.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarConfigChangedIterator struct { + Event *KeeperRegistrarConfigChanged + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarConfigChangedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarConfigChanged) + 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(KeeperRegistrarConfigChanged) + 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 *KeeperRegistrarConfigChangedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarConfigChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarConfigChanged struct { + AutoApproveConfigType uint8 + AutoApproveMaxAllowed uint32 + KeeperRegistry common.Address + MinLINKJuels *big.Int + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterConfigChanged(opts *bind.FilterOpts) (*KeeperRegistrarConfigChangedIterator, error) { + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "ConfigChanged") + if err != nil { + return nil, err + } + return &KeeperRegistrarConfigChangedIterator{contract: _KeeperRegistrar.contract, event: "ConfigChanged", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarConfigChanged) (event.Subscription, error) { + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "ConfigChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarConfigChanged) + if err := _KeeperRegistrar.contract.UnpackLog(event, "ConfigChanged", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseConfigChanged(log types.Log) (*KeeperRegistrarConfigChanged, error) { + event := new(KeeperRegistrarConfigChanged) + if err := _KeeperRegistrar.contract.UnpackLog(event, "ConfigChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarOwnershipTransferRequestedIterator struct { + Event *KeeperRegistrarOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarOwnershipTransferRequested) + 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(KeeperRegistrarOwnershipTransferRequested) + 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 *KeeperRegistrarOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferRequestedIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarOwnershipTransferRequestedIterator{contract: _KeeperRegistrar.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarOwnershipTransferRequested) + if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferRequested", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistrarOwnershipTransferRequested, error) { + event := new(KeeperRegistrarOwnershipTransferRequested) + if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarOwnershipTransferredIterator struct { + Event *KeeperRegistrarOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarOwnershipTransferred) + 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(KeeperRegistrarOwnershipTransferred) + 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 *KeeperRegistrarOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferredIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarOwnershipTransferredIterator{contract: _KeeperRegistrar.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarOwnershipTransferred) + if err := _KeeperRegistrar.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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseOwnershipTransferred(log types.Log) (*KeeperRegistrarOwnershipTransferred, error) { + event := new(KeeperRegistrarOwnershipTransferred) + if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarRegistrationApprovedIterator struct { + Event *KeeperRegistrarRegistrationApproved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarRegistrationApprovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarRegistrationApproved) + 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(KeeperRegistrarRegistrationApproved) + 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 *KeeperRegistrarRegistrationApprovedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarRegistrationApprovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarRegistrationApproved struct { + Hash [32]byte + DisplayName string + UpkeepId *big.Int + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*KeeperRegistrarRegistrationApprovedIterator, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + var upkeepIdRule []interface{} + for _, upkeepIdItem := range upkeepId { + upkeepIdRule = append(upkeepIdRule, upkeepIdItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarRegistrationApprovedIterator{contract: _KeeperRegistrar.contract, event: "RegistrationApproved", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + var upkeepIdRule []interface{} + for _, upkeepIdItem := range upkeepId { + upkeepIdRule = append(upkeepIdRule, upkeepIdItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarRegistrationApproved) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationApproved", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseRegistrationApproved(log types.Log) (*KeeperRegistrarRegistrationApproved, error) { + event := new(KeeperRegistrarRegistrationApproved) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationApproved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarRegistrationRejectedIterator struct { + Event *KeeperRegistrarRegistrationRejected + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarRegistrationRejectedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarRegistrationRejected) + 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(KeeperRegistrarRegistrationRejected) + 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 *KeeperRegistrarRegistrationRejectedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarRegistrationRejectedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarRegistrationRejected struct { + Hash [32]byte + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*KeeperRegistrarRegistrationRejectedIterator, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "RegistrationRejected", hashRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarRegistrationRejectedIterator{contract: _KeeperRegistrar.contract, event: "RegistrationRejected", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRejected, hash [][32]byte) (event.Subscription, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "RegistrationRejected", hashRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarRegistrationRejected) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRejected", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseRegistrationRejected(log types.Log) (*KeeperRegistrarRegistrationRejected, error) { + event := new(KeeperRegistrarRegistrationRejected) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRejected", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type KeeperRegistrarRegistrationRequestedIterator struct { + Event *KeeperRegistrarRegistrationRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *KeeperRegistrarRegistrationRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperRegistrarRegistrationRequested) + 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(KeeperRegistrarRegistrationRequested) + 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 *KeeperRegistrarRegistrationRequestedIterator) Error() error { + return it.fail +} + +func (it *KeeperRegistrarRegistrationRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type KeeperRegistrarRegistrationRequested struct { + Hash [32]byte + Name string + EncryptedEmail []byte + UpkeepContract common.Address + GasLimit uint32 + AdminAddress common.Address + CheckData []byte + Amount *big.Int + Raw types.Log +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address) (*KeeperRegistrarRegistrationRequestedIterator, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + var upkeepContractRule []interface{} + for _, upkeepContractItem := range upkeepContract { + upkeepContractRule = append(upkeepContractRule, upkeepContractItem) + } + + logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule) + if err != nil { + return nil, err + } + return &KeeperRegistrarRegistrationRequestedIterator{contract: _KeeperRegistrar.contract, event: "RegistrationRequested", logs: logs, sub: sub}, nil +} + +func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRequested, hash [][32]byte, upkeepContract []common.Address) (event.Subscription, error) { + + var hashRule []interface{} + for _, hashItem := range hash { + hashRule = append(hashRule, hashItem) + } + + var upkeepContractRule []interface{} + for _, upkeepContractItem := range upkeepContract { + upkeepContractRule = append(upkeepContractRule, upkeepContractItem) + } + + logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(KeeperRegistrarRegistrationRequested) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRequested", 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 (_KeeperRegistrar *KeeperRegistrarFilterer) ParseRegistrationRequested(log types.Log) (*KeeperRegistrarRegistrationRequested, error) { + event := new(KeeperRegistrarRegistrationRequested) + if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type GetRegistrationConfig struct { + AutoApproveConfigType uint8 + AutoApproveMaxAllowed uint32 + ApprovedCount uint32 + KeeperRegistry common.Address + MinLINKJuels *big.Int +} + +func (_KeeperRegistrar *KeeperRegistrar) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _KeeperRegistrar.abi.Events["AutoApproveAllowedSenderSet"].ID: + return _KeeperRegistrar.ParseAutoApproveAllowedSenderSet(log) + case _KeeperRegistrar.abi.Events["ConfigChanged"].ID: + return _KeeperRegistrar.ParseConfigChanged(log) + case _KeeperRegistrar.abi.Events["OwnershipTransferRequested"].ID: + return _KeeperRegistrar.ParseOwnershipTransferRequested(log) + case _KeeperRegistrar.abi.Events["OwnershipTransferred"].ID: + return _KeeperRegistrar.ParseOwnershipTransferred(log) + case _KeeperRegistrar.abi.Events["RegistrationApproved"].ID: + return _KeeperRegistrar.ParseRegistrationApproved(log) + case _KeeperRegistrar.abi.Events["RegistrationRejected"].ID: + return _KeeperRegistrar.ParseRegistrationRejected(log) + case _KeeperRegistrar.abi.Events["RegistrationRequested"].ID: + return _KeeperRegistrar.ParseRegistrationRequested(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (KeeperRegistrarAutoApproveAllowedSenderSet) Topic() common.Hash { + return common.HexToHash("0x20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356") +} + +func (KeeperRegistrarConfigChanged) Topic() common.Hash { + return common.HexToHash("0x6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd") +} + +func (KeeperRegistrarOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (KeeperRegistrarOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (KeeperRegistrarRegistrationApproved) Topic() common.Hash { + return common.HexToHash("0xb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b") +} + +func (KeeperRegistrarRegistrationRejected) Topic() common.Hash { + return common.HexToHash("0x3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a22") +} + +func (KeeperRegistrarRegistrationRequested) Topic() common.Hash { + return common.HexToHash("0x9b8456f925542af2c5fb15ff4be32cc8f209dda96c544766e301367df40f4998") +} + +func (_KeeperRegistrar *KeeperRegistrar) Address() common.Address { + return _KeeperRegistrar.address +} + +type KeeperRegistrarInterface interface { + LINK(opts *bind.CallOpts) (common.Address, error) + + GetAutoApproveAllowedSender(opts *bind.CallOpts, senderAddress common.Address) (bool, error) + + GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) + + GetRegistrationConfig(opts *bind.CallOpts) (GetRegistrationConfig, + + error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, offchainConfig []byte, hash [32]byte) (*types.Transaction, error) + + Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) + + OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) + + Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, offchainConfig []byte, amount *big.Int, sender common.Address) (*types.Transaction, error) + + RegisterUpkeep(opts *bind.TransactOpts, requestParams KeeperRegistrar20RegistrationParams) (*types.Transaction, error) + + SetAutoApproveAllowedSender(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) + + SetRegistrationConfig(opts *bind.TransactOpts, autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*KeeperRegistrarAutoApproveAllowedSenderSetIterator, error) + + WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) + + ParseAutoApproveAllowedSenderSet(log types.Log) (*KeeperRegistrarAutoApproveAllowedSenderSet, error) + + FilterConfigChanged(opts *bind.FilterOpts) (*KeeperRegistrarConfigChangedIterator, error) + + WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarConfigChanged) (event.Subscription, error) + + ParseConfigChanged(log types.Log) (*KeeperRegistrarConfigChanged, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistrarOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*KeeperRegistrarOwnershipTransferred, error) + + FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*KeeperRegistrarRegistrationApprovedIterator, error) + + WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) + + ParseRegistrationApproved(log types.Log) (*KeeperRegistrarRegistrationApproved, error) + + FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*KeeperRegistrarRegistrationRejectedIterator, error) + + WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRejected, hash [][32]byte) (event.Subscription, error) + + ParseRegistrationRejected(log types.Log) (*KeeperRegistrarRegistrationRejected, error) + + FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address) (*KeeperRegistrarRegistrationRequestedIterator, error) + + WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRequested, hash [][32]byte, upkeepContract []common.Address) (event.Subscription, error) + + ParseRegistrationRequested(log types.Log) (*KeeperRegistrarRegistrationRequested, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/upkeep_transcoder/upkeep_transcoder.go b/core/gethwrappers/generated/upkeep_transcoder/upkeep_transcoder.go new file mode 100644 index 00000000000..02c31999812 --- /dev/null +++ b/core/gethwrappers/generated/upkeep_transcoder/upkeep_transcoder.go @@ -0,0 +1,225 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package upkeep_transcoder + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +var UpkeepTranscoderMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"InvalidTranscoding\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"fromVersion\",\"type\":\"uint8\"},{\"internalType\":\"enumUpkeepFormat\",\"name\":\"toVersion\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"transcodeUpkeeps\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5061029b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063181f5a771461003b578063c71249ab1461008d575b600080fd5b6100776040518060400160405280601681526020017f55706b6565705472616e73636f64657220312e302e300000000000000000000081525081565b6040516100849190610245565b60405180910390f35b61007761009b36600461014c565b60608360028111156100af576100af61025f565b8560028111156100c1576100c161025f565b146100f8576040517f90aaccc300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509298975050505050505050565b80356003811061014757600080fd5b919050565b6000806000806060858703121561016257600080fd5b61016b85610138565b935061017960208601610138565b9250604085013567ffffffffffffffff8082111561019657600080fd5b818701915087601f8301126101aa57600080fd5b8135818111156101b957600080fd5b8860208285010111156101cb57600080fd5b95989497505060200194505050565b6000815180845260005b81811015610200576020818501810151868301820152016101e4565b81811115610212576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061025860208301846101da565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c6343000806000a", +} + +var UpkeepTranscoderABI = UpkeepTranscoderMetaData.ABI + +var UpkeepTranscoderBin = UpkeepTranscoderMetaData.Bin + +func DeployUpkeepTranscoder(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *UpkeepTranscoder, error) { + parsed, err := UpkeepTranscoderMetaData.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(UpkeepTranscoderBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UpkeepTranscoder{UpkeepTranscoderCaller: UpkeepTranscoderCaller{contract: contract}, UpkeepTranscoderTransactor: UpkeepTranscoderTransactor{contract: contract}, UpkeepTranscoderFilterer: UpkeepTranscoderFilterer{contract: contract}}, nil +} + +type UpkeepTranscoder struct { + address common.Address + abi abi.ABI + UpkeepTranscoderCaller + UpkeepTranscoderTransactor + UpkeepTranscoderFilterer +} + +type UpkeepTranscoderCaller struct { + contract *bind.BoundContract +} + +type UpkeepTranscoderTransactor struct { + contract *bind.BoundContract +} + +type UpkeepTranscoderFilterer struct { + contract *bind.BoundContract +} + +type UpkeepTranscoderSession struct { + Contract *UpkeepTranscoder + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type UpkeepTranscoderCallerSession struct { + Contract *UpkeepTranscoderCaller + CallOpts bind.CallOpts +} + +type UpkeepTranscoderTransactorSession struct { + Contract *UpkeepTranscoderTransactor + TransactOpts bind.TransactOpts +} + +type UpkeepTranscoderRaw struct { + Contract *UpkeepTranscoder +} + +type UpkeepTranscoderCallerRaw struct { + Contract *UpkeepTranscoderCaller +} + +type UpkeepTranscoderTransactorRaw struct { + Contract *UpkeepTranscoderTransactor +} + +func NewUpkeepTranscoder(address common.Address, backend bind.ContractBackend) (*UpkeepTranscoder, error) { + abi, err := abi.JSON(strings.NewReader(UpkeepTranscoderABI)) + if err != nil { + return nil, err + } + contract, err := bindUpkeepTranscoder(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UpkeepTranscoder{address: address, abi: abi, UpkeepTranscoderCaller: UpkeepTranscoderCaller{contract: contract}, UpkeepTranscoderTransactor: UpkeepTranscoderTransactor{contract: contract}, UpkeepTranscoderFilterer: UpkeepTranscoderFilterer{contract: contract}}, nil +} + +func NewUpkeepTranscoderCaller(address common.Address, caller bind.ContractCaller) (*UpkeepTranscoderCaller, error) { + contract, err := bindUpkeepTranscoder(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UpkeepTranscoderCaller{contract: contract}, nil +} + +func NewUpkeepTranscoderTransactor(address common.Address, transactor bind.ContractTransactor) (*UpkeepTranscoderTransactor, error) { + contract, err := bindUpkeepTranscoder(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UpkeepTranscoderTransactor{contract: contract}, nil +} + +func NewUpkeepTranscoderFilterer(address common.Address, filterer bind.ContractFilterer) (*UpkeepTranscoderFilterer, error) { + contract, err := bindUpkeepTranscoder(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UpkeepTranscoderFilterer{contract: contract}, nil +} + +func bindUpkeepTranscoder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(UpkeepTranscoderABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +func (_UpkeepTranscoder *UpkeepTranscoderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UpkeepTranscoder.Contract.UpkeepTranscoderCaller.contract.Call(opts, result, method, params...) +} + +func (_UpkeepTranscoder *UpkeepTranscoderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpkeepTranscoder.Contract.UpkeepTranscoderTransactor.contract.Transfer(opts) +} + +func (_UpkeepTranscoder *UpkeepTranscoderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UpkeepTranscoder.Contract.UpkeepTranscoderTransactor.contract.Transact(opts, method, params...) +} + +func (_UpkeepTranscoder *UpkeepTranscoderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UpkeepTranscoder.Contract.contract.Call(opts, result, method, params...) +} + +func (_UpkeepTranscoder *UpkeepTranscoderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpkeepTranscoder.Contract.contract.Transfer(opts) +} + +func (_UpkeepTranscoder *UpkeepTranscoderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UpkeepTranscoder.Contract.contract.Transact(opts, method, params...) +} + +func (_UpkeepTranscoder *UpkeepTranscoderCaller) TranscodeUpkeeps(opts *bind.CallOpts, fromVersion uint8, toVersion uint8, encodedUpkeeps []byte) ([]byte, error) { + var out []interface{} + err := _UpkeepTranscoder.contract.Call(opts, &out, "transcodeUpkeeps", fromVersion, toVersion, encodedUpkeeps) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_UpkeepTranscoder *UpkeepTranscoderSession) TranscodeUpkeeps(fromVersion uint8, toVersion uint8, encodedUpkeeps []byte) ([]byte, error) { + return _UpkeepTranscoder.Contract.TranscodeUpkeeps(&_UpkeepTranscoder.CallOpts, fromVersion, toVersion, encodedUpkeeps) +} + +func (_UpkeepTranscoder *UpkeepTranscoderCallerSession) TranscodeUpkeeps(fromVersion uint8, toVersion uint8, encodedUpkeeps []byte) ([]byte, error) { + return _UpkeepTranscoder.Contract.TranscodeUpkeeps(&_UpkeepTranscoder.CallOpts, fromVersion, toVersion, encodedUpkeeps) +} + +func (_UpkeepTranscoder *UpkeepTranscoderCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _UpkeepTranscoder.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_UpkeepTranscoder *UpkeepTranscoderSession) TypeAndVersion() (string, error) { + return _UpkeepTranscoder.Contract.TypeAndVersion(&_UpkeepTranscoder.CallOpts) +} + +func (_UpkeepTranscoder *UpkeepTranscoderCallerSession) TypeAndVersion() (string, error) { + return _UpkeepTranscoder.Contract.TypeAndVersion(&_UpkeepTranscoder.CallOpts) +} + +func (_UpkeepTranscoder *UpkeepTranscoder) Address() common.Address { + return _UpkeepTranscoder.address +} + +type UpkeepTranscoderInterface interface { + TranscodeUpkeeps(opts *bind.CallOpts, fromVersion uint8, toVersion uint8, encodedUpkeeps []byte) ([]byte, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt index abb10b45a74..65d41eac80b 100644 --- a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -13,6 +13,8 @@ derived_price_feed_wrapper: ../../contracts/solc/v0.8.6/DerivedPriceFeed.abi ../ flags_wrapper: ../../contracts/solc/v0.6/Flags.abi ../../contracts/solc/v0.6/Flags.bin 2034d1b562ca37a63068851915e3703980276e8d5f7db6db8a3351a49d69fc4a flux_aggregator_wrapper: ../../contracts/solc/v0.6/FluxAggregator.abi ../../contracts/solc/v0.6/FluxAggregator.bin a3b0a6396c4aa3b5ee39b3c4bd45efc89789d4859379a8a92caca3a0496c5794 gas_wrapper: ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.bin 4a5dcdac486d18fcd58e3488c15c1710ae76b977556a3f3191bd269a4bc75723 +keeper_registrar_wrapper1_2: ../../contracts/solc/v0.8.6/KeeperRegistrar.abi ../../contracts/solc/v0.8.6/KeeperRegistrar.bin e49b2f8b23da17af1ed2209b8ae0968cc04350554d636711e6c24a3ad3118692 +keeper_registrar_wrapper2_0: ../../contracts/solc/v0.8.6/KeeperRegistrar2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistrar2_0.bin 647f125c2f0dafabcdc545cb77b15dc2ec3ea9429357806813179b1fd555c2d2 keeper_registry_logic1_3: ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3.bin e1bee66ce7cd0085469f923c46f0eddb58fd45dec207def1bb383b37e413a6ca keeper_registry_logic2_0: ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0.bin cf563c2e48d6d6e11c19910c1f1c4d4df46b2ddd950c0c6e0640e8bde9f4c183 keeper_registry_wrapper1_1: ../../contracts/solc/v0.7/KeeperRegistry1_1.abi ../../contracts/solc/v0.7/KeeperRegistry1_1.bin 6ce079f2738f015f7374673a2816e8e9787143d00b780ea7652c8aa9ad9e1e20 @@ -44,6 +46,7 @@ solidity_vrf_verifier_wrapper: ../../contracts/solc/v0.6/VRFTestHelper.abi ../.. type_and_version_interface_wrapper: ../../contracts/solc/v0.8.6/TypeAndVersionInterface.abi ../../contracts/solc/v0.8.6/TypeAndVersionInterface.bin bc9c3a6e73e3ebd5b58754df0deeb3b33f4bb404d5709bb904aed51d32f4b45e upkeep_counter_wrapper: ../../contracts/solc/v0.7/UpkeepCounter.abi ../../contracts/solc/v0.7/UpkeepCounter.bin 901961ebf18906febc1c350f02da85c7ea1c2a68da70cfd94efa27c837a48663 upkeep_perform_counter_restrictive_wrapper: ../../contracts/solc/v0.7/UpkeepPerformCounterRestrictive.abi ../../contracts/solc/v0.7/UpkeepPerformCounterRestrictive.bin 8975a058fba528e16d8414dc6f13946d17a145fcbc66cf25a32449b6fe1ce878 +upkeep_transcoder: ../../contracts/solc/v0.8.6/UpkeepTranscoder.abi ../../contracts/solc/v0.8.6/UpkeepTranscoder.bin 336c92a981597be26508455f81a908a0784a817b129a59686c5b2c4afcba730a vrf_consumer_v2: ../../contracts/solc/v0.8.6/VRFConsumerV2.abi ../../contracts/solc/v0.8.6/VRFConsumerV2.bin 9ef258bf8e9f8d880fd229ceb145593d91e24fc89366baa0bf19169c5787d15f vrf_consumer_v2_upgradeable_example: ../../contracts/solc/v0.8.6/VRFConsumerV2UpgradeableExample.abi ../../contracts/solc/v0.8.6/VRFConsumerV2UpgradeableExample.bin f1790a9a2f2a04c730593e483459709cb89e897f8a19d7a3ac0cfe6a97265e6e vrf_coordinator_v2: ../../contracts/solc/v0.8.6/VRFCoordinatorV2.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2.bin 7839d54d662197ad8f987495b6461e8ea9c66746b79a744bfd74ff086c276be0 diff --git a/core/gethwrappers/go_generate.go b/core/gethwrappers/go_generate.go index 5bf82fc9620..deb9f517b45 100644 --- a/core/gethwrappers/go_generate.go +++ b/core/gethwrappers/go_generate.go @@ -28,13 +28,16 @@ package gethwrappers //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.7/UpkeepCounter.abi ../../contracts/solc/v0.7/UpkeepCounter.bin UpkeepCounter upkeep_counter_wrapper //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/CronUpkeepFactory.abi - CronUpkeepFactory cron_upkeep_factory_wrapper //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/CronUpkeep.abi - CronUpkeep cron_upkeep_wrapper +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistrar.abi ../../contracts/solc/v0.8.6/KeeperRegistrar.bin KeeperRegistrar keeper_registrar_wrapper1_2 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistry1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_2.bin KeeperRegistry keeper_registry_wrapper1_2 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/TypeAndVersionInterface.abi ../../contracts/solc/v0.8.6/TypeAndVersionInterface.bin TypeAndVersionInterface type_and_version_interface_wrapper //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.bin KeeperRegistryCheckUpkeepGasUsageWrapper gas_wrapper //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistry1_3.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_3.bin KeeperRegistry keeper_registry_wrapper1_3 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3.bin KeeperRegistryLogic keeper_registry_logic1_3 +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistrar2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistrar2_0.bin KeeperRegistrar keeper_registrar_wrapper2_0 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistry2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistry2_0.bin KeeperRegistry keeper_registry_wrapper2_0 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0.bin KeeperRegistryLogic keeper_registry_logic2_0 +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/UpkeepTranscoder.abi ../../contracts/solc/v0.8.6/UpkeepTranscoder.bin UpkeepTranscoder upkeep_transcoder // v0.8.6 VRFConsumer //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFConsumer.abi ../../contracts/solc/v0.8.6/VRFConsumer.bin VRFConsumer solidity_vrf_consumer_interface_v08 diff --git a/integration-tests/actions/automation_ocr_helpers.go b/integration-tests/actions/automation_ocr_helpers.go index 88f368ad471..38c51c9ac61 100644 --- a/integration-tests/actions/automation_ocr_helpers.go +++ b/integration-tests/actions/automation_ocr_helpers.go @@ -11,7 +11,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/lib/pq" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/smartcontractkit/libocr/offchainreporting2/confighelper" types2 "github.com/smartcontractkit/ocr2keepers/pkg/types" @@ -23,6 +22,7 @@ import ( "github.com/smartcontractkit/chainlink/core/store/models" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" ) func BuildAutoOCR2ConfigVars( diff --git a/integration-tests/actions/keeper_benchmark_helpers.go b/integration-tests/actions/keeper_benchmark_helpers.go index a5a6d7ce489..76abbb4980c 100644 --- a/integration-tests/actions/keeper_benchmark_helpers.go +++ b/integration-tests/actions/keeper_benchmark_helpers.go @@ -15,9 +15,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" ) // DeployBenchmarkKeeperContracts deploys a set amount of keeper Benchmark contracts registered to a single registry diff --git a/integration-tests/actions/keeper_helpers.go b/integration-tests/actions/keeper_helpers.go index 80b18a0f56c..0438b010058 100644 --- a/integration-tests/actions/keeper_helpers.go +++ b/integration-tests/actions/keeper_helpers.go @@ -9,12 +9,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" ) var ZeroAddress = common.Address{} diff --git a/integration-tests/benchmark/keeper_test.go b/integration-tests/benchmark/keeper_test.go index 8e89c8ecf86..9d9202dc0d8 100644 --- a/integration-tests/benchmark/keeper_test.go +++ b/integration-tests/benchmark/keeper_test.go @@ -20,12 +20,12 @@ import ( "github.com/smartcontractkit/chainlink-env/pkg/helm/reorg" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - eth_contracts "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" networks "github.com/smartcontractkit/chainlink/integration-tests" "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + eth_contracts "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/smartcontractkit/chainlink/integration-tests/testsetups" ) diff --git a/integration-tests/chaos/automation_chaos_test.go b/integration-tests/chaos/automation_chaos_test.go index d48e485673a..0381e1ccce1 100644 --- a/integration-tests/chaos/automation_chaos_test.go +++ b/integration-tests/chaos/automation_chaos_test.go @@ -15,7 +15,6 @@ import ( "github.com/smartcontractkit/chainlink-env/pkg/helm/chainlink" "github.com/smartcontractkit/chainlink-env/pkg/helm/ethereum" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - eth_contracts "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" @@ -24,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + eth_contracts "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" ) var ( diff --git a/integration-tests/contracts/contract_deployer.go b/integration-tests/contracts/contract_deployer.go index 35ff6d0f1a6..93f119a82a1 100644 --- a/integration-tests/contracts/contract_deployer.go +++ b/integration-tests/contracts/contract_deployer.go @@ -6,8 +6,6 @@ import ( "math/big" "time" - int_ethereum "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -19,7 +17,17 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" - ethereum2 "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" + eth_contracts "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" + + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registrar_wrapper1_2" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registrar_wrapper2_0" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_logic1_3" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_logic2_0" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper1_1" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper1_2" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper1_3" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper2_0" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/upkeep_transcoder" ) // ContractDeployer is an interface for abstracting the contract deployment methods across network implementations @@ -39,7 +47,7 @@ type ContractDeployer interface { DeployVRFContract() (VRF, error) DeployMockETHLINKFeed(answer *big.Int) (MockETHLINKFeed, error) DeployMockGasFeed(answer *big.Int) (MockGasFeed, error) - DeployKeeperRegistrar(registryVersion ethereum.KeeperRegistryVersion, linkAddr string, registrarSettings KeeperRegistrarSettings) (KeeperRegistrar, error) + DeployKeeperRegistrar(registryVersion eth_contracts.KeeperRegistryVersion, linkAddr string, registrarSettings KeeperRegistrarSettings) (KeeperRegistrar, error) DeployUpkeepTranscoder() (UpkeepTranscoder, error) DeployKeeperRegistry(opts *KeeperRegistryOpts) (KeeperRegistry, error) DeployKeeperConsumer(updateInterval *big.Int) (KeeperConsumer, error) @@ -72,7 +80,7 @@ type ContractDeployer interface { DeployBlockhashStore() (BlockHashStore, error) DeployOperatorFactory(linkAddr string) (OperatorFactory, error) DeployUpkeepResetter() (UpkeepResetter, error) - DeployStaking(params ethereum2.StakingPoolConstructorParams) (Staking, error) + DeployStaking(params eth_contracts.StakingPoolConstructorParams) (Staking, error) DeployBatchBlockhashStore(blockhashStoreAddr string) (BatchBlockhashStore, error) DeployAtlasFunctions() (AtlasFunctions, error) LoadVerifierProxy(address common.Address) (VerifierProxy, error) @@ -249,19 +257,19 @@ func (e *EthereumContractDeployer) DeployFluxAggregatorContract( }, nil } -func (e *EthereumContractDeployer) DeployStaking(params ethereum2.StakingPoolConstructorParams) (Staking, error) { +func (e *EthereumContractDeployer) DeployStaking(params eth_contracts.StakingPoolConstructorParams) (Staking, error) { stakingAddress, _, instance, err := e.client.DeployContract("Staking", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum2.DeployStaking(auth, backend, params) + return eth_contracts.DeployStaking(auth, backend, params) }) if err != nil { return nil, err } return &EthereumStaking{ client: e.client, - staking: instance.(*ethereum2.Staking), + staking: instance.(*eth_contracts.Staking), address: stakingAddress, }, nil } @@ -271,14 +279,14 @@ func (e *EthereumContractDeployer) DeployAtlasFunctions() (AtlasFunctions, error auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum2.DeployAtlasFunctions(auth, backend) + return eth_contracts.DeployAtlasFunctions(auth, backend) }) if err != nil { return nil, err } return &EthereumAtlasFunctions{ client: e.client, - atlasFunctions: instance.(*ethereum2.AtlasFunctions), + atlasFunctions: instance.(*eth_contracts.AtlasFunctions), address: address, }, nil } @@ -472,7 +480,7 @@ func (e *EthereumContractDeployer) DeployUpkeepTranscoder() (UpkeepTranscoder, e opts *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployUpkeepTranscoder(opts, backend) + return upkeep_transcoder.DeployUpkeepTranscoder(opts, backend) }) if err != nil { @@ -481,21 +489,21 @@ func (e *EthereumContractDeployer) DeployUpkeepTranscoder() (UpkeepTranscoder, e return &EthereumUpkeepTranscoder{ client: e.client, - transcoder: instance.(*ethereum.UpkeepTranscoder), + transcoder: instance.(*upkeep_transcoder.UpkeepTranscoder), address: address, }, err } -func (e *EthereumContractDeployer) DeployKeeperRegistrar(registryVersion ethereum.KeeperRegistryVersion, linkAddr string, +func (e *EthereumContractDeployer) DeployKeeperRegistrar(registryVersion eth_contracts.KeeperRegistryVersion, linkAddr string, registrarSettings KeeperRegistrarSettings) (KeeperRegistrar, error) { - if registryVersion == ethereum.RegistryVersion_2_0 { + if registryVersion == eth_contracts.RegistryVersion_2_0 { // deploy registrar 2.0 address, _, instance, err := e.client.DeployContract("KeeperRegistrar", func( opts *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperRegistrar20(opts, backend, common.HexToAddress(linkAddr), registrarSettings.AutoApproveConfigType, + return keeper_registrar_wrapper2_0.DeployKeeperRegistrar(opts, backend, common.HexToAddress(linkAddr), registrarSettings.AutoApproveConfigType, registrarSettings.AutoApproveMaxAllowed, common.HexToAddress(registrarSettings.RegistryAddr), registrarSettings.MinLinkJuels) }) @@ -505,7 +513,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistrar(registryVersion ethereu return &EthereumKeeperRegistrar{ client: e.client, - registrar20: instance.(*ethereum.KeeperRegistrar20), + registrar20: instance.(*keeper_registrar_wrapper2_0.KeeperRegistrar), address: address, }, err } @@ -514,7 +522,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistrar(registryVersion ethereu opts *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperRegistrar(opts, backend, common.HexToAddress(linkAddr), registrarSettings.AutoApproveConfigType, + return keeper_registrar_wrapper1_2.DeployKeeperRegistrar(opts, backend, common.HexToAddress(linkAddr), registrarSettings.AutoApproveConfigType, registrarSettings.AutoApproveMaxAllowed, common.HexToAddress(registrarSettings.RegistryAddr), registrarSettings.MinLinkJuels) }) @@ -524,7 +532,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistrar(registryVersion ethereu return &EthereumKeeperRegistrar{ client: e.client, - registrar: instance.(*ethereum.KeeperRegistrar), + registrar: instance.(*keeper_registrar_wrapper1_2.KeeperRegistrar), address: address, }, err } @@ -545,12 +553,12 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( } registryGasOverhead := big.NewInt(80000) switch opts.RegistryVersion { - case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: + case eth_contracts.RegistryVersion_1_0, eth_contracts.RegistryVersion_1_1: address, _, instance, err := e.client.DeployContract("KeeperRegistry1_1", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperRegistry11( + return keeper_registry_wrapper1_1.DeployKeeperRegistry( auth, backend, common.HexToAddress(opts.LinkAddr), @@ -571,24 +579,24 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( } return &EthereumKeeperRegistry{ client: e.client, - version: ethereum.RegistryVersion_1_1, - registry1_1: instance.(*ethereum.KeeperRegistry11), + version: eth_contracts.RegistryVersion_1_1, + registry1_1: instance.(*keeper_registry_wrapper1_1.KeeperRegistry), registry1_2: nil, registry1_3: nil, address: address, }, err - case ethereum.RegistryVersion_1_2: + case eth_contracts.RegistryVersion_1_2: address, _, instance, err := e.client.DeployContract("KeeperRegistry1_2", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperRegistry12( + return keeper_registry_wrapper1_2.DeployKeeperRegistry( auth, backend, common.HexToAddress(opts.LinkAddr), common.HexToAddress(opts.ETHFeedAddr), common.HexToAddress(opts.GasFeedAddr), - ethereum.Config1_2{ + keeper_registry_wrapper1_2.Config{ PaymentPremiumPPB: opts.Settings.PaymentPremiumPPB, FlatFeeMicroLink: opts.Settings.FlatFeeMicroLINK, BlockCountPerTurn: opts.Settings.BlockCountPerTurn, @@ -609,18 +617,18 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( } return &EthereumKeeperRegistry{ client: e.client, - version: ethereum.RegistryVersion_1_2, + version: eth_contracts.RegistryVersion_1_2, registry1_1: nil, - registry1_2: instance.(*ethereum.KeeperRegistry12), + registry1_2: instance.(*keeper_registry_wrapper1_2.KeeperRegistry), registry1_3: nil, address: address, }, err - case ethereum.RegistryVersion_1_3: + case eth_contracts.RegistryVersion_1_3: logicAddress, _, _, err := e.client.DeployContract("KeeperRegistryLogic1_3", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperRegistryLogic13( + return keeper_registry_logic1_3.DeployKeeperRegistryLogic( auth, backend, paymentModel, // Default payment model @@ -642,11 +650,11 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperRegistry13( + return keeper_registry_wrapper1_3.DeployKeeperRegistry( auth, backend, *logicAddress, - ethereum.Config1_3{ + keeper_registry_wrapper1_3.Config{ PaymentPremiumPPB: opts.Settings.PaymentPremiumPPB, FlatFeeMicroLink: opts.Settings.FlatFeeMicroLINK, BlockCountPerTurn: opts.Settings.BlockCountPerTurn, @@ -667,18 +675,18 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( } return &EthereumKeeperRegistry{ client: e.client, - version: ethereum.RegistryVersion_1_3, + version: eth_contracts.RegistryVersion_1_3, registry1_1: nil, registry1_2: nil, - registry1_3: instance.(*ethereum.KeeperRegistry13), + registry1_3: instance.(*keeper_registry_wrapper1_3.KeeperRegistry), address: address, }, err - case ethereum.RegistryVersion_2_0: + case eth_contracts.RegistryVersion_2_0: logicAddress, _, _, err := e.client.DeployContract("KeeperRegistryLogic2_0", func( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperRegistryLogic20( + return keeper_registry_logic2_0.DeployKeeperRegistryLogic( auth, backend, paymentModel, // Default payment model @@ -700,7 +708,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperRegistry20( + return keeper_registry_wrapper2_0.DeployKeeperRegistry( auth, backend, *logicAddress, @@ -711,8 +719,8 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( } return &EthereumKeeperRegistry{ client: e.client, - version: ethereum.RegistryVersion_2_0, - registry2_0: instance.(*ethereum.KeeperRegistry20), + version: eth_contracts.RegistryVersion_2_0, + registry2_0: instance.(*keeper_registry_wrapper2_0.KeeperRegistry), address: address, }, err @@ -726,14 +734,14 @@ func (e *EthereumContractDeployer) DeployKeeperConsumer(updateInterval *big.Int) auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperConsumer(auth, backend, updateInterval) + return eth_contracts.DeployKeeperConsumer(auth, backend, updateInterval) }) if err != nil { return nil, err } return &EthereumKeeperConsumer{ client: e.client, - consumer: instance.(*ethereum.KeeperConsumer), + consumer: instance.(*eth_contracts.KeeperConsumer), address: address, }, err } @@ -743,14 +751,14 @@ func (e *EthereumContractDeployer) DeployUpkeepCounter(testRange *big.Int, inter auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployUpkeepCounter(auth, backend, testRange, interval) + return eth_contracts.DeployUpkeepCounter(auth, backend, testRange, interval) }) if err != nil { return nil, err } return &EthereumUpkeepCounter{ client: e.client, - consumer: instance.(*ethereum.UpkeepCounter), + consumer: instance.(*eth_contracts.UpkeepCounter), address: address, }, err } @@ -760,14 +768,14 @@ func (e *EthereumContractDeployer) DeployUpkeepPerformCounterRestrictive(testRan auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployUpkeepPerformCounterRestrictive(auth, backend, testRange, averageEligibilityCadence) + return eth_contracts.DeployUpkeepPerformCounterRestrictive(auth, backend, testRange, averageEligibilityCadence) }) if err != nil { return nil, err } return &EthereumUpkeepPerformCounterRestrictive{ client: e.client, - consumer: instance.(*ethereum.UpkeepPerformCounterRestrictive), + consumer: instance.(*eth_contracts.UpkeepPerformCounterRestrictive), address: address, }, err } @@ -782,7 +790,7 @@ func (e *EthereumContractDeployer) DeployKeeperConsumerPerformance( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperConsumerPerformance( + return eth_contracts.DeployKeeperConsumerPerformance( auth, backend, testBlockRange, @@ -796,7 +804,7 @@ func (e *EthereumContractDeployer) DeployKeeperConsumerPerformance( } return &EthereumKeeperConsumerPerformance{ client: e.client, - consumer: instance.(*ethereum.KeeperConsumerPerformance), + consumer: instance.(*eth_contracts.KeeperConsumerPerformance), address: address, }, err } @@ -812,7 +820,7 @@ func (e *EthereumContractDeployer) DeployKeeperConsumerBenchmark( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployKeeperConsumerBenchmark( + return eth_contracts.DeployKeeperConsumerBenchmark( auth, backend, testBlockRange, @@ -827,7 +835,7 @@ func (e *EthereumContractDeployer) DeployKeeperConsumerBenchmark( } return &EthereumKeeperConsumerBenchmark{ client: e.client, - consumer: instance.(*ethereum.KeeperConsumerBenchmark), + consumer: instance.(*eth_contracts.KeeperConsumerBenchmark), address: address, }, err } @@ -837,7 +845,7 @@ func (e *EthereumContractDeployer) DeployKeeperPerformDataChecker(expectedData [ auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return ethereum.DeployPerformDataChecker( + return eth_contracts.DeployPerformDataChecker( auth, backend, expectedData, @@ -848,7 +856,7 @@ func (e *EthereumContractDeployer) DeployKeeperPerformDataChecker(expectedData [ } return &EthereumKeeperPerformDataCheckerConsumer{ client: e.client, - performDataChecker: instance.(*ethereum.PerformDataChecker), + performDataChecker: instance.(*eth_contracts.PerformDataChecker), address: address, }, err } @@ -877,7 +885,7 @@ func (e *EthereumContractDeployer) DeployUpkeepResetter() (UpkeepResetter, error auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return int_ethereum.DeployUpkeepResetter(auth, backend) + return eth_contracts.DeployUpkeepResetter(auth, backend) }) if err != nil { return nil, err @@ -885,6 +893,6 @@ func (e *EthereumContractDeployer) DeployUpkeepResetter() (UpkeepResetter, error return &EthereumUpkeepResetter{ address: addr, client: e.client, - consumer: instance.(*int_ethereum.UpkeepResetter), + consumer: instance.(*eth_contracts.UpkeepResetter), }, err } diff --git a/integration-tests/contracts/contract_loader.go b/integration-tests/contracts/contract_loader.go index 974b80c01c7..c87b8800ce2 100644 --- a/integration-tests/contracts/contract_loader.go +++ b/integration-tests/contracts/contract_loader.go @@ -3,8 +3,7 @@ package contracts import ( "errors" - "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" - int_ethereum "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" + eth_contracts "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -120,7 +119,7 @@ func (e *EthereumContractLoader) LoadKeeperConsumerBenchmark(address common.Addr address common.Address, backend bind.ContractBackend, ) (interface{}, error) { - return ethereum.NewKeeperConsumerBenchmark(address, backend) + return eth_contracts.NewKeeperConsumerBenchmark(address, backend) }) if err != nil { return nil, err @@ -128,7 +127,7 @@ func (e *EthereumContractLoader) LoadKeeperConsumerBenchmark(address common.Addr return &EthereumKeeperConsumerBenchmark{ address: &address, client: e.client, - consumer: instance.(*ethereum.KeeperConsumerBenchmark), + consumer: instance.(*eth_contracts.KeeperConsumerBenchmark), }, err } @@ -138,7 +137,7 @@ func (e *EthereumContractLoader) LoadUpkeepResetter(address common.Address) (Upk address common.Address, backend bind.ContractBackend, ) (interface{}, error) { - return int_ethereum.NewUpkeepResetter(address, backend) + return eth_contracts.NewUpkeepResetter(address, backend) }) if err != nil { return nil, err @@ -146,6 +145,6 @@ func (e *EthereumContractLoader) LoadUpkeepResetter(address common.Address) (Upk return &EthereumUpkeepResetter{ address: &address, client: e.client, - consumer: instance.(*int_ethereum.UpkeepResetter), + consumer: instance.(*eth_contracts.UpkeepResetter), }, err } diff --git a/integration-tests/contracts/ethereum/KeeperConsumer.go b/integration-tests/contracts/ethereum/KeeperConsumer.go new file mode 100644 index 00000000000..c0691729d21 --- /dev/null +++ b/integration-tests/contracts/ethereum/KeeperConsumer.go @@ -0,0 +1,361 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ethereum + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// KeeperConsumerMetaData contains all meta data concerning the KeeperConsumer contract. +var KeeperConsumerMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"updateInterval\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimeStamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a060405234801561001057600080fd5b506040516103583803806103588339818101604052602081101561003357600080fd5b505160805242600155600080556080516102fe61005a6000398061025452506102fe6000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80633f3b3b271461005c5780634585e33b1461007657806361bc221a146100e65780636e04ff0d146100ee578063947a36fb146101dd575b600080fd5b6100646101e5565b60408051918252519081900360200190f35b6100e46004803603602081101561008c57600080fd5b810190602081018135600160201b8111156100a657600080fd5b8201836020820111156100b857600080fd5b803590602001918460018302840111600160201b831117156100d957600080fd5b5090925090506101eb565b005b6100646101f8565b61015c6004803603602081101561010457600080fd5b810190602081018135600160201b81111561011e57600080fd5b82018360208201111561013057600080fd5b803590602001918460018302840111600160201b8311171561015157600080fd5b5090925090506101fe565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156101a1578181015183820152602001610189565b50505050905090810190601f1680156101ce5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b610064610252565b60015481565b5050600080546001019055565b60005481565b6000606061020a610276565b6001848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959a92995091975050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b32156102c6576040805162461bcd60e51b815260206004820152601a6024820152791bdb9b1e48199bdc881cda5b5d5b185d195908189858dad95b9960321b604482015290519081900360640190fd5b56fea2646970667358221220c0e089efa59b00d8b131c6b0456904c0ef8f5646c27f81de540a4cc400cff70c64736f6c63430007060033", +} + +// KeeperConsumerABI is the input ABI used to generate the binding from. +// Deprecated: Use KeeperConsumerMetaData.ABI instead. +var KeeperConsumerABI = KeeperConsumerMetaData.ABI + +// KeeperConsumerBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use KeeperConsumerMetaData.Bin instead. +var KeeperConsumerBin = KeeperConsumerMetaData.Bin + +// DeployKeeperConsumer deploys a new Ethereum contract, binding an instance of KeeperConsumer to it. +func DeployKeeperConsumer(auth *bind.TransactOpts, backend bind.ContractBackend, updateInterval *big.Int) (common.Address, *types.Transaction, *KeeperConsumer, error) { + parsed, err := KeeperConsumerMetaData.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(KeeperConsumerBin), backend, updateInterval) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &KeeperConsumer{KeeperConsumerCaller: KeeperConsumerCaller{contract: contract}, KeeperConsumerTransactor: KeeperConsumerTransactor{contract: contract}, KeeperConsumerFilterer: KeeperConsumerFilterer{contract: contract}}, nil +} + +// KeeperConsumer is an auto generated Go binding around an Ethereum contract. +type KeeperConsumer struct { + KeeperConsumerCaller // Read-only binding to the contract + KeeperConsumerTransactor // Write-only binding to the contract + KeeperConsumerFilterer // Log filterer for contract events +} + +// KeeperConsumerCaller is an auto generated read-only Go binding around an Ethereum contract. +type KeeperConsumerCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// KeeperConsumerTransactor is an auto generated write-only Go binding around an Ethereum contract. +type KeeperConsumerTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// KeeperConsumerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type KeeperConsumerFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// KeeperConsumerSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type KeeperConsumerSession struct { + Contract *KeeperConsumer // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// KeeperConsumerCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type KeeperConsumerCallerSession struct { + Contract *KeeperConsumerCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// KeeperConsumerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type KeeperConsumerTransactorSession struct { + Contract *KeeperConsumerTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// KeeperConsumerRaw is an auto generated low-level Go binding around an Ethereum contract. +type KeeperConsumerRaw struct { + Contract *KeeperConsumer // Generic contract binding to access the raw methods on +} + +// KeeperConsumerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type KeeperConsumerCallerRaw struct { + Contract *KeeperConsumerCaller // Generic read-only contract binding to access the raw methods on +} + +// KeeperConsumerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type KeeperConsumerTransactorRaw struct { + Contract *KeeperConsumerTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewKeeperConsumer creates a new instance of KeeperConsumer, bound to a specific deployed contract. +func NewKeeperConsumer(address common.Address, backend bind.ContractBackend) (*KeeperConsumer, error) { + contract, err := bindKeeperConsumer(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &KeeperConsumer{KeeperConsumerCaller: KeeperConsumerCaller{contract: contract}, KeeperConsumerTransactor: KeeperConsumerTransactor{contract: contract}, KeeperConsumerFilterer: KeeperConsumerFilterer{contract: contract}}, nil +} + +// NewKeeperConsumerCaller creates a new read-only instance of KeeperConsumer, bound to a specific deployed contract. +func NewKeeperConsumerCaller(address common.Address, caller bind.ContractCaller) (*KeeperConsumerCaller, error) { + contract, err := bindKeeperConsumer(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &KeeperConsumerCaller{contract: contract}, nil +} + +// NewKeeperConsumerTransactor creates a new write-only instance of KeeperConsumer, bound to a specific deployed contract. +func NewKeeperConsumerTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperConsumerTransactor, error) { + contract, err := bindKeeperConsumer(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &KeeperConsumerTransactor{contract: contract}, nil +} + +// NewKeeperConsumerFilterer creates a new log filterer instance of KeeperConsumer, bound to a specific deployed contract. +func NewKeeperConsumerFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperConsumerFilterer, error) { + contract, err := bindKeeperConsumer(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &KeeperConsumerFilterer{contract: contract}, nil +} + +// bindKeeperConsumer binds a generic wrapper to an already deployed contract. +func bindKeeperConsumer(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(KeeperConsumerABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_KeeperConsumer *KeeperConsumerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperConsumer.Contract.KeeperConsumerCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_KeeperConsumer *KeeperConsumerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperConsumer.Contract.KeeperConsumerTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_KeeperConsumer *KeeperConsumerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperConsumer.Contract.KeeperConsumerTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_KeeperConsumer *KeeperConsumerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperConsumer.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_KeeperConsumer *KeeperConsumerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperConsumer.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_KeeperConsumer *KeeperConsumerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperConsumer.Contract.contract.Transact(opts, method, params...) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes checkData) view returns(bool upkeepNeeded, bytes performData) +func (_KeeperConsumer *KeeperConsumerCaller) CheckUpkeep(opts *bind.CallOpts, checkData []byte) (struct { + UpkeepNeeded bool + PerformData []byte +}, error) { + var out []interface{} + err := _KeeperConsumer.contract.Call(opts, &out, "checkUpkeep", checkData) + + outstruct := new(struct { + UpkeepNeeded bool + PerformData []byte + }) + if err != nil { + return *outstruct, err + } + + outstruct.UpkeepNeeded = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.PerformData = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes checkData) view returns(bool upkeepNeeded, bytes performData) +func (_KeeperConsumer *KeeperConsumerSession) CheckUpkeep(checkData []byte) (struct { + UpkeepNeeded bool + PerformData []byte +}, error) { + return _KeeperConsumer.Contract.CheckUpkeep(&_KeeperConsumer.CallOpts, checkData) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes checkData) view returns(bool upkeepNeeded, bytes performData) +func (_KeeperConsumer *KeeperConsumerCallerSession) CheckUpkeep(checkData []byte) (struct { + UpkeepNeeded bool + PerformData []byte +}, error) { + return _KeeperConsumer.Contract.CheckUpkeep(&_KeeperConsumer.CallOpts, checkData) +} + +// Counter is a free data retrieval call binding the contract method 0x61bc221a. +// +// Solidity: function counter() view returns(uint256) +func (_KeeperConsumer *KeeperConsumerCaller) Counter(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumer.contract.Call(opts, &out, "counter") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Counter is a free data retrieval call binding the contract method 0x61bc221a. +// +// Solidity: function counter() view returns(uint256) +func (_KeeperConsumer *KeeperConsumerSession) Counter() (*big.Int, error) { + return _KeeperConsumer.Contract.Counter(&_KeeperConsumer.CallOpts) +} + +// Counter is a free data retrieval call binding the contract method 0x61bc221a. +// +// Solidity: function counter() view returns(uint256) +func (_KeeperConsumer *KeeperConsumerCallerSession) Counter() (*big.Int, error) { + return _KeeperConsumer.Contract.Counter(&_KeeperConsumer.CallOpts) +} + +// Interval is a free data retrieval call binding the contract method 0x947a36fb. +// +// Solidity: function interval() view returns(uint256) +func (_KeeperConsumer *KeeperConsumerCaller) Interval(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumer.contract.Call(opts, &out, "interval") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Interval is a free data retrieval call binding the contract method 0x947a36fb. +// +// Solidity: function interval() view returns(uint256) +func (_KeeperConsumer *KeeperConsumerSession) Interval() (*big.Int, error) { + return _KeeperConsumer.Contract.Interval(&_KeeperConsumer.CallOpts) +} + +// Interval is a free data retrieval call binding the contract method 0x947a36fb. +// +// Solidity: function interval() view returns(uint256) +func (_KeeperConsumer *KeeperConsumerCallerSession) Interval() (*big.Int, error) { + return _KeeperConsumer.Contract.Interval(&_KeeperConsumer.CallOpts) +} + +// LastTimeStamp is a free data retrieval call binding the contract method 0x3f3b3b27. +// +// Solidity: function lastTimeStamp() view returns(uint256) +func (_KeeperConsumer *KeeperConsumerCaller) LastTimeStamp(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumer.contract.Call(opts, &out, "lastTimeStamp") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LastTimeStamp is a free data retrieval call binding the contract method 0x3f3b3b27. +// +// Solidity: function lastTimeStamp() view returns(uint256) +func (_KeeperConsumer *KeeperConsumerSession) LastTimeStamp() (*big.Int, error) { + return _KeeperConsumer.Contract.LastTimeStamp(&_KeeperConsumer.CallOpts) +} + +// LastTimeStamp is a free data retrieval call binding the contract method 0x3f3b3b27. +// +// Solidity: function lastTimeStamp() view returns(uint256) +func (_KeeperConsumer *KeeperConsumerCallerSession) LastTimeStamp() (*big.Int, error) { + return _KeeperConsumer.Contract.LastTimeStamp(&_KeeperConsumer.CallOpts) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes performData) returns() +func (_KeeperConsumer *KeeperConsumerTransactor) PerformUpkeep(opts *bind.TransactOpts, performData []byte) (*types.Transaction, error) { + return _KeeperConsumer.contract.Transact(opts, "performUpkeep", performData) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes performData) returns() +func (_KeeperConsumer *KeeperConsumerSession) PerformUpkeep(performData []byte) (*types.Transaction, error) { + return _KeeperConsumer.Contract.PerformUpkeep(&_KeeperConsumer.TransactOpts, performData) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes performData) returns() +func (_KeeperConsumer *KeeperConsumerTransactorSession) PerformUpkeep(performData []byte) (*types.Transaction, error) { + return _KeeperConsumer.Contract.PerformUpkeep(&_KeeperConsumer.TransactOpts, performData) +} diff --git a/integration-tests/contracts/ethereum/KeeperConsumerBenchmark.go b/integration-tests/contracts/ethereum/KeeperConsumerBenchmark.go new file mode 100644 index 00000000000..810c26e995f --- /dev/null +++ b/integration-tests/contracts/ethereum/KeeperConsumerBenchmark.go @@ -0,0 +1,869 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ethereum + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// KeeperConsumerBenchmarkMetaData contains all meta data concerning the KeeperConsumerBenchmark contract. +var KeeperConsumerBenchmarkMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_testRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_averageEligibilityCadence\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_checkGasToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_performGasToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_firstEligibleBuffer\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialCall\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nextEligible\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"PerformingUpkeep\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"averageEligibilityCadence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkEligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkGasToBurn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dummyMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstEligibleBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstEligibleBuffer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCountPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialCall\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextEligible\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"performGasToBurn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setCheckGasToBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_firstEligibleBuffer\",\"type\":\"uint256\"}],\"name\":\"setFirstEligibleBuffer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setPerformGasToBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newTestRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_newAverageEligibilityCadence\",\"type\":\"uint256\"}],\"name\":\"setSpread\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"testRange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x6080604052600080556000600155600060095534801561001e57600080fd5b50604051610741380380610741833981810160405260a081101561004157600080fd5b508051602082015160408301516060840151608090940151600284905560038390556004829055600585905560078190559293919290919080610084574361009e565b6007546003546100926100ac565b8161009957fe5b064301015b600655506100dd9350505050565b6040805160001943014060208083019190915230828401528251808303840181526060909201909252805191012090565b610655806100ec6000396000f3fe608060405234801561001057600080fd5b50600436106101015760003560e01c80637f407edf1161009d5780637f407edf146103025780638dba0fba14610325578063926f086e1461032d578063a9a4c57c14610335578063ad0d5c4d1461033d578063b30566b41461035a578063c228a98e14610362578063c4da244d1461036a578063d826f88f14610372578063e303666f1461037a57610101565b806306661abd1461010657806313bda75b146101205780632555d2cf1461013f5780632ff3617d1461015c5780634585e33b14610164578063523d9b8a146101d25780636250a13a146101da5780636e04ff0d146101e25780637145f11b146102d1575b600080fd5b61010e610382565b60408051918252519081900360200190f35b61013d6004803603602081101561013657600080fd5b5035610388565b005b61013d6004803603602081101561015557600080fd5b503561038d565b61010e610392565b61013d6004803603602081101561017a57600080fd5b810190602081018135600160201b81111561019457600080fd5b8201836020820111156101a657600080fd5b803590602001918460018302840111600160201b831117156101c757600080fd5b509092509050610398565b61010e610489565b61010e61048f565b610250600480360360208110156101f857600080fd5b810190602081018135600160201b81111561021257600080fd5b82018360208201111561022457600080fd5b803590602001918460018302840111600160201b8311171561024557600080fd5b509092509050610495565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561029557818101518382015260200161027d565b50505050905090810190601f1680156102c25780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6102ee600480360360208110156102e757600080fd5b5035610534565b604080519115158252519081900360200190f35b61013d6004803603604081101561031857600080fd5b5080359060200135610549565b61010e610554565b61010e61055a565b61010e610560565b61013d6004803603602081101561035357600080fd5b5035610566565b61010e61056b565b6102ee610571565b61010e610580565b61013d610586565b61010e6105ba565b60095481565b600455565b600555565b60045481565b6103a06105c0565b6103a957600080fd5b60005a9050600054600014156103be57436000555b600354439081016001818155600980549091019055600054604080513281526020810192909252818101929092526060810192909252517f1313be6f6d6263f115d3e986c9622f868fcda43c8b8e7ef193e7a53d75a4d27c9181900360800190a160001943014060005b6005545a840310156104825780801561044f575060008281526008602052604090205460ff165b60408051602080820195909552308183015281518082038301815260609091019091528051930192909220919050610428565b5050505050565b60015481565b60025481565b6000606060005a905060001943014060005b6004545a84031015610501578080156104ce575060008281526008602052604090205460ff165b604080516020808201959095523081830152815180820383018152606090910190915280519301929092209190506104a7565b6105096105c0565b6040805192151560208085019190915281518085039091018152928101905297909650945050505050565b60086020526000908152604090205460ff1681565b600291909155600355565b60075481565b60005481565b60035481565b600755565b60055481565b600061057b6105c0565b905090565b60065481565b600080805560095560075461059b57436105b5565b6007546003546105a96105ee565b816105b057fe5b064301015b600655565b60095490565b60008054156105e45760025460005443031080156105df575060015443115b61057b565b5060065443101590565b604080516000194301406020808301919091523082840152825180830384018152606090920190925280519101209056fea2646970667358221220aca1c31f2a0fb9a854dd47864921d36b78865fd84f4d343cf5b590005c6f1e2764736f6c63430007060033", +} + +// KeeperConsumerBenchmarkABI is the input ABI used to generate the binding from. +// Deprecated: Use KeeperConsumerBenchmarkMetaData.ABI instead. +var KeeperConsumerBenchmarkABI = KeeperConsumerBenchmarkMetaData.ABI + +// KeeperConsumerBenchmarkBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use KeeperConsumerBenchmarkMetaData.Bin instead. +var KeeperConsumerBenchmarkBin = KeeperConsumerBenchmarkMetaData.Bin + +// DeployKeeperConsumerBenchmark deploys a new Ethereum contract, binding an instance of KeeperConsumerBenchmark to it. +func DeployKeeperConsumerBenchmark(auth *bind.TransactOpts, backend bind.ContractBackend, _testRange *big.Int, _averageEligibilityCadence *big.Int, _checkGasToBurn *big.Int, _performGasToBurn *big.Int, _firstEligibleBuffer *big.Int) (common.Address, *types.Transaction, *KeeperConsumerBenchmark, error) { + parsed, err := KeeperConsumerBenchmarkMetaData.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(KeeperConsumerBenchmarkBin), backend, _testRange, _averageEligibilityCadence, _checkGasToBurn, _performGasToBurn, _firstEligibleBuffer) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &KeeperConsumerBenchmark{KeeperConsumerBenchmarkCaller: KeeperConsumerBenchmarkCaller{contract: contract}, KeeperConsumerBenchmarkTransactor: KeeperConsumerBenchmarkTransactor{contract: contract}, KeeperConsumerBenchmarkFilterer: KeeperConsumerBenchmarkFilterer{contract: contract}}, nil +} + +// KeeperConsumerBenchmark is an auto generated Go binding around an Ethereum contract. +type KeeperConsumerBenchmark struct { + KeeperConsumerBenchmarkCaller // Read-only binding to the contract + KeeperConsumerBenchmarkTransactor // Write-only binding to the contract + KeeperConsumerBenchmarkFilterer // Log filterer for contract events +} + +// KeeperConsumerBenchmarkCaller is an auto generated read-only Go binding around an Ethereum contract. +type KeeperConsumerBenchmarkCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// KeeperConsumerBenchmarkTransactor is an auto generated write-only Go binding around an Ethereum contract. +type KeeperConsumerBenchmarkTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// KeeperConsumerBenchmarkFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type KeeperConsumerBenchmarkFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// KeeperConsumerBenchmarkSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type KeeperConsumerBenchmarkSession struct { + Contract *KeeperConsumerBenchmark // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// KeeperConsumerBenchmarkCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type KeeperConsumerBenchmarkCallerSession struct { + Contract *KeeperConsumerBenchmarkCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// KeeperConsumerBenchmarkTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type KeeperConsumerBenchmarkTransactorSession struct { + Contract *KeeperConsumerBenchmarkTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// KeeperConsumerBenchmarkRaw is an auto generated low-level Go binding around an Ethereum contract. +type KeeperConsumerBenchmarkRaw struct { + Contract *KeeperConsumerBenchmark // Generic contract binding to access the raw methods on +} + +// KeeperConsumerBenchmarkCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type KeeperConsumerBenchmarkCallerRaw struct { + Contract *KeeperConsumerBenchmarkCaller // Generic read-only contract binding to access the raw methods on +} + +// KeeperConsumerBenchmarkTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type KeeperConsumerBenchmarkTransactorRaw struct { + Contract *KeeperConsumerBenchmarkTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewKeeperConsumerBenchmark creates a new instance of KeeperConsumerBenchmark, bound to a specific deployed contract. +func NewKeeperConsumerBenchmark(address common.Address, backend bind.ContractBackend) (*KeeperConsumerBenchmark, error) { + contract, err := bindKeeperConsumerBenchmark(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &KeeperConsumerBenchmark{KeeperConsumerBenchmarkCaller: KeeperConsumerBenchmarkCaller{contract: contract}, KeeperConsumerBenchmarkTransactor: KeeperConsumerBenchmarkTransactor{contract: contract}, KeeperConsumerBenchmarkFilterer: KeeperConsumerBenchmarkFilterer{contract: contract}}, nil +} + +// NewKeeperConsumerBenchmarkCaller creates a new read-only instance of KeeperConsumerBenchmark, bound to a specific deployed contract. +func NewKeeperConsumerBenchmarkCaller(address common.Address, caller bind.ContractCaller) (*KeeperConsumerBenchmarkCaller, error) { + contract, err := bindKeeperConsumerBenchmark(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &KeeperConsumerBenchmarkCaller{contract: contract}, nil +} + +// NewKeeperConsumerBenchmarkTransactor creates a new write-only instance of KeeperConsumerBenchmark, bound to a specific deployed contract. +func NewKeeperConsumerBenchmarkTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperConsumerBenchmarkTransactor, error) { + contract, err := bindKeeperConsumerBenchmark(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &KeeperConsumerBenchmarkTransactor{contract: contract}, nil +} + +// NewKeeperConsumerBenchmarkFilterer creates a new log filterer instance of KeeperConsumerBenchmark, bound to a specific deployed contract. +func NewKeeperConsumerBenchmarkFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperConsumerBenchmarkFilterer, error) { + contract, err := bindKeeperConsumerBenchmark(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &KeeperConsumerBenchmarkFilterer{contract: contract}, nil +} + +// bindKeeperConsumerBenchmark binds a generic wrapper to an already deployed contract. +func bindKeeperConsumerBenchmark(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(KeeperConsumerBenchmarkABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperConsumerBenchmark.Contract.KeeperConsumerBenchmarkCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.KeeperConsumerBenchmarkTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.KeeperConsumerBenchmarkTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperConsumerBenchmark.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.contract.Transact(opts, method, params...) +} + +// AverageEligibilityCadence is a free data retrieval call binding the contract method 0xa9a4c57c. +// +// Solidity: function averageEligibilityCadence() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) AverageEligibilityCadence(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "averageEligibilityCadence") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AverageEligibilityCadence is a free data retrieval call binding the contract method 0xa9a4c57c. +// +// Solidity: function averageEligibilityCadence() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) AverageEligibilityCadence() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.AverageEligibilityCadence(&_KeeperConsumerBenchmark.CallOpts) +} + +// AverageEligibilityCadence is a free data retrieval call binding the contract method 0xa9a4c57c. +// +// Solidity: function averageEligibilityCadence() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) AverageEligibilityCadence() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.AverageEligibilityCadence(&_KeeperConsumerBenchmark.CallOpts) +} + +// CheckEligible is a free data retrieval call binding the contract method 0xc228a98e. +// +// Solidity: function checkEligible() view returns(bool) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) CheckEligible(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "checkEligible") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// CheckEligible is a free data retrieval call binding the contract method 0xc228a98e. +// +// Solidity: function checkEligible() view returns(bool) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) CheckEligible() (bool, error) { + return _KeeperConsumerBenchmark.Contract.CheckEligible(&_KeeperConsumerBenchmark.CallOpts) +} + +// CheckEligible is a free data retrieval call binding the contract method 0xc228a98e. +// +// Solidity: function checkEligible() view returns(bool) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) CheckEligible() (bool, error) { + return _KeeperConsumerBenchmark.Contract.CheckEligible(&_KeeperConsumerBenchmark.CallOpts) +} + +// CheckGasToBurn is a free data retrieval call binding the contract method 0x2ff3617d. +// +// Solidity: function checkGasToBurn() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) CheckGasToBurn(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "checkGasToBurn") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CheckGasToBurn is a free data retrieval call binding the contract method 0x2ff3617d. +// +// Solidity: function checkGasToBurn() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) CheckGasToBurn() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.CheckGasToBurn(&_KeeperConsumerBenchmark.CallOpts) +} + +// CheckGasToBurn is a free data retrieval call binding the contract method 0x2ff3617d. +// +// Solidity: function checkGasToBurn() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) CheckGasToBurn() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.CheckGasToBurn(&_KeeperConsumerBenchmark.CallOpts) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) CheckUpkeep(opts *bind.CallOpts, data []byte) (bool, []byte, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "checkUpkeep", data) + + if err != nil { + return *new(bool), *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new([]byte)).(*[]byte) + + return out0, out1, err + +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) CheckUpkeep(data []byte) (bool, []byte, error) { + return _KeeperConsumerBenchmark.Contract.CheckUpkeep(&_KeeperConsumerBenchmark.CallOpts, data) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) CheckUpkeep(data []byte) (bool, []byte, error) { + return _KeeperConsumerBenchmark.Contract.CheckUpkeep(&_KeeperConsumerBenchmark.CallOpts, data) +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) Count(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "count") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) Count() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.Count(&_KeeperConsumerBenchmark.CallOpts) +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) Count() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.Count(&_KeeperConsumerBenchmark.CallOpts) +} + +// DummyMap is a free data retrieval call binding the contract method 0x7145f11b. +// +// Solidity: function dummyMap(bytes32 ) view returns(bool) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) DummyMap(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "dummyMap", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// DummyMap is a free data retrieval call binding the contract method 0x7145f11b. +// +// Solidity: function dummyMap(bytes32 ) view returns(bool) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) DummyMap(arg0 [32]byte) (bool, error) { + return _KeeperConsumerBenchmark.Contract.DummyMap(&_KeeperConsumerBenchmark.CallOpts, arg0) +} + +// DummyMap is a free data retrieval call binding the contract method 0x7145f11b. +// +// Solidity: function dummyMap(bytes32 ) view returns(bool) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) DummyMap(arg0 [32]byte) (bool, error) { + return _KeeperConsumerBenchmark.Contract.DummyMap(&_KeeperConsumerBenchmark.CallOpts, arg0) +} + +// FirstEligibleBlock is a free data retrieval call binding the contract method 0xc4da244d. +// +// Solidity: function firstEligibleBlock() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) FirstEligibleBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "firstEligibleBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FirstEligibleBlock is a free data retrieval call binding the contract method 0xc4da244d. +// +// Solidity: function firstEligibleBlock() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) FirstEligibleBlock() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.FirstEligibleBlock(&_KeeperConsumerBenchmark.CallOpts) +} + +// FirstEligibleBlock is a free data retrieval call binding the contract method 0xc4da244d. +// +// Solidity: function firstEligibleBlock() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) FirstEligibleBlock() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.FirstEligibleBlock(&_KeeperConsumerBenchmark.CallOpts) +} + +// FirstEligibleBuffer is a free data retrieval call binding the contract method 0x8dba0fba. +// +// Solidity: function firstEligibleBuffer() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) FirstEligibleBuffer(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "firstEligibleBuffer") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FirstEligibleBuffer is a free data retrieval call binding the contract method 0x8dba0fba. +// +// Solidity: function firstEligibleBuffer() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) FirstEligibleBuffer() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.FirstEligibleBuffer(&_KeeperConsumerBenchmark.CallOpts) +} + +// FirstEligibleBuffer is a free data retrieval call binding the contract method 0x8dba0fba. +// +// Solidity: function firstEligibleBuffer() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) FirstEligibleBuffer() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.FirstEligibleBuffer(&_KeeperConsumerBenchmark.CallOpts) +} + +// GetCountPerforms is a free data retrieval call binding the contract method 0xe303666f. +// +// Solidity: function getCountPerforms() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) GetCountPerforms(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "getCountPerforms") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCountPerforms is a free data retrieval call binding the contract method 0xe303666f. +// +// Solidity: function getCountPerforms() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) GetCountPerforms() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.GetCountPerforms(&_KeeperConsumerBenchmark.CallOpts) +} + +// GetCountPerforms is a free data retrieval call binding the contract method 0xe303666f. +// +// Solidity: function getCountPerforms() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) GetCountPerforms() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.GetCountPerforms(&_KeeperConsumerBenchmark.CallOpts) +} + +// InitialCall is a free data retrieval call binding the contract method 0x926f086e. +// +// Solidity: function initialCall() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) InitialCall(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "initialCall") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// InitialCall is a free data retrieval call binding the contract method 0x926f086e. +// +// Solidity: function initialCall() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) InitialCall() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.InitialCall(&_KeeperConsumerBenchmark.CallOpts) +} + +// InitialCall is a free data retrieval call binding the contract method 0x926f086e. +// +// Solidity: function initialCall() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) InitialCall() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.InitialCall(&_KeeperConsumerBenchmark.CallOpts) +} + +// NextEligible is a free data retrieval call binding the contract method 0x523d9b8a. +// +// Solidity: function nextEligible() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) NextEligible(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "nextEligible") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NextEligible is a free data retrieval call binding the contract method 0x523d9b8a. +// +// Solidity: function nextEligible() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) NextEligible() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.NextEligible(&_KeeperConsumerBenchmark.CallOpts) +} + +// NextEligible is a free data retrieval call binding the contract method 0x523d9b8a. +// +// Solidity: function nextEligible() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) NextEligible() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.NextEligible(&_KeeperConsumerBenchmark.CallOpts) +} + +// PerformGasToBurn is a free data retrieval call binding the contract method 0xb30566b4. +// +// Solidity: function performGasToBurn() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) PerformGasToBurn(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "performGasToBurn") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PerformGasToBurn is a free data retrieval call binding the contract method 0xb30566b4. +// +// Solidity: function performGasToBurn() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) PerformGasToBurn() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.PerformGasToBurn(&_KeeperConsumerBenchmark.CallOpts) +} + +// PerformGasToBurn is a free data retrieval call binding the contract method 0xb30566b4. +// +// Solidity: function performGasToBurn() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) PerformGasToBurn() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.PerformGasToBurn(&_KeeperConsumerBenchmark.CallOpts) +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCaller) TestRange(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerBenchmark.contract.Call(opts, &out, "testRange") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) TestRange() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.TestRange(&_KeeperConsumerBenchmark.CallOpts) +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkCallerSession) TestRange() (*big.Int, error) { + return _KeeperConsumerBenchmark.Contract.TestRange(&_KeeperConsumerBenchmark.CallOpts) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes ) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactor) PerformUpkeep(opts *bind.TransactOpts, arg0 []byte) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.contract.Transact(opts, "performUpkeep", arg0) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes ) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) PerformUpkeep(arg0 []byte) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.PerformUpkeep(&_KeeperConsumerBenchmark.TransactOpts, arg0) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes ) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactorSession) PerformUpkeep(arg0 []byte) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.PerformUpkeep(&_KeeperConsumerBenchmark.TransactOpts, arg0) +} + +// Reset is a paid mutator transaction binding the contract method 0xd826f88f. +// +// Solidity: function reset() returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactor) Reset(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.contract.Transact(opts, "reset") +} + +// Reset is a paid mutator transaction binding the contract method 0xd826f88f. +// +// Solidity: function reset() returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) Reset() (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.Reset(&_KeeperConsumerBenchmark.TransactOpts) +} + +// Reset is a paid mutator transaction binding the contract method 0xd826f88f. +// +// Solidity: function reset() returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactorSession) Reset() (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.Reset(&_KeeperConsumerBenchmark.TransactOpts) +} + +// SetCheckGasToBurn is a paid mutator transaction binding the contract method 0x13bda75b. +// +// Solidity: function setCheckGasToBurn(uint256 value) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactor) SetCheckGasToBurn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.contract.Transact(opts, "setCheckGasToBurn", value) +} + +// SetCheckGasToBurn is a paid mutator transaction binding the contract method 0x13bda75b. +// +// Solidity: function setCheckGasToBurn(uint256 value) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) SetCheckGasToBurn(value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.SetCheckGasToBurn(&_KeeperConsumerBenchmark.TransactOpts, value) +} + +// SetCheckGasToBurn is a paid mutator transaction binding the contract method 0x13bda75b. +// +// Solidity: function setCheckGasToBurn(uint256 value) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactorSession) SetCheckGasToBurn(value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.SetCheckGasToBurn(&_KeeperConsumerBenchmark.TransactOpts, value) +} + +// SetFirstEligibleBuffer is a paid mutator transaction binding the contract method 0xad0d5c4d. +// +// Solidity: function setFirstEligibleBuffer(uint256 _firstEligibleBuffer) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactor) SetFirstEligibleBuffer(opts *bind.TransactOpts, _firstEligibleBuffer *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.contract.Transact(opts, "setFirstEligibleBuffer", _firstEligibleBuffer) +} + +// SetFirstEligibleBuffer is a paid mutator transaction binding the contract method 0xad0d5c4d. +// +// Solidity: function setFirstEligibleBuffer(uint256 _firstEligibleBuffer) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) SetFirstEligibleBuffer(_firstEligibleBuffer *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.SetFirstEligibleBuffer(&_KeeperConsumerBenchmark.TransactOpts, _firstEligibleBuffer) +} + +// SetFirstEligibleBuffer is a paid mutator transaction binding the contract method 0xad0d5c4d. +// +// Solidity: function setFirstEligibleBuffer(uint256 _firstEligibleBuffer) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactorSession) SetFirstEligibleBuffer(_firstEligibleBuffer *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.SetFirstEligibleBuffer(&_KeeperConsumerBenchmark.TransactOpts, _firstEligibleBuffer) +} + +// SetPerformGasToBurn is a paid mutator transaction binding the contract method 0x2555d2cf. +// +// Solidity: function setPerformGasToBurn(uint256 value) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactor) SetPerformGasToBurn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.contract.Transact(opts, "setPerformGasToBurn", value) +} + +// SetPerformGasToBurn is a paid mutator transaction binding the contract method 0x2555d2cf. +// +// Solidity: function setPerformGasToBurn(uint256 value) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) SetPerformGasToBurn(value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.SetPerformGasToBurn(&_KeeperConsumerBenchmark.TransactOpts, value) +} + +// SetPerformGasToBurn is a paid mutator transaction binding the contract method 0x2555d2cf. +// +// Solidity: function setPerformGasToBurn(uint256 value) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactorSession) SetPerformGasToBurn(value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.SetPerformGasToBurn(&_KeeperConsumerBenchmark.TransactOpts, value) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactor) SetSpread(opts *bind.TransactOpts, _newTestRange *big.Int, _newAverageEligibilityCadence *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.contract.Transact(opts, "setSpread", _newTestRange, _newAverageEligibilityCadence) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkSession) SetSpread(_newTestRange *big.Int, _newAverageEligibilityCadence *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.SetSpread(&_KeeperConsumerBenchmark.TransactOpts, _newTestRange, _newAverageEligibilityCadence) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) returns() +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkTransactorSession) SetSpread(_newTestRange *big.Int, _newAverageEligibilityCadence *big.Int) (*types.Transaction, error) { + return _KeeperConsumerBenchmark.Contract.SetSpread(&_KeeperConsumerBenchmark.TransactOpts, _newTestRange, _newAverageEligibilityCadence) +} + +// KeeperConsumerBenchmarkPerformingUpkeepIterator is returned from FilterPerformingUpkeep and is used to iterate over the raw logs and unpacked data for PerformingUpkeep events raised by the KeeperConsumerBenchmark contract. +type KeeperConsumerBenchmarkPerformingUpkeepIterator struct { + Event *KeeperConsumerBenchmarkPerformingUpkeep // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *KeeperConsumerBenchmarkPerformingUpkeepIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperConsumerBenchmarkPerformingUpkeep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(KeeperConsumerBenchmarkPerformingUpkeep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *KeeperConsumerBenchmarkPerformingUpkeepIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *KeeperConsumerBenchmarkPerformingUpkeepIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// KeeperConsumerBenchmarkPerformingUpkeep represents a PerformingUpkeep event raised by the KeeperConsumerBenchmark contract. +type KeeperConsumerBenchmarkPerformingUpkeep struct { + From common.Address + InitialCall *big.Int + NextEligible *big.Int + BlockNumber *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPerformingUpkeep is a free log retrieval operation binding the contract event 0x1313be6f6d6263f115d3e986c9622f868fcda43c8b8e7ef193e7a53d75a4d27c. +// +// Solidity: event PerformingUpkeep(address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkFilterer) FilterPerformingUpkeep(opts *bind.FilterOpts) (*KeeperConsumerBenchmarkPerformingUpkeepIterator, error) { + + logs, sub, err := _KeeperConsumerBenchmark.contract.FilterLogs(opts, "PerformingUpkeep") + if err != nil { + return nil, err + } + return &KeeperConsumerBenchmarkPerformingUpkeepIterator{contract: _KeeperConsumerBenchmark.contract, event: "PerformingUpkeep", logs: logs, sub: sub}, nil +} + +// WatchPerformingUpkeep is a free log subscription operation binding the contract event 0x1313be6f6d6263f115d3e986c9622f868fcda43c8b8e7ef193e7a53d75a4d27c. +// +// Solidity: event PerformingUpkeep(address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkFilterer) WatchPerformingUpkeep(opts *bind.WatchOpts, sink chan<- *KeeperConsumerBenchmarkPerformingUpkeep) (event.Subscription, error) { + + logs, sub, err := _KeeperConsumerBenchmark.contract.WatchLogs(opts, "PerformingUpkeep") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(KeeperConsumerBenchmarkPerformingUpkeep) + if err := _KeeperConsumerBenchmark.contract.UnpackLog(event, "PerformingUpkeep", 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 +} + +// ParsePerformingUpkeep is a log parse operation binding the contract event 0x1313be6f6d6263f115d3e986c9622f868fcda43c8b8e7ef193e7a53d75a4d27c. +// +// Solidity: event PerformingUpkeep(address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber) +func (_KeeperConsumerBenchmark *KeeperConsumerBenchmarkFilterer) ParsePerformingUpkeep(log types.Log) (*KeeperConsumerBenchmarkPerformingUpkeep, error) { + event := new(KeeperConsumerBenchmarkPerformingUpkeep) + if err := _KeeperConsumerBenchmark.contract.UnpackLog(event, "PerformingUpkeep", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/integration-tests/contracts/ethereum/KeeperConsumerPerformance.go b/integration-tests/contracts/ethereum/KeeperConsumerPerformance.go new file mode 100644 index 00000000000..23cbef7c2a3 --- /dev/null +++ b/integration-tests/contracts/ethereum/KeeperConsumerPerformance.go @@ -0,0 +1,787 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ethereum + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// KeeperConsumerPerformanceMetaData contains all meta data concerning the KeeperConsumerPerformance contract. +var KeeperConsumerPerformanceMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_testRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_averageEligibilityCadence\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_checkGasToBurn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_performGasToBurn\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"eligible\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialCall\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nextEligible\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"PerformingUpkeep\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"averageEligibilityCadence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkEligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkGasToBurn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dummyMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCountPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialCall\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextEligible\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"performGasToBurn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setCheckGasToBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setPerformGasToBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newTestRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_newAverageEligibilityCadence\",\"type\":\"uint256\"}],\"name\":\"setSpread\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"testRange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x6080604052600080556000600155600060075534801561001e57600080fd5b506040516105f03803806105f08339818101604052608081101561004157600080fd5b5080516020820151604083015160609093015160029290925560035560049190915560055561057b806100756000396000f3fe608060405234801561001057600080fd5b50600436106100e05760003560e01c80637145f11b116100875780637145f11b146102b05780637f407edf146102e1578063926f086e14610304578063a9a4c57c1461030c578063b30566b414610314578063c228a98e1461031c578063d826f88f14610324578063e303666f1461032c576100e0565b806306661abd146100e557806313bda75b146100ff5780632555d2cf1461011e5780632ff3617d1461013b5780634585e33b14610143578063523d9b8a146101b15780636250a13a146101b95780636e04ff0d146101c1575b600080fd5b6100ed610334565b60408051918252519081900360200190f35b61011c6004803603602081101561011557600080fd5b503561033a565b005b61011c6004803603602081101561013457600080fd5b503561033f565b6100ed610344565b61011c6004803603602081101561015957600080fd5b810190602081018135600160201b81111561017357600080fd5b82018360208201111561018557600080fd5b803590602001918460018302840111600160201b831117156101a657600080fd5b50909250905061034a565b6100ed610425565b6100ed61042b565b61022f600480360360208110156101d757600080fd5b810190602081018135600160201b8111156101f157600080fd5b82018360208201111561020357600080fd5b803590602001918460018302840111600160201b8311171561022457600080fd5b509092509050610431565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561027457818101518382015260200161025c565b50505050905090810190601f1680156102a15780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6102cd600480360360208110156102c657600080fd5b503561049f565b604080519115158252519081900360200190f35b61011c600480360360408110156102f757600080fd5b50803590602001356104b4565b6100ed6104bf565b6100ed6104c5565b6100ed6104cb565b6102cd6104d1565b61011c6104e0565b6100ed6104ea565b60075481565b600455565b600555565b60045481565b60005a905060006103596104f0565b60005460015460408051841515815232602082015280820193909352606083019190915243608083018190529051929350917fbd6b6608a51477954e8b498c633bda87e5cd555e06ead50486398d9e3b9cebc09181900360a00190a1816103bf57600080fd5b6000546103cc5760008190555b6003546002026103da610514565b816103e157fe5b068101600190810181556007805490910190555b6005545a8403101561041e5743406000908152600660205260409020805460ff191690556103f5565b5050505050565b60015481565b60025481565b6000606060005a905060005b6004545a8303101561046d578080156104665750434060009081526006602052604090205460ff165b905061043d565b6104756104f0565b60408051921515602080850191909152815180850390910181529281019052969095509350505050565b60066020526000908152604090205460ff1681565b600291909155600355565b60005481565b60035481565b60055481565b60006104db6104f0565b905090565b6000808055600755565b60075490565b6000805415806104db575060025460005443031080156104db575050600154431190565b604080516000194301406020808301919091523082840152825180830384018152606090920190925280519101209056fea2646970667358221220e233009b46ad9b01fb692930a06d8a04abee3578625455b4761ede5e8ae7489e64736f6c63430007060033", +} + +// KeeperConsumerPerformanceABI is the input ABI used to generate the binding from. +// Deprecated: Use KeeperConsumerPerformanceMetaData.ABI instead. +var KeeperConsumerPerformanceABI = KeeperConsumerPerformanceMetaData.ABI + +// KeeperConsumerPerformanceBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use KeeperConsumerPerformanceMetaData.Bin instead. +var KeeperConsumerPerformanceBin = KeeperConsumerPerformanceMetaData.Bin + +// DeployKeeperConsumerPerformance deploys a new Ethereum contract, binding an instance of KeeperConsumerPerformance to it. +func DeployKeeperConsumerPerformance(auth *bind.TransactOpts, backend bind.ContractBackend, _testRange *big.Int, _averageEligibilityCadence *big.Int, _checkGasToBurn *big.Int, _performGasToBurn *big.Int) (common.Address, *types.Transaction, *KeeperConsumerPerformance, error) { + parsed, err := KeeperConsumerPerformanceMetaData.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(KeeperConsumerPerformanceBin), backend, _testRange, _averageEligibilityCadence, _checkGasToBurn, _performGasToBurn) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &KeeperConsumerPerformance{KeeperConsumerPerformanceCaller: KeeperConsumerPerformanceCaller{contract: contract}, KeeperConsumerPerformanceTransactor: KeeperConsumerPerformanceTransactor{contract: contract}, KeeperConsumerPerformanceFilterer: KeeperConsumerPerformanceFilterer{contract: contract}}, nil +} + +// KeeperConsumerPerformance is an auto generated Go binding around an Ethereum contract. +type KeeperConsumerPerformance struct { + KeeperConsumerPerformanceCaller // Read-only binding to the contract + KeeperConsumerPerformanceTransactor // Write-only binding to the contract + KeeperConsumerPerformanceFilterer // Log filterer for contract events +} + +// KeeperConsumerPerformanceCaller is an auto generated read-only Go binding around an Ethereum contract. +type KeeperConsumerPerformanceCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// KeeperConsumerPerformanceTransactor is an auto generated write-only Go binding around an Ethereum contract. +type KeeperConsumerPerformanceTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// KeeperConsumerPerformanceFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type KeeperConsumerPerformanceFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// KeeperConsumerPerformanceSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type KeeperConsumerPerformanceSession struct { + Contract *KeeperConsumerPerformance // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// KeeperConsumerPerformanceCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type KeeperConsumerPerformanceCallerSession struct { + Contract *KeeperConsumerPerformanceCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// KeeperConsumerPerformanceTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type KeeperConsumerPerformanceTransactorSession struct { + Contract *KeeperConsumerPerformanceTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// KeeperConsumerPerformanceRaw is an auto generated low-level Go binding around an Ethereum contract. +type KeeperConsumerPerformanceRaw struct { + Contract *KeeperConsumerPerformance // Generic contract binding to access the raw methods on +} + +// KeeperConsumerPerformanceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type KeeperConsumerPerformanceCallerRaw struct { + Contract *KeeperConsumerPerformanceCaller // Generic read-only contract binding to access the raw methods on +} + +// KeeperConsumerPerformanceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type KeeperConsumerPerformanceTransactorRaw struct { + Contract *KeeperConsumerPerformanceTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewKeeperConsumerPerformance creates a new instance of KeeperConsumerPerformance, bound to a specific deployed contract. +func NewKeeperConsumerPerformance(address common.Address, backend bind.ContractBackend) (*KeeperConsumerPerformance, error) { + contract, err := bindKeeperConsumerPerformance(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &KeeperConsumerPerformance{KeeperConsumerPerformanceCaller: KeeperConsumerPerformanceCaller{contract: contract}, KeeperConsumerPerformanceTransactor: KeeperConsumerPerformanceTransactor{contract: contract}, KeeperConsumerPerformanceFilterer: KeeperConsumerPerformanceFilterer{contract: contract}}, nil +} + +// NewKeeperConsumerPerformanceCaller creates a new read-only instance of KeeperConsumerPerformance, bound to a specific deployed contract. +func NewKeeperConsumerPerformanceCaller(address common.Address, caller bind.ContractCaller) (*KeeperConsumerPerformanceCaller, error) { + contract, err := bindKeeperConsumerPerformance(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &KeeperConsumerPerformanceCaller{contract: contract}, nil +} + +// NewKeeperConsumerPerformanceTransactor creates a new write-only instance of KeeperConsumerPerformance, bound to a specific deployed contract. +func NewKeeperConsumerPerformanceTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperConsumerPerformanceTransactor, error) { + contract, err := bindKeeperConsumerPerformance(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &KeeperConsumerPerformanceTransactor{contract: contract}, nil +} + +// NewKeeperConsumerPerformanceFilterer creates a new log filterer instance of KeeperConsumerPerformance, bound to a specific deployed contract. +func NewKeeperConsumerPerformanceFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperConsumerPerformanceFilterer, error) { + contract, err := bindKeeperConsumerPerformance(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &KeeperConsumerPerformanceFilterer{contract: contract}, nil +} + +// bindKeeperConsumerPerformance binds a generic wrapper to an already deployed contract. +func bindKeeperConsumerPerformance(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(KeeperConsumerPerformanceABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperConsumerPerformance.Contract.KeeperConsumerPerformanceCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.KeeperConsumerPerformanceTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.KeeperConsumerPerformanceTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _KeeperConsumerPerformance.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.contract.Transact(opts, method, params...) +} + +// AverageEligibilityCadence is a free data retrieval call binding the contract method 0xa9a4c57c. +// +// Solidity: function averageEligibilityCadence() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) AverageEligibilityCadence(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "averageEligibilityCadence") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AverageEligibilityCadence is a free data retrieval call binding the contract method 0xa9a4c57c. +// +// Solidity: function averageEligibilityCadence() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) AverageEligibilityCadence() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.AverageEligibilityCadence(&_KeeperConsumerPerformance.CallOpts) +} + +// AverageEligibilityCadence is a free data retrieval call binding the contract method 0xa9a4c57c. +// +// Solidity: function averageEligibilityCadence() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) AverageEligibilityCadence() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.AverageEligibilityCadence(&_KeeperConsumerPerformance.CallOpts) +} + +// CheckEligible is a free data retrieval call binding the contract method 0xc228a98e. +// +// Solidity: function checkEligible() view returns(bool) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) CheckEligible(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "checkEligible") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// CheckEligible is a free data retrieval call binding the contract method 0xc228a98e. +// +// Solidity: function checkEligible() view returns(bool) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) CheckEligible() (bool, error) { + return _KeeperConsumerPerformance.Contract.CheckEligible(&_KeeperConsumerPerformance.CallOpts) +} + +// CheckEligible is a free data retrieval call binding the contract method 0xc228a98e. +// +// Solidity: function checkEligible() view returns(bool) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) CheckEligible() (bool, error) { + return _KeeperConsumerPerformance.Contract.CheckEligible(&_KeeperConsumerPerformance.CallOpts) +} + +// CheckGasToBurn is a free data retrieval call binding the contract method 0x2ff3617d. +// +// Solidity: function checkGasToBurn() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) CheckGasToBurn(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "checkGasToBurn") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CheckGasToBurn is a free data retrieval call binding the contract method 0x2ff3617d. +// +// Solidity: function checkGasToBurn() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) CheckGasToBurn() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.CheckGasToBurn(&_KeeperConsumerPerformance.CallOpts) +} + +// CheckGasToBurn is a free data retrieval call binding the contract method 0x2ff3617d. +// +// Solidity: function checkGasToBurn() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) CheckGasToBurn() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.CheckGasToBurn(&_KeeperConsumerPerformance.CallOpts) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) CheckUpkeep(opts *bind.CallOpts, data []byte) (bool, []byte, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "checkUpkeep", data) + + if err != nil { + return *new(bool), *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new([]byte)).(*[]byte) + + return out0, out1, err + +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) CheckUpkeep(data []byte) (bool, []byte, error) { + return _KeeperConsumerPerformance.Contract.CheckUpkeep(&_KeeperConsumerPerformance.CallOpts, data) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) CheckUpkeep(data []byte) (bool, []byte, error) { + return _KeeperConsumerPerformance.Contract.CheckUpkeep(&_KeeperConsumerPerformance.CallOpts, data) +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) Count(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "count") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) Count() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.Count(&_KeeperConsumerPerformance.CallOpts) +} + +// Count is a free data retrieval call binding the contract method 0x06661abd. +// +// Solidity: function count() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) Count() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.Count(&_KeeperConsumerPerformance.CallOpts) +} + +// DummyMap is a free data retrieval call binding the contract method 0x7145f11b. +// +// Solidity: function dummyMap(bytes32 ) view returns(bool) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) DummyMap(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "dummyMap", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// DummyMap is a free data retrieval call binding the contract method 0x7145f11b. +// +// Solidity: function dummyMap(bytes32 ) view returns(bool) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) DummyMap(arg0 [32]byte) (bool, error) { + return _KeeperConsumerPerformance.Contract.DummyMap(&_KeeperConsumerPerformance.CallOpts, arg0) +} + +// DummyMap is a free data retrieval call binding the contract method 0x7145f11b. +// +// Solidity: function dummyMap(bytes32 ) view returns(bool) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) DummyMap(arg0 [32]byte) (bool, error) { + return _KeeperConsumerPerformance.Contract.DummyMap(&_KeeperConsumerPerformance.CallOpts, arg0) +} + +// GetCountPerforms is a free data retrieval call binding the contract method 0xe303666f. +// +// Solidity: function getCountPerforms() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) GetCountPerforms(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "getCountPerforms") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCountPerforms is a free data retrieval call binding the contract method 0xe303666f. +// +// Solidity: function getCountPerforms() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) GetCountPerforms() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.GetCountPerforms(&_KeeperConsumerPerformance.CallOpts) +} + +// GetCountPerforms is a free data retrieval call binding the contract method 0xe303666f. +// +// Solidity: function getCountPerforms() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) GetCountPerforms() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.GetCountPerforms(&_KeeperConsumerPerformance.CallOpts) +} + +// InitialCall is a free data retrieval call binding the contract method 0x926f086e. +// +// Solidity: function initialCall() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) InitialCall(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "initialCall") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// InitialCall is a free data retrieval call binding the contract method 0x926f086e. +// +// Solidity: function initialCall() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) InitialCall() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.InitialCall(&_KeeperConsumerPerformance.CallOpts) +} + +// InitialCall is a free data retrieval call binding the contract method 0x926f086e. +// +// Solidity: function initialCall() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) InitialCall() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.InitialCall(&_KeeperConsumerPerformance.CallOpts) +} + +// NextEligible is a free data retrieval call binding the contract method 0x523d9b8a. +// +// Solidity: function nextEligible() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) NextEligible(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "nextEligible") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NextEligible is a free data retrieval call binding the contract method 0x523d9b8a. +// +// Solidity: function nextEligible() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) NextEligible() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.NextEligible(&_KeeperConsumerPerformance.CallOpts) +} + +// NextEligible is a free data retrieval call binding the contract method 0x523d9b8a. +// +// Solidity: function nextEligible() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) NextEligible() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.NextEligible(&_KeeperConsumerPerformance.CallOpts) +} + +// PerformGasToBurn is a free data retrieval call binding the contract method 0xb30566b4. +// +// Solidity: function performGasToBurn() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) PerformGasToBurn(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "performGasToBurn") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PerformGasToBurn is a free data retrieval call binding the contract method 0xb30566b4. +// +// Solidity: function performGasToBurn() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) PerformGasToBurn() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.PerformGasToBurn(&_KeeperConsumerPerformance.CallOpts) +} + +// PerformGasToBurn is a free data retrieval call binding the contract method 0xb30566b4. +// +// Solidity: function performGasToBurn() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) PerformGasToBurn() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.PerformGasToBurn(&_KeeperConsumerPerformance.CallOpts) +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCaller) TestRange(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _KeeperConsumerPerformance.contract.Call(opts, &out, "testRange") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) TestRange() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.TestRange(&_KeeperConsumerPerformance.CallOpts) +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceCallerSession) TestRange() (*big.Int, error) { + return _KeeperConsumerPerformance.Contract.TestRange(&_KeeperConsumerPerformance.CallOpts) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes data) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactor) PerformUpkeep(opts *bind.TransactOpts, data []byte) (*types.Transaction, error) { + return _KeeperConsumerPerformance.contract.Transact(opts, "performUpkeep", data) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes data) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) PerformUpkeep(data []byte) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.PerformUpkeep(&_KeeperConsumerPerformance.TransactOpts, data) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes data) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactorSession) PerformUpkeep(data []byte) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.PerformUpkeep(&_KeeperConsumerPerformance.TransactOpts, data) +} + +// Reset is a paid mutator transaction binding the contract method 0xd826f88f. +// +// Solidity: function reset() returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactor) Reset(opts *bind.TransactOpts) (*types.Transaction, error) { + return _KeeperConsumerPerformance.contract.Transact(opts, "reset") +} + +// Reset is a paid mutator transaction binding the contract method 0xd826f88f. +// +// Solidity: function reset() returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) Reset() (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.Reset(&_KeeperConsumerPerformance.TransactOpts) +} + +// Reset is a paid mutator transaction binding the contract method 0xd826f88f. +// +// Solidity: function reset() returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactorSession) Reset() (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.Reset(&_KeeperConsumerPerformance.TransactOpts) +} + +// SetCheckGasToBurn is a paid mutator transaction binding the contract method 0x13bda75b. +// +// Solidity: function setCheckGasToBurn(uint256 value) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactor) SetCheckGasToBurn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerPerformance.contract.Transact(opts, "setCheckGasToBurn", value) +} + +// SetCheckGasToBurn is a paid mutator transaction binding the contract method 0x13bda75b. +// +// Solidity: function setCheckGasToBurn(uint256 value) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) SetCheckGasToBurn(value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.SetCheckGasToBurn(&_KeeperConsumerPerformance.TransactOpts, value) +} + +// SetCheckGasToBurn is a paid mutator transaction binding the contract method 0x13bda75b. +// +// Solidity: function setCheckGasToBurn(uint256 value) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactorSession) SetCheckGasToBurn(value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.SetCheckGasToBurn(&_KeeperConsumerPerformance.TransactOpts, value) +} + +// SetPerformGasToBurn is a paid mutator transaction binding the contract method 0x2555d2cf. +// +// Solidity: function setPerformGasToBurn(uint256 value) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactor) SetPerformGasToBurn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerPerformance.contract.Transact(opts, "setPerformGasToBurn", value) +} + +// SetPerformGasToBurn is a paid mutator transaction binding the contract method 0x2555d2cf. +// +// Solidity: function setPerformGasToBurn(uint256 value) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) SetPerformGasToBurn(value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.SetPerformGasToBurn(&_KeeperConsumerPerformance.TransactOpts, value) +} + +// SetPerformGasToBurn is a paid mutator transaction binding the contract method 0x2555d2cf. +// +// Solidity: function setPerformGasToBurn(uint256 value) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactorSession) SetPerformGasToBurn(value *big.Int) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.SetPerformGasToBurn(&_KeeperConsumerPerformance.TransactOpts, value) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactor) SetSpread(opts *bind.TransactOpts, _newTestRange *big.Int, _newAverageEligibilityCadence *big.Int) (*types.Transaction, error) { + return _KeeperConsumerPerformance.contract.Transact(opts, "setSpread", _newTestRange, _newAverageEligibilityCadence) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceSession) SetSpread(_newTestRange *big.Int, _newAverageEligibilityCadence *big.Int) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.SetSpread(&_KeeperConsumerPerformance.TransactOpts, _newTestRange, _newAverageEligibilityCadence) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) returns() +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceTransactorSession) SetSpread(_newTestRange *big.Int, _newAverageEligibilityCadence *big.Int) (*types.Transaction, error) { + return _KeeperConsumerPerformance.Contract.SetSpread(&_KeeperConsumerPerformance.TransactOpts, _newTestRange, _newAverageEligibilityCadence) +} + +// KeeperConsumerPerformancePerformingUpkeepIterator is returned from FilterPerformingUpkeep and is used to iterate over the raw logs and unpacked data for PerformingUpkeep events raised by the KeeperConsumerPerformance contract. +type KeeperConsumerPerformancePerformingUpkeepIterator struct { + Event *KeeperConsumerPerformancePerformingUpkeep // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *KeeperConsumerPerformancePerformingUpkeepIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(KeeperConsumerPerformancePerformingUpkeep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(KeeperConsumerPerformancePerformingUpkeep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *KeeperConsumerPerformancePerformingUpkeepIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *KeeperConsumerPerformancePerformingUpkeepIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// KeeperConsumerPerformancePerformingUpkeep represents a PerformingUpkeep event raised by the KeeperConsumerPerformance contract. +type KeeperConsumerPerformancePerformingUpkeep struct { + Eligible bool + From common.Address + InitialCall *big.Int + NextEligible *big.Int + BlockNumber *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPerformingUpkeep is a free log retrieval operation binding the contract event 0xbd6b6608a51477954e8b498c633bda87e5cd555e06ead50486398d9e3b9cebc0. +// +// Solidity: event PerformingUpkeep(bool eligible, address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceFilterer) FilterPerformingUpkeep(opts *bind.FilterOpts) (*KeeperConsumerPerformancePerformingUpkeepIterator, error) { + + logs, sub, err := _KeeperConsumerPerformance.contract.FilterLogs(opts, "PerformingUpkeep") + if err != nil { + return nil, err + } + return &KeeperConsumerPerformancePerformingUpkeepIterator{contract: _KeeperConsumerPerformance.contract, event: "PerformingUpkeep", logs: logs, sub: sub}, nil +} + +// WatchPerformingUpkeep is a free log subscription operation binding the contract event 0xbd6b6608a51477954e8b498c633bda87e5cd555e06ead50486398d9e3b9cebc0. +// +// Solidity: event PerformingUpkeep(bool eligible, address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceFilterer) WatchPerformingUpkeep(opts *bind.WatchOpts, sink chan<- *KeeperConsumerPerformancePerformingUpkeep) (event.Subscription, error) { + + logs, sub, err := _KeeperConsumerPerformance.contract.WatchLogs(opts, "PerformingUpkeep") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(KeeperConsumerPerformancePerformingUpkeep) + if err := _KeeperConsumerPerformance.contract.UnpackLog(event, "PerformingUpkeep", 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 +} + +// ParsePerformingUpkeep is a log parse operation binding the contract event 0xbd6b6608a51477954e8b498c633bda87e5cd555e06ead50486398d9e3b9cebc0. +// +// Solidity: event PerformingUpkeep(bool eligible, address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber) +func (_KeeperConsumerPerformance *KeeperConsumerPerformanceFilterer) ParsePerformingUpkeep(log types.Log) (*KeeperConsumerPerformancePerformingUpkeep, error) { + event := new(KeeperConsumerPerformancePerformingUpkeep) + if err := _KeeperConsumerPerformance.contract.UnpackLog(event, "PerformingUpkeep", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/integration-tests/contracts/ethereum/KeeperRegistryVersions.go b/integration-tests/contracts/ethereum/KeeperRegistryVersions.go new file mode 100644 index 00000000000..9ce38e0d82b --- /dev/null +++ b/integration-tests/contracts/ethereum/KeeperRegistryVersions.go @@ -0,0 +1,20 @@ +package ethereum + +import ( + "github.com/ethereum/go-ethereum/common" +) + +// AbigenLog is an interface for abigen generated log topics +type AbigenLog interface { + Topic() common.Hash +} + +type KeeperRegistryVersion int32 + +const ( + RegistryVersion_1_0 KeeperRegistryVersion = iota + RegistryVersion_1_1 + RegistryVersion_1_2 + RegistryVersion_1_3 + RegistryVersion_2_0 +) diff --git a/integration-tests/contracts/ethereum/PerformDataChecker.go b/integration-tests/contracts/ethereum/PerformDataChecker.go new file mode 100644 index 00000000000..99c8d1380cd --- /dev/null +++ b/integration-tests/contracts/ethereum/PerformDataChecker.go @@ -0,0 +1,292 @@ +package ethereum + +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +import ( + "errors" + "math/big" + "strings" + + "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 +) + +var PerformDataCheckerMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"expectedData\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_expectedData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"expectedData\",\"type\":\"bytes\"}],\"name\":\"setExpectedData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506040516107d33803806107d383398101604081905261002f916100e2565b8051610042906001906020840190610049565b5050610202565b828054610055906101b1565b90600052602060002090601f01602090048101928261007757600085556100bd565b82601f1061009057805160ff19168380011785556100bd565b828001600101855582156100bd579182015b828111156100bd5782518255916020019190600101906100a2565b506100c99291506100cd565b5090565b5b808211156100c957600081556001016100ce565b600060208083850312156100f557600080fd5b82516001600160401b038082111561010c57600080fd5b818501915085601f83011261012057600080fd5b815181811115610132576101326101ec565b604051601f8201601f19908116603f0116810190838211818310171561015a5761015a6101ec565b81604052828152888684870101111561017257600080fd5b600093505b828410156101945784840186015181850187015292850192610177565b828411156101a55760008684830101525b98975050505050505050565b600181811c908216806101c557607f821691505b602082108114156101e657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6105c2806102116000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806361bc221a1161005057806361bc221a146100945780636e04ff0d146100b05780638d1a93c2146100d157600080fd5b80632aa0f7951461006c5780634585e33b14610081575b600080fd5b61007f61007a366004610304565b6100e6565b005b61007f61008f366004610304565b6100f7565b61009d60005481565b6040519081526020015b60405180910390f35b6100c36100be366004610304565b610145565b6040516100a79291906104c4565b6100d96101bf565b6040516100a791906104e7565b6100f26001838361024d565b505050565b600160405161010691906103f1565b6040518091039020828260405161011e9291906103e1565b604051809103902014156101415760008054908061013b83610555565b91905055505b5050565b60006060600160405161015891906103f1565b604051809103902084846040516101709291906103e1565b604051809103902014848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959a92995091975050505050505050565b600180546101cc90610501565b80601f01602080910402602001604051908101604052809291908181526020018280546101f890610501565b80156102455780601f1061021a57610100808354040283529160200191610245565b820191906000526020600020905b81548152906001019060200180831161022857829003601f168201915b505050505081565b82805461025990610501565b90600052602060002090601f01602090048101928261027b57600085556102df565b82601f106102b2578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008235161785556102df565b828001600101855582156102df579182015b828111156102df5782358255916020019190600101906102c4565b506102eb9291506102ef565b5090565b5b808211156102eb57600081556001016102f0565b6000806020838503121561031757600080fd5b823567ffffffffffffffff8082111561032f57600080fd5b818501915085601f83011261034357600080fd5b81358181111561035257600080fd5b86602082850101111561036457600080fd5b60209290920196919550909350505050565b6000815180845260005b8181101561039c57602081850181015186830182015201610380565b818111156103ae576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8183823760009101908152919050565b600080835481600182811c91508083168061040d57607f831692505b6020808410821415610446577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b81801561045a5760018114610489576104b6565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008616895284890196506104b6565b60008a81526020902060005b868110156104ae5781548b820152908501908301610495565b505084890196505b509498975050505050505050565b82151581526040602082015260006104df6040830184610376565b949350505050565b6020815260006104fa6020830184610376565b9392505050565b600181811c9082168061051557607f821691505b6020821081141561054f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156105ae577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea164736f6c6343000806000a", +} + +var PerformDataCheckerABI = PerformDataCheckerMetaData.ABI + +var PerformDataCheckerBin = PerformDataCheckerMetaData.Bin + +func DeployPerformDataChecker(auth *bind.TransactOpts, backend bind.ContractBackend, expectedData []byte) (common.Address, *types.Transaction, *PerformDataChecker, error) { + parsed, err := PerformDataCheckerMetaData.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(PerformDataCheckerBin), backend, expectedData) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &PerformDataChecker{PerformDataCheckerCaller: PerformDataCheckerCaller{contract: contract}, PerformDataCheckerTransactor: PerformDataCheckerTransactor{contract: contract}, PerformDataCheckerFilterer: PerformDataCheckerFilterer{contract: contract}}, nil +} + +type PerformDataChecker struct { + address common.Address + abi abi.ABI + PerformDataCheckerCaller + PerformDataCheckerTransactor + PerformDataCheckerFilterer +} + +type PerformDataCheckerCaller struct { + contract *bind.BoundContract +} + +type PerformDataCheckerTransactor struct { + contract *bind.BoundContract +} + +type PerformDataCheckerFilterer struct { + contract *bind.BoundContract +} + +type PerformDataCheckerSession struct { + Contract *PerformDataChecker + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type PerformDataCheckerCallerSession struct { + Contract *PerformDataCheckerCaller + CallOpts bind.CallOpts +} + +type PerformDataCheckerTransactorSession struct { + Contract *PerformDataCheckerTransactor + TransactOpts bind.TransactOpts +} + +type PerformDataCheckerRaw struct { + Contract *PerformDataChecker +} + +type PerformDataCheckerCallerRaw struct { + Contract *PerformDataCheckerCaller +} + +type PerformDataCheckerTransactorRaw struct { + Contract *PerformDataCheckerTransactor +} + +func NewPerformDataChecker(address common.Address, backend bind.ContractBackend) (*PerformDataChecker, error) { + abi, err := abi.JSON(strings.NewReader(PerformDataCheckerABI)) + if err != nil { + return nil, err + } + contract, err := bindPerformDataChecker(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &PerformDataChecker{address: address, abi: abi, PerformDataCheckerCaller: PerformDataCheckerCaller{contract: contract}, PerformDataCheckerTransactor: PerformDataCheckerTransactor{contract: contract}, PerformDataCheckerFilterer: PerformDataCheckerFilterer{contract: contract}}, nil +} + +func NewPerformDataCheckerCaller(address common.Address, caller bind.ContractCaller) (*PerformDataCheckerCaller, error) { + contract, err := bindPerformDataChecker(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &PerformDataCheckerCaller{contract: contract}, nil +} + +func NewPerformDataCheckerTransactor(address common.Address, transactor bind.ContractTransactor) (*PerformDataCheckerTransactor, error) { + contract, err := bindPerformDataChecker(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &PerformDataCheckerTransactor{contract: contract}, nil +} + +func NewPerformDataCheckerFilterer(address common.Address, filterer bind.ContractFilterer) (*PerformDataCheckerFilterer, error) { + contract, err := bindPerformDataChecker(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &PerformDataCheckerFilterer{contract: contract}, nil +} + +func bindPerformDataChecker(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PerformDataCheckerABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +func (_PerformDataChecker *PerformDataCheckerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _PerformDataChecker.Contract.PerformDataCheckerCaller.contract.Call(opts, result, method, params...) +} + +func (_PerformDataChecker *PerformDataCheckerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PerformDataChecker.Contract.PerformDataCheckerTransactor.contract.Transfer(opts) +} + +func (_PerformDataChecker *PerformDataCheckerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PerformDataChecker.Contract.PerformDataCheckerTransactor.contract.Transact(opts, method, params...) +} + +func (_PerformDataChecker *PerformDataCheckerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _PerformDataChecker.Contract.contract.Call(opts, result, method, params...) +} + +func (_PerformDataChecker *PerformDataCheckerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PerformDataChecker.Contract.contract.Transfer(opts) +} + +func (_PerformDataChecker *PerformDataCheckerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PerformDataChecker.Contract.contract.Transact(opts, method, params...) +} + +func (_PerformDataChecker *PerformDataCheckerCaller) CheckUpkeep(opts *bind.CallOpts, checkData []byte) (CheckUpkeep, + + error) { + var out []interface{} + err := _PerformDataChecker.contract.Call(opts, &out, "checkUpkeep", checkData) + + outstruct := new(CheckUpkeep) + if err != nil { + return *outstruct, err + } + + outstruct.UpkeepNeeded = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.PerformData = *abi.ConvertType(out[1], new([]byte)).(*[]byte) + + return *outstruct, err + +} + +func (_PerformDataChecker *PerformDataCheckerSession) CheckUpkeep(checkData []byte) (CheckUpkeep, + + error) { + return _PerformDataChecker.Contract.CheckUpkeep(&_PerformDataChecker.CallOpts, checkData) +} + +func (_PerformDataChecker *PerformDataCheckerCallerSession) CheckUpkeep(checkData []byte) (CheckUpkeep, + + error) { + return _PerformDataChecker.Contract.CheckUpkeep(&_PerformDataChecker.CallOpts, checkData) +} + +func (_PerformDataChecker *PerformDataCheckerCaller) Counter(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _PerformDataChecker.contract.Call(opts, &out, "counter") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_PerformDataChecker *PerformDataCheckerSession) Counter() (*big.Int, error) { + return _PerformDataChecker.Contract.Counter(&_PerformDataChecker.CallOpts) +} + +func (_PerformDataChecker *PerformDataCheckerCallerSession) Counter() (*big.Int, error) { + return _PerformDataChecker.Contract.Counter(&_PerformDataChecker.CallOpts) +} + +func (_PerformDataChecker *PerformDataCheckerCaller) SExpectedData(opts *bind.CallOpts) ([]byte, error) { + var out []interface{} + err := _PerformDataChecker.contract.Call(opts, &out, "s_expectedData") + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +func (_PerformDataChecker *PerformDataCheckerSession) SExpectedData() ([]byte, error) { + return _PerformDataChecker.Contract.SExpectedData(&_PerformDataChecker.CallOpts) +} + +func (_PerformDataChecker *PerformDataCheckerCallerSession) SExpectedData() ([]byte, error) { + return _PerformDataChecker.Contract.SExpectedData(&_PerformDataChecker.CallOpts) +} + +func (_PerformDataChecker *PerformDataCheckerTransactor) PerformUpkeep(opts *bind.TransactOpts, performData []byte) (*types.Transaction, error) { + return _PerformDataChecker.contract.Transact(opts, "performUpkeep", performData) +} + +func (_PerformDataChecker *PerformDataCheckerSession) PerformUpkeep(performData []byte) (*types.Transaction, error) { + return _PerformDataChecker.Contract.PerformUpkeep(&_PerformDataChecker.TransactOpts, performData) +} + +func (_PerformDataChecker *PerformDataCheckerTransactorSession) PerformUpkeep(performData []byte) (*types.Transaction, error) { + return _PerformDataChecker.Contract.PerformUpkeep(&_PerformDataChecker.TransactOpts, performData) +} + +func (_PerformDataChecker *PerformDataCheckerTransactor) SetExpectedData(opts *bind.TransactOpts, expectedData []byte) (*types.Transaction, error) { + return _PerformDataChecker.contract.Transact(opts, "setExpectedData", expectedData) +} + +func (_PerformDataChecker *PerformDataCheckerSession) SetExpectedData(expectedData []byte) (*types.Transaction, error) { + return _PerformDataChecker.Contract.SetExpectedData(&_PerformDataChecker.TransactOpts, expectedData) +} + +func (_PerformDataChecker *PerformDataCheckerTransactorSession) SetExpectedData(expectedData []byte) (*types.Transaction, error) { + return _PerformDataChecker.Contract.SetExpectedData(&_PerformDataChecker.TransactOpts, expectedData) +} + +type CheckUpkeep struct { + UpkeepNeeded bool + PerformData []byte +} + +func (_PerformDataChecker *PerformDataChecker) Address() common.Address { + return _PerformDataChecker.address +} + +type PerformDataCheckerInterface interface { + CheckUpkeep(opts *bind.CallOpts, checkData []byte) (CheckUpkeep, + + error) + + Counter(opts *bind.CallOpts) (*big.Int, error) + + SExpectedData(opts *bind.CallOpts) ([]byte, error) + + PerformUpkeep(opts *bind.TransactOpts, performData []byte) (*types.Transaction, error) + + SetExpectedData(opts *bind.TransactOpts, expectedData []byte) (*types.Transaction, error) + + Address() common.Address +} diff --git a/integration-tests/contracts/ethereum/UpkeepCounter.go b/integration-tests/contracts/ethereum/UpkeepCounter.go new file mode 100644 index 00000000000..f0097bfb7b0 --- /dev/null +++ b/integration-tests/contracts/ethereum/UpkeepCounter.go @@ -0,0 +1,641 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ethereum + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// UpkeepCounterMetaData contains all meta data concerning the UpkeepCounter contract. +var UpkeepCounterMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_testRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"counter\",\"type\":\"uint256\"}],\"name\":\"PerformingUpkeep\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previousPerformBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_testRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_interval\",\"type\":\"uint256\"}],\"name\":\"setSpread\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"testRange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506040516104423803806104428339818101604052604081101561003357600080fd5b508051602090910151600091825560015560038190554360025560048190556005556103de806100646000396000f3fe608060405234801561001057600080fd5b506004361061008e5760003560e01c80632cb15864146100935780634585e33b146100ad57806361bc221a1461011d5780636250a13a146101255780636e04ff0d1461012d5780637f407edf1461021c578063806b984f1461023f578063917d895f14610247578063947a36fb1461024f578063d832d92f14610257575b600080fd5b61009b610273565b60408051918252519081900360200190f35b61011b600480360360208110156100c357600080fd5b810190602081018135600160201b8111156100dd57600080fd5b8201836020820111156100ef57600080fd5b803590602001918460018302840111600160201b8311171561011057600080fd5b509092509050610279565b005b61009b6102f0565b61009b6102f6565b61019b6004803603602081101561014357600080fd5b810190602081018135600160201b81111561015d57600080fd5b82018360208201111561016f57600080fd5b803590602001918460018302840111600160201b8311171561019057600080fd5b5090925090506102fc565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156101e05781810151838201526020016101c8565b50505050905090810190601f16801561020d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b61011b6004803603604081101561023257600080fd5b508035906020013561034e565b61009b610360565b61009b610366565b61009b61036c565b61025f610372565b604080519115158252519081900360200190f35b60045481565b60045461028557436004555b4360028190556005805460010190819055600454600354604080519283526020830194909452818401526060810191909152905132917f8e8112f20a2134e18e591d2cdd68cd86a95d06e6328ede501fc6314f4a5075fa919081900360800190a25050600254600355565b60055481565b60005481565b60006060610308610372565b848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250959a92995091975050505050505050565b60009182556001556004819055600555565b60025481565b60035481565b60015481565b600060045460001415610387575060016103a5565b60005460045443031080156103a25750600154600254430310155b90505b9056fea264697066735822122040ec1d65fcf245bb817ffdc5ef880653b8cc880e41da1037b27143dcb90127c864736f6c63430007060033", +} + +// UpkeepCounterABI is the input ABI used to generate the binding from. +// Deprecated: Use UpkeepCounterMetaData.ABI instead. +var UpkeepCounterABI = UpkeepCounterMetaData.ABI + +// UpkeepCounterBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UpkeepCounterMetaData.Bin instead. +var UpkeepCounterBin = UpkeepCounterMetaData.Bin + +// DeployUpkeepCounter deploys a new Ethereum contract, binding an instance of UpkeepCounter to it. +func DeployUpkeepCounter(auth *bind.TransactOpts, backend bind.ContractBackend, _testRange *big.Int, _interval *big.Int) (common.Address, *types.Transaction, *UpkeepCounter, error) { + parsed, err := UpkeepCounterMetaData.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(UpkeepCounterBin), backend, _testRange, _interval) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UpkeepCounter{UpkeepCounterCaller: UpkeepCounterCaller{contract: contract}, UpkeepCounterTransactor: UpkeepCounterTransactor{contract: contract}, UpkeepCounterFilterer: UpkeepCounterFilterer{contract: contract}}, nil +} + +// UpkeepCounter is an auto generated Go binding around an Ethereum contract. +type UpkeepCounter struct { + UpkeepCounterCaller // Read-only binding to the contract + UpkeepCounterTransactor // Write-only binding to the contract + UpkeepCounterFilterer // Log filterer for contract events +} + +// UpkeepCounterCaller is an auto generated read-only Go binding around an Ethereum contract. +type UpkeepCounterCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UpkeepCounterTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UpkeepCounterTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UpkeepCounterFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UpkeepCounterFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UpkeepCounterSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UpkeepCounterSession struct { + Contract *UpkeepCounter // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UpkeepCounterCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UpkeepCounterCallerSession struct { + Contract *UpkeepCounterCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UpkeepCounterTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UpkeepCounterTransactorSession struct { + Contract *UpkeepCounterTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UpkeepCounterRaw is an auto generated low-level Go binding around an Ethereum contract. +type UpkeepCounterRaw struct { + Contract *UpkeepCounter // Generic contract binding to access the raw methods on +} + +// UpkeepCounterCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UpkeepCounterCallerRaw struct { + Contract *UpkeepCounterCaller // Generic read-only contract binding to access the raw methods on +} + +// UpkeepCounterTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UpkeepCounterTransactorRaw struct { + Contract *UpkeepCounterTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUpkeepCounter creates a new instance of UpkeepCounter, bound to a specific deployed contract. +func NewUpkeepCounter(address common.Address, backend bind.ContractBackend) (*UpkeepCounter, error) { + contract, err := bindUpkeepCounter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UpkeepCounter{UpkeepCounterCaller: UpkeepCounterCaller{contract: contract}, UpkeepCounterTransactor: UpkeepCounterTransactor{contract: contract}, UpkeepCounterFilterer: UpkeepCounterFilterer{contract: contract}}, nil +} + +// NewUpkeepCounterCaller creates a new read-only instance of UpkeepCounter, bound to a specific deployed contract. +func NewUpkeepCounterCaller(address common.Address, caller bind.ContractCaller) (*UpkeepCounterCaller, error) { + contract, err := bindUpkeepCounter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UpkeepCounterCaller{contract: contract}, nil +} + +// NewUpkeepCounterTransactor creates a new write-only instance of UpkeepCounter, bound to a specific deployed contract. +func NewUpkeepCounterTransactor(address common.Address, transactor bind.ContractTransactor) (*UpkeepCounterTransactor, error) { + contract, err := bindUpkeepCounter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UpkeepCounterTransactor{contract: contract}, nil +} + +// NewUpkeepCounterFilterer creates a new log filterer instance of UpkeepCounter, bound to a specific deployed contract. +func NewUpkeepCounterFilterer(address common.Address, filterer bind.ContractFilterer) (*UpkeepCounterFilterer, error) { + contract, err := bindUpkeepCounter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UpkeepCounterFilterer{contract: contract}, nil +} + +// bindUpkeepCounter binds a generic wrapper to an already deployed contract. +func bindUpkeepCounter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(UpkeepCounterABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UpkeepCounter *UpkeepCounterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UpkeepCounter.Contract.UpkeepCounterCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UpkeepCounter *UpkeepCounterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpkeepCounter.Contract.UpkeepCounterTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UpkeepCounter *UpkeepCounterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UpkeepCounter.Contract.UpkeepCounterTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UpkeepCounter *UpkeepCounterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UpkeepCounter.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UpkeepCounter *UpkeepCounterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpkeepCounter.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UpkeepCounter *UpkeepCounterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UpkeepCounter.Contract.contract.Transact(opts, method, params...) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_UpkeepCounter *UpkeepCounterCaller) CheckUpkeep(opts *bind.CallOpts, data []byte) (bool, []byte, error) { + var out []interface{} + err := _UpkeepCounter.contract.Call(opts, &out, "checkUpkeep", data) + + if err != nil { + return *new(bool), *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new([]byte)).(*[]byte) + + return out0, out1, err + +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_UpkeepCounter *UpkeepCounterSession) CheckUpkeep(data []byte) (bool, []byte, error) { + return _UpkeepCounter.Contract.CheckUpkeep(&_UpkeepCounter.CallOpts, data) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_UpkeepCounter *UpkeepCounterCallerSession) CheckUpkeep(data []byte) (bool, []byte, error) { + return _UpkeepCounter.Contract.CheckUpkeep(&_UpkeepCounter.CallOpts, data) +} + +// Counter is a free data retrieval call binding the contract method 0x61bc221a. +// +// Solidity: function counter() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCaller) Counter(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepCounter.contract.Call(opts, &out, "counter") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Counter is a free data retrieval call binding the contract method 0x61bc221a. +// +// Solidity: function counter() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterSession) Counter() (*big.Int, error) { + return _UpkeepCounter.Contract.Counter(&_UpkeepCounter.CallOpts) +} + +// Counter is a free data retrieval call binding the contract method 0x61bc221a. +// +// Solidity: function counter() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCallerSession) Counter() (*big.Int, error) { + return _UpkeepCounter.Contract.Counter(&_UpkeepCounter.CallOpts) +} + +// Eligible is a free data retrieval call binding the contract method 0xd832d92f. +// +// Solidity: function eligible() view returns(bool) +func (_UpkeepCounter *UpkeepCounterCaller) Eligible(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _UpkeepCounter.contract.Call(opts, &out, "eligible") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Eligible is a free data retrieval call binding the contract method 0xd832d92f. +// +// Solidity: function eligible() view returns(bool) +func (_UpkeepCounter *UpkeepCounterSession) Eligible() (bool, error) { + return _UpkeepCounter.Contract.Eligible(&_UpkeepCounter.CallOpts) +} + +// Eligible is a free data retrieval call binding the contract method 0xd832d92f. +// +// Solidity: function eligible() view returns(bool) +func (_UpkeepCounter *UpkeepCounterCallerSession) Eligible() (bool, error) { + return _UpkeepCounter.Contract.Eligible(&_UpkeepCounter.CallOpts) +} + +// InitialBlock is a free data retrieval call binding the contract method 0x2cb15864. +// +// Solidity: function initialBlock() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCaller) InitialBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepCounter.contract.Call(opts, &out, "initialBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// InitialBlock is a free data retrieval call binding the contract method 0x2cb15864. +// +// Solidity: function initialBlock() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterSession) InitialBlock() (*big.Int, error) { + return _UpkeepCounter.Contract.InitialBlock(&_UpkeepCounter.CallOpts) +} + +// InitialBlock is a free data retrieval call binding the contract method 0x2cb15864. +// +// Solidity: function initialBlock() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCallerSession) InitialBlock() (*big.Int, error) { + return _UpkeepCounter.Contract.InitialBlock(&_UpkeepCounter.CallOpts) +} + +// Interval is a free data retrieval call binding the contract method 0x947a36fb. +// +// Solidity: function interval() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCaller) Interval(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepCounter.contract.Call(opts, &out, "interval") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Interval is a free data retrieval call binding the contract method 0x947a36fb. +// +// Solidity: function interval() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterSession) Interval() (*big.Int, error) { + return _UpkeepCounter.Contract.Interval(&_UpkeepCounter.CallOpts) +} + +// Interval is a free data retrieval call binding the contract method 0x947a36fb. +// +// Solidity: function interval() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCallerSession) Interval() (*big.Int, error) { + return _UpkeepCounter.Contract.Interval(&_UpkeepCounter.CallOpts) +} + +// LastBlock is a free data retrieval call binding the contract method 0x806b984f. +// +// Solidity: function lastBlock() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCaller) LastBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepCounter.contract.Call(opts, &out, "lastBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LastBlock is a free data retrieval call binding the contract method 0x806b984f. +// +// Solidity: function lastBlock() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterSession) LastBlock() (*big.Int, error) { + return _UpkeepCounter.Contract.LastBlock(&_UpkeepCounter.CallOpts) +} + +// LastBlock is a free data retrieval call binding the contract method 0x806b984f. +// +// Solidity: function lastBlock() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCallerSession) LastBlock() (*big.Int, error) { + return _UpkeepCounter.Contract.LastBlock(&_UpkeepCounter.CallOpts) +} + +// PreviousPerformBlock is a free data retrieval call binding the contract method 0x917d895f. +// +// Solidity: function previousPerformBlock() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCaller) PreviousPerformBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepCounter.contract.Call(opts, &out, "previousPerformBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PreviousPerformBlock is a free data retrieval call binding the contract method 0x917d895f. +// +// Solidity: function previousPerformBlock() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterSession) PreviousPerformBlock() (*big.Int, error) { + return _UpkeepCounter.Contract.PreviousPerformBlock(&_UpkeepCounter.CallOpts) +} + +// PreviousPerformBlock is a free data retrieval call binding the contract method 0x917d895f. +// +// Solidity: function previousPerformBlock() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCallerSession) PreviousPerformBlock() (*big.Int, error) { + return _UpkeepCounter.Contract.PreviousPerformBlock(&_UpkeepCounter.CallOpts) +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCaller) TestRange(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepCounter.contract.Call(opts, &out, "testRange") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterSession) TestRange() (*big.Int, error) { + return _UpkeepCounter.Contract.TestRange(&_UpkeepCounter.CallOpts) +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_UpkeepCounter *UpkeepCounterCallerSession) TestRange() (*big.Int, error) { + return _UpkeepCounter.Contract.TestRange(&_UpkeepCounter.CallOpts) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes performData) returns() +func (_UpkeepCounter *UpkeepCounterTransactor) PerformUpkeep(opts *bind.TransactOpts, performData []byte) (*types.Transaction, error) { + return _UpkeepCounter.contract.Transact(opts, "performUpkeep", performData) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes performData) returns() +func (_UpkeepCounter *UpkeepCounterSession) PerformUpkeep(performData []byte) (*types.Transaction, error) { + return _UpkeepCounter.Contract.PerformUpkeep(&_UpkeepCounter.TransactOpts, performData) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes performData) returns() +func (_UpkeepCounter *UpkeepCounterTransactorSession) PerformUpkeep(performData []byte) (*types.Transaction, error) { + return _UpkeepCounter.Contract.PerformUpkeep(&_UpkeepCounter.TransactOpts, performData) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _testRange, uint256 _interval) returns() +func (_UpkeepCounter *UpkeepCounterTransactor) SetSpread(opts *bind.TransactOpts, _testRange *big.Int, _interval *big.Int) (*types.Transaction, error) { + return _UpkeepCounter.contract.Transact(opts, "setSpread", _testRange, _interval) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _testRange, uint256 _interval) returns() +func (_UpkeepCounter *UpkeepCounterSession) SetSpread(_testRange *big.Int, _interval *big.Int) (*types.Transaction, error) { + return _UpkeepCounter.Contract.SetSpread(&_UpkeepCounter.TransactOpts, _testRange, _interval) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _testRange, uint256 _interval) returns() +func (_UpkeepCounter *UpkeepCounterTransactorSession) SetSpread(_testRange *big.Int, _interval *big.Int) (*types.Transaction, error) { + return _UpkeepCounter.Contract.SetSpread(&_UpkeepCounter.TransactOpts, _testRange, _interval) +} + +// UpkeepCounterPerformingUpkeepIterator is returned from FilterPerformingUpkeep and is used to iterate over the raw logs and unpacked data for PerformingUpkeep events raised by the UpkeepCounter contract. +type UpkeepCounterPerformingUpkeepIterator struct { + Event *UpkeepCounterPerformingUpkeep // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *UpkeepCounterPerformingUpkeepIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(UpkeepCounterPerformingUpkeep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(UpkeepCounterPerformingUpkeep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *UpkeepCounterPerformingUpkeepIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UpkeepCounterPerformingUpkeepIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UpkeepCounterPerformingUpkeep represents a PerformingUpkeep event raised by the UpkeepCounter contract. +type UpkeepCounterPerformingUpkeep struct { + From common.Address + InitialBlock *big.Int + LastBlock *big.Int + PreviousBlock *big.Int + Counter *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPerformingUpkeep is a free log retrieval operation binding the contract event 0x8e8112f20a2134e18e591d2cdd68cd86a95d06e6328ede501fc6314f4a5075fa. +// +// Solidity: event PerformingUpkeep(address indexed from, uint256 initialBlock, uint256 lastBlock, uint256 previousBlock, uint256 counter) +func (_UpkeepCounter *UpkeepCounterFilterer) FilterPerformingUpkeep(opts *bind.FilterOpts, from []common.Address) (*UpkeepCounterPerformingUpkeepIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _UpkeepCounter.contract.FilterLogs(opts, "PerformingUpkeep", fromRule) + if err != nil { + return nil, err + } + return &UpkeepCounterPerformingUpkeepIterator{contract: _UpkeepCounter.contract, event: "PerformingUpkeep", logs: logs, sub: sub}, nil +} + +// WatchPerformingUpkeep is a free log subscription operation binding the contract event 0x8e8112f20a2134e18e591d2cdd68cd86a95d06e6328ede501fc6314f4a5075fa. +// +// Solidity: event PerformingUpkeep(address indexed from, uint256 initialBlock, uint256 lastBlock, uint256 previousBlock, uint256 counter) +func (_UpkeepCounter *UpkeepCounterFilterer) WatchPerformingUpkeep(opts *bind.WatchOpts, sink chan<- *UpkeepCounterPerformingUpkeep, from []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + + logs, sub, err := _UpkeepCounter.contract.WatchLogs(opts, "PerformingUpkeep", fromRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(UpkeepCounterPerformingUpkeep) + if err := _UpkeepCounter.contract.UnpackLog(event, "PerformingUpkeep", 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 +} + +// ParsePerformingUpkeep is a log parse operation binding the contract event 0x8e8112f20a2134e18e591d2cdd68cd86a95d06e6328ede501fc6314f4a5075fa. +// +// Solidity: event PerformingUpkeep(address indexed from, uint256 initialBlock, uint256 lastBlock, uint256 previousBlock, uint256 counter) +func (_UpkeepCounter *UpkeepCounterFilterer) ParsePerformingUpkeep(log types.Log) (*UpkeepCounterPerformingUpkeep, error) { + event := new(UpkeepCounterPerformingUpkeep) + if err := _UpkeepCounter.contract.UnpackLog(event, "PerformingUpkeep", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/integration-tests/contracts/ethereum/UpkeepPerformCounterRestrictive.go b/integration-tests/contracts/ethereum/UpkeepPerformCounterRestrictive.go new file mode 100644 index 00000000000..092472fe99e --- /dev/null +++ b/integration-tests/contracts/ethereum/UpkeepPerformCounterRestrictive.go @@ -0,0 +1,756 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package ethereum + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// UpkeepPerformCounterRestrictiveMetaData contains all meta data concerning the UpkeepPerformCounterRestrictive contract. +var UpkeepPerformCounterRestrictiveMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_testRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_averageEligibilityCadence\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"eligible\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"initialCall\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nextEligible\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"PerformingUpkeep\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"averageEligibilityCadence\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkEligible\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checkGasToBurn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dummyMap\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCountPerforms\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialCall\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextEligible\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"performGasToBurn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setCheckGasToBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setPerformGasToBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newTestRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_newAverageEligibilityCadence\",\"type\":\"uint256\"}],\"name\":\"setSpread\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"testRange\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x6080604052600080556000600155600060075534801561001e57600080fd5b506040516105c93803806105c98339818101604052604081101561004157600080fd5b508051602090910151600291909155600355610567806100626000396000f3fe608060405234801561001057600080fd5b50600436106100c55760003560e01c806313bda75b146100ca5780632555d2cf146100e95780632ff3617d146101065780634585e33b14610120578063523d9b8a1461018e5780636250a13a146101965780636e04ff0d1461019e5780637145f11b1461028d5780637f407edf146102be578063926f086e146102e1578063a9a4c57c146102e9578063b30566b4146102f1578063c228a98e146102f9578063d826f88f14610301578063e303666f14610309575b600080fd5b6100e7600480360360208110156100e057600080fd5b5035610311565b005b6100e7600480360360208110156100ff57600080fd5b5035610316565b61010e61031b565b60408051918252519081900360200190f35b6100e76004803603602081101561013657600080fd5b810190602081018135600160201b81111561015057600080fd5b82018360208201111561016257600080fd5b803590602001918460018302840111600160201b8311171561018357600080fd5b509092509050610321565b61010e610404565b61010e61040a565b61020c600480360360208110156101b457600080fd5b810190602081018135600160201b8111156101ce57600080fd5b8201836020820111156101e057600080fd5b803590602001918460018302840111600160201b8311171561020157600080fd5b509092509050610410565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610251578181015183820152602001610239565b50505050905090810190601f16801561027e5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6102aa600480360360208110156102a357600080fd5b503561048b565b604080519115158252519081900360200190f35b6100e7600480360360408110156102d457600080fd5b50803590602001356104a0565b61010e6104ab565b61010e6104b1565b61010e6104b7565b6102aa6104bd565b6100e76104cc565b61010e6104d6565b600455565b600555565b60045481565b60005a905060006103306104dc565b60005460015460408051841515815232602082015280820193909352606083019190915243608083018190529051929350917fbd6b6608a51477954e8b498c633bda87e5cd555e06ead50486398d9e3b9cebc09181900360a00190a18161039657600080fd5b6000546103a35760008190555b6003546002026103b1610500565b816103b857fe5b06810160019081018155600780549091019055600019015b6005545a840310156103fd5780406000908152600660205260409020805460ff19169055600019016103d0565b5050505050565b60015481565b60025481565b6000606060005a9050600019430160005b6004545a840310156104585780801561044a5750814060009081526006602052604090205460ff165b600019909201919050610421565b6104606104dc565b6040805192151560208085019190915281518085039091018152928101905297909650945050505050565b60066020526000908152604090205460ff1681565b600291909155600355565b60005481565b60035481565b60055481565b60006104c76104dc565b905090565b6000808055600755565b60075490565b6000805415806104c7575060025460005443031080156104c7575050600154431190565b604080516000194301406020808301919091523082840152825180830384018152606090920190925280519101209056fea2646970667358221220a317dab4792a9ae36241f654e15b5fbb29c4a249e54654ea0b02219f739b347a64736f6c63430007060033", +} + +// UpkeepPerformCounterRestrictiveABI is the input ABI used to generate the binding from. +// Deprecated: Use UpkeepPerformCounterRestrictiveMetaData.ABI instead. +var UpkeepPerformCounterRestrictiveABI = UpkeepPerformCounterRestrictiveMetaData.ABI + +// UpkeepPerformCounterRestrictiveBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use UpkeepPerformCounterRestrictiveMetaData.Bin instead. +var UpkeepPerformCounterRestrictiveBin = UpkeepPerformCounterRestrictiveMetaData.Bin + +// DeployUpkeepPerformCounterRestrictive deploys a new Ethereum contract, binding an instance of UpkeepPerformCounterRestrictive to it. +func DeployUpkeepPerformCounterRestrictive(auth *bind.TransactOpts, backend bind.ContractBackend, _testRange *big.Int, _averageEligibilityCadence *big.Int) (common.Address, *types.Transaction, *UpkeepPerformCounterRestrictive, error) { + parsed, err := UpkeepPerformCounterRestrictiveMetaData.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(UpkeepPerformCounterRestrictiveBin), backend, _testRange, _averageEligibilityCadence) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &UpkeepPerformCounterRestrictive{UpkeepPerformCounterRestrictiveCaller: UpkeepPerformCounterRestrictiveCaller{contract: contract}, UpkeepPerformCounterRestrictiveTransactor: UpkeepPerformCounterRestrictiveTransactor{contract: contract}, UpkeepPerformCounterRestrictiveFilterer: UpkeepPerformCounterRestrictiveFilterer{contract: contract}}, nil +} + +// UpkeepPerformCounterRestrictive is an auto generated Go binding around an Ethereum contract. +type UpkeepPerformCounterRestrictive struct { + UpkeepPerformCounterRestrictiveCaller // Read-only binding to the contract + UpkeepPerformCounterRestrictiveTransactor // Write-only binding to the contract + UpkeepPerformCounterRestrictiveFilterer // Log filterer for contract events +} + +// UpkeepPerformCounterRestrictiveCaller is an auto generated read-only Go binding around an Ethereum contract. +type UpkeepPerformCounterRestrictiveCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UpkeepPerformCounterRestrictiveTransactor is an auto generated write-only Go binding around an Ethereum contract. +type UpkeepPerformCounterRestrictiveTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UpkeepPerformCounterRestrictiveFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type UpkeepPerformCounterRestrictiveFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// UpkeepPerformCounterRestrictiveSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type UpkeepPerformCounterRestrictiveSession struct { + Contract *UpkeepPerformCounterRestrictive // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UpkeepPerformCounterRestrictiveCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type UpkeepPerformCounterRestrictiveCallerSession struct { + Contract *UpkeepPerformCounterRestrictiveCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// UpkeepPerformCounterRestrictiveTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type UpkeepPerformCounterRestrictiveTransactorSession struct { + Contract *UpkeepPerformCounterRestrictiveTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// UpkeepPerformCounterRestrictiveRaw is an auto generated low-level Go binding around an Ethereum contract. +type UpkeepPerformCounterRestrictiveRaw struct { + Contract *UpkeepPerformCounterRestrictive // Generic contract binding to access the raw methods on +} + +// UpkeepPerformCounterRestrictiveCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type UpkeepPerformCounterRestrictiveCallerRaw struct { + Contract *UpkeepPerformCounterRestrictiveCaller // Generic read-only contract binding to access the raw methods on +} + +// UpkeepPerformCounterRestrictiveTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type UpkeepPerformCounterRestrictiveTransactorRaw struct { + Contract *UpkeepPerformCounterRestrictiveTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewUpkeepPerformCounterRestrictive creates a new instance of UpkeepPerformCounterRestrictive, bound to a specific deployed contract. +func NewUpkeepPerformCounterRestrictive(address common.Address, backend bind.ContractBackend) (*UpkeepPerformCounterRestrictive, error) { + contract, err := bindUpkeepPerformCounterRestrictive(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &UpkeepPerformCounterRestrictive{UpkeepPerformCounterRestrictiveCaller: UpkeepPerformCounterRestrictiveCaller{contract: contract}, UpkeepPerformCounterRestrictiveTransactor: UpkeepPerformCounterRestrictiveTransactor{contract: contract}, UpkeepPerformCounterRestrictiveFilterer: UpkeepPerformCounterRestrictiveFilterer{contract: contract}}, nil +} + +// NewUpkeepPerformCounterRestrictiveCaller creates a new read-only instance of UpkeepPerformCounterRestrictive, bound to a specific deployed contract. +func NewUpkeepPerformCounterRestrictiveCaller(address common.Address, caller bind.ContractCaller) (*UpkeepPerformCounterRestrictiveCaller, error) { + contract, err := bindUpkeepPerformCounterRestrictive(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &UpkeepPerformCounterRestrictiveCaller{contract: contract}, nil +} + +// NewUpkeepPerformCounterRestrictiveTransactor creates a new write-only instance of UpkeepPerformCounterRestrictive, bound to a specific deployed contract. +func NewUpkeepPerformCounterRestrictiveTransactor(address common.Address, transactor bind.ContractTransactor) (*UpkeepPerformCounterRestrictiveTransactor, error) { + contract, err := bindUpkeepPerformCounterRestrictive(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &UpkeepPerformCounterRestrictiveTransactor{contract: contract}, nil +} + +// NewUpkeepPerformCounterRestrictiveFilterer creates a new log filterer instance of UpkeepPerformCounterRestrictive, bound to a specific deployed contract. +func NewUpkeepPerformCounterRestrictiveFilterer(address common.Address, filterer bind.ContractFilterer) (*UpkeepPerformCounterRestrictiveFilterer, error) { + contract, err := bindUpkeepPerformCounterRestrictive(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &UpkeepPerformCounterRestrictiveFilterer{contract: contract}, nil +} + +// bindUpkeepPerformCounterRestrictive binds a generic wrapper to an already deployed contract. +func bindUpkeepPerformCounterRestrictive(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(UpkeepPerformCounterRestrictiveABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UpkeepPerformCounterRestrictive.Contract.UpkeepPerformCounterRestrictiveCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.UpkeepPerformCounterRestrictiveTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.UpkeepPerformCounterRestrictiveTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _UpkeepPerformCounterRestrictive.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.contract.Transact(opts, method, params...) +} + +// AverageEligibilityCadence is a free data retrieval call binding the contract method 0xa9a4c57c. +// +// Solidity: function averageEligibilityCadence() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) AverageEligibilityCadence(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "averageEligibilityCadence") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AverageEligibilityCadence is a free data retrieval call binding the contract method 0xa9a4c57c. +// +// Solidity: function averageEligibilityCadence() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) AverageEligibilityCadence() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.AverageEligibilityCadence(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// AverageEligibilityCadence is a free data retrieval call binding the contract method 0xa9a4c57c. +// +// Solidity: function averageEligibilityCadence() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) AverageEligibilityCadence() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.AverageEligibilityCadence(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// CheckEligible is a free data retrieval call binding the contract method 0xc228a98e. +// +// Solidity: function checkEligible() view returns(bool) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) CheckEligible(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "checkEligible") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// CheckEligible is a free data retrieval call binding the contract method 0xc228a98e. +// +// Solidity: function checkEligible() view returns(bool) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) CheckEligible() (bool, error) { + return _UpkeepPerformCounterRestrictive.Contract.CheckEligible(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// CheckEligible is a free data retrieval call binding the contract method 0xc228a98e. +// +// Solidity: function checkEligible() view returns(bool) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) CheckEligible() (bool, error) { + return _UpkeepPerformCounterRestrictive.Contract.CheckEligible(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// CheckGasToBurn is a free data retrieval call binding the contract method 0x2ff3617d. +// +// Solidity: function checkGasToBurn() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) CheckGasToBurn(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "checkGasToBurn") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CheckGasToBurn is a free data retrieval call binding the contract method 0x2ff3617d. +// +// Solidity: function checkGasToBurn() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) CheckGasToBurn() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.CheckGasToBurn(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// CheckGasToBurn is a free data retrieval call binding the contract method 0x2ff3617d. +// +// Solidity: function checkGasToBurn() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) CheckGasToBurn() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.CheckGasToBurn(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) CheckUpkeep(opts *bind.CallOpts, data []byte) (bool, []byte, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "checkUpkeep", data) + + if err != nil { + return *new(bool), *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out1 := *abi.ConvertType(out[1], new([]byte)).(*[]byte) + + return out0, out1, err + +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) CheckUpkeep(data []byte) (bool, []byte, error) { + return _UpkeepPerformCounterRestrictive.Contract.CheckUpkeep(&_UpkeepPerformCounterRestrictive.CallOpts, data) +} + +// CheckUpkeep is a free data retrieval call binding the contract method 0x6e04ff0d. +// +// Solidity: function checkUpkeep(bytes data) view returns(bool, bytes) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) CheckUpkeep(data []byte) (bool, []byte, error) { + return _UpkeepPerformCounterRestrictive.Contract.CheckUpkeep(&_UpkeepPerformCounterRestrictive.CallOpts, data) +} + +// DummyMap is a free data retrieval call binding the contract method 0x7145f11b. +// +// Solidity: function dummyMap(bytes32 ) view returns(bool) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) DummyMap(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "dummyMap", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// DummyMap is a free data retrieval call binding the contract method 0x7145f11b. +// +// Solidity: function dummyMap(bytes32 ) view returns(bool) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) DummyMap(arg0 [32]byte) (bool, error) { + return _UpkeepPerformCounterRestrictive.Contract.DummyMap(&_UpkeepPerformCounterRestrictive.CallOpts, arg0) +} + +// DummyMap is a free data retrieval call binding the contract method 0x7145f11b. +// +// Solidity: function dummyMap(bytes32 ) view returns(bool) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) DummyMap(arg0 [32]byte) (bool, error) { + return _UpkeepPerformCounterRestrictive.Contract.DummyMap(&_UpkeepPerformCounterRestrictive.CallOpts, arg0) +} + +// GetCountPerforms is a free data retrieval call binding the contract method 0xe303666f. +// +// Solidity: function getCountPerforms() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) GetCountPerforms(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "getCountPerforms") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetCountPerforms is a free data retrieval call binding the contract method 0xe303666f. +// +// Solidity: function getCountPerforms() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) GetCountPerforms() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.GetCountPerforms(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// GetCountPerforms is a free data retrieval call binding the contract method 0xe303666f. +// +// Solidity: function getCountPerforms() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) GetCountPerforms() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.GetCountPerforms(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// InitialCall is a free data retrieval call binding the contract method 0x926f086e. +// +// Solidity: function initialCall() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) InitialCall(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "initialCall") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// InitialCall is a free data retrieval call binding the contract method 0x926f086e. +// +// Solidity: function initialCall() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) InitialCall() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.InitialCall(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// InitialCall is a free data retrieval call binding the contract method 0x926f086e. +// +// Solidity: function initialCall() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) InitialCall() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.InitialCall(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// NextEligible is a free data retrieval call binding the contract method 0x523d9b8a. +// +// Solidity: function nextEligible() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) NextEligible(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "nextEligible") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NextEligible is a free data retrieval call binding the contract method 0x523d9b8a. +// +// Solidity: function nextEligible() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) NextEligible() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.NextEligible(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// NextEligible is a free data retrieval call binding the contract method 0x523d9b8a. +// +// Solidity: function nextEligible() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) NextEligible() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.NextEligible(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// PerformGasToBurn is a free data retrieval call binding the contract method 0xb30566b4. +// +// Solidity: function performGasToBurn() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) PerformGasToBurn(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "performGasToBurn") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PerformGasToBurn is a free data retrieval call binding the contract method 0xb30566b4. +// +// Solidity: function performGasToBurn() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) PerformGasToBurn() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.PerformGasToBurn(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// PerformGasToBurn is a free data retrieval call binding the contract method 0xb30566b4. +// +// Solidity: function performGasToBurn() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) PerformGasToBurn() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.PerformGasToBurn(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCaller) TestRange(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _UpkeepPerformCounterRestrictive.contract.Call(opts, &out, "testRange") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) TestRange() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.TestRange(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// TestRange is a free data retrieval call binding the contract method 0x6250a13a. +// +// Solidity: function testRange() view returns(uint256) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveCallerSession) TestRange() (*big.Int, error) { + return _UpkeepPerformCounterRestrictive.Contract.TestRange(&_UpkeepPerformCounterRestrictive.CallOpts) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes ) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactor) PerformUpkeep(opts *bind.TransactOpts, arg0 []byte) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.contract.Transact(opts, "performUpkeep", arg0) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes ) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) PerformUpkeep(arg0 []byte) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.PerformUpkeep(&_UpkeepPerformCounterRestrictive.TransactOpts, arg0) +} + +// PerformUpkeep is a paid mutator transaction binding the contract method 0x4585e33b. +// +// Solidity: function performUpkeep(bytes ) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactorSession) PerformUpkeep(arg0 []byte) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.PerformUpkeep(&_UpkeepPerformCounterRestrictive.TransactOpts, arg0) +} + +// Reset is a paid mutator transaction binding the contract method 0xd826f88f. +// +// Solidity: function reset() returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactor) Reset(opts *bind.TransactOpts) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.contract.Transact(opts, "reset") +} + +// Reset is a paid mutator transaction binding the contract method 0xd826f88f. +// +// Solidity: function reset() returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) Reset() (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.Reset(&_UpkeepPerformCounterRestrictive.TransactOpts) +} + +// Reset is a paid mutator transaction binding the contract method 0xd826f88f. +// +// Solidity: function reset() returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactorSession) Reset() (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.Reset(&_UpkeepPerformCounterRestrictive.TransactOpts) +} + +// SetCheckGasToBurn is a paid mutator transaction binding the contract method 0x13bda75b. +// +// Solidity: function setCheckGasToBurn(uint256 value) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactor) SetCheckGasToBurn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.contract.Transact(opts, "setCheckGasToBurn", value) +} + +// SetCheckGasToBurn is a paid mutator transaction binding the contract method 0x13bda75b. +// +// Solidity: function setCheckGasToBurn(uint256 value) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) SetCheckGasToBurn(value *big.Int) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.SetCheckGasToBurn(&_UpkeepPerformCounterRestrictive.TransactOpts, value) +} + +// SetCheckGasToBurn is a paid mutator transaction binding the contract method 0x13bda75b. +// +// Solidity: function setCheckGasToBurn(uint256 value) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactorSession) SetCheckGasToBurn(value *big.Int) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.SetCheckGasToBurn(&_UpkeepPerformCounterRestrictive.TransactOpts, value) +} + +// SetPerformGasToBurn is a paid mutator transaction binding the contract method 0x2555d2cf. +// +// Solidity: function setPerformGasToBurn(uint256 value) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactor) SetPerformGasToBurn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.contract.Transact(opts, "setPerformGasToBurn", value) +} + +// SetPerformGasToBurn is a paid mutator transaction binding the contract method 0x2555d2cf. +// +// Solidity: function setPerformGasToBurn(uint256 value) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) SetPerformGasToBurn(value *big.Int) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.SetPerformGasToBurn(&_UpkeepPerformCounterRestrictive.TransactOpts, value) +} + +// SetPerformGasToBurn is a paid mutator transaction binding the contract method 0x2555d2cf. +// +// Solidity: function setPerformGasToBurn(uint256 value) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactorSession) SetPerformGasToBurn(value *big.Int) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.SetPerformGasToBurn(&_UpkeepPerformCounterRestrictive.TransactOpts, value) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactor) SetSpread(opts *bind.TransactOpts, _newTestRange *big.Int, _newAverageEligibilityCadence *big.Int) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.contract.Transact(opts, "setSpread", _newTestRange, _newAverageEligibilityCadence) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveSession) SetSpread(_newTestRange *big.Int, _newAverageEligibilityCadence *big.Int) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.SetSpread(&_UpkeepPerformCounterRestrictive.TransactOpts, _newTestRange, _newAverageEligibilityCadence) +} + +// SetSpread is a paid mutator transaction binding the contract method 0x7f407edf. +// +// Solidity: function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) returns() +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveTransactorSession) SetSpread(_newTestRange *big.Int, _newAverageEligibilityCadence *big.Int) (*types.Transaction, error) { + return _UpkeepPerformCounterRestrictive.Contract.SetSpread(&_UpkeepPerformCounterRestrictive.TransactOpts, _newTestRange, _newAverageEligibilityCadence) +} + +// UpkeepPerformCounterRestrictivePerformingUpkeepIterator is returned from FilterPerformingUpkeep and is used to iterate over the raw logs and unpacked data for PerformingUpkeep events raised by the UpkeepPerformCounterRestrictive contract. +type UpkeepPerformCounterRestrictivePerformingUpkeepIterator struct { + Event *UpkeepPerformCounterRestrictivePerformingUpkeep // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *UpkeepPerformCounterRestrictivePerformingUpkeepIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(UpkeepPerformCounterRestrictivePerformingUpkeep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(UpkeepPerformCounterRestrictivePerformingUpkeep) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *UpkeepPerformCounterRestrictivePerformingUpkeepIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *UpkeepPerformCounterRestrictivePerformingUpkeepIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// UpkeepPerformCounterRestrictivePerformingUpkeep represents a PerformingUpkeep event raised by the UpkeepPerformCounterRestrictive contract. +type UpkeepPerformCounterRestrictivePerformingUpkeep struct { + Eligible bool + From common.Address + InitialCall *big.Int + NextEligible *big.Int + BlockNumber *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPerformingUpkeep is a free log retrieval operation binding the contract event 0xbd6b6608a51477954e8b498c633bda87e5cd555e06ead50486398d9e3b9cebc0. +// +// Solidity: event PerformingUpkeep(bool eligible, address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveFilterer) FilterPerformingUpkeep(opts *bind.FilterOpts) (*UpkeepPerformCounterRestrictivePerformingUpkeepIterator, error) { + + logs, sub, err := _UpkeepPerformCounterRestrictive.contract.FilterLogs(opts, "PerformingUpkeep") + if err != nil { + return nil, err + } + return &UpkeepPerformCounterRestrictivePerformingUpkeepIterator{contract: _UpkeepPerformCounterRestrictive.contract, event: "PerformingUpkeep", logs: logs, sub: sub}, nil +} + +// WatchPerformingUpkeep is a free log subscription operation binding the contract event 0xbd6b6608a51477954e8b498c633bda87e5cd555e06ead50486398d9e3b9cebc0. +// +// Solidity: event PerformingUpkeep(bool eligible, address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveFilterer) WatchPerformingUpkeep(opts *bind.WatchOpts, sink chan<- *UpkeepPerformCounterRestrictivePerformingUpkeep) (event.Subscription, error) { + + logs, sub, err := _UpkeepPerformCounterRestrictive.contract.WatchLogs(opts, "PerformingUpkeep") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(UpkeepPerformCounterRestrictivePerformingUpkeep) + if err := _UpkeepPerformCounterRestrictive.contract.UnpackLog(event, "PerformingUpkeep", 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 +} + +// ParsePerformingUpkeep is a log parse operation binding the contract event 0xbd6b6608a51477954e8b498c633bda87e5cd555e06ead50486398d9e3b9cebc0. +// +// Solidity: event PerformingUpkeep(bool eligible, address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber) +func (_UpkeepPerformCounterRestrictive *UpkeepPerformCounterRestrictiveFilterer) ParsePerformingUpkeep(log types.Log) (*UpkeepPerformCounterRestrictivePerformingUpkeep, error) { + event := new(UpkeepPerformCounterRestrictivePerformingUpkeep) + if err := _UpkeepPerformCounterRestrictive.contract.UnpackLog(event, "PerformingUpkeep", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/integration-tests/contracts/ethereum/src/KeeperBase.sol b/integration-tests/contracts/ethereum/src/KeeperBase.sol new file mode 120000 index 00000000000..dfff3da022f --- /dev/null +++ b/integration-tests/contracts/ethereum/src/KeeperBase.sol @@ -0,0 +1 @@ +../../../../contracts/src/v0.7/KeeperBase.sol \ No newline at end of file diff --git a/integration-tests/contracts/ethereum/src/KeeperCompatibleInterface.sol b/integration-tests/contracts/ethereum/src/KeeperCompatibleInterface.sol new file mode 120000 index 00000000000..8e6eb6cf21e --- /dev/null +++ b/integration-tests/contracts/ethereum/src/KeeperCompatibleInterface.sol @@ -0,0 +1 @@ +../../../../contracts/src/v0.7/interfaces/KeeperCompatibleInterface.sol \ No newline at end of file diff --git a/integration-tests/contracts/ethereum/src/KeeperConsumer.sol b/integration-tests/contracts/ethereum/src/KeeperConsumer.sol new file mode 100644 index 00000000000..1c2d772e632 --- /dev/null +++ b/integration-tests/contracts/ethereum/src/KeeperConsumer.sol @@ -0,0 +1,31 @@ +pragma solidity ^0.7.0; + +import "./KeeperCompatibleInterface.sol"; +import "./KeeperBase.sol"; + +contract KeeperConsumer is KeeperCompatibleInterface, KeeperBase { + uint public counter; + uint public immutable interval; + uint public lastTimeStamp; + + + constructor(uint updateInterval) public { + interval = updateInterval; + lastTimeStamp = block.timestamp; + counter = 0; + } + + function checkUpkeep(bytes calldata checkData) + external + override + view + cannotExecute + returns (bool upkeepNeeded, bytes memory performData) { + return (true, checkData); + } + + function performUpkeep(bytes calldata performData) external override { + counter = counter + 1; + } +} + diff --git a/integration-tests/contracts/ethereum/src/KeeperConsumerBenchmark.sol b/integration-tests/contracts/ethereum/src/KeeperConsumerBenchmark.sol new file mode 100644 index 00000000000..f6bf1f0f59f --- /dev/null +++ b/integration-tests/contracts/ethereum/src/KeeperConsumerBenchmark.sol @@ -0,0 +1,95 @@ +pragma solidity 0.7.6; + +contract KeeperConsumerBenchmark { + event PerformingUpkeep(address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber); + + uint256 public initialCall = 0; + uint256 public nextEligible = 0; + uint256 public testRange; + uint256 public averageEligibilityCadence; + uint256 public checkGasToBurn; + uint256 public performGasToBurn; + uint256 public firstEligibleBlock; + uint256 public firstEligibleBuffer; + mapping(bytes32 => bool) public dummyMap; // used to force storage lookup + + uint256 public count = 0; + + constructor(uint256 _testRange, uint256 _averageEligibilityCadence, uint256 _checkGasToBurn, uint256 _performGasToBurn, uint256 _firstEligibleBuffer) { + testRange = _testRange; + averageEligibilityCadence = _averageEligibilityCadence; + checkGasToBurn = _checkGasToBurn; + performGasToBurn = _performGasToBurn; + firstEligibleBuffer = _firstEligibleBuffer; + firstEligibleBlock = firstEligibleBuffer > 0 ? (block.number +(rand() % averageEligibilityCadence)) + firstEligibleBuffer : block.number; + } + + function checkUpkeep(bytes calldata data) external view returns (bool, bytes memory) { + uint256 startGas = gasleft(); + bytes32 dummyIndex = blockhash(block.number - 1); + bool dummy; + // burn gas + while (startGas - gasleft() < checkGasToBurn) { + dummy = dummy && dummyMap[dummyIndex]; // arbitrary storage reads + dummyIndex = keccak256(abi.encode(dummyIndex, address(this))); + } + return (eligible(), abi.encode(dummy)); + } + + function performUpkeep(bytes calldata) external { + require(eligible()); + uint256 startGas = gasleft(); + if (initialCall == 0) { + initialCall = block.number; + } + nextEligible = block.number + averageEligibilityCadence; + count++; + emit PerformingUpkeep( tx.origin, initialCall, nextEligible, block.number); + // burn gas + bytes32 dummyIndex = blockhash(block.number - 1); + bool dummy; + while (startGas - gasleft() < performGasToBurn) { + dummy = dummy && dummyMap[dummyIndex]; // arbitrary storage reads + dummyIndex = keccak256(abi.encode(dummyIndex, address(this))); + } + } + + function setCheckGasToBurn(uint256 value) public { + checkGasToBurn = value; + } + + function setPerformGasToBurn(uint256 value) public { + performGasToBurn = value; + } + + function getCountPerforms() public view returns (uint256) { + return count; + } + + function eligible() internal view returns (bool) { + return initialCall == 0 ? block.number >= firstEligibleBlock: (block.number - initialCall < testRange && block.number > nextEligible); + } + + function checkEligible() public view returns (bool) { + return eligible(); + } + + function reset() external { + initialCall = 0; + count = 0; + firstEligibleBlock = firstEligibleBuffer > 0 ? (block.number +(rand() % averageEligibilityCadence)) + firstEligibleBuffer : block.number; + } + + function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) external { + testRange = _newTestRange; + averageEligibilityCadence = _newAverageEligibilityCadence; + } + + function setFirstEligibleBuffer(uint256 _firstEligibleBuffer) external { + firstEligibleBuffer = _firstEligibleBuffer; + } + + function rand() private view returns (uint256) { + return uint256(keccak256(abi.encode(blockhash(block.number - 1), address(this)))); + } +} \ No newline at end of file diff --git a/integration-tests/contracts/ethereum/src/KeeperConsumerPerformance.sol b/integration-tests/contracts/ethereum/src/KeeperConsumerPerformance.sol new file mode 100644 index 00000000000..4d763f7276e --- /dev/null +++ b/integration-tests/contracts/ethereum/src/KeeperConsumerPerformance.sol @@ -0,0 +1,83 @@ +pragma solidity 0.7.6; + +contract KeeperConsumerPerformance { + event PerformingUpkeep(bool eligible, address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber); + + uint256 public initialCall = 0; + uint256 public nextEligible = 0; + uint256 public testRange; + uint256 public averageEligibilityCadence; + uint256 public checkGasToBurn; + uint256 public performGasToBurn; + mapping(bytes32 => bool) public dummyMap; // used to force storage lookup + + uint256 public count = 0; + + constructor(uint256 _testRange, uint256 _averageEligibilityCadence, uint256 _checkGasToBurn, uint256 _performGasToBurn) { + testRange = _testRange; + averageEligibilityCadence = _averageEligibilityCadence; + checkGasToBurn = _checkGasToBurn; + performGasToBurn = _performGasToBurn; + } + + function checkUpkeep(bytes calldata data) external view returns (bool, bytes memory) { + uint256 startGas = gasleft(); + bool dummy; + // burn gas + while (startGas - gasleft() < checkGasToBurn) { + dummy = dummy && dummyMap[blockhash(block.number)]; // arbitrary state reads + } + return (eligible(), abi.encode(dummy)); + } + + function performUpkeep(bytes calldata data) external { + uint256 startGas = gasleft(); + bool eligible = eligible(); + uint256 blockNum = block.number; + emit PerformingUpkeep(eligible, tx.origin, initialCall, nextEligible, blockNum); + require(eligible); + if (initialCall == 0) { + initialCall = blockNum; + } + nextEligible = (blockNum + (rand() % (averageEligibilityCadence * 2))) + 1; + count++; + // burn gas + while (startGas - gasleft() < performGasToBurn) { + dummyMap[blockhash(block.number)] = false; + } + } + + function setCheckGasToBurn(uint256 value) public { + checkGasToBurn = value; + } + + function setPerformGasToBurn(uint256 value) public { + performGasToBurn = value; + } + + function getCountPerforms() public view returns (uint256) { + return count; + } + + function eligible() internal view returns (bool) { + return initialCall == 0 || (block.number - initialCall < testRange && block.number > nextEligible); + } + + function checkEligible() public view returns (bool) { + return eligible(); + } + + function reset() external { + initialCall = 0; + count = 0; + } + + function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) external { + testRange = _newTestRange; + averageEligibilityCadence = _newAverageEligibilityCadence; + } + + function rand() private view returns (uint256) { + return uint256(keccak256(abi.encode(blockhash(block.number - 1), address(this)))); + } +} \ No newline at end of file diff --git a/integration-tests/contracts/ethereum/src/PerformDataChecker.sol b/integration-tests/contracts/ethereum/src/PerformDataChecker.sol new file mode 100644 index 00000000000..df63415d76b --- /dev/null +++ b/integration-tests/contracts/ethereum/src/PerformDataChecker.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.6; + +import "./KeeperCompatibleInterface.sol"; + +contract PerformDataChecker is KeeperCompatibleInterface { + uint256 public counter; + bytes public s_expectedData; + + constructor(bytes memory expectedData) { + s_expectedData = expectedData; + } + + function setExpectedData(bytes calldata expectedData) external { + s_expectedData = expectedData; + } + + function checkUpkeep(bytes calldata checkData) + external + view + override + returns (bool upkeepNeeded, bytes memory performData) + { + return (keccak256(checkData) == keccak256(s_expectedData), checkData); + } + + function performUpkeep(bytes calldata performData) external override { + if (keccak256(performData) == keccak256(s_expectedData)) { + counter++; + } + } +} diff --git a/integration-tests/contracts/ethereum/src/UpkeepCounter.sol b/integration-tests/contracts/ethereum/src/UpkeepCounter.sol new file mode 100644 index 00000000000..3c42b58255f --- /dev/null +++ b/integration-tests/contracts/ethereum/src/UpkeepCounter.sol @@ -0,0 +1,57 @@ +pragma solidity ^0.7.6; + +contract UpkeepCounter { + event PerformingUpkeep( + address indexed from, + uint256 initialBlock, + uint256 lastBlock, + uint256 previousBlock, + uint256 counter + ); + + uint256 public testRange; + uint256 public interval; + uint256 public lastBlock; + uint256 public previousPerformBlock; + uint256 public initialBlock; + uint256 public counter; + + constructor(uint256 _testRange, uint256 _interval) { + testRange = _testRange; + interval = _interval; + previousPerformBlock = 0; + lastBlock = block.number; + initialBlock = 0; + counter = 0; + } + + function checkUpkeep(bytes calldata data) external view returns (bool, bytes memory) { + return (eligible(), data); + } + + function performUpkeep(bytes calldata performData) external { + if (initialBlock == 0) { + initialBlock = block.number; + } + lastBlock = block.number; + counter = counter + 1; + performData; + emit PerformingUpkeep(tx.origin, initialBlock, lastBlock, previousPerformBlock, counter); + previousPerformBlock = lastBlock; + } + + function eligible() public view returns (bool) { + if (initialBlock == 0) { + return true; + } + + return (block.number - initialBlock) < testRange && (block.number - lastBlock) >= interval; + } + + function setSpread(uint256 _testRange, uint256 _interval) external { + testRange = _testRange; + interval = _interval; + initialBlock = 0; + counter = 0; + } +} diff --git a/integration-tests/contracts/ethereum/src/UpkeepPerformCounterRestrictive.sol b/integration-tests/contracts/ethereum/src/UpkeepPerformCounterRestrictive.sol new file mode 100644 index 00000000000..35e28584a09 --- /dev/null +++ b/integration-tests/contracts/ethereum/src/UpkeepPerformCounterRestrictive.sol @@ -0,0 +1,85 @@ +pragma solidity 0.7.6; + +contract UpkeepPerformCounterRestrictive { + event PerformingUpkeep(bool eligible, address from, uint256 initialCall, uint256 nextEligible, uint256 blockNumber); + + uint256 public initialCall = 0; + uint256 public nextEligible = 0; + uint256 public testRange; + uint256 public averageEligibilityCadence; + uint256 public checkGasToBurn; + uint256 public performGasToBurn; + mapping(bytes32 => bool) public dummyMap; // used to force storage lookup + + uint256 private count = 0; + + constructor(uint256 _testRange, uint256 _averageEligibilityCadence) { + testRange = _testRange; + averageEligibilityCadence = _averageEligibilityCadence; + } + + function checkUpkeep(bytes calldata data) external view returns (bool, bytes memory) { + uint256 startGas = gasleft(); + uint256 blockNum = block.number - 1; + bool dummy; + // burn gas + while (startGas - gasleft() < checkGasToBurn) { + dummy = dummy && dummyMap[blockhash(blockNum)]; // arbitrary storage reads + blockNum--; + } + return (eligible(), abi.encode(dummy)); + } + + function performUpkeep(bytes calldata) external { + uint256 startGas = gasleft(); + bool eligible = eligible(); + uint256 blockNum = block.number; + emit PerformingUpkeep(eligible, tx.origin, initialCall, nextEligible, blockNum); + require(eligible); + if (initialCall == 0) { + initialCall = blockNum; + } + nextEligible = (blockNum + (rand() % (averageEligibilityCadence * 2))) + 1; + count++; + // burn gas + blockNum--; + while (startGas - gasleft() < performGasToBurn) { + dummyMap[blockhash(blockNum)] = false; // arbitrary storage writes + blockNum--; + } + } + + function setCheckGasToBurn(uint256 value) public { + checkGasToBurn = value; + } + + function setPerformGasToBurn(uint256 value) public { + performGasToBurn = value; + } + + function getCountPerforms() public view returns (uint256) { + return count; + } + + function eligible() internal view returns (bool) { + return initialCall == 0 || (block.number - initialCall < testRange && block.number > nextEligible); + } + + function checkEligible() public view returns (bool) { + return eligible(); + } + + function reset() external { + initialCall = 0; + count = 0; + } + + function setSpread(uint256 _newTestRange, uint256 _newAverageEligibilityCadence) external { + testRange = _newTestRange; + averageEligibilityCadence = _newAverageEligibilityCadence; + } + + function rand() private view returns (uint256) { + return uint256(keccak256(abi.encode(blockhash(block.number - 1), address(this)))); + } +} diff --git a/integration-tests/contracts/ethereum_contracts.go b/integration-tests/contracts/ethereum_contracts.go index 8fa45f57524..e84e450fbcf 100644 --- a/integration-tests/contracts/ethereum_contracts.go +++ b/integration-tests/contracts/ethereum_contracts.go @@ -22,7 +22,7 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" "github.com/smartcontractkit/chainlink/integration-tests/client" - ethereum2 "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" + eth_contracts "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/smartcontractkit/chainlink/integration-tests/testreporters" ) @@ -136,7 +136,7 @@ func (e *EthereumAPIConsumer) CreateRequestTo( // EthereumStaking type EthereumStaking struct { client blockchain.EVMClient - staking *ethereum2.Staking + staking *eth_contracts.Staking address *common.Address } @@ -224,7 +224,7 @@ func (f *EthereumStaking) SetMerkleRoot(newMerkleRoot [32]byte) error { // EthereumAtlasFunctions type EthereumAtlasFunctions struct { client blockchain.EVMClient - atlasFunctions *ethereum2.AtlasFunctions + atlasFunctions *eth_contracts.AtlasFunctions address *common.Address } diff --git a/integration-tests/contracts/ethereum_keeper_contracts.go b/integration-tests/contracts/ethereum_keeper_contracts.go index 480a44acfeb..ba7137129e8 100644 --- a/integration-tests/contracts/ethereum_keeper_contracts.go +++ b/integration-tests/contracts/ethereum_keeper_contracts.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/upkeep_transcoder" "math/big" "strconv" "strings" @@ -17,10 +18,15 @@ import ( goabi "github.com/umbracle/ethgo/abi" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" "github.com/smartcontractkit/chainlink/core/utils" - int_ethereum "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registrar_wrapper1_2" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registrar_wrapper2_0" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper1_1" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper1_2" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper1_3" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper2_0" + "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/smartcontractkit/chainlink/integration-tests/testreporters" ) @@ -202,10 +208,10 @@ type UpkeepInfo struct { type EthereumKeeperRegistry struct { client blockchain.EVMClient version ethereum.KeeperRegistryVersion - registry1_1 *ethereum.KeeperRegistry11 - registry1_2 *ethereum.KeeperRegistry12 - registry1_3 *ethereum.KeeperRegistry13 - registry2_0 *ethereum.KeeperRegistry20 + registry1_1 *keeper_registry_wrapper1_1.KeeperRegistry + registry1_2 *keeper_registry_wrapper1_2.KeeperRegistry + registry1_3 *keeper_registry_wrapper1_3.KeeperRegistry + registry2_0 *keeper_registry_wrapper2_0.KeeperRegistry address *common.Address } @@ -269,7 +275,7 @@ func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings, ocrCon return err } - tx, err := v.registry1_2.SetConfig(txOpts, ethereum.Config1_2{ + tx, err := v.registry1_2.SetConfig(txOpts, keeper_registry_wrapper1_2.Config{ PaymentPremiumPPB: config.PaymentPremiumPPB, FlatFeeMicroLink: config.FlatFeeMicroLINK, BlockCountPerTurn: config.BlockCountPerTurn, @@ -294,7 +300,7 @@ func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings, ocrCon return err } - tx, err := v.registry1_3.SetConfig(txOpts, ethereum.Config1_3{ + tx, err := v.registry1_3.SetConfig(txOpts, keeper_registry_wrapper1_3.Config{ PaymentPremiumPPB: config.PaymentPremiumPPB, FlatFeeMicroLink: config.FlatFeeMicroLINK, BlockCountPerTurn: config.BlockCountPerTurn, @@ -1565,7 +1571,7 @@ func (v *EthereumKeeperPerformDataCheckerConsumer) SetExpectedData(ctx context.C type EthereumUpkeepResetter struct { client blockchain.EVMClient - consumer *int_ethereum.UpkeepResetter + consumer *ethereum.UpkeepResetter address *common.Address } @@ -1688,8 +1694,8 @@ func (v *EthereumKeeperConsumerBenchmark) SetFirstEligibleBuffer(ctx context.Con // registering new upkeeps. type EthereumKeeperRegistrar struct { client blockchain.EVMClient - registrar *ethereum.KeeperRegistrar - registrar20 *ethereum.KeeperRegistrar20 + registrar *keeper_registrar_wrapper1_2.KeeperRegistrar + registrar20 *keeper_registrar_wrapper2_0.KeeperRegistrar address *common.Address } @@ -1714,7 +1720,7 @@ func (v *EthereumKeeperRegistrar) EncodeRegisterRequest( senderAddr string, ) ([]byte, error) { if v.registrar20 != nil { - registryABI, err := abi.JSON(strings.NewReader(ethereum.KeeperRegistrar20MetaData.ABI)) + registryABI, err := abi.JSON(strings.NewReader(keeper_registrar_wrapper2_0.KeeperRegistrarMetaData.ABI)) if err != nil { return nil, err } @@ -1735,7 +1741,7 @@ func (v *EthereumKeeperRegistrar) EncodeRegisterRequest( } return req, nil } - registryABI, err := abi.JSON(strings.NewReader(ethereum.KeeperRegistrarMetaData.ABI)) + registryABI, err := abi.JSON(strings.NewReader(keeper_registrar_wrapper1_2.KeeperRegistrarMetaData.ABI)) if err != nil { return nil, err } @@ -1761,7 +1767,7 @@ func (v *EthereumKeeperRegistrar) EncodeRegisterRequest( // of upkeeps from one registry to another. type EthereumUpkeepTranscoder struct { client blockchain.EVMClient - transcoder *ethereum.UpkeepTranscoder + transcoder *upkeep_transcoder.UpkeepTranscoder address *common.Address } diff --git a/integration-tests/contracts/ethereum_vrf_contracts.go b/integration-tests/contracts/ethereum_vrf_contracts.go index 099d2b65567..a11ea2df04f 100644 --- a/integration-tests/contracts/ethereum_vrf_contracts.go +++ b/integration-tests/contracts/ethereum_vrf_contracts.go @@ -4,7 +4,7 @@ import ( "context" "encoding/hex" "fmt" - int_ethereum "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" + eth_contracts "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "math/big" "time" @@ -138,14 +138,14 @@ func (e *EthereumContractDeployer) DeployVRFv2Consumer(coordinatorAddr string) ( auth *bind.TransactOpts, backend bind.ContractBackend, ) (common.Address, *types.Transaction, interface{}, error) { - return int_ethereum.DeployVRFv2Consumer(auth, backend, common.HexToAddress(coordinatorAddr)) + return eth_contracts.DeployVRFv2Consumer(auth, backend, common.HexToAddress(coordinatorAddr)) }) if err != nil { return nil, err } return &EthereumVRFv2Consumer{ client: e.client, - consumer: instance.(*int_ethereum.VRFv2Consumer), + consumer: instance.(*eth_contracts.VRFv2Consumer), address: address, }, err } @@ -410,7 +410,7 @@ type EthereumVRFConsumerV2 struct { type EthereumVRFv2Consumer struct { address *common.Address client blockchain.EVMClient - consumer *int_ethereum.VRFv2Consumer + consumer *eth_contracts.VRFv2Consumer } // CurrentSubscription get current VRFv2 subscription diff --git a/integration-tests/go.mod b/integration-tests/go.mod index ac68d6ed9f8..01f4df1fee3 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -16,7 +16,7 @@ require ( github.com/smartcontractkit/chainlink v1.10.0 github.com/smartcontractkit/chainlink-env v0.30.20 github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 - github.com/smartcontractkit/chainlink-testing-framework v1.10.10 + github.com/smartcontractkit/chainlink-testing-framework v1.11.0 github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 github.com/smartcontractkit/ocr2keepers v0.6.14 github.com/smartcontractkit/ocr2vrf v0.0.0-20230313164535-dce9b4be73a3 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 5016c97a9ba..d0bf3506c3d 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1790,8 +1790,8 @@ github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230316183824-9f1e5e11e2b7 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230320130046-4d37840c6c1b h1:EptRlfHmVygt29kSYkzzPWah5WgQEuI7//YkLKTH5JY= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c h1:zQpo+pI1tFmh++wEqhif28cpTKM2cI8zkSHcOgk1qgI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.0-20230318133606-b0d74b9b5e2c/go.mod h1:3xUS0kadHzpEM7JtoTHUJkSkByHCU+LbxnQVgCaLNJA= -github.com/smartcontractkit/chainlink-testing-framework v1.10.10 h1:UR3KepUvk/x7eGYhvCI86zNWL2DlWLJflwBkNrhE/6Y= -github.com/smartcontractkit/chainlink-testing-framework v1.10.10/go.mod h1:LgVtlLXWsClw4AkYXMMu4q7feVPfJfXQOC+rWYPwV2E= +github.com/smartcontractkit/chainlink-testing-framework v1.11.0 h1:IyBUuEfWN7IJpQD2PmCHBXp63IEyXVVsw1rKGfSeRFM= +github.com/smartcontractkit/chainlink-testing-framework v1.11.0/go.mod h1:LgVtlLXWsClw4AkYXMMu4q7feVPfJfXQOC+rWYPwV2E= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407 h1:P3dhh6UkjA6Fxj39y4vQflv7GoDCa+QC/Du7CCDxjfQ= github.com/smartcontractkit/libocr v0.0.0-20221209172631-568a30f68407/go.mod h1:5JnCHuYgmIP9ZyXzgAfI5Iwu0WxBtBKp+ApeT5o1Cjw= github.com/smartcontractkit/ocr2keepers v0.6.14 h1:Rg+SYd8PCyd4CcCetwnRKjVEQsHVsV6QOaWcLhi+6sg= diff --git a/integration-tests/performance/keeper_test.go b/integration-tests/performance/keeper_test.go index be02a69ef48..885a1d924a3 100644 --- a/integration-tests/performance/keeper_test.go +++ b/integration-tests/performance/keeper_test.go @@ -16,7 +16,6 @@ import ( "github.com/smartcontractkit/chainlink-env/pkg/helm/mockserver" mockservercfg "github.com/smartcontractkit/chainlink-env/pkg/helm/mockserver-cfg" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" @@ -24,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/smartcontractkit/chainlink/integration-tests/testsetups" ) diff --git a/integration-tests/smoke/automation_test.go b/integration-tests/smoke/automation_test.go index a7374533b18..82236acb88b 100644 --- a/integration-tests/smoke/automation_test.go +++ b/integration-tests/smoke/automation_test.go @@ -18,7 +18,6 @@ import ( "github.com/smartcontractkit/chainlink-env/pkg/helm/mockserver" mockservercfg "github.com/smartcontractkit/chainlink-env/pkg/helm/mockserver-cfg" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" @@ -27,6 +26,7 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" ) const ( diff --git a/integration-tests/smoke/keeper_test.go b/integration-tests/smoke/keeper_test.go index 42c39c29d5c..399a5e362ac 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -17,7 +17,6 @@ import ( "github.com/smartcontractkit/chainlink-env/pkg/helm/mockserver" mockservercfg "github.com/smartcontractkit/chainlink-env/pkg/helm/mockserver-cfg" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" @@ -26,6 +25,7 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" ) const ( diff --git a/integration-tests/testreporters/keeper.go b/integration-tests/testreporters/keeper.go index dc0fb9c2c45..0861203f314 100644 --- a/integration-tests/testreporters/keeper.go +++ b/integration-tests/testreporters/keeper.go @@ -130,7 +130,7 @@ func (k *KeeperBlockTimeTestReporter) SendSlackNotification(t *testing.T, slackC headerText = ":x: Keeper Block Time Test FAILED :x:" } messageBlocks := testreporters.CommonSlackNotificationBlocks( - t, slackClient, headerText, k.namespace, k.keeperReportFile, testreporters.SlackUserID, testFailed, + headerText, k.namespace, k.keeperReportFile, ) ts, err := testreporters.SendSlackMessage(slackClient, slack.MsgOptionBlocks(messageBlocks...)) if err != nil { diff --git a/integration-tests/testreporters/keeper_benchmark.go b/integration-tests/testreporters/keeper_benchmark.go index 640f5536df3..72d3e7c640d 100644 --- a/integration-tests/testreporters/keeper_benchmark.go +++ b/integration-tests/testreporters/keeper_benchmark.go @@ -249,7 +249,7 @@ func (k *KeeperBenchmarkTestReporter) SendSlackNotification(t *testing.T, slackC headerText = ":x: Automation Benchmark Test FAILED :x:" } messageBlocks := testreporters.CommonSlackNotificationBlocks( - t, slackClient, headerText, k.namespace, k.keeperReportFile, testreporters.SlackUserID, testFailed, + headerText, k.namespace, k.keeperReportFile, ) ts, err := testreporters.SendSlackMessage(slackClient, slack.MsgOptionBlocks(messageBlocks...)) if err != nil { diff --git a/integration-tests/testreporters/ocr.go b/integration-tests/testreporters/ocr.go index bea1882656f..52ee1d01c30 100644 --- a/integration-tests/testreporters/ocr.go +++ b/integration-tests/testreporters/ocr.go @@ -64,7 +64,7 @@ func (o *OCRSoakTestReporter) SendSlackNotification(t *testing.T, slackClient *s headerText = ":warning: OCR Soak Test Found Anomalies :warning:" } messageBlocks := testreporters.CommonSlackNotificationBlocks( - t, slackClient, headerText, o.namespace, o.csvLocation, testreporters.SlackUserID, testFailed, + headerText, o.namespace, o.csvLocation, ) ts, err := testreporters.SendSlackMessage(slackClient, slack.MsgOptionBlocks(messageBlocks...)) if err != nil { diff --git a/integration-tests/testreporters/vrfv2.go b/integration-tests/testreporters/vrfv2.go index 7d9eddaca4f..c1ab816d4e8 100644 --- a/integration-tests/testreporters/vrfv2.go +++ b/integration-tests/testreporters/vrfv2.go @@ -80,7 +80,7 @@ func (o *VRFV2SoakTestReporter) SendSlackNotification(t *testing.T, slackClient headerText = ":x: VRFV2 Soak Test FAILED :x:" } messageBlocks := testreporters.CommonSlackNotificationBlocks( - t, slackClient, headerText, o.namespace, o.csvLocation, testreporters.SlackUserID, testFailed, + headerText, o.namespace, o.csvLocation, ) ts, err := testreporters.SendSlackMessage(slackClient, slack.MsgOptionBlocks(messageBlocks...)) if err != nil { diff --git a/integration-tests/testsetups/keeper_benchmark.go b/integration-tests/testsetups/keeper_benchmark.go index 173e47c8d38..92a2fa807ac 100644 --- a/integration-tests/testsetups/keeper_benchmark.go +++ b/integration-tests/testsetups/keeper_benchmark.go @@ -14,7 +14,6 @@ import ( "github.com/slack-go/slack" "github.com/smartcontractkit/chainlink-env/environment" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/contracts/ethereum" reportModel "github.com/smartcontractkit/chainlink-testing-framework/testreporters" "github.com/smartcontractkit/chainlink-testing-framework/utils" "github.com/stretchr/testify/require" @@ -22,7 +21,13 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/smartcontractkit/chainlink/integration-tests/testreporters" + + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper1_1" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper1_2" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper1_3" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/keeper_registry_wrapper2_0" ) // KeeperBenchmarkTest builds a test to check that chainlink nodes are able to upkeep a specified amount of Upkeep @@ -261,19 +266,19 @@ func (k *KeeperBenchmarkTest) subscribeToUpkeepPerformedEvent( rIndex int, ) { l := utils.GetTestLogger(t) - contractABI, err := ethereum.KeeperRegistry11MetaData.GetAbi() + contractABI, err := keeper_registry_wrapper1_1.KeeperRegistryMetaData.GetAbi() require.NoError(t, err, "Error getting ABI") switch k.Inputs.RegistryVersions[rIndex] { case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: - contractABI, err = ethereum.KeeperRegistry11MetaData.GetAbi() + contractABI, err = keeper_registry_wrapper1_1.KeeperRegistryMetaData.GetAbi() case ethereum.RegistryVersion_1_2: - contractABI, err = ethereum.KeeperRegistry12MetaData.GetAbi() + contractABI, err = keeper_registry_wrapper1_2.KeeperRegistryMetaData.GetAbi() case ethereum.RegistryVersion_1_3: - contractABI, err = ethereum.KeeperRegistry13MetaData.GetAbi() + contractABI, err = keeper_registry_wrapper1_3.KeeperRegistryMetaData.GetAbi() case ethereum.RegistryVersion_2_0: - contractABI, err = ethereum.KeeperRegistry20MetaData.GetAbi() + contractABI, err = keeper_registry_wrapper2_0.KeeperRegistryMetaData.GetAbi() default: - contractABI, err = ethereum.KeeperRegistry13MetaData.GetAbi() + contractABI, err = keeper_registry_wrapper2_0.KeeperRegistryMetaData.GetAbi() } require.NoError(t, err, "Getting contract abi for registry shouldn't fail") From 46e4008e489a0b024275b5cd399fbc5ca74efdef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Vitor=20de=20Lima=20Matos?= Date: Mon, 20 Mar 2023 14:32:44 -0300 Subject: [PATCH 24/25] LogPoller - support downstream testing (#8648) Co-authored-by: connorwstein --- .../evm/client/simulated_backend_client.go | 2 + core/chains/evm/logpoller/helper_test.go | 82 +- core/chains/evm/logpoller/integration_test.go | 390 --------- core/chains/evm/logpoller/log_poller.go | 126 +-- .../evm/logpoller/log_poller_internal_test.go | 316 +++++++ core/chains/evm/logpoller/log_poller_test.go | 814 ++++++++---------- core/chains/evm/logpoller/orm.go | 4 +- core/chains/evm/logpoller/orm_test.go | 219 +++-- core/internal/testutils/testutils.go | 2 +- 9 files changed, 959 insertions(+), 996 deletions(-) delete mode 100644 core/chains/evm/logpoller/integration_test.go create mode 100644 core/chains/evm/logpoller/log_poller_internal_test.go diff --git a/core/chains/evm/client/simulated_backend_client.go b/core/chains/evm/client/simulated_backend_client.go index ea29282a293..bd347bd9488 100644 --- a/core/chains/evm/client/simulated_backend_client.go +++ b/core/chains/evm/client/simulated_backend_client.go @@ -239,6 +239,7 @@ func (c *SimulatedBackendClient) HeadByNumber(ctx context.Context, n *big.Int) ( Hash: header.Hash(), Number: header.Number.Int64(), ParentHash: header.ParentHash, + Timestamp: time.Unix(int64(header.Time), 0), }, nil } @@ -255,6 +256,7 @@ func (c *SimulatedBackendClient) HeadByHash(ctx context.Context, h common.Hash) Hash: header.Hash(), Number: header.Number.Int64(), ParentHash: header.ParentHash, + Timestamp: time.Unix(int64(header.Time), 0), }, nil } diff --git a/core/chains/evm/logpoller/helper_test.go b/core/chains/evm/logpoller/helper_test.go index 6b279157ab4..b48596693e6 100644 --- a/core/chains/evm/logpoller/helper_test.go +++ b/core/chains/evm/logpoller/helper_test.go @@ -1,23 +1,26 @@ -package logpoller +package logpoller_test import ( "context" + "database/sql" "math/big" + "strings" "testing" "time" - "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/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" - "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethdb" - "github.com/smartcontractkit/sqlx" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/log_emitter" "github.com/smartcontractkit/chainlink/core/internal/testutils" "github.com/smartcontractkit/chainlink/core/internal/testutils/pgtest" @@ -25,12 +28,16 @@ import ( "github.com/smartcontractkit/chainlink/core/utils" ) +var ( + EmitterABI, _ = abi.JSON(strings.NewReader(log_emitter.LogEmitterABI)) +) + type TestHarness struct { - Lggr logger.Logger - ChainID *big.Int - db *sqlx.DB - ORM *ORM - LogPoller *logPoller + Lggr logger.Logger + // Chain2/ORM2 is just a dummy second chain, doesn't have a client. + ChainID, ChainID2 *big.Int + ORM, ORM2 *logpoller.ORM + LogPoller logpoller.LogPollerTest Client *backends.SimulatedBackend Owner *bind.TransactOpts Emitter1, Emitter2 *log_emitter.LogEmitter @@ -38,14 +45,16 @@ type TestHarness struct { EthDB ethdb.Database } -func SetupTH(t *testing.T, finalityDepth, backfillBatchSize, rpcBatchSize int64) TestHarness { +func SetupTH(t testing.TB, finalityDepth, backfillBatchSize, rpcBatchSize int64) TestHarness { lggr := logger.TestLogger(t) chainID := testutils.NewRandomEVMChainID() + chainID2 := testutils.NewRandomEVMChainID() db := pgtest.NewSqlxDB(t) require.NoError(t, utils.JustError(db.Exec(`SET CONSTRAINTS evm_log_poller_blocks_evm_chain_id_fkey DEFERRED`))) require.NoError(t, utils.JustError(db.Exec(`SET CONSTRAINTS evm_log_poller_filters_evm_chain_id_fkey DEFERRED`))) require.NoError(t, utils.JustError(db.Exec(`SET CONSTRAINTS evm_logs_evm_chain_id_fkey DEFERRED`))) - o := NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + o := logpoller.NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + o2 := logpoller.NewORM(chainID2, db, lggr, pgtest.NewQConfig(true)) owner := testutils.MustNewSimTransactor(t) ethDB := rawdb.NewMemoryDatabase() ec := backends.NewSimulatedBackendWithDatabase(ethDB, map[common.Address]core.GenesisAccount{ @@ -55,7 +64,8 @@ func SetupTH(t *testing.T, finalityDepth, backfillBatchSize, rpcBatchSize int64) }, 10e6) // Poll period doesn't matter, we intend to call poll and save logs directly in the test. // Set it to some insanely high value to not interfere with any tests. - lp := NewLogPoller(o, client.NewSimulatedBackendClient(t, ec, chainID), lggr, 1*time.Hour, finalityDepth, backfillBatchSize, rpcBatchSize, 1000) + esc := client.NewSimulatedBackendClient(t, ec, chainID) + lp := logpoller.NewLogPoller(o, esc, lggr, 1*time.Hour, finalityDepth, backfillBatchSize, rpcBatchSize, 1000) emitterAddress1, _, emitter1, err := log_emitter.DeployLogEmitter(owner, ec) require.NoError(t, err) emitterAddress2, _, emitter2, err := log_emitter.DeployLogEmitter(owner, ec) @@ -64,8 +74,9 @@ func SetupTH(t *testing.T, finalityDepth, backfillBatchSize, rpcBatchSize int64) return TestHarness{ Lggr: lggr, ChainID: chainID, - db: db, + ChainID2: chainID2, ORM: o, + ORM2: o2, LogPoller: lp, Client: ec, Owner: owner, @@ -77,36 +88,25 @@ func SetupTH(t *testing.T, finalityDepth, backfillBatchSize, rpcBatchSize int64) } } -// returns next unfinalized block number to be fetched and saved to db -func (lp *logPoller) GetCurrentBlock() int64 { - lastProcessed, _ := lp.orm.SelectLatestBlock() - return lastProcessed.BlockNumber + 1 -} - -func (lp *logPoller) PollAndSaveLogs(ctx context.Context, currentBlockNumber int64) int64 { - lp.pollAndSaveLogs(ctx, currentBlockNumber) - return lp.GetCurrentBlock() -} - -// Similar to lp.Start(), but works after it's already been run once -func (lp *logPoller) Restart(parentCtx context.Context) error { - lp.StartStopOnce = utils.StartStopOnce{} - lp.done = make(chan struct{}) - return lp.Start(parentCtx) +func (th *TestHarness) PollAndSaveLogs(ctx context.Context, currentBlockNumber int64) int64 { + th.LogPoller.PollAndSaveLogs(ctx, currentBlockNumber) + latest, _ := th.LogPoller.LatestBlock() + return latest + 1 } -func (lp *logPoller) Filter() ethereum.FilterQuery { - return lp.filter(nil, nil, nil) -} - -func (o *ORM) SelectLogsByBlockRange(start, end int64) ([]Log, error) { - return o.selectLogsByBlockRange(start, end) -} - -func (lp *logPoller) ConvertLogs(gethLogs []types.Log, blocks []LogPollerBlock) []Log { - return convertLogs(gethLogs, blocks, lp.lggr, lp.ec.ChainID()) +func (th *TestHarness) assertDontHave(t *testing.T, start, end int) { + for i := start; i < end; i++ { + _, err := th.ORM.SelectBlockByNumber(int64(i)) + assert.True(t, errors.Is(err, sql.ErrNoRows)) + } } -func (lp *logPoller) BlocksFromLogs(ctx context.Context, logs []types.Log) (blocks []LogPollerBlock, err error) { - return lp.blocksFromLogs(ctx, logs) +func (th *TestHarness) assertHaveCanonical(t *testing.T, start, end int) { + for i := start; i < end; i++ { + blk, err := th.ORM.SelectBlockByNumber(int64(i)) + require.NoError(t, err, "block %v", i) + chainBlk, err := th.Client.BlockByNumber(testutils.Context(t), big.NewInt(int64(i))) + require.NoError(t, err) + assert.Equal(t, chainBlk.Hash().Bytes(), blk.BlockHash.Bytes(), "block %v", i) + } } diff --git a/core/chains/evm/logpoller/integration_test.go b/core/chains/evm/logpoller/integration_test.go deleted file mode 100644 index 4739444f5da..00000000000 --- a/core/chains/evm/logpoller/integration_test.go +++ /dev/null @@ -1,390 +0,0 @@ -package logpoller_test - -import ( - "context" - "fmt" - "math/big" - "strings" - "testing" - "time" - - "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/rawdb" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/params" - "github.com/pkg/errors" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink/core/chains/evm/logpoller" - evmtypes "github.com/smartcontractkit/chainlink/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/log_emitter" - "github.com/smartcontractkit/chainlink/core/internal/cltest/heavyweight" - "github.com/smartcontractkit/chainlink/core/internal/testutils" - "github.com/smartcontractkit/chainlink/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/core/logger" - "github.com/smartcontractkit/chainlink/core/services/pg" - "github.com/smartcontractkit/chainlink/core/utils" -) - -var ( - EmitterABI, _ = abi.JSON(strings.NewReader(log_emitter.LogEmitterABI)) -) - -func logRuntime(t *testing.T, start time.Time) { - t.Log("runtime", time.Since(start)) -} - -func TestPopulateLoadedDB(t *testing.T) { - t.Skip("only for local load testing and query analysis") - lggr := logger.TestLogger(t) - _, db := heavyweight.FullTestDBV2(t, "logs_scale", nil) - chainID := big.NewInt(137) - _, err := db.Exec(`INSERT INTO evm_chains (id, created_at, updated_at) VALUES ($1, NOW(), NOW())`, utils.NewBig(chainID)) - require.NoError(t, err) - o := logpoller.NewORM(big.NewInt(137), db, lggr, pgtest.NewQConfig(true)) - event1 := EmitterABI.Events["Log1"].ID - address1 := common.HexToAddress("0x2ab9a2Dc53736b361b72d900CdF9F78F9406fbbb") - address2 := common.HexToAddress("0x6E225058950f237371261C985Db6bDe26df2200E") - - // We start at 1 just so block number > 0 - for j := 1; j < 1000; j++ { - var logs []logpoller.Log - // Max we can insert per batch - for i := 0; i < 1000; i++ { - addr := address1 - if (i+(1000*j))%2 == 0 { - addr = address2 - } - logs = append(logs, logpoller.Log{ - EvmChainId: utils.NewBig(chainID), - LogIndex: 1, - BlockHash: common.HexToHash(fmt.Sprintf("0x%d", i+(1000*j))), - BlockNumber: int64(i + (1000 * j)), - EventSig: event1, - Topics: [][]byte{event1[:], logpoller.EvmWord(uint64(i + 1000*j)).Bytes()}, - Address: addr, - TxHash: common.HexToHash("0x1234"), - Data: logpoller.EvmWord(uint64(i + 1000*j)).Bytes(), - }) - } - require.NoError(t, o.InsertLogs(logs)) - } - func() { - defer logRuntime(t, time.Now()) - _, err := o.SelectLogsByBlockRangeFilter(750000, 800000, address1, event1) - require.NoError(t, err) - }() - func() { - defer logRuntime(t, time.Now()) - _, err = o.SelectLatestLogEventSigsAddrsWithConfs(0, []common.Address{address1}, []common.Hash{event1}, 0) - require.NoError(t, err) - }() - - // Confirm all the logs. - require.NoError(t, o.InsertBlock(common.HexToHash("0x10"), 1000000, time.Now())) - func() { - defer logRuntime(t, time.Now()) - lgs, err := o.SelectDataWordRange(address1, event1, 0, logpoller.EvmWord(500000), logpoller.EvmWord(500020), 0) - require.NoError(t, err) - // 10 since every other log is for address1 - assert.Equal(t, 10, len(lgs)) - }() - - func() { - defer logRuntime(t, time.Now()) - lgs, err := o.SelectIndexedLogs(address2, event1, 1, []common.Hash{logpoller.EvmWord(500000), logpoller.EvmWord(500020)}, 0) - require.NoError(t, err) - assert.Equal(t, 2, len(lgs)) - }() - - func() { - defer logRuntime(t, time.Now()) - lgs, err := o.SelectIndexLogsTopicRange(address1, event1, 1, logpoller.EvmWord(500000), logpoller.EvmWord(500020), 0) - require.NoError(t, err) - assert.Equal(t, 10, len(lgs)) - }() -} - -func TestLogPoller_Integration(t *testing.T) { - th := logpoller.SetupTH(t, 2, 3, 2) - th.Client.Commit() // Block 2. Ensure we have finality number of blocks - - err := th.LogPoller.RegisterFilter(logpoller.Filter{"Integration test", []common.Hash{EmitterABI.Events["Log1"].ID}, []common.Address{th.EmitterAddress1}}) - require.NoError(t, err) - require.Len(t, th.LogPoller.Filter().Addresses, 1) - require.Len(t, th.LogPoller.Filter().Topics, 1) - - // Calling Start() after RegisterFilter() simulates a node restart after job creation, should reload filter from db. - require.NoError(t, th.LogPoller.Start(testutils.Context(t))) - require.Len(t, th.LogPoller.Filter().Addresses, 1) - require.Len(t, th.LogPoller.Filter().Topics, 1) - - // Emit some logs in blocks 3->7. - for i := 0; i < 5; i++ { - _, err := th.Emitter1.EmitLog1(th.Owner, []*big.Int{big.NewInt(int64(i))}) - require.NoError(t, err) - _, err = th.Emitter1.EmitLog2(th.Owner, []*big.Int{big.NewInt(int64(i))}) - require.NoError(t, err) - th.Client.Commit() - } - // The poller starts on a new chain at latest-finality (5 in this case), - // replay to ensure we get all the logs. - require.NoError(t, th.LogPoller.Replay(testutils.Context(t), 1)) - - // We should immediately have all those Log1 logs. - logs, err := th.LogPoller.Logs(2, 7, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) - require.NoError(t, err) - assert.Equal(t, 5, len(logs)) - // Now let's update the filter and replay to get Log2 logs. - err = th.LogPoller.RegisterFilter(logpoller.Filter{ - "Emitter - log2", []common.Hash{EmitterABI.Events["Log2"].ID}, - []common.Address{th.EmitterAddress1}, - }) - require.NoError(t, err) - // Replay an invalid block should error - assert.Error(t, th.LogPoller.Replay(testutils.Context(t), 0)) - assert.Error(t, th.LogPoller.Replay(testutils.Context(t), 20)) - // Replay only from block 4, so we should see logs in block 4,5,6,7 (4 logs) - require.NoError(t, th.LogPoller.Replay(testutils.Context(t), 4)) - - // We should immediately see 4 logs2 logs. - logs, err = th.LogPoller.Logs(2, 7, EmitterABI.Events["Log2"].ID, th.EmitterAddress1) - require.NoError(t, err) - assert.Equal(t, 4, len(logs)) - - // Cancelling a replay should return an error synchronously. - ctx, cancel := context.WithCancel(context.Background()) - cancel() - assert.True(t, errors.Is(th.LogPoller.Replay(ctx, 4), logpoller.ErrReplayAbortedByClient)) - - require.NoError(t, th.LogPoller.Close()) -} - -// Simulate a badly behaving rpc server, where unfinalized blocks can return different logs -// for the same block hash. We should be able to handle this without missing any logs, as -// long as the logs returned for finalized blocks are consistent. -func Test_BackupLogPoller(t *testing.T) { - th := logpoller.SetupTH(t, 2, 3, 2) - // later, we will need at least 32 blocks filled with logs for cache invalidation - for i := int64(0); i < 32; i++ { - // to invalidate geth's internal read-cache, a matching log must be found in the bloom filter - // for each of the 32 blocks - tx, err := th.Emitter1.EmitLog1(th.Owner, []*big.Int{big.NewInt(i + 7)}) - require.NoError(t, err) - require.NotNil(t, tx) - th.Client.Commit() - } - - ctx := testutils.Context(t) - - filter1 := logpoller.Filter{"filter1", []common.Hash{ - EmitterABI.Events["Log1"].ID, - EmitterABI.Events["Log2"].ID}, - []common.Address{th.EmitterAddress1}} - err := th.LogPoller.RegisterFilter(filter1) - require.NoError(t, err) - - filters, err := th.ORM.LoadFilters(pg.WithParentCtx(testutils.Context(t))) - require.NoError(t, err) - require.Equal(t, 1, len(filters)) - require.Equal(t, filter1, filters["filter1"]) - - err = th.LogPoller.RegisterFilter( - logpoller.Filter{"filter2", - []common.Hash{EmitterABI.Events["Log1"].ID}, - []common.Address{th.EmitterAddress2}}) - require.NoError(t, err) - - defer th.LogPoller.UnregisterFilter("filter1") - defer th.LogPoller.UnregisterFilter("filter2") - - // generate some tx's with logs - tx1, err := th.Emitter1.EmitLog1(th.Owner, []*big.Int{big.NewInt(1)}) - require.NoError(t, err) - require.NotNil(t, tx1) - - tx2, err := th.Emitter1.EmitLog2(th.Owner, []*big.Int{big.NewInt(2)}) - require.NoError(t, err) - require.NotNil(t, tx2) - - tx3, err := th.Emitter2.EmitLog1(th.Owner, []*big.Int{big.NewInt(3)}) - require.NoError(t, err) - require.NotNil(t, tx3) - - th.Client.Commit() // commit block 34 with 3 tx's included - - h := th.Client.Blockchain().CurrentHeader() // get latest header - require.Equal(t, uint64(34), h.Number.Uint64()) - - // save these 3 receipts for later - receipts := rawdb.ReadReceipts(th.EthDB, h.Hash(), h.Number.Uint64(), params.AllEthashProtocolChanges) - require.NotZero(t, receipts.Len()) - - // Simulate a situation where the rpc server has a block, but no logs available for it yet - // this can't happen with geth itself, but can with other clients. - rawdb.WriteReceipts(th.EthDB, h.Hash(), h.Number.Uint64(), types.Receipts{}) // wipes out all logs for block 34 - - body := rawdb.ReadBody(th.EthDB, h.Hash(), h.Number.Uint64()) - require.Equal(t, 3, len(body.Transactions)) - txs := body.Transactions // save transactions for later - body.Transactions = types.Transactions{} // number of tx's must match # of logs for GetLogs() to succeed - rawdb.WriteBody(th.EthDB, h.Hash(), h.Number.Uint64(), body) - - currentBlock := th.LogPoller.PollAndSaveLogs(ctx, 1) - assert.Equal(t, int64(35), currentBlock) - - // simulate logs becoming available - rawdb.WriteReceipts(th.EthDB, h.Hash(), h.Number.Uint64(), receipts) - require.True(t, rawdb.HasReceipts(th.EthDB, h.Hash(), h.Number.Uint64())) - body.Transactions = txs - rawdb.WriteBody(th.EthDB, h.Hash(), h.Number.Uint64(), body) - - // flush out cached block 34 by reading logs from first 32 blocks - query := ethereum.FilterQuery{ - FromBlock: big.NewInt(int64(2)), - ToBlock: big.NewInt(int64(33)), - Addresses: []common.Address{th.EmitterAddress1}, - Topics: [][]common.Hash{{EmitterABI.Events["Log1"].ID}}, - } - fLogs, err := th.Client.FilterLogs(ctx, query) - require.NoError(t, err) - require.Equal(t, 32, len(fLogs)) - - // logs shouldn't show up yet - logs, err := th.LogPoller.Logs(34, 34, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) - require.NoError(t, err) - assert.Equal(t, 0, len(logs)) - - th.Client.Commit() - th.Client.Commit() - - // Run ordinary poller + backup poller at least once - require.NoError(t, th.LogPoller.Restart(testutils.Context(t))) - time.Sleep(500 * time.Millisecond) - require.NoError(t, th.LogPoller.Close()) - currentBlock = th.LogPoller.GetCurrentBlock() - - require.Equal(t, int64(37), currentBlock) - - // logs still shouldn't show up, because we don't want to backfill the last finalized log - // to help with reorg detection - logs, err = th.LogPoller.Logs(34, 34, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) - require.NoError(t, err) - assert.Equal(t, 0, len(logs)) - - th.Client.Commit() - - // Run ordinary poller + backup poller at least once more - require.NoError(t, th.LogPoller.Restart(testutils.Context(t))) - time.Sleep(500 * time.Millisecond) - require.NoError(t, th.LogPoller.Close()) - currentBlock = th.LogPoller.GetCurrentBlock() - - require.Equal(t, int64(38), currentBlock) - - // all 3 logs in block 34 should show up now, thanks to backup logger - logs, err = th.LogPoller.Logs(30, 37, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) - require.NoError(t, err) - assert.Equal(t, 5, len(logs)) - logs, err = th.LogPoller.Logs(34, 34, EmitterABI.Events["Log2"].ID, th.EmitterAddress1) - require.NoError(t, err) - assert.Equal(t, 1, len(logs)) - logs, err = th.LogPoller.Logs(32, 36, EmitterABI.Events["Log1"].ID, th.EmitterAddress2) - require.NoError(t, err) - assert.Equal(t, 1, len(logs)) -} - -func TestLogPoller_BlockTimestamps(t *testing.T) { - t.Parallel() - ctx := testutils.Context(t) - th := logpoller.SetupTH(t, 2, 3, 2) - - addresses := []common.Address{th.EmitterAddress1, th.EmitterAddress2} - topics := []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID} - - err := th.LogPoller.RegisterFilter(logpoller.Filter{"convertLogs", topics, addresses}) - require.NoError(t, err) - - blk, err := th.Client.BlockByNumber(ctx, nil) - require.NoError(t, err) - require.Equal(t, big.NewInt(1), blk.Number()) - start := blk.Time() - - // There is automatically a 10s delay between each block. To make sure it's including the correct block timestamps, - // we introduce irregularities by inserting two additional block delays. We can't control the block times for - // blocks produced by the log emitter, but we can adjust the time on empty blocks in between. Simulated time - // sequence: [ #1 ] ..(10s + delay1).. [ #2 ] ..10s.. [ #3 (LOG1) ] ..(10s + delay2).. [ #4 ] ..10s.. [ #5 (LOG2) ] - const delay1 = 589 - const delay2 = 643 - time1 := start + 20 + delay1 - time2 := time1 + 20 + delay2 - - require.NoError(t, th.Client.AdjustTime(delay1*time.Second)) - hash := th.Client.Commit() - - blk, err = th.Client.BlockByHash(ctx, hash) - require.NoError(t, err) - require.Equal(t, big.NewInt(2), blk.Number()) - assert.Equal(t, time1-10, blk.Time()) - - _, err = th.Emitter1.EmitLog1(th.Owner, []*big.Int{big.NewInt(1)}) - require.NoError(t, err) - hash = th.Client.Commit() - - blk, err = th.Client.BlockByHash(ctx, hash) - require.NoError(t, err) - require.Equal(t, big.NewInt(3), blk.Number()) - assert.Equal(t, time1, blk.Time()) - - require.NoError(t, th.Client.AdjustTime(delay2*time.Second)) - th.Client.Commit() - _, err = th.Emitter2.EmitLog2(th.Owner, []*big.Int{big.NewInt(2)}) - require.NoError(t, err) - hash = th.Client.Commit() - - blk, err = th.Client.BlockByHash(ctx, hash) - require.NoError(t, err) - require.Equal(t, big.NewInt(5), blk.Number()) - assert.Equal(t, time2, blk.Time()) - - query := ethereum.FilterQuery{ - FromBlock: big.NewInt(2), - ToBlock: big.NewInt(5), - Topics: [][]common.Hash{topics}, - Addresses: []common.Address{th.EmitterAddress1, th.EmitterAddress2}} - - gethLogs, err := th.Client.FilterLogs(ctx, query) - require.NoError(t, err) - require.Len(t, gethLogs, 2) - - blocks, err := th.LogPoller.BlocksFromLogs(ctx, gethLogs) - require.NoError(t, err) - require.Len(t, blocks, 2) - - logs := th.LogPoller.ConvertLogs(gethLogs, blocks) - require.Len(t, logs, 2) - - val, err := logs[0].Topics.Value() - require.NoError(t, err) - s, ok := val.(string) - require.True(t, ok) - var topics0 evmtypes.HashArray - require.NoError(t, topics0.Scan(s)) - - val, err = logs[1].Topics.Value() - require.NoError(t, err) - s, ok = val.(string) - require.True(t, ok) - var topics1 evmtypes.HashArray - require.NoError(t, topics1.Scan(s)) - - assert.Equal(t, time.Unix(big.NewInt(int64(time1)).Int64(), 0).UTC(), logs[0].BlockTimestamp) - assert.Equal(t, addresses[0], logs[0].Address) - assert.Equal(t, topics[0], topics0[0]) - assert.Equal(t, time.Unix(big.NewInt(int64(time2)).Int64(), 0).UTC(), logs[1].BlockTimestamp) - assert.Equal(t, addresses[1], logs[1].Address) - assert.Equal(t, topics[1], topics1[0]) -} diff --git a/core/chains/evm/logpoller/log_poller.go b/core/chains/evm/logpoller/log_poller.go index 618fd2940bd..7ca28f15ce0 100644 --- a/core/chains/evm/logpoller/log_poller.go +++ b/core/chains/evm/logpoller/log_poller.go @@ -36,6 +36,7 @@ type LogPoller interface { UnregisterFilter(name string) error LatestBlock(qopts ...pg.QOpt) (int64, error) GetBlocksRange(ctx context.Context, numbers []uint64, qopts ...pg.QOpt) ([]LogPollerBlock, error) + // General querying Logs(start, end int64, eventSig common.Hash, address common.Address, qopts ...pg.QOpt) ([]Log, error) LogsWithSigs(start, end int64, eventSigs []common.Hash, address common.Address, qopts ...pg.QOpt) ([]Log, error) @@ -50,6 +51,14 @@ type LogPoller interface { LogsDataWordGreaterThan(eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs int, qopts ...pg.QOpt) ([]Log, error) } +type LogPollerTest interface { + LogPoller + PollAndSaveLogs(ctx context.Context, currentBlockNumber int64) + BackupPollAndSaveLogs(ctx context.Context, backupPollerBlockDelay int64) + Filter(from, to *big.Int, bh *common.Hash) ethereum.FilterQuery + GetReplayFromBlock(ctx context.Context, requested int64) (int64, error) +} + type Client interface { HeadByNumber(ctx context.Context, n *big.Int) (*evmtypes.Head, error) HeadByHash(ctx context.Context, n common.Hash) (*evmtypes.Head, error) @@ -59,9 +68,9 @@ type Client interface { } var ( - _ LogPoller = &logPoller{} - ErrReplayAbortedByClient = errors.New("replay aborted by client") - ErrReplayAbortedOnShutdown = errors.New("replay aborted, log poller shutdown") + _ LogPollerTest = &logPoller{} + ErrReplayAbortedByClient = errors.New("replay aborted by client") + ErrReplayAbortedOnShutdown = errors.New("replay aborted, log poller shutdown") ) type logPoller struct { @@ -120,7 +129,7 @@ func NewLogPoller(orm *ORM, ec Client, lggr logger.Logger, pollPeriod time.Durat rpcBatchSize: rpcBatchSize, keepBlocksDepth: keepBlocksDepth, filters: make(map[string]Filter), - filterDirty: true, // Always build filter on first call to cache an empty filter if nothing registered yet. + filterDirty: true, // Always build Filter on first call to cache an empty filter if nothing registered yet. } } @@ -146,9 +155,9 @@ func FilterName(id string, args ...any) string { return s.String() } -// contains returns true if this filter already fully contains a +// Contains returns true if this filter already fully Contains a // filter passed to it. -func (filter *Filter) contains(other *Filter) bool { +func (filter *Filter) Contains(other *Filter) bool { if other == nil { return true } @@ -211,8 +220,8 @@ func (lp *logPoller) RegisterFilter(filter Filter) error { defer lp.filterMu.Unlock() if existingFilter, ok := lp.filters[filter.Name]; ok { - if existingFilter.contains(&filter) { - // Nothing new in this filter + if existingFilter.Contains(&filter) { + // Nothing new in this Filter return nil } lp.lggr.Warnw("Updating existing filter with more events or addresses", "filter", filter) @@ -234,7 +243,7 @@ func (lp *logPoller) UnregisterFilter(name string) error { _, ok := lp.filters[name] if !ok { - return errors.Errorf("filter %s not found", name) + return errors.Errorf("Filter %s not found", name) } if err := lp.orm.DeleteFilter(name); err != nil { return errors.Wrapf(err, "Failed to delete filter %s", name) @@ -244,7 +253,7 @@ func (lp *logPoller) UnregisterFilter(name string) error { return nil } -func (lp *logPoller) filter(from, to *big.Int, bh *common.Hash) ethereum.FilterQuery { +func (lp *logPoller) Filter(from, to *big.Int, bh *common.Hash) ethereum.FilterQuery { lp.filterMu.Lock() defer lp.filterMu.Unlock() if !lp.filterDirty { @@ -352,7 +361,7 @@ func (lp *logPoller) HealthReport() map[string]error { return map[string]error{lp.Name(): lp.StartStopOnce.Healthy()} } -func (lp *logPoller) getReplayFromBlock(ctx context.Context, requested int64) (int64, error) { +func (lp *logPoller) GetReplayFromBlock(ctx context.Context, requested int64) (int64, error) { lastProcessed, err := lp.orm.SelectLatestBlock(pg.WithParentCtx(ctx)) if err != nil { if !errors.Is(err, sql.ErrNoRows) { @@ -396,7 +405,7 @@ func (lp *logPoller) run() { case <-lp.ctx.Done(): return case replayReq := <-lp.replayStart: - fromBlock, err := lp.getReplayFromBlock(replayReq.ctx, replayReq.fromBlock) + fromBlock, err := lp.GetReplayFromBlock(replayReq.ctx, replayReq.fromBlock) if err == nil { if !filtersLoaded { lp.lggr.Warnw("Received replayReq before filters loaded", "fromBlock", fromBlock, "requested", replayReq.fromBlock) @@ -406,7 +415,7 @@ func (lp *logPoller) run() { } else { // Serially process replay requests. lp.lggr.Warnw("Executing replay", "fromBlock", fromBlock, "requested", replayReq.fromBlock) - lp.pollAndSaveLogs(replayReq.ctx, fromBlock) + lp.PollAndSaveLogs(replayReq.ctx, fromBlock) } } else { lp.lggr.Errorw("Error executing replay, could not get fromBlock", "err", err) @@ -458,7 +467,7 @@ func (lp *logPoller) run() { } else { start = lastProcessed.BlockNumber + 1 } - lp.pollAndSaveLogs(lp.ctx, start) + lp.PollAndSaveLogs(lp.ctx, start) case <-backupLogPollTick: // Backup log poller: this serves as an emergency backup to protect against eventual-consistency behavior // of an rpc node (seen occasionally on optimism, but possibly could happen on other chains?). If the first @@ -475,43 +484,7 @@ func (lp *logPoller) run() { lp.lggr.Warnw("backup log poller ran before filters loaded, skipping") continue } - - if lp.backupPollerNextBlock == 0 { - lastProcessed, err := lp.orm.SelectLatestBlock(pg.WithParentCtx(lp.ctx)) - if err != nil { - if errors.Is(err, sql.ErrNoRows) { - lp.lggr.Warnw("backup log poller ran before first successful log poller run, skipping") - } else { - lp.lggr.Errorw("unable to get starting block", "err", err) - } - continue - } - - // If this is our first run, start max(finalityDepth+1, backupPollerBlockDelay) blocks behind the last processed - // (or at block 0 if whole blockchain is too short) - lp.backupPollerNextBlock = lastProcessed.BlockNumber - mathutil.Max(lp.finalityDepth+1, backupPollerBlockDelay) - if lastProcessed.BlockNumber > backupPollerBlockDelay { - lp.backupPollerNextBlock = lastProcessed.BlockNumber - backupPollerBlockDelay - } - } - - latestBlock, err := lp.ec.HeadByNumber(lp.ctx, nil) - if err != nil { - lp.lggr.Warnw("backup logpoller failed to get latest block", "err", err) - continue - } - - lastSafeBackfillBlock := latestBlock.Number - lp.finalityDepth - 1 - if lastSafeBackfillBlock >= lp.backupPollerNextBlock { - lp.lggr.Infow("Backup poller backfilling logs", "start", lp.backupPollerNextBlock, "end", lastSafeBackfillBlock) - if err = lp.backfill(lp.ctx, lp.backupPollerNextBlock, lastSafeBackfillBlock); err != nil { - // If there's an error backfilling, we can just return and retry from the last block saved - // since we don't save any blocks on backfilling. We may re-insert the same logs but thats ok. - lp.lggr.Warnw("Backup poller failed", "err", err) - continue - } - lp.backupPollerNextBlock = lastSafeBackfillBlock + 1 - } + lp.BackupPollAndSaveLogs(lp.ctx, backupPollerBlockDelay) case <-blockPruneTick: blockPruneTick = time.After(lp.pollPeriod * 1000) if err := lp.pruneOldBlocks(lp.ctx); err != nil { @@ -521,6 +494,45 @@ func (lp *logPoller) run() { } } +func (lp *logPoller) BackupPollAndSaveLogs(ctx context.Context, backupPollerBlockDelay int64) { + if lp.backupPollerNextBlock == 0 { + lastProcessed, err := lp.orm.SelectLatestBlock(pg.WithParentCtx(ctx)) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + lp.lggr.Warnw("Backup log poller ran before first successful log poller run, skipping") + } else { + lp.lggr.Errorw("Backup log poller unable to get starting block", "err", err) + } + return + } + + // If this is our first run, start max(finalityDepth+1, backupPollerBlockDelay) blocks behind the last processed + // (or at block 0 if whole blockchain is too short) + lp.backupPollerNextBlock = lastProcessed.BlockNumber - mathutil.Max(lp.finalityDepth+1, backupPollerBlockDelay) + if lastProcessed.BlockNumber > backupPollerBlockDelay { + lp.backupPollerNextBlock = lastProcessed.BlockNumber - backupPollerBlockDelay + } + } + + latestBlock, err := lp.ec.HeadByNumber(ctx, nil) + if err != nil { + lp.lggr.Warnw("Backup logpoller failed to get latest block", "err", err) + return + } + + lastSafeBackfillBlock := latestBlock.Number - lp.finalityDepth - 1 + if lastSafeBackfillBlock >= lp.backupPollerNextBlock { + lp.lggr.Infow("Backup poller backfilling logs", "start", lp.backupPollerNextBlock, "end", lastSafeBackfillBlock) + if err = lp.backfill(ctx, lp.backupPollerNextBlock, lastSafeBackfillBlock); err != nil { + // If there's an error backfilling, we can just return and retry from the last block saved + // since we don't save any blocks on backfilling. We may re-insert the same logs but thats ok. + lp.lggr.Warnw("Backup poller failed", "err", err) + return + } + lp.backupPollerNextBlock = lastSafeBackfillBlock + 1 + } +} + // convertLogs converts an array of geth logs ([]type.Log) to an array of logpoller logs ([]Log) // // Block timestamps are extracted from blocks param. If len(blocks) == 1, the same timestamp from this block @@ -583,7 +595,7 @@ func (lp *logPoller) blocksFromLogs(ctx context.Context, logs []types.Log) (bloc func (lp *logPoller) backfill(ctx context.Context, start, end int64) error { for from := start; from <= end; from += lp.backfillBatchSize { to := mathutil.Min(from+lp.backfillBatchSize-1, end) - gethLogs, err := lp.ec.FilterLogs(ctx, lp.filter(big.NewInt(from), big.NewInt(to), nil)) + gethLogs, err := lp.ec.FilterLogs(ctx, lp.Filter(big.NewInt(from), big.NewInt(to), nil)) if err != nil { lp.lggr.Warnw("Unable query for logs, retrying", "err", err, "from", from, "to", to) return err @@ -596,7 +608,7 @@ func (lp *logPoller) backfill(ctx context.Context, start, end int64) error { return err } - lp.lggr.Debugw("Backfill found logs", "from", from, "to", to, "logs", len(gethLogs)) + lp.lggr.Debugw("Backfill found logs", "from", from, "to", to, "logs", len(gethLogs), "blocks", blocks) err = lp.orm.q.WithOpts(pg.WithParentCtx(ctx)).Transaction(func(tx pg.Queryer) error { return lp.orm.InsertLogs(convertLogs(gethLogs, blocks, lp.lggr, lp.ec.ChainID()), pg.WithQueryer(tx)) }) @@ -694,10 +706,10 @@ func (lp *logPoller) getCurrentBlockMaybeHandleReorg(ctx context.Context, curren return currentBlock, nil } -// pollAndSaveLogs On startup/crash current is the first block after the last processed block. +// PollAndSaveLogs On startup/crash current is the first block after the last processed block. // currentBlockNumber is the block from where new logs are to be polled & saved. Under normal // conditions this would be equal to lastProcessed.BlockNumber + 1. -func (lp *logPoller) pollAndSaveLogs(ctx context.Context, currentBlockNumber int64) { +func (lp *logPoller) PollAndSaveLogs(ctx context.Context, currentBlockNumber int64) { lp.lggr.Debugw("Polling for logs", "currentBlockNumber", currentBlockNumber) latestBlock, err := lp.ec.HeadByNumber(ctx, nil) if err != nil { @@ -759,12 +771,12 @@ func (lp *logPoller) pollAndSaveLogs(ctx context.Context, currentBlockNumber int for { h := currentBlock.Hash var logs []types.Log - logs, err = lp.ec.FilterLogs(ctx, lp.filter(nil, nil, &h)) + logs, err = lp.ec.FilterLogs(ctx, lp.Filter(nil, nil, &h)) if err != nil { lp.lggr.Warnw("Unable to query for logs, retrying", "err", err, "block", currentBlockNumber) return } - lp.lggr.Debugw("Unfinalized log query", "logs", len(logs), "currentBlockNumber", currentBlockNumber, "blockHash", currentBlock.Hash) + lp.lggr.Debugw("Unfinalized log query", "logs", len(logs), "currentBlockNumber", currentBlockNumber, "blockHash", currentBlock.Hash, "timestamp", currentBlock.Timestamp.Unix()) err = lp.orm.q.WithOpts(pg.WithParentCtx(ctx)).Transaction(func(tx pg.Queryer) error { if err2 := lp.orm.InsertBlock(h, currentBlockNumber, currentBlock.Timestamp, pg.WithQueryer(tx)); err2 != nil { return err2 diff --git a/core/chains/evm/logpoller/log_poller_internal_test.go b/core/chains/evm/logpoller/log_poller_internal_test.go new file mode 100644 index 00000000000..71bee112a7e --- /dev/null +++ b/core/chains/evm/logpoller/log_poller_internal_test.go @@ -0,0 +1,316 @@ +package logpoller + +import ( + "context" + "fmt" + "math/big" + "strings" + "testing" + "time" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/rawdb" + "github.com/ethereum/go-ethereum/core/types" + "github.com/jackc/pgconn" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest/observer" + + "github.com/smartcontractkit/chainlink/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/log_emitter" + "github.com/smartcontractkit/chainlink/core/internal/testutils" + "github.com/smartcontractkit/chainlink/core/internal/testutils/pgtest" + "github.com/smartcontractkit/chainlink/core/logger" + "github.com/smartcontractkit/chainlink/core/utils" +) + +var ( + EmitterABI, _ = abi.JSON(strings.NewReader(log_emitter.LogEmitterABI)) +) + +// Validate that filters stored in log_filters_table match the filters stored in memory +func validateFiltersTable(t *testing.T, lp *logPoller, orm *ORM) { + filters, err := orm.LoadFilters() + require.NoError(t, err) + require.Equal(t, len(filters), len(lp.filters)) + for name, dbFilter := range filters { + dbFilter := dbFilter + memFilter, ok := lp.filters[name] + require.True(t, ok) + assert.True(t, memFilter.Contains(&dbFilter), + fmt.Sprintf("in-memory Filter %s is missing some addresses or events from db Filter table", name)) + assert.True(t, dbFilter.Contains(&memFilter), + fmt.Sprintf("db Filter table %s is missing some addresses or events from in-memory Filter", name)) + } +} + +func TestLogPoller_RegisterFilter(t *testing.T) { + t.Parallel() + a1 := common.HexToAddress("0x2ab9a2dc53736b361b72d900cdf9f78f9406fbbb") + a2 := common.HexToAddress("0x2ab9a2dc53736b361b72d900cdf9f78f9406fbbc") + + lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.ErrorLevel) + chainID := testutils.NewRandomEVMChainID() + db := pgtest.NewSqlxDB(t) + + orm := NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + lp := NewLogPoller(orm, nil, lggr, 15*time.Second, 1, 1, 2, 1000) + + filter := Filter{"test Filter", []common.Hash{EmitterABI.Events["Log1"].ID}, []common.Address{a1}} + err := lp.RegisterFilter(filter) + require.Error(t, err, "RegisterFilter failed to save Filter to db") + require.Equal(t, 1, observedLogs.Len()) + assertForeignConstraintError(t, observedLogs.All()[0], "evm_log_poller_filters", "evm_log_poller_filters_evm_chain_id_fkey") + + db.Close() + db = pgtest.NewSqlxDB(t) + lggr = logger.TestLogger(t) + orm = NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + + // disable check that chain id exists for rest of tests + require.NoError(t, utils.JustError(db.Exec(`SET CONSTRAINTS evm_log_poller_filters_evm_chain_id_fkey DEFERRED`))) + // Set up a test chain with a log emitting contract deployed. + + lp = NewLogPoller(orm, nil, lggr, 15*time.Second, 1, 1, 2, 1000) + + // We expect a zero Filter if nothing registered yet. + f := lp.Filter(nil, nil, nil) + require.Equal(t, 1, len(f.Addresses)) + assert.Equal(t, common.HexToAddress("0x0000000000000000000000000000000000000000"), f.Addresses[0]) + + err = lp.RegisterFilter(Filter{"Emitter Log 1", []common.Hash{EmitterABI.Events["Log1"].ID}, []common.Address{a1}}) + require.NoError(t, err) + assert.Equal(t, []common.Address{a1}, lp.Filter(nil, nil, nil).Addresses) + assert.Equal(t, [][]common.Hash{{EmitterABI.Events["Log1"].ID}}, lp.Filter(nil, nil, nil).Topics) + validateFiltersTable(t, lp, orm) + + // Should de-dupe EventSigs + err = lp.RegisterFilter(Filter{"Emitter Log 1 + 2", []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, []common.Address{a2}}) + require.NoError(t, err) + assert.Equal(t, []common.Address{a1, a2}, lp.Filter(nil, nil, nil).Addresses) + assert.Equal(t, [][]common.Hash{{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}}, lp.Filter(nil, nil, nil).Topics) + validateFiltersTable(t, lp, orm) + + // Should de-dupe Addresses + err = lp.RegisterFilter(Filter{"Emitter Log 1 + 2 dupe", []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, []common.Address{a2}}) + require.NoError(t, err) + assert.Equal(t, []common.Address{a1, a2}, lp.Filter(nil, nil, nil).Addresses) + assert.Equal(t, [][]common.Hash{{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}}, lp.Filter(nil, nil, nil).Topics) + validateFiltersTable(t, lp, orm) + + // Address required. + err = lp.RegisterFilter(Filter{"no address", []common.Hash{EmitterABI.Events["Log1"].ID}, []common.Address{}}) + require.Error(t, err) + // Event required + err = lp.RegisterFilter(Filter{"No event", []common.Hash{}, []common.Address{a1}}) + require.Error(t, err) + validateFiltersTable(t, lp, orm) + + // Removing non-existence Filter should error. + err = lp.UnregisterFilter("Filter doesn't exist") + require.Error(t, err) + + // Check that all filters are still there + _, ok := lp.filters["Emitter Log 1"] + require.True(t, ok, "'Emitter Log 1 Filter' missing") + _, ok = lp.filters["Emitter Log 1 + 2"] + require.True(t, ok, "'Emitter Log 1 + 2' Filter missing") + _, ok = lp.filters["Emitter Log 1 + 2 dupe"] + require.True(t, ok, "'Emitter Log 1 + 2 dupe' Filter missing") + + // Removing an existing Filter should remove it from both memory and db + err = lp.UnregisterFilter("Emitter Log 1 + 2") + require.NoError(t, err) + _, ok = lp.filters["Emitter Log 1 + 2"] + require.False(t, ok, "'Emitter Log 1 Filter' should have been removed by UnregisterFilter()") + require.Len(t, lp.filters, 2) + validateFiltersTable(t, lp, orm) + + err = lp.UnregisterFilter("Emitter Log 1 + 2 dupe") + require.NoError(t, err) + err = lp.UnregisterFilter("Emitter Log 1") + require.NoError(t, err) + assert.Len(t, lp.filters, 0) + filters, err := lp.orm.LoadFilters() + require.NoError(t, err) + assert.Len(t, filters, 0) + + // Make sure cache was invalidated + assert.Len(t, lp.Filter(nil, nil, nil).Addresses, 1) + assert.Equal(t, lp.Filter(nil, nil, nil).Addresses[0], common.HexToAddress("0x0000000000000000000000000000000000000000")) + assert.Len(t, lp.Filter(nil, nil, nil).Topics, 1) + assert.Len(t, lp.Filter(nil, nil, nil).Topics[0], 0) +} + +func assertForeignConstraintError(t *testing.T, observedLog observer.LoggedEntry, + table string, constraint string) { + + assert.Equal(t, "SQL ERROR", observedLog.Entry.Message) + + field := observedLog.Context[0] + require.Equal(t, zapcore.ErrorType, field.Type) + err, ok := field.Interface.(error) + var pgErr *pgconn.PgError + require.True(t, errors.As(err, &pgErr)) + require.True(t, ok) + assert.Equal(t, "23503", pgErr.SQLState()) // foreign key constraint violation code + assert.Equal(t, table, pgErr.TableName) + assert.Equal(t, constraint, pgErr.ConstraintName) +} + +func TestLogPoller_DBErrorHandling(t *testing.T) { + t.Parallel() + lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.WarnLevel) + chainID1 := testutils.NewRandomEVMChainID() + chainID2 := testutils.NewRandomEVMChainID() + db := pgtest.NewSqlxDB(t) + o := NewORM(chainID1, db, lggr, pgtest.NewQConfig(true)) + + owner := testutils.MustNewSimTransactor(t) + ethDB := rawdb.NewMemoryDatabase() + ec := backends.NewSimulatedBackendWithDatabase(ethDB, map[common.Address]core.GenesisAccount{ + owner.From: { + Balance: big.NewInt(0).Mul(big.NewInt(10), big.NewInt(1e18)), + }, + }, 10e6) + _, _, emitter, err := log_emitter.DeployLogEmitter(owner, ec) + require.NoError(t, err) + _, err = emitter.EmitLog1(owner, []*big.Int{big.NewInt(9)}) + require.NoError(t, err) + _, err = emitter.EmitLog1(owner, []*big.Int{big.NewInt(7)}) + require.NoError(t, err) + ec.Commit() + ec.Commit() + ec.Commit() + + lp := NewLogPoller(o, client.NewSimulatedBackendClient(t, ec, chainID2), lggr, 1*time.Hour, 2, 3, 2, 1000) + ctx, cancelReplay := context.WithCancel(testutils.Context(t)) + lp.ctx, lp.cancel = context.WithCancel(testutils.Context(t)) + defer cancelReplay() + defer lp.cancel() + + err = lp.Replay(ctx, 5) // block number too high + require.ErrorContains(t, err, "Invalid replay block number") + + // Force a db error while loading the filters (tx aborted, already rolled back) + require.Error(t, utils.JustError(db.Exec(`invalid query`))) + go func() { + err = lp.Replay(ctx, 2) + assert.Error(t, err, ErrReplayAbortedByClient) + }() + + time.Sleep(100 * time.Millisecond) + go lp.run() + require.Eventually(t, func() bool { + return observedLogs.Len() >= 5 + }, 2*time.Second, 20*time.Millisecond) + lp.cancel() + lp.Close() + <-lp.done + + logMsgs := make(map[string]int) + for _, obs := range observedLogs.All() { + _, ok := logMsgs[obs.Entry.Message] + if ok { + logMsgs[(obs.Entry.Message)] = 1 + } else { + logMsgs[(obs.Entry.Message)]++ + } + } + + assert.Contains(t, logMsgs, "SQL ERROR") + assert.Contains(t, logMsgs, "Failed loading filters in main logpoller loop, retrying later") + assert.Contains(t, logMsgs, "Error executing replay, could not get fromBlock") + assert.Contains(t, logMsgs, "backup log poller ran before filters loaded, skipping") +} + +func TestLogPoller_ConvertLogs(t *testing.T) { + t.Parallel() + lggr := logger.TestLogger(t) + + topics := []common.Hash{EmitterABI.Events["Log1"].ID} + + var cases = []struct { + name string + logs []types.Log + blocks []LogPollerBlock + expected int + }{ + {"SingleBlock", + []types.Log{{Topics: topics}, {Topics: topics}}, + []LogPollerBlock{{BlockTimestamp: time.Now()}}, + 2}, + {"BlockList", + []types.Log{{Topics: topics}, {Topics: topics}, {Topics: topics}}, + []LogPollerBlock{{BlockTimestamp: time.Now()}}, + 3}, + {"EmptyList", + []types.Log{}, + []LogPollerBlock{}, + 0}, + {"TooManyBlocks", + []types.Log{{}}, + []LogPollerBlock{{}, {}}, + 0}, + {"TooFewBlocks", + []types.Log{{}, {}, {}}, + []LogPollerBlock{{}, {}}, + 0}, + } + + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + logs := convertLogs(c.logs, c.blocks, lggr, big.NewInt(53)) + require.Len(t, logs, c.expected) + for i := 0; i < c.expected; i++ { + if len(c.blocks) == 1 { + assert.Equal(t, c.blocks[0].BlockTimestamp, logs[i].BlockTimestamp) + } else { + assert.Equal(t, logs[i].BlockTimestamp, c.blocks[i].BlockTimestamp) + } + } + }) + } +} + +func TestFilterName(t *testing.T) { + t.Parallel() + assert.Equal(t, "a - b:c:d", FilterName("a", "b", "c", "d")) + assert.Equal(t, "empty args test", FilterName("empty args test")) +} + +func benchmarkFilter(b *testing.B, nFilters, nAddresses, nEvents int) { + lggr := logger.TestLogger(b) + lp := NewLogPoller(nil, nil, lggr, 1*time.Hour, 2, 3, 2, 1000) + for i := 0; i < nFilters; i++ { + var addresses []common.Address + var events []common.Hash + for j := 0; j < nAddresses; j++ { + addresses = append(addresses, common.BigToAddress(big.NewInt(int64(j+1)))) + } + for j := 0; j < nEvents; j++ { + events = append(events, common.BigToHash(big.NewInt(int64(j+1)))) + } + err := lp.RegisterFilter(Filter{Name: "my Filter", EventSigs: events, Addresses: addresses}) + require.NoError(b, err) + } + b.ResetTimer() + for n := 0; n < b.N; n++ { + lp.Filter(nil, nil, nil) + } +} + +func BenchmarkFilter10_1(b *testing.B) { + benchmarkFilter(b, 10, 1, 1) +} +func BenchmarkFilter100_10(b *testing.B) { + benchmarkFilter(b, 100, 10, 10) +} +func BenchmarkFilter1000_100(b *testing.B) { + benchmarkFilter(b, 1000, 100, 100) +} diff --git a/core/chains/evm/logpoller/log_poller_test.go b/core/chains/evm/logpoller/log_poller_test.go index ec3bde361ac..6f38c85ccc4 100644 --- a/core/chains/evm/logpoller/log_poller_test.go +++ b/core/chains/evm/logpoller/log_poller_test.go @@ -1,22 +1,20 @@ -package logpoller +package logpoller_test import ( "context" - "database/sql" "fmt" "math/big" - "strings" "testing" "time" - "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" - "github.com/jackc/pgconn" + "github.com/ethereum/go-ethereum/params" "github.com/leanovate/gopter" "github.com/leanovate/gopter/gen" "github.com/leanovate/gopter/prop" @@ -24,11 +22,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/rand" - "go.uber.org/zap/zapcore" - "go.uber.org/zap/zaptest/observer" "github.com/smartcontractkit/chainlink/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/core/gethwrappers/generated/log_emitter" + "github.com/smartcontractkit/chainlink/core/internal/cltest/heavyweight" "github.com/smartcontractkit/chainlink/core/internal/testutils" "github.com/smartcontractkit/chainlink/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/core/logger" @@ -36,56 +34,345 @@ import ( "github.com/smartcontractkit/chainlink/core/utils" ) -var ( - EmitterABI, _ = abi.JSON(strings.NewReader(log_emitter.LogEmitterABI)) -) +func logRuntime(t *testing.T, start time.Time) { + t.Log("runtime", time.Since(start)) +} -func GenLog(chainID *big.Int, logIndex int64, blockNum int64, blockHash string, topic1 []byte, address common.Address) Log { - return Log{ - EvmChainId: utils.NewBig(chainID), - LogIndex: logIndex, - BlockHash: common.HexToHash(blockHash), - BlockNumber: blockNum, - EventSig: common.BytesToHash(topic1), - Topics: [][]byte{topic1}, - Address: address, - TxHash: common.HexToHash("0x1234"), - Data: append([]byte("hello "), byte(blockNum)), +func TestPopulateLoadedDB(t *testing.T) { + t.Skip("only for local load testing and query analysis") + lggr := logger.TestLogger(t) + _, db := heavyweight.FullTestDBV2(t, "logs_scale", nil) + chainID := big.NewInt(137) + _, err := db.Exec(`INSERT INTO evm_chains (id, created_at, updated_at) VALUES ($1, NOW(), NOW())`, utils.NewBig(chainID)) + require.NoError(t, err) + o := logpoller.NewORM(big.NewInt(137), db, lggr, pgtest.NewQConfig(true)) + event1 := EmitterABI.Events["Log1"].ID + address1 := common.HexToAddress("0x2ab9a2Dc53736b361b72d900CdF9F78F9406fbbb") + address2 := common.HexToAddress("0x6E225058950f237371261C985Db6bDe26df2200E") + + // We start at 1 just so block number > 0 + for j := 1; j < 1000; j++ { + var logs []logpoller.Log + // Max we can insert per batch + for i := 0; i < 1000; i++ { + addr := address1 + if (i+(1000*j))%2 == 0 { + addr = address2 + } + logs = append(logs, logpoller.Log{ + EvmChainId: utils.NewBig(chainID), + LogIndex: 1, + BlockHash: common.HexToHash(fmt.Sprintf("0x%d", i+(1000*j))), + BlockNumber: int64(i + (1000 * j)), + EventSig: event1, + Topics: [][]byte{event1[:], logpoller.EvmWord(uint64(i + 1000*j)).Bytes()}, + Address: addr, + TxHash: common.HexToHash("0x1234"), + Data: logpoller.EvmWord(uint64(i + 1000*j)).Bytes(), + }) + } + require.NoError(t, o.InsertLogs(logs)) } + func() { + defer logRuntime(t, time.Now()) + _, err := o.SelectLogsByBlockRangeFilter(750000, 800000, address1, event1) + require.NoError(t, err) + }() + func() { + defer logRuntime(t, time.Now()) + _, err = o.SelectLatestLogEventSigsAddrsWithConfs(0, []common.Address{address1}, []common.Hash{event1}, 0) + require.NoError(t, err) + }() + + // Confirm all the logs. + require.NoError(t, o.InsertBlock(common.HexToHash("0x10"), 1000000, time.Now())) + func() { + defer logRuntime(t, time.Now()) + lgs, err := o.SelectDataWordRange(address1, event1, 0, logpoller.EvmWord(500000), logpoller.EvmWord(500020), 0) + require.NoError(t, err) + // 10 since every other log is for address1 + assert.Equal(t, 10, len(lgs)) + }() + + func() { + defer logRuntime(t, time.Now()) + lgs, err := o.SelectIndexedLogs(address2, event1, 1, []common.Hash{logpoller.EvmWord(500000), logpoller.EvmWord(500020)}, 0) + require.NoError(t, err) + assert.Equal(t, 2, len(lgs)) + }() + + func() { + defer logRuntime(t, time.Now()) + lgs, err := o.SelectIndexLogsTopicRange(address1, event1, 1, logpoller.EvmWord(500000), logpoller.EvmWord(500020), 0) + require.NoError(t, err) + assert.Equal(t, 10, len(lgs)) + }() } -func assertDontHave(t *testing.T, start, end int, orm *ORM) { - for i := start; i < end; i++ { - _, err := orm.SelectBlockByNumber(int64(i)) - assert.True(t, errors.Is(err, sql.ErrNoRows)) +func TestLogPoller_Integration(t *testing.T) { + th := SetupTH(t, 2, 3, 2) + th.Client.Commit() // Block 2. Ensure we have finality number of blocks + + err := th.LogPoller.RegisterFilter(logpoller.Filter{"Integration test", []common.Hash{EmitterABI.Events["Log1"].ID}, []common.Address{th.EmitterAddress1}}) + require.NoError(t, err) + require.Len(t, th.LogPoller.Filter(nil, nil, nil).Addresses, 1) + require.Len(t, th.LogPoller.Filter(nil, nil, nil).Topics, 1) + + // Calling Start() after RegisterFilter() simulates a node restart after job creation, should reload Filter from db. + require.NoError(t, th.LogPoller.Start(testutils.Context(t))) + require.Len(t, th.LogPoller.Filter(nil, nil, nil).Addresses, 1) + require.Len(t, th.LogPoller.Filter(nil, nil, nil).Topics, 1) + + // Emit some logs in blocks 3->7. + for i := 0; i < 5; i++ { + _, err := th.Emitter1.EmitLog1(th.Owner, []*big.Int{big.NewInt(int64(i))}) + require.NoError(t, err) + _, err = th.Emitter1.EmitLog2(th.Owner, []*big.Int{big.NewInt(int64(i))}) + require.NoError(t, err) + th.Client.Commit() } + // The poller starts on a new chain at latest-finality (5 in this case), + // replay to ensure we get all the logs. + require.NoError(t, th.LogPoller.Replay(testutils.Context(t), 1)) + + // We should immediately have all those Log1 logs. + logs, err := th.LogPoller.Logs(2, 7, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) + require.NoError(t, err) + assert.Equal(t, 5, len(logs)) + // Now let's update the Filter and replay to get Log2 logs. + err = th.LogPoller.RegisterFilter(logpoller.Filter{ + "Emitter - log2", []common.Hash{EmitterABI.Events["Log2"].ID}, + []common.Address{th.EmitterAddress1}, + }) + require.NoError(t, err) + // Replay an invalid block should error + assert.Error(t, th.LogPoller.Replay(testutils.Context(t), 0)) + assert.Error(t, th.LogPoller.Replay(testutils.Context(t), 20)) + // Replay only from block 4, so we should see logs in block 4,5,6,7 (4 logs) + require.NoError(t, th.LogPoller.Replay(testutils.Context(t), 4)) + + // We should immediately see 4 logs2 logs. + logs, err = th.LogPoller.Logs(2, 7, EmitterABI.Events["Log2"].ID, th.EmitterAddress1) + require.NoError(t, err) + assert.Equal(t, 4, len(logs)) + + // Cancelling a replay should return an error synchronously. + ctx, cancel := context.WithCancel(context.Background()) + cancel() + assert.True(t, errors.Is(th.LogPoller.Replay(ctx, 4), logpoller.ErrReplayAbortedByClient)) + + require.NoError(t, th.LogPoller.Close()) } -func assertHaveCanonical(t *testing.T, start, end int, ec *backends.SimulatedBackend, orm *ORM) { - for i := start; i < end; i++ { - blk, err := orm.SelectBlockByNumber(int64(i)) - require.NoError(t, err, "block %v", i) - chainBlk, err := ec.BlockByNumber(testutils.Context(t), big.NewInt(int64(i))) +// Simulate a badly behaving rpc server, where unfinalized blocks can return different logs +// for the same block hash. We should be able to handle this without missing any logs, as +// long as the logs returned for finalized blocks are consistent. +func Test_BackupLogPoller(t *testing.T) { + th := SetupTH(t, 2, 3, 2) + // later, we will need at least 32 blocks filled with logs for cache invalidation + for i := int64(0); i < 32; i++ { + // to invalidate geth's internal read-cache, a matching log must be found in the bloom Filter + // for each of the 32 blocks + tx, err := th.Emitter1.EmitLog1(th.Owner, []*big.Int{big.NewInt(i + 7)}) require.NoError(t, err) - assert.Equal(t, chainBlk.Hash().Bytes(), blk.BlockHash.Bytes(), "block %v", i) + require.NotNil(t, tx) + th.Client.Commit() + } + + ctx := testutils.Context(t) + + filter1 := logpoller.Filter{"filter1", []common.Hash{ + EmitterABI.Events["Log1"].ID, + EmitterABI.Events["Log2"].ID}, + []common.Address{th.EmitterAddress1}} + err := th.LogPoller.RegisterFilter(filter1) + require.NoError(t, err) + + filters, err := th.ORM.LoadFilters(pg.WithParentCtx(testutils.Context(t))) + require.NoError(t, err) + require.Equal(t, 1, len(filters)) + require.Equal(t, filter1, filters["filter1"]) + + err = th.LogPoller.RegisterFilter( + logpoller.Filter{"filter2", + []common.Hash{EmitterABI.Events["Log1"].ID}, + []common.Address{th.EmitterAddress2}}) + require.NoError(t, err) + + defer th.LogPoller.UnregisterFilter("filter1") + defer th.LogPoller.UnregisterFilter("filter2") + + // generate some tx's with logs + tx1, err := th.Emitter1.EmitLog1(th.Owner, []*big.Int{big.NewInt(1)}) + require.NoError(t, err) + require.NotNil(t, tx1) + + tx2, err := th.Emitter1.EmitLog2(th.Owner, []*big.Int{big.NewInt(2)}) + require.NoError(t, err) + require.NotNil(t, tx2) + + tx3, err := th.Emitter2.EmitLog1(th.Owner, []*big.Int{big.NewInt(3)}) + require.NoError(t, err) + require.NotNil(t, tx3) + + th.Client.Commit() // commit block 34 with 3 tx's included + + h := th.Client.Blockchain().CurrentHeader() // get latest header + require.Equal(t, uint64(34), h.Number.Uint64()) + + // save these 3 receipts for later + receipts := rawdb.ReadReceipts(th.EthDB, h.Hash(), h.Number.Uint64(), params.AllEthashProtocolChanges) + require.NotZero(t, receipts.Len()) + + // Simulate a situation where the rpc server has a block, but no logs available for it yet + // this can't happen with geth itself, but can with other clients. + rawdb.WriteReceipts(th.EthDB, h.Hash(), h.Number.Uint64(), types.Receipts{}) // wipes out all logs for block 34 + + body := rawdb.ReadBody(th.EthDB, h.Hash(), h.Number.Uint64()) + require.Equal(t, 3, len(body.Transactions)) + txs := body.Transactions // save transactions for later + body.Transactions = types.Transactions{} // number of tx's must match # of logs for GetLogs() to succeed + rawdb.WriteBody(th.EthDB, h.Hash(), h.Number.Uint64(), body) + + currentBlock := th.PollAndSaveLogs(ctx, 1) + assert.Equal(t, int64(35), currentBlock) + + // simulate logs becoming available + rawdb.WriteReceipts(th.EthDB, h.Hash(), h.Number.Uint64(), receipts) + require.True(t, rawdb.HasReceipts(th.EthDB, h.Hash(), h.Number.Uint64())) + body.Transactions = txs + rawdb.WriteBody(th.EthDB, h.Hash(), h.Number.Uint64(), body) + + // flush out cached block 34 by reading logs from first 32 blocks + query := ethereum.FilterQuery{ + FromBlock: big.NewInt(int64(2)), + ToBlock: big.NewInt(int64(33)), + Addresses: []common.Address{th.EmitterAddress1}, + Topics: [][]common.Hash{{EmitterABI.Events["Log1"].ID}}, } + fLogs, err := th.Client.FilterLogs(ctx, query) + require.NoError(t, err) + require.Equal(t, 32, len(fLogs)) + + // logs shouldn't show up yet + logs, err := th.LogPoller.Logs(34, 34, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) + require.NoError(t, err) + assert.Equal(t, 0, len(logs)) + + th.Client.Commit() + th.Client.Commit() + + // Run ordinary poller + backup poller at least once + currentBlock, _ = th.LogPoller.LatestBlock() + th.LogPoller.PollAndSaveLogs(ctx, currentBlock+1) + th.LogPoller.BackupPollAndSaveLogs(ctx, 100) + currentBlock, _ = th.LogPoller.LatestBlock() + + require.Equal(t, int64(37), currentBlock+1) + + // logs still shouldn't show up, because we don't want to backfill the last finalized log + // to help with reorg detection + logs, err = th.LogPoller.Logs(34, 34, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) + require.NoError(t, err) + assert.Equal(t, 0, len(logs)) + + th.Client.Commit() + + // Run ordinary poller + backup poller at least once more + th.LogPoller.PollAndSaveLogs(ctx, currentBlock+1) + th.LogPoller.BackupPollAndSaveLogs(ctx, 100) + currentBlock, _ = th.LogPoller.LatestBlock() + + require.Equal(t, int64(38), currentBlock+1) + + // all 3 logs in block 34 should show up now, thanks to backup logger + logs, err = th.LogPoller.Logs(30, 37, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) + require.NoError(t, err) + assert.Equal(t, 5, len(logs)) + logs, err = th.LogPoller.Logs(34, 34, EmitterABI.Events["Log2"].ID, th.EmitterAddress1) + require.NoError(t, err) + assert.Equal(t, 1, len(logs)) + logs, err = th.LogPoller.Logs(32, 36, EmitterABI.Events["Log1"].ID, th.EmitterAddress2) + require.NoError(t, err) + assert.Equal(t, 1, len(logs)) } -func TestLogPoller_Batching(t *testing.T) { +func TestLogPoller_BlockTimestamps(t *testing.T) { t.Parallel() + ctx := testutils.Context(t) th := SetupTH(t, 2, 3, 2) - var logs []Log - // Inserts are limited to 65535 parameters. A log being 10 parameters this results in - // a maximum of 6553 log inserts per tx. As inserting more than 6553 would result in - // an error without batching, this test makes sure batching is enabled. - for i := 0; i < 15000; i++ { - logs = append(logs, GenLog(th.ChainID, int64(i+1), 1, "0x3", EmitterABI.Events["Log1"].ID.Bytes(), th.EmitterAddress1)) - } - require.NoError(t, th.ORM.InsertLogs(logs)) - lgs, err := th.ORM.SelectLogsByBlockRange(1, 1) + + addresses := []common.Address{th.EmitterAddress1, th.EmitterAddress2} + topics := []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID} + + err := th.LogPoller.RegisterFilter(logpoller.Filter{"convertLogs", topics, addresses}) + require.NoError(t, err) + + blk, err := th.Client.BlockByNumber(ctx, nil) + require.NoError(t, err) + require.Equal(t, big.NewInt(1), blk.Number()) + start := blk.Time() + + // There is automatically a 10s delay between each block. To make sure it's including the correct block timestamps, + // we introduce irregularities by inserting two additional block delays. We can't control the block times for + // blocks produced by the log emitter, but we can adjust the time on empty blocks in between. Simulated time + // sequence: [ #1 ] ..(10s + delay1).. [ #2 ] ..10s.. [ #3 (LOG1) ] ..(10s + delay2).. [ #4 ] ..10s.. [ #5 (LOG2) ] + const delay1 = 589 + const delay2 = 643 + time1 := start + 20 + delay1 + time2 := time1 + 20 + delay2 + + require.NoError(t, th.Client.AdjustTime(delay1*time.Second)) + hash := th.Client.Commit() + + blk, err = th.Client.BlockByHash(ctx, hash) + require.NoError(t, err) + require.Equal(t, big.NewInt(2), blk.Number()) + assert.Equal(t, time1-10, blk.Time()) + + _, err = th.Emitter1.EmitLog1(th.Owner, []*big.Int{big.NewInt(1)}) + require.NoError(t, err) + hash = th.Client.Commit() + + blk, err = th.Client.BlockByHash(ctx, hash) + require.NoError(t, err) + require.Equal(t, big.NewInt(3), blk.Number()) + assert.Equal(t, time1, blk.Time()) + + require.NoError(t, th.Client.AdjustTime(delay2*time.Second)) + th.Client.Commit() + _, err = th.Emitter2.EmitLog2(th.Owner, []*big.Int{big.NewInt(2)}) + require.NoError(t, err) + hash = th.Client.Commit() + + blk, err = th.Client.BlockByHash(ctx, hash) require.NoError(t, err) - // Make sure all logs are inserted - require.Equal(t, len(logs), len(lgs)) + require.Equal(t, big.NewInt(5), blk.Number()) + assert.Equal(t, time2, blk.Time()) + + query := ethereum.FilterQuery{ + FromBlock: big.NewInt(2), + ToBlock: big.NewInt(5), + Topics: [][]common.Hash{topics}, + Addresses: []common.Address{th.EmitterAddress1, th.EmitterAddress2}} + + gethLogs, err := th.Client.FilterLogs(ctx, query) + require.NoError(t, err) + require.Len(t, gethLogs, 2) + + lb, _ := th.LogPoller.LatestBlock() + th.PollAndSaveLogs(context.Background(), lb+1) + lg1, err := th.LogPoller.Logs(0, 20, EmitterABI.Events["Log1"].ID, th.EmitterAddress1) + require.NoError(t, err) + lg2, err := th.LogPoller.Logs(0, 20, EmitterABI.Events["Log2"].ID, th.EmitterAddress2) + require.NoError(t, err) + + // Logs should have correct timestamps + b, _ := th.Client.BlockByHash(context.Background(), lg1[0].BlockHash) + t.Log(len(lg1), lg1[0].BlockTimestamp) + assert.Equal(t, int64(b.Time()), lg1[0].BlockTimestamp.UTC().Unix(), time1) + b2, _ := th.Client.BlockByHash(context.Background(), lg2[0].BlockHash) + assert.Equal(t, int64(b2.Time()), lg2[0].BlockTimestamp.UTC().Unix(), time2) } func TestLogPoller_SynchronizedWithGeth(t *testing.T) { @@ -108,7 +395,7 @@ func TestLogPoller_SynchronizedWithGeth(t *testing.T) { t.Log("Starting test", mineOrReorg) chainID := testutils.NewRandomEVMChainID() // Set up a test chain with a log emitting contract deployed. - orm := NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) + orm := logpoller.NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) // Note this property test is run concurrently and the sim is not threadsafe. ec := backends.NewSimulatedBackend(map[common.Address]core.GenesisAccount{ owner.From: { @@ -117,12 +404,14 @@ func TestLogPoller_SynchronizedWithGeth(t *testing.T) { }, 10e6) _, _, emitter1, err := log_emitter.DeployLogEmitter(owner, ec) require.NoError(t, err) - lp := NewLogPoller(orm, client.NewSimulatedBackendClient(t, ec, chainID), lggr, 15*time.Second, int64(finalityDepth), 3, 2, 1000) + lp := logpoller.NewLogPoller(orm, client.NewSimulatedBackendClient(t, ec, chainID), lggr, 15*time.Second, int64(finalityDepth), 3, 2, 1000) for i := 0; i < finalityDepth; i++ { // Have enough blocks that we could reorg the full finalityDepth-1. ec.Commit() } currentBlock := int64(1) - currentBlock = lp.PollAndSaveLogs(testutils.Context(t), currentBlock) + lp.PollAndSaveLogs(testutils.Context(t), currentBlock) + currentBlock, err = lp.LatestBlock() + require.NoError(t, err) matchesGeth := func() bool { // Check every block is identical latest, err := ec.BlockByNumber(testutils.Context(t), nil) @@ -171,7 +460,9 @@ func TestLogPoller_SynchronizedWithGeth(t *testing.T) { require.NoError(t, err) t.Logf("New latest (%v, %x), latest parent %x)\n", latest.NumberU64(), latest.Hash(), latest.ParentHash()) } - currentBlock = lp.PollAndSaveLogs(testutils.Context(t), currentBlock) + lp.PollAndSaveLogs(testutils.Context(t), currentBlock) + currentBlock, err = lp.LatestBlock() + require.NoError(t, err) } return matchesGeth() }, gen.SliceOfN(numChainInserts, gen.UInt64Range(1, uint64(finalityDepth-1))))) // Max reorg depth is finality depth - 1 @@ -183,7 +474,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { th := SetupTH(t, 2, 3, 2) // Set up a log poller listening for log emitter logs. - err := th.LogPoller.RegisterFilter(Filter{ + err := th.LogPoller.RegisterFilter(logpoller.Filter{ "Test Emitter 1 & 2", []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, []common.Address{th.EmitterAddress1, th.EmitterAddress2}, }) @@ -197,7 +488,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { // Test scenario: single block in chain, no logs. // Chain genesis <- 1 // DB: empty - newStart := th.LogPoller.PollAndSaveLogs(testutils.Context(t), 1) + newStart := th.PollAndSaveLogs(testutils.Context(t), 1) assert.Equal(t, int64(2), newStart) // We expect to have saved block 1. @@ -212,15 +503,15 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { lgs, err := th.ORM.SelectLogsByBlockRange(1, 1) require.NoError(t, err) assert.Equal(t, 0, len(lgs)) - assertHaveCanonical(t, 1, 1, th.Client, th.ORM) + th.assertHaveCanonical(t, 1, 1) // Polling again should be a noop, since we are at the latest. - newStart = th.LogPoller.PollAndSaveLogs(testutils.Context(t), newStart) + newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(2), newStart) latest, err := th.ORM.SelectLatestBlock() require.NoError(t, err) assert.Equal(t, int64(1), latest.BlockNumber) - assertHaveCanonical(t, 1, 1, th.Client, th.ORM) + th.assertHaveCanonical(t, 1, 1) // Test scenario: one log 2 block chain. // Chain gen <- 1 <- 2 (L1) @@ -230,7 +521,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { th.Client.Commit() // Polling should get us the L1 log. - newStart = th.LogPoller.PollAndSaveLogs(testutils.Context(t), newStart) + newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(3), newStart) latest, err = th.ORM.SelectLatestBlock() require.NoError(t, err) @@ -265,7 +556,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { // Create 3 (we need a new block for us to do any polling and detect the reorg). th.Client.Commit() - newStart = th.LogPoller.PollAndSaveLogs(testutils.Context(t), newStart) + newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(4), newStart) latest, err = th.ORM.SelectLatestBlock() require.NoError(t, err) @@ -274,7 +565,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { require.NoError(t, err) require.Equal(t, 1, len(lgs)) assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000002`), lgs[0].Data) - assertHaveCanonical(t, 1, 3, th.Client, th.ORM) + th.assertHaveCanonical(t, 1, 3) // Test scenario: reorg back to previous tip. // Chain gen <- 1 <- 2 (L1_1) <- 3' (L1_3) <- 4 @@ -286,7 +577,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { th.Client.Commit() // Create 4 th.Client.Commit() - newStart = th.LogPoller.PollAndSaveLogs(testutils.Context(t), newStart) + newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(5), newStart) latest, err = th.ORM.SelectLatestBlock() require.NoError(t, err) @@ -299,9 +590,9 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000001`), lgs[0].Data) assert.Equal(t, int64(3), lgs[1].BlockNumber) assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000003`), lgs[1].Data) - assertHaveCanonical(t, 1, 1, th.Client, th.ORM) - assertHaveCanonical(t, 3, 4, th.Client, th.ORM) - assertDontHave(t, 2, 2, th.ORM) // 2 gets backfilled + th.assertHaveCanonical(t, 1, 1) + th.assertHaveCanonical(t, 3, 4) + th.assertDontHave(t, 2, 2) // 2 gets backfilled // Test scenario: multiple logs per block for many blocks (also after reorg). // Chain gen <- 1 <- 2 (L1_1) <- 3' L1_3 <- 4 <- 5 (L1_4, L2_5) <- 6 (L1_6) @@ -320,7 +611,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { // Create 5 th.Client.Commit() - newStart = th.LogPoller.PollAndSaveLogs(testutils.Context(t), newStart) + newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(7), newStart) lgs, err = th.ORM.SelectLogsByBlockRange(4, 6) require.NoError(t, err) @@ -331,9 +622,9 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { assert.Equal(t, th.EmitterAddress2, lgs[1].Address) assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000006`), lgs[2].Data) assert.Equal(t, th.EmitterAddress1, lgs[2].Address) - assertHaveCanonical(t, 1, 1, th.Client, th.ORM) - assertDontHave(t, 2, 2, th.ORM) // 2 gets backfilled - assertHaveCanonical(t, 3, 6, th.Client, th.ORM) + th.assertHaveCanonical(t, 1, 1) + th.assertDontHave(t, 2, 2) // 2 gets backfilled + th.assertHaveCanonical(t, 3, 6) // Test scenario: node down for exactly finality + 2 blocks // Note we only backfill up to finalized - 1 blocks, because we need to save the @@ -347,7 +638,7 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { require.NoError(t, err) th.Client.Commit() } - newStart = th.LogPoller.PollAndSaveLogs(testutils.Context(t), newStart) + newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(11), newStart) lgs, err = th.ORM.SelectLogsByBlockRange(7, 9) require.NoError(t, err) @@ -358,8 +649,8 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { assert.Equal(t, int64(8), lgs[1].BlockNumber) assert.Equal(t, hexutil.MustDecode(`0x0000000000000000000000000000000000000000000000000000000000000009`), lgs[2].Data) assert.Equal(t, int64(9), lgs[2].BlockNumber) - assertDontHave(t, 7, 7, th.ORM) // Do not expect to save backfilled blocks. - assertHaveCanonical(t, 8, 10, th.Client, th.ORM) + th.assertDontHave(t, 7, 7) // Do not expect to save backfilled blocks. + th.assertHaveCanonical(t, 8, 10) // Test scenario large backfill (multiple batches) // Chain gen <- 1 <- 2 (L1_1) <- 3' L1_3 <- 4 <- 5 (L1_4, L2_5) <- 6 (L1_6) <- 7 (L1_7) <- 8 (L1_8) <- 9 (L1_9) <- 10..16 @@ -373,13 +664,13 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { require.NoError(t, err) th.Client.Commit() } - newStart = th.LogPoller.PollAndSaveLogs(testutils.Context(t), newStart) + newStart = th.PollAndSaveLogs(testutils.Context(t), newStart) assert.Equal(t, int64(18), newStart) lgs, err = th.ORM.SelectLogsByBlockRange(11, 17) require.NoError(t, err) assert.Equal(t, 7, len(lgs)) - assertHaveCanonical(t, 15, 16, th.Client, th.ORM) - assertDontHave(t, 11, 14, th.ORM) // Do not expect to save backfilled blocks. + th.assertHaveCanonical(t, 15, 16) + th.assertDontHave(t, 11, 14) // Do not expect to save backfilled blocks. // Verify that a custom block timestamp will get written to db correctly also b, err = th.Client.BlockByNumber(testutils.Context(t), nil) @@ -394,266 +685,21 @@ func TestLogPoller_PollAndSaveLogs(t *testing.T) { require.Equal(t, uint64(180+time.Hour.Seconds()), b.Time()) } -func TestLogPoller_Logs(t *testing.T) { - t.Parallel() - th := SetupTH(t, 2, 3, 2) - event1 := EmitterABI.Events["Log1"].ID - event2 := EmitterABI.Events["Log2"].ID - address1 := common.HexToAddress("0x2ab9a2Dc53736b361b72d900CdF9F78F9406fbbb") - address2 := common.HexToAddress("0x6E225058950f237371261C985Db6bDe26df2200E") - - // Block 1-3 - require.NoError(t, th.ORM.InsertLogs([]Log{ - GenLog(th.ChainID, 1, 1, "0x3", event1[:], address1), - GenLog(th.ChainID, 2, 1, "0x3", event2[:], address2), - GenLog(th.ChainID, 1, 2, "0x4", event1[:], address2), - GenLog(th.ChainID, 2, 2, "0x4", event2[:], address1), - GenLog(th.ChainID, 1, 3, "0x5", event1[:], address1), - GenLog(th.ChainID, 2, 3, "0x5", event2[:], address2), - })) - - // Select for all Addresses - lgs, err := th.ORM.SelectLogsByBlockRange(1, 3) - require.NoError(t, err) - require.Equal(t, 6, len(lgs)) - assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000003", lgs[0].BlockHash.String()) - assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000003", lgs[1].BlockHash.String()) - assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000004", lgs[2].BlockHash.String()) - assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000004", lgs[3].BlockHash.String()) - assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000005", lgs[4].BlockHash.String()) - assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000005", lgs[5].BlockHash.String()) - - // Filter by Address and topic - lgs, err = th.ORM.SelectLogsByBlockRangeFilter(1, 3, address1, event1) - require.NoError(t, err) - require.Equal(t, 2, len(lgs)) - assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000003", lgs[0].BlockHash.String()) - assert.Equal(t, address1, lgs[0].Address) - assert.Equal(t, event1.Bytes(), lgs[0].Topics[0]) - assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000005", lgs[1].BlockHash.String()) - assert.Equal(t, address1, lgs[1].Address) - - // Filter by block - lgs, err = th.ORM.SelectLogsByBlockRangeFilter(2, 2, address2, event1) - require.NoError(t, err) - require.Equal(t, 1, len(lgs)) - assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000004", lgs[0].BlockHash.String()) - assert.Equal(t, int64(1), lgs[0].LogIndex) - assert.Equal(t, address2, lgs[0].Address) - assert.Equal(t, event1.Bytes(), lgs[0].Topics[0]) -} - -// Validate that filters stored in log_filters_table match the filters stored in memory -func validateFiltersTable(t *testing.T, lp *logPoller, orm *ORM) { - filters, err := orm.LoadFilters() - require.NoError(t, err) - require.Equal(t, len(filters), len(lp.filters)) - for name, dbFilter := range filters { - dbFilter := dbFilter - memFilter, ok := lp.filters[name] - require.True(t, ok) - assert.True(t, memFilter.contains(&dbFilter), - fmt.Sprintf("in-memory filter %s is missing some addresses or events from db filter table", name)) - assert.True(t, dbFilter.contains(&memFilter), - fmt.Sprintf("db filter table %s is missing some addresses or events from in-memory filter", name)) - } -} - -func TestLogPoller_RegisterFilter(t *testing.T) { - t.Parallel() - a1 := common.HexToAddress("0x2ab9a2dc53736b361b72d900cdf9f78f9406fbbb") - a2 := common.HexToAddress("0x2ab9a2dc53736b361b72d900cdf9f78f9406fbbc") - - lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.ErrorLevel) - chainID := testutils.NewRandomEVMChainID() - db := pgtest.NewSqlxDB(t) - - orm := NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) - lp := NewLogPoller(orm, nil, lggr, 15*time.Second, 1, 1, 2, 1000) - - filter := Filter{"test filter", []common.Hash{EmitterABI.Events["Log1"].ID}, []common.Address{a1}} - err := lp.RegisterFilter(filter) - require.Error(t, err, "RegisterFilter failed to save filter to db") - require.Equal(t, 1, observedLogs.Len()) - assertForeignConstraintError(t, observedLogs.All()[0], "evm_log_poller_filters", "evm_log_poller_filters_evm_chain_id_fkey") - - db.Close() - db = pgtest.NewSqlxDB(t) - lggr = logger.TestLogger(t) - orm = NewORM(chainID, db, lggr, pgtest.NewQConfig(true)) - - // disable check that chain id exists for rest of tests - require.NoError(t, utils.JustError(db.Exec(`SET CONSTRAINTS evm_log_poller_filters_evm_chain_id_fkey DEFERRED`))) - // Set up a test chain with a log emitting contract deployed. - - lp = NewLogPoller(orm, nil, lggr, 15*time.Second, 1, 1, 2, 1000) - - // We expect a zero filter if nothing registered yet. - f := lp.filter(nil, nil, nil) - require.Equal(t, 1, len(f.Addresses)) - assert.Equal(t, common.HexToAddress("0x0000000000000000000000000000000000000000"), f.Addresses[0]) - - err = lp.RegisterFilter(Filter{"Emitter Log 1", []common.Hash{EmitterABI.Events["Log1"].ID}, []common.Address{a1}}) - require.NoError(t, err) - assert.Equal(t, []common.Address{a1}, lp.Filter().Addresses) - assert.Equal(t, [][]common.Hash{{EmitterABI.Events["Log1"].ID}}, lp.Filter().Topics) - validateFiltersTable(t, lp, orm) - - // Should de-dupe EventSigs - err = lp.RegisterFilter(Filter{"Emitter Log 1 + 2", []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, []common.Address{a2}}) - require.NoError(t, err) - assert.Equal(t, []common.Address{a1, a2}, lp.Filter().Addresses) - assert.Equal(t, [][]common.Hash{{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}}, lp.Filter().Topics) - validateFiltersTable(t, lp, orm) - - // Should de-dupe Addresses - err = lp.RegisterFilter(Filter{"Emitter Log 1 + 2 dupe", []common.Hash{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, []common.Address{a2}}) - require.NoError(t, err) - assert.Equal(t, []common.Address{a1, a2}, lp.Filter().Addresses) - assert.Equal(t, [][]common.Hash{{EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}}, lp.Filter().Topics) - validateFiltersTable(t, lp, orm) - - // Address required. - err = lp.RegisterFilter(Filter{"no address", []common.Hash{EmitterABI.Events["Log1"].ID}, []common.Address{}}) - require.Error(t, err) - // Event required - err = lp.RegisterFilter(Filter{"No event", []common.Hash{}, []common.Address{a1}}) - require.Error(t, err) - validateFiltersTable(t, lp, orm) - - // Removing non-existence filter should error. - err = lp.UnregisterFilter("filter doesn't exist") - require.Error(t, err) - - // Check that all filters are still there - _, ok := lp.filters["Emitter Log 1"] - require.True(t, ok, "'Emitter Log 1 filter' missing") - _, ok = lp.filters["Emitter Log 1 + 2"] - require.True(t, ok, "'Emitter Log 1 + 2' filter missing") - _, ok = lp.filters["Emitter Log 1 + 2 dupe"] - require.True(t, ok, "'Emitter Log 1 + 2 dupe' filter missing") - - // Removing an existing filter should remove it from both memory and db - err = lp.UnregisterFilter("Emitter Log 1 + 2") - require.NoError(t, err) - _, ok = lp.filters["Emitter Log 1 + 2"] - require.False(t, ok, "'Emitter Log 1 filter' should have been removed by UnregisterFilter()") - require.Len(t, lp.filters, 2) - validateFiltersTable(t, lp, orm) - - err = lp.UnregisterFilter("Emitter Log 1 + 2 dupe") - require.NoError(t, err) - err = lp.UnregisterFilter("Emitter Log 1") - require.NoError(t, err) - assert.Len(t, lp.filters, 0) - filters, err := lp.orm.LoadFilters() - require.NoError(t, err) - assert.Len(t, filters, 0) - - // Make sure cache was invalidated - assert.Len(t, lp.Filter().Addresses, 1) - assert.Equal(t, lp.Filter().Addresses[0], common.HexToAddress("0x0000000000000000000000000000000000000000")) - assert.Len(t, lp.Filter().Topics, 1) - assert.Len(t, lp.Filter().Topics[0], 0) -} - -func assertForeignConstraintError(t *testing.T, observedLog observer.LoggedEntry, - table string, constraint string) { - - assert.Equal(t, "SQL ERROR", observedLog.Entry.Message) - - field := observedLog.Context[0] - require.Equal(t, zapcore.ErrorType, field.Type) - err, ok := field.Interface.(error) - var pgErr *pgconn.PgError - require.True(t, errors.As(err, &pgErr)) - require.True(t, ok) - assert.Equal(t, "23503", pgErr.SQLState()) // foreign key constraint violation code - assert.Equal(t, table, pgErr.TableName) - assert.Equal(t, constraint, pgErr.ConstraintName) -} - -func TestLogPoller_DBErrorHandling(t *testing.T) { - t.Parallel() - lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.WarnLevel) - chainID1 := testutils.NewRandomEVMChainID() - chainID2 := testutils.NewRandomEVMChainID() - db := pgtest.NewSqlxDB(t) - o := NewORM(chainID1, db, lggr, pgtest.NewQConfig(true)) - - owner := testutils.MustNewSimTransactor(t) - ethDB := rawdb.NewMemoryDatabase() - ec := backends.NewSimulatedBackendWithDatabase(ethDB, map[common.Address]core.GenesisAccount{ - owner.From: { - Balance: big.NewInt(0).Mul(big.NewInt(10), big.NewInt(1e18)), - }, - }, 10e6) - _, _, emitter, err := log_emitter.DeployLogEmitter(owner, ec) - require.NoError(t, err) - _, err = emitter.EmitLog1(owner, []*big.Int{big.NewInt(9)}) - require.NoError(t, err) - _, err = emitter.EmitLog1(owner, []*big.Int{big.NewInt(7)}) - require.NoError(t, err) - ec.Commit() - ec.Commit() - ec.Commit() - - lp := NewLogPoller(o, client.NewSimulatedBackendClient(t, ec, chainID2), lggr, 1*time.Hour, 2, 3, 2, 1000) - ctx, cancelReplay := context.WithCancel(testutils.Context(t)) - lp.ctx, lp.cancel = context.WithCancel(testutils.Context(t)) - defer cancelReplay() - defer lp.cancel() - - err = lp.Replay(ctx, 5) // block number too high - require.ErrorContains(t, err, "Invalid replay block number") - - // Force a db error while loading the filters (tx aborted, already rolled back) - require.Error(t, utils.JustError(db.Exec(`invalid query`))) - go func() { - err = lp.Replay(ctx, 2) - assert.Error(t, err, ErrReplayAbortedByClient) - }() - - time.Sleep(100 * time.Millisecond) - go lp.run() - require.Eventually(t, func() bool { - return observedLogs.Len() >= 5 - }, 2*time.Second, 20*time.Millisecond) - lp.cancel() - lp.Close() - <-lp.done - - logMsgs := make(map[string]int) - for _, obs := range observedLogs.All() { - _, ok := logMsgs[obs.Entry.Message] - if ok { - logMsgs[(obs.Entry.Message)] = 1 - } else { - logMsgs[(obs.Entry.Message)]++ - } - } - - assert.Contains(t, logMsgs, "SQL ERROR") - assert.Contains(t, logMsgs, "Failed loading filters in main logpoller loop, retrying later") - assert.Contains(t, logMsgs, "Error executing replay, could not get fromBlock") - assert.Contains(t, logMsgs, "backup log poller ran before filters loaded, skipping") -} - func TestLogPoller_LoadFilters(t *testing.T) { t.Parallel() th := SetupTH(t, 2, 3, 2) - filter1 := Filter{"first filter", []common.Hash{ + filter1 := logpoller.Filter{"first Filter", []common.Hash{ EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, []common.Address{th.EmitterAddress1, th.EmitterAddress2}} - filter2 := Filter{"second filter", []common.Hash{ + filter2 := logpoller.Filter{"second Filter", []common.Hash{ EmitterABI.Events["Log2"].ID, EmitterABI.Events["Log3"].ID}, []common.Address{th.EmitterAddress2}} - filter3 := Filter{"third filter", []common.Hash{ + filter3 := logpoller.Filter{"third Filter", []common.Hash{ EmitterABI.Events["Log1"].ID}, []common.Address{th.EmitterAddress1, th.EmitterAddress2}} - assert.True(t, filter1.contains(nil)) - assert.False(t, filter1.contains(&filter2)) - assert.False(t, filter2.contains(&filter1)) - assert.True(t, filter1.contains(&filter3)) + assert.True(t, filter1.Contains(nil)) + assert.False(t, filter1.Contains(&filter2)) + assert.False(t, filter2.Contains(&filter1)) + assert.True(t, filter1.Contains(&filter3)) err := th.LogPoller.RegisterFilter(filter1) require.NoError(t, err) @@ -667,78 +713,27 @@ func TestLogPoller_LoadFilters(t *testing.T) { require.NotNil(t, filters) require.Len(t, filters, 3) - filter, ok := filters["first filter"] + filter, ok := filters["first Filter"] require.True(t, ok) - assert.True(t, filter.contains(&filter1)) - assert.True(t, filter1.contains(&filter)) + assert.True(t, filter.Contains(&filter1)) + assert.True(t, filter1.Contains(&filter)) - filter, ok = filters["second filter"] + filter, ok = filters["second Filter"] require.True(t, ok) - assert.True(t, filter.contains(&filter2)) - assert.True(t, filter2.contains(&filter)) + assert.True(t, filter.Contains(&filter2)) + assert.True(t, filter2.Contains(&filter)) - filter, ok = filters["third filter"] + filter, ok = filters["third Filter"] require.True(t, ok) - assert.True(t, filter.contains(&filter3)) - assert.True(t, filter3.contains(&filter)) -} - -type ConvertLogsTestCases struct { - name string - logs []types.Log - blocks []LogPollerBlock - expected int -} - -func TestLogPoller_ConvertLogs(t *testing.T) { - t.Parallel() - lggr := logger.TestLogger(t) - - topics := []common.Hash{EmitterABI.Events["Log1"].ID} - - cases := []ConvertLogsTestCases{ - {"SingleBlock", - []types.Log{{Topics: topics}, {Topics: topics}}, - []LogPollerBlock{{BlockTimestamp: time.Now()}}, - 2}, - {"BlockList", - []types.Log{{Topics: topics}, {Topics: topics}, {Topics: topics}}, - []LogPollerBlock{{BlockTimestamp: time.Now()}}, - 3}, - {"EmptyList", - []types.Log{}, - []LogPollerBlock{}, - 0}, - {"TooManyBlocks", - []types.Log{{}}, - []LogPollerBlock{{}, {}}, - 0}, - {"TooFewBlocks", - []types.Log{{}, {}, {}}, - []LogPollerBlock{{}, {}}, - 0}, - } - - for _, c := range cases { - t.Run(c.name, func(t *testing.T) { - logs := convertLogs(c.logs, c.blocks, lggr, big.NewInt(53)) - require.Len(t, logs, c.expected) - for i := 0; i < c.expected; i++ { - if len(c.blocks) == 1 { - assert.Equal(t, c.blocks[0].BlockTimestamp, logs[i].BlockTimestamp) - } else { - assert.Equal(t, logs[i].BlockTimestamp, c.blocks[i].BlockTimestamp) - } - } - }) - } + assert.True(t, filter.Contains(&filter3)) + assert.True(t, filter3.Contains(&filter)) } func TestLogPoller_GetBlocks_Range(t *testing.T) { t.Parallel() th := SetupTH(t, 2, 3, 2) - err := th.LogPoller.RegisterFilter(Filter{"GetBlocks Test", []common.Hash{ + err := th.LogPoller.RegisterFilter(logpoller.Filter{"GetBlocks Test", []common.Hash{ EmitterABI.Events["Log1"].ID, EmitterABI.Events["Log2"].ID}, []common.Address{th.EmitterAddress1, th.EmitterAddress2}}, ) require.NoError(t, err) @@ -842,16 +837,6 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { cancel() _, err = th.LogPoller.GetBlocksRange(testutils.Context(t), blockNums, qopts) require.NoError(t, err) - - // getBlocksRange returns blocks with a nil client - th.LogPoller.ec = nil - blockNums = []uint64{1, 2} - blocks, err = th.LogPoller.GetBlocksRange(testutils.Context(t), blockNums) - require.NoError(t, err) - assert.Equal(t, 1, int(blocks[0].BlockNumber)) - assert.NotEmpty(t, blocks[0].BlockHash) - assert.Equal(t, 2, int(blocks[1].BlockNumber)) - assert.NotEmpty(t, blocks[1].BlockHash) } func TestGetReplayFromBlock(t *testing.T) { @@ -864,12 +849,12 @@ func TestGetReplayFromBlock(t *testing.T) { // Nothing in the DB yet, should use whatever we specify. requested := int64(5) - fromBlock, err := th.LogPoller.getReplayFromBlock(testutils.Context(t), requested) + fromBlock, err := th.LogPoller.GetReplayFromBlock(testutils.Context(t), requested) require.NoError(t, err) assert.Equal(t, requested, fromBlock) // Do a poll, then we should have up to block 11 (blocks 0 & 1 are contract deployments, 2-10 logs). - nextBlock := th.LogPoller.PollAndSaveLogs(testutils.Context(t), 1) + nextBlock := th.PollAndSaveLogs(testutils.Context(t), 1) require.Equal(t, int64(12), nextBlock) // Commit a few more so chain is ahead. @@ -878,7 +863,7 @@ func TestGetReplayFromBlock(t *testing.T) { } // Should take min(latest, requested), in this case latest. requested = int64(15) - fromBlock, err = th.LogPoller.getReplayFromBlock(testutils.Context(t), requested) + fromBlock, err = th.LogPoller.GetReplayFromBlock(testutils.Context(t), requested) require.NoError(t, err) latest, err := th.LogPoller.LatestBlock() require.NoError(t, err) @@ -886,44 +871,7 @@ func TestGetReplayFromBlock(t *testing.T) { // Should take min(latest, requested) in this case requested. requested = int64(7) - fromBlock, err = th.LogPoller.getReplayFromBlock(testutils.Context(t), requested) + fromBlock, err = th.LogPoller.GetReplayFromBlock(testutils.Context(t), requested) require.NoError(t, err) assert.Equal(t, requested, fromBlock) } - -func TestFilterName(t *testing.T) { - t.Parallel() - assert.Equal(t, "a - b:c:d", FilterName("a", "b", "c", "d")) - assert.Equal(t, "empty args test", FilterName("empty args test")) -} - -func benchmarkFilter(b *testing.B, nFilters, nAddresses, nEvents int) { - lggr := logger.TestLogger(b) - lp := NewLogPoller(nil, nil, lggr, 1*time.Hour, 2, 3, 2, 1000) - for i := 0; i < nFilters; i++ { - var addresses []common.Address - var events []common.Hash - for j := 0; j < nAddresses; j++ { - addresses = append(addresses, common.BigToAddress(big.NewInt(int64(j+1)))) - } - for j := 0; j < nEvents; j++ { - events = append(events, common.BigToHash(big.NewInt(int64(j+1)))) - } - err := lp.RegisterFilter(Filter{Name: "my filter", EventSigs: events, Addresses: addresses}) - require.NoError(b, err) - } - b.ResetTimer() - for n := 0; n < b.N; n++ { - lp.filter(nil, nil, nil) - } -} - -func BenchmarkFilter10_1(b *testing.B) { - benchmarkFilter(b, 10, 1, 1) -} -func BenchmarkFilter100_10(b *testing.B) { - benchmarkFilter(b, 100, 10, 10) -} -func BenchmarkFilter1000_100(b *testing.B) { - benchmarkFilter(b, 1000, 100, 100) -} diff --git a/core/chains/evm/logpoller/orm.go b/core/chains/evm/logpoller/orm.go index 1c0bfbacb46..4b78fd9c377 100644 --- a/core/chains/evm/logpoller/orm.go +++ b/core/chains/evm/logpoller/orm.go @@ -63,7 +63,7 @@ func (o *ORM) InsertFilter(filter Filter, qopts ...pg.QOpt) (err error) { filter.Name, utils.NewBig(o.chainID), addresses, events) } -// DeleteFilter removes all events,address pairs associated with the filter +// DeleteFilter removes all events,address pairs associated with the Filter func (o *ORM) DeleteFilter(name string, qopts ...pg.QOpt) error { q := o.q.WithOpts(qopts...) return q.ExecQ(`DELETE FROM evm_log_poller_filters WHERE name = $1 AND evm_chain_id = $2`, name, utils.NewBig(o.chainID)) @@ -170,7 +170,7 @@ func (o *ORM) InsertLogs(logs []Log, qopts ...pg.QOpt) error { return nil } -func (o *ORM) selectLogsByBlockRange(start, end int64) ([]Log, error) { +func (o *ORM) SelectLogsByBlockRange(start, end int64) ([]Log, error) { var logs []Log err := o.q.Select(&logs, ` SELECT * FROM evm_logs diff --git a/core/chains/evm/logpoller/orm_test.go b/core/chains/evm/logpoller/orm_test.go index 9f39546fb82..40d93ea82fd 100644 --- a/core/chains/evm/logpoller/orm_test.go +++ b/core/chains/evm/logpoller/orm_test.go @@ -1,4 +1,4 @@ -package logpoller +package logpoller_test import ( "bytes" @@ -13,8 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/core/logger" + "github.com/smartcontractkit/chainlink/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/core/utils" ) @@ -24,20 +23,40 @@ type block struct { timestamp int64 } -// Setup creates two orms representing logs from different chains. -func setup(t testing.TB) (*ORM, *ORM) { - db := pgtest.NewSqlxDB(t) - lggr := logger.TestLogger(t) - require.NoError(t, utils.JustError(db.Exec(`SET CONSTRAINTS evm_log_poller_blocks_evm_chain_id_fkey DEFERRED`))) - require.NoError(t, utils.JustError(db.Exec(`SET CONSTRAINTS evm_logs_evm_chain_id_fkey DEFERRED`))) - o1 := NewORM(big.NewInt(137), db, lggr, pgtest.NewQConfig(true)) - o2 := NewORM(big.NewInt(138), db, lggr, pgtest.NewQConfig(true)) - return o1, o2 +func GenLog(chainID *big.Int, logIndex int64, blockNum int64, blockHash string, topic1 []byte, address common.Address) logpoller.Log { + return logpoller.Log{ + EvmChainId: utils.NewBig(chainID), + LogIndex: logIndex, + BlockHash: common.HexToHash(blockHash), + BlockNumber: blockNum, + EventSig: common.BytesToHash(topic1), + Topics: [][]byte{topic1}, + Address: address, + TxHash: common.HexToHash("0x1234"), + Data: append([]byte("hello "), byte(blockNum)), + } } -func TestORM_GetBlocks_From_Range(t *testing.T) { +func TestLogPoller_Batching(t *testing.T) { + t.Parallel() + th := SetupTH(t, 2, 3, 2) + var logs []logpoller.Log + // Inserts are limited to 65535 parameters. A log being 10 parameters this results in + // a maximum of 6553 log inserts per tx. As inserting more than 6553 would result in + // an error without batching, this test makes sure batching is enabled. + for i := 0; i < 15000; i++ { + logs = append(logs, GenLog(th.ChainID, int64(i+1), 1, "0x3", EmitterABI.Events["Log1"].ID.Bytes(), th.EmitterAddress1)) + } + require.NoError(t, th.ORM.InsertLogs(logs)) + lgs, err := th.ORM.SelectLogsByBlockRange(1, 1) + require.NoError(t, err) + // Make sure all logs are inserted + require.Equal(t, len(logs), len(lgs)) +} - o1, _ := setup(t) +func TestORM_GetBlocks_From_Range(t *testing.T) { + th := SetupTH(t, 2, 3, 2) + o1 := th.ORM // Insert many blocks and read them back together blocks := []block{ { @@ -91,8 +110,8 @@ func TestORM_GetBlocks_From_Range(t *testing.T) { } func TestORM_GetBlocks_From_Range_Recent_Blocks(t *testing.T) { - - o1, _ := setup(t) + th := SetupTH(t, 2, 3, 2) + o1 := th.ORM // Insert many blocks and read them back together var recentBlocks []block for i := 1; i <= 256; i++ { @@ -123,14 +142,16 @@ func TestORM_GetBlocks_From_Range_Recent_Blocks(t *testing.T) { } func TestORM(t *testing.T) { - o1, o2 := setup(t) + th := SetupTH(t, 2, 3, 2) + o1 := th.ORM + o2 := th.ORM2 // Insert and read back a block. require.NoError(t, o1.InsertBlock(common.HexToHash("0x1234"), 10, time.Now())) b, err := o1.SelectBlockByHash(common.HexToHash("0x1234")) require.NoError(t, err) assert.Equal(t, b.BlockNumber, int64(10)) assert.Equal(t, b.BlockHash.Bytes(), common.HexToHash("0x1234").Bytes()) - assert.Equal(t, b.EvmChainId.String(), "137") + assert.Equal(t, b.EvmChainId.String(), th.ChainID.String()) // Insert blocks from a different chain require.NoError(t, o2.InsertBlock(common.HexToHash("0x1234"), 11, time.Now())) @@ -139,7 +160,7 @@ func TestORM(t *testing.T) { require.NoError(t, err) assert.Equal(t, b2.BlockNumber, int64(11)) assert.Equal(t, b2.BlockHash.Bytes(), common.HexToHash("0x1234").Bytes()) - assert.Equal(t, b2.EvmChainId.String(), "138") + assert.Equal(t, b2.EvmChainId.String(), th.ChainID2.String()) latest, err := o1.SelectLatestBlock() require.NoError(t, err) @@ -168,9 +189,9 @@ func TestORM(t *testing.T) { // Should be able to insert and read back a log. topic := common.HexToHash("0x1599") topic2 := common.HexToHash("0x1600") - require.NoError(t, o1.InsertLogs([]Log{ + require.NoError(t, o1.InsertLogs([]logpoller.Log{ { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 1, BlockHash: common.HexToHash("0x1234"), BlockNumber: int64(10), @@ -181,7 +202,7 @@ func TestORM(t *testing.T) { Data: []byte("hello"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 2, BlockHash: common.HexToHash("0x1234"), BlockNumber: int64(11), @@ -192,7 +213,7 @@ func TestORM(t *testing.T) { Data: []byte("hello"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 3, BlockHash: common.HexToHash("0x1234"), BlockNumber: int64(12), @@ -203,7 +224,7 @@ func TestORM(t *testing.T) { Data: []byte("hello"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 4, BlockHash: common.HexToHash("0x1234"), BlockNumber: int64(13), @@ -214,7 +235,7 @@ func TestORM(t *testing.T) { Data: []byte("hello"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 5, BlockHash: common.HexToHash("0x1234"), BlockNumber: int64(14), @@ -225,7 +246,7 @@ func TestORM(t *testing.T) { Data: []byte("hello2"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 6, BlockHash: common.HexToHash("0x1234"), BlockNumber: int64(15), @@ -236,7 +257,7 @@ func TestORM(t *testing.T) { Data: []byte("hello2"), }, })) - logs, err := o1.selectLogsByBlockRange(10, 10) + logs, err := o1.SelectLogsByBlockRange(10, 10) require.NoError(t, err) require.Equal(t, 1, len(logs)) assert.Equal(t, []byte("hello"), logs[0].Data) @@ -316,21 +337,21 @@ func TestORM(t *testing.T) { latest, err = o1.SelectLatestBlock() require.NoError(t, err) t.Log(latest.BlockNumber) - logs, err = o1.selectLogsByBlockRange(1, latest.BlockNumber) + logs, err = o1.SelectLogsByBlockRange(1, latest.BlockNumber) require.NoError(t, err) require.Equal(t, 0, len(logs)) } -func insertLogsTopicValueRange(t *testing.T, o *ORM, addr common.Address, blockNumber int, eventSig common.Hash, start, stop int) { - var lgs []Log +func insertLogsTopicValueRange(t *testing.T, chainID *big.Int, o *logpoller.ORM, addr common.Address, blockNumber int, eventSig common.Hash, start, stop int) { + var lgs []logpoller.Log for i := start; i <= stop; i++ { - lgs = append(lgs, Log{ - EvmChainId: utils.NewBig(o.chainID), + lgs = append(lgs, logpoller.Log{ + EvmChainId: utils.NewBig(chainID), LogIndex: int64(i), BlockHash: common.HexToHash("0x1234"), BlockNumber: int64(blockNumber), EventSig: eventSig, - Topics: [][]byte{eventSig[:], EvmWord(uint64(i)).Bytes()}, + Topics: [][]byte{eventSig[:], logpoller.EvmWord(uint64(i)).Bytes()}, Address: addr, TxHash: common.HexToHash("0x1888"), Data: []byte("hello"), @@ -340,54 +361,56 @@ func insertLogsTopicValueRange(t *testing.T, o *ORM, addr common.Address, blockN } func TestORM_IndexedLogs(t *testing.T) { - o1, _ := setup(t) + th := SetupTH(t, 2, 3, 2) + o1 := th.ORM eventSig := common.HexToHash("0x1599") addr := common.HexToAddress("0x1234") require.NoError(t, o1.InsertBlock(common.HexToHash("0x1"), 1, time.Now())) - insertLogsTopicValueRange(t, o1, addr, 1, eventSig, 1, 3) - insertLogsTopicValueRange(t, o1, addr, 2, eventSig, 4, 4) // unconfirmed + insertLogsTopicValueRange(t, th.ChainID, o1, addr, 1, eventSig, 1, 3) + insertLogsTopicValueRange(t, th.ChainID, o1, addr, 2, eventSig, 4, 4) // unconfirmed - lgs, err := o1.SelectIndexedLogs(addr, eventSig, 1, []common.Hash{EvmWord(1)}, 0) + lgs, err := o1.SelectIndexedLogs(addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1)}, 0) require.NoError(t, err) require.Equal(t, 1, len(lgs)) - assert.Equal(t, EvmWord(1).Bytes(), lgs[0].GetTopics()[1].Bytes()) + assert.Equal(t, logpoller.EvmWord(1).Bytes(), lgs[0].GetTopics()[1].Bytes()) - lgs, err = o1.SelectIndexedLogs(addr, eventSig, 1, []common.Hash{EvmWord(1), EvmWord(2)}, 0) + lgs, err = o1.SelectIndexedLogs(addr, eventSig, 1, []common.Hash{logpoller.EvmWord(1), logpoller.EvmWord(2)}, 0) require.NoError(t, err) assert.Equal(t, 2, len(lgs)) - lgs, err = o1.SelectIndexLogsTopicGreaterThan(addr, eventSig, 1, EvmWord(2), 0) + lgs, err = o1.SelectIndexLogsTopicGreaterThan(addr, eventSig, 1, logpoller.EvmWord(2), 0) require.NoError(t, err) assert.Equal(t, 2, len(lgs)) - lgs, err = o1.SelectIndexLogsTopicRange(addr, eventSig, 1, EvmWord(3), EvmWord(3), 0) + lgs, err = o1.SelectIndexLogsTopicRange(addr, eventSig, 1, logpoller.EvmWord(3), logpoller.EvmWord(3), 0) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) - assert.Equal(t, EvmWord(3).Bytes(), lgs[0].GetTopics()[1].Bytes()) + assert.Equal(t, logpoller.EvmWord(3).Bytes(), lgs[0].GetTopics()[1].Bytes()) - lgs, err = o1.SelectIndexLogsTopicRange(addr, eventSig, 1, EvmWord(1), EvmWord(3), 0) + lgs, err = o1.SelectIndexLogsTopicRange(addr, eventSig, 1, logpoller.EvmWord(1), logpoller.EvmWord(3), 0) require.NoError(t, err) assert.Equal(t, 3, len(lgs)) // Check confirmations work as expected. require.NoError(t, o1.InsertBlock(common.HexToHash("0x2"), 2, time.Now())) - lgs, err = o1.SelectIndexLogsTopicRange(addr, eventSig, 1, EvmWord(4), EvmWord(4), 1) + lgs, err = o1.SelectIndexLogsTopicRange(addr, eventSig, 1, logpoller.EvmWord(4), logpoller.EvmWord(4), 1) require.NoError(t, err) assert.Equal(t, 0, len(lgs)) require.NoError(t, o1.InsertBlock(common.HexToHash("0x3"), 3, time.Now())) - lgs, err = o1.SelectIndexLogsTopicRange(addr, eventSig, 1, EvmWord(4), EvmWord(4), 1) + lgs, err = o1.SelectIndexLogsTopicRange(addr, eventSig, 1, logpoller.EvmWord(4), logpoller.EvmWord(4), 1) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) } func TestORM_DataWords(t *testing.T) { - o1, _ := setup(t) + th := SetupTH(t, 2, 3, 2) + o1 := th.ORM eventSig := common.HexToHash("0x1599") addr := common.HexToAddress("0x1234") require.NoError(t, o1.InsertBlock(common.HexToHash("0x1"), 1, time.Now())) - require.NoError(t, o1.InsertLogs([]Log{ + require.NoError(t, o1.InsertLogs([]logpoller.Log{ { - EvmChainId: utils.NewBig(o1.chainID), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: int64(0), BlockHash: common.HexToHash("0x1"), BlockNumber: int64(1), @@ -395,11 +418,11 @@ func TestORM_DataWords(t *testing.T) { Topics: [][]byte{eventSig[:]}, Address: addr, TxHash: common.HexToHash("0x1888"), - Data: EvmWord(1).Bytes(), + Data: logpoller.EvmWord(1).Bytes(), }, { // In block 2, unconfirmed to start - EvmChainId: utils.NewBig(o1.chainID), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: int64(1), BlockHash: common.HexToHash("0x2"), BlockNumber: int64(2), @@ -407,43 +430,44 @@ func TestORM_DataWords(t *testing.T) { Topics: [][]byte{eventSig[:]}, Address: addr, TxHash: common.HexToHash("0x1888"), - Data: append(EvmWord(2).Bytes(), EvmWord(3).Bytes()...), + Data: append(logpoller.EvmWord(2).Bytes(), logpoller.EvmWord(3).Bytes()...), }, })) // Outside range should fail. - lgs, err := o1.SelectDataWordRange(addr, eventSig, 0, EvmWord(2), EvmWord(2), 0) + lgs, err := o1.SelectDataWordRange(addr, eventSig, 0, logpoller.EvmWord(2), logpoller.EvmWord(2), 0) require.NoError(t, err) assert.Equal(t, 0, len(lgs)) // Range including log should succeed - lgs, err = o1.SelectDataWordRange(addr, eventSig, 0, EvmWord(1), EvmWord(2), 0) + lgs, err = o1.SelectDataWordRange(addr, eventSig, 0, logpoller.EvmWord(1), logpoller.EvmWord(2), 0) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) // Range only covering log should succeed - lgs, err = o1.SelectDataWordRange(addr, eventSig, 0, EvmWord(1), EvmWord(1), 0) + lgs, err = o1.SelectDataWordRange(addr, eventSig, 0, logpoller.EvmWord(1), logpoller.EvmWord(1), 0) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) // Cannot query for unconfirmed second log. - lgs, err = o1.SelectDataWordRange(addr, eventSig, 1, EvmWord(3), EvmWord(3), 0) + lgs, err = o1.SelectDataWordRange(addr, eventSig, 1, logpoller.EvmWord(3), logpoller.EvmWord(3), 0) require.NoError(t, err) assert.Equal(t, 0, len(lgs)) // Confirm it, then can query. require.NoError(t, o1.InsertBlock(common.HexToHash("0x2"), 2, time.Now())) - lgs, err = o1.SelectDataWordRange(addr, eventSig, 1, EvmWord(3), EvmWord(3), 0) + lgs, err = o1.SelectDataWordRange(addr, eventSig, 1, logpoller.EvmWord(3), logpoller.EvmWord(3), 0) require.NoError(t, err) assert.Equal(t, 1, len(lgs)) - assert.Equal(t, lgs[0].Data, append(EvmWord(2).Bytes(), EvmWord(3).Bytes()...)) + assert.Equal(t, lgs[0].Data, append(logpoller.EvmWord(2).Bytes(), logpoller.EvmWord(3).Bytes()...)) // Check greater than 1 yields both logs. - lgs, err = o1.SelectDataWordGreaterThan(addr, eventSig, 0, EvmWord(1), 0) + lgs, err = o1.SelectDataWordGreaterThan(addr, eventSig, 0, logpoller.EvmWord(1), 0) require.NoError(t, err) assert.Equal(t, 2, len(lgs)) } func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { - o1, _ := setup(t) + th := SetupTH(t, 2, 3, 2) + o1 := th.ORM // Insert logs on different topics, should be able to read them // back using SelectLogsWithSigsByBlockRangeFilter and specifying @@ -451,9 +475,9 @@ func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { topic := common.HexToHash("0x1599") topic2 := common.HexToHash("0x1600") sourceAddr := common.HexToAddress("0x12345") - inputLogs := []Log{ + inputLogs := []logpoller.Log{ { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 1, BlockHash: common.HexToHash("0x1234"), BlockNumber: int64(10), @@ -464,7 +488,7 @@ func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { Data: []byte("hello1"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 2, BlockHash: common.HexToHash("0x1235"), BlockNumber: int64(11), @@ -475,7 +499,7 @@ func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { Data: []byte("hello2"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 3, BlockHash: common.HexToHash("0x1236"), BlockNumber: int64(12), @@ -486,7 +510,7 @@ func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { Data: []byte("hello3"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 4, BlockHash: common.HexToHash("0x1237"), BlockNumber: int64(13), @@ -497,7 +521,7 @@ func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { Data: []byte("hello4"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 5, BlockHash: common.HexToHash("0x1238"), BlockNumber: int64(14), @@ -508,7 +532,7 @@ func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { Data: []byte("hello5"), }, { - EvmChainId: utils.NewBigI(137), + EvmChainId: utils.NewBig(th.ChainID), LogIndex: 6, BlockHash: common.HexToHash("0x1239"), BlockNumber: int64(15), @@ -536,7 +560,8 @@ func TestORM_SelectLogsWithSigsByBlockRangeFilter(t *testing.T) { } func TestORM_DeleteBlocksBefore(t *testing.T) { - o1, _ := setup(t) + th := SetupTH(t, 2, 3, 2) + o1 := th.ORM require.NoError(t, o1.InsertBlock(common.HexToHash("0x1234"), 1, time.Now())) require.NoError(t, o1.InsertBlock(common.HexToHash("0x1235"), 2, time.Now())) require.NoError(t, o1.DeleteBlocksBefore(1)) @@ -556,13 +581,63 @@ func TestORM_DeleteBlocksBefore(t *testing.T) { require.Equal(t, err, sql.ErrNoRows) } +func TestLogPoller_Logs(t *testing.T) { + t.Parallel() + th := SetupTH(t, 2, 3, 2) + event1 := EmitterABI.Events["Log1"].ID + event2 := EmitterABI.Events["Log2"].ID + address1 := common.HexToAddress("0x2ab9a2Dc53736b361b72d900CdF9F78F9406fbbb") + address2 := common.HexToAddress("0x6E225058950f237371261C985Db6bDe26df2200E") + + // Block 1-3 + require.NoError(t, th.ORM.InsertLogs([]logpoller.Log{ + GenLog(th.ChainID, 1, 1, "0x3", event1[:], address1), + GenLog(th.ChainID, 2, 1, "0x3", event2[:], address2), + GenLog(th.ChainID, 1, 2, "0x4", event1[:], address2), + GenLog(th.ChainID, 2, 2, "0x4", event2[:], address1), + GenLog(th.ChainID, 1, 3, "0x5", event1[:], address1), + GenLog(th.ChainID, 2, 3, "0x5", event2[:], address2), + })) + + // Select for all Addresses + lgs, err := th.ORM.SelectLogsByBlockRange(1, 3) + require.NoError(t, err) + require.Equal(t, 6, len(lgs)) + assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000003", lgs[0].BlockHash.String()) + assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000003", lgs[1].BlockHash.String()) + assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000004", lgs[2].BlockHash.String()) + assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000004", lgs[3].BlockHash.String()) + assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000005", lgs[4].BlockHash.String()) + assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000005", lgs[5].BlockHash.String()) + + // Filter by Address and topic + lgs, err = th.ORM.SelectLogsByBlockRangeFilter(1, 3, address1, event1) + require.NoError(t, err) + require.Equal(t, 2, len(lgs)) + assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000003", lgs[0].BlockHash.String()) + assert.Equal(t, address1, lgs[0].Address) + assert.Equal(t, event1.Bytes(), lgs[0].Topics[0]) + assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000005", lgs[1].BlockHash.String()) + assert.Equal(t, address1, lgs[1].Address) + + // Filter by block + lgs, err = th.ORM.SelectLogsByBlockRangeFilter(2, 2, address2, event1) + require.NoError(t, err) + require.Equal(t, 1, len(lgs)) + assert.Equal(t, "0x0000000000000000000000000000000000000000000000000000000000000004", lgs[0].BlockHash.String()) + assert.Equal(t, int64(1), lgs[0].LogIndex) + assert.Equal(t, address2, lgs[0].Address) + assert.Equal(t, event1.Bytes(), lgs[0].Topics[0]) +} + func BenchmarkLogs(b *testing.B) { - o, _ := setup(b) - var lgs []Log + th := SetupTH(b, 2, 3, 2) + o := th.ORM + var lgs []logpoller.Log addr := common.HexToAddress("0x1234") for i := 0; i < 10_000; i++ { - lgs = append(lgs, Log{ - EvmChainId: utils.NewBig(o.chainID), + lgs = append(lgs, logpoller.Log{ + EvmChainId: utils.NewBig(th.ChainID), LogIndex: int64(i), BlockHash: common.HexToHash("0x1"), BlockNumber: 1, @@ -576,7 +651,7 @@ func BenchmarkLogs(b *testing.B) { require.NoError(b, o.InsertLogs(lgs)) b.ResetTimer() for n := 0; n < b.N; n++ { - _, err := o.SelectDataWordRange(addr, EmitterABI.Events["Log1"].ID, 0, EvmWord(8000), EvmWord(8002), 0) + _, err := o.SelectDataWordRange(addr, EmitterABI.Events["Log1"].ID, 0, logpoller.EvmWord(8000), logpoller.EvmWord(8002), 0) require.NoError(b, err) } } diff --git a/core/internal/testutils/testutils.go b/core/internal/testutils/testutils.go index bf42b53790e..627897a0e11 100644 --- a/core/internal/testutils/testutils.go +++ b/core/internal/testutils/testutils.go @@ -46,7 +46,7 @@ var SimulatedChainID = big.NewInt(1337) // MustNewSimTransactor returns a transactor for interacting with the // geth simulated backend. -func MustNewSimTransactor(t *testing.T) *bind.TransactOpts { +func MustNewSimTransactor(t testing.TB) *bind.TransactOpts { key, err := crypto.GenerateKey() require.NoError(t, err) transactor, err := bind.NewKeyedTransactorWithChainID(key, SimulatedChainID) From e18eb45695243d3e07c7d7d1f267e3523bfcd604 Mon Sep 17 00:00:00 2001 From: Ryan Hall Date: Mon, 20 Mar 2023 14:02:11 -0400 Subject: [PATCH 25/25] Automation registry 2.0.2 (#8419) * write automation registry 2_0_2 * use failure mode enum in tests * expose revert bytes in checkUpkeep * rename PaymentModel --> Mode * use Mode enum in tests * upgrade ArbSys to nitro version * improve error message in keeper registry test * make keeper registry use L2 blocknum/blockhash on arbitrum * early return instead of revert on stale report * add PerformDataWrapper to user custom revert bytes * fix misplaced comment in keeper registry test * update _blockHash function to pre-check block range * update go wrappers for automation 2.0.2 --------- Co-authored-by: Chris Malec --- .../v0.8/automation/2_0/KeeperRegistry2_0.sol | 22 +- .../automation/2_0/KeeperRegistryBase2_0.sol | 56 ++- .../automation/2_0/KeeperRegistryLogic2_0.sol | 40 +- contracts/src/v0.8/dev/ArbitrumValidator.sol | 2 +- .../src/precompiles/ArbSys.sol | 150 ++++++ .../contracts/arbos/builtin/ArbSys.sol | 72 --- contracts/src/v0.8/mocks/MockArbSys.sol | 17 + .../v0.8/automation/KeeperRegistry2_0.test.ts | 454 ++++++++++++------ .../test/v0.8/dev/UpkeepTranscoder3_0.test.ts | 9 +- .../keeper_registry_logic2_0.go | 22 +- .../keeper_registry_wrapper2_0.go | 18 +- ...rapper-dependency-versions-do-not-edit.txt | 4 +- .../contracts/contract_deployer.go | 12 +- 13 files changed, 585 insertions(+), 293 deletions(-) create mode 100644 contracts/src/v0.8/dev/vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol delete mode 100644 contracts/src/v0.8/dev/vendor/arb-os/e8d9696f21/contracts/arbos/builtin/ArbSys.sol create mode 100644 contracts/src/v0.8/mocks/MockArbSys.sol diff --git a/contracts/src/v0.8/automation/2_0/KeeperRegistry2_0.sol b/contracts/src/v0.8/automation/2_0/KeeperRegistry2_0.sol index 15c7c5f3128..1d8b9ec7575 100644 --- a/contracts/src/v0.8/automation/2_0/KeeperRegistry2_0.sol +++ b/contracts/src/v0.8/automation/2_0/KeeperRegistry2_0.sol @@ -37,6 +37,9 @@ contract KeeperRegistry2_0 is /** * @notice versions: + * - KeeperRegistry 2.0.2: pass revert bytes as performData when target contract reverts + * : fixes issue with arbitrum block number + * : does an early return in case of stale report instead of revert * - KeeperRegistry 2.0.1: implements workaround for buggy migrate function in 1.X * - KeeperRegistry 2.0.0: implement OCR interface * - KeeperRegistry 1.3.0: split contract into Proxy and Logic @@ -50,11 +53,12 @@ contract KeeperRegistry2_0 is * - KeeperRegistry 1.1.0: added flatFeeMicroLink * - KeeperRegistry 1.0.0: initial release */ - string public constant override typeAndVersion = "KeeperRegistry 2.0.1"; + string public constant override typeAndVersion = "KeeperRegistry 2.0.2"; /** * @inheritdoc MigratableKeeperRegistryInterface */ + UpkeepFormat public constant override upkeepTranscoderVersion = UPKEEP_TRANSCODER_VERSION_BASE; /** @@ -67,7 +71,7 @@ contract KeeperRegistry2_0 is */ constructor(KeeperRegistryBase2_0 keeperRegistryLogic) KeeperRegistryBase2_0( - keeperRegistryLogic.getPaymentModel(), + keeperRegistryLogic.getMode(), keeperRegistryLogic.getLinkAddress(), keeperRegistryLogic.getLinkNativeFeedAddress(), keeperRegistryLogic.getFastGasFeedAddress() @@ -140,7 +144,9 @@ contract KeeperRegistry2_0 is } } // No upkeeps to be performed in this report - if (numUpkeepsPassedChecks == 0) revert StaleReport(); + if (numUpkeepsPassedChecks == 0) { + return; + } // Verify signatures if (s_latestConfigDigest != reportContext[0]) revert ConfigDigestMismatch(); @@ -151,7 +157,7 @@ contract KeeperRegistry2_0 is for (uint256 i = 0; i < report.upkeepIds.length; i++) { if (upkeepTransmitInfo[i].earlyChecksPassed) { // Check if this upkeep was already performed in this report - if (s_upkeep[report.upkeepIds[i]].lastPerformBlockNumber == uint32(block.number)) { + if (s_upkeep[report.upkeepIds[i]].lastPerformBlockNumber == uint32(_blockNum())) { revert InvalidReport(); } @@ -165,7 +171,7 @@ contract KeeperRegistry2_0 is gasOverhead -= upkeepTransmitInfo[i].gasUsed; // Store last perform block number for upkeep - s_upkeep[report.upkeepIds[i]].lastPerformBlockNumber = uint32(block.number); + s_upkeep[report.upkeepIds[i]].lastPerformBlockNumber = uint32(_blockNum()); } } @@ -358,7 +364,7 @@ contract KeeperRegistry2_0 is s_fallbackLinkPrice = onchainConfigStruct.fallbackLinkPrice; uint32 previousConfigBlockNumber = s_storage.latestConfigBlockNumber; - s_storage.latestConfigBlockNumber = uint32(block.number); + s_storage.latestConfigBlockNumber = uint32(_blockNum()); s_storage.configCount += 1; s_latestConfigDigest = _configDigestFromConfigData( @@ -655,7 +661,7 @@ contract KeeperRegistry2_0 is return false; } - if (blockhash(wrappedPerformData.checkBlockNumber) != wrappedPerformData.checkBlockhash) { + if (_blockHash(wrappedPerformData.checkBlockNumber) != wrappedPerformData.checkBlockhash) { // Can happen when the block on which report was generated got reorged // We will also revert if checkBlockNumber is older than 256 blocks. In this case we rely on a new transmission // with the latest checkBlockNumber @@ -663,7 +669,7 @@ contract KeeperRegistry2_0 is return false; } - if (upkeep.maxValidBlocknumber <= block.number) { + if (upkeep.maxValidBlocknumber <= _blockNum()) { // Can happen when an upkeep got cancelled after report was generated. // However we have a CANCELLATION_DELAY of 50 blocks so shouldn't happen in practice emit CancelledUpkeepReport(upkeepId); diff --git a/contracts/src/v0.8/automation/2_0/KeeperRegistryBase2_0.sol b/contracts/src/v0.8/automation/2_0/KeeperRegistryBase2_0.sol index ed7c8ecb1dd..1f2fab2ee7a 100644 --- a/contracts/src/v0.8/automation/2_0/KeeperRegistryBase2_0.sol +++ b/contracts/src/v0.8/automation/2_0/KeeperRegistryBase2_0.sol @@ -4,6 +4,7 @@ pragma solidity 0.8.6; import "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; import "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; import "../../vendor/@eth-optimism/contracts/0.8.6/contracts/L2/predeploys/OVM_GasPriceOracle.sol"; +import {ArbSys} from "../../dev/vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; import "../ExecutionPrevention.sol"; import {OnchainConfig, State, UpkeepFailureReason} from "../../interfaces/automation/2_0/AutomationRegistryInterface2_0.sol"; import "../../ConfirmedOwner.sol"; @@ -62,7 +63,7 @@ abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { bytes internal constant L1_FEE_DATA_PADDING = "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; - uint256 internal constant REGISTRY_GAS_OVERHEAD = 65_000; // Used only in maxPayment estimation, not in actual payment + uint256 internal constant REGISTRY_GAS_OVERHEAD = 70_000; // Used only in maxPayment estimation, not in actual payment uint256 internal constant REGISTRY_PER_PERFORM_BYTE_GAS_OVERHEAD = 20; // Used only in maxPayment estimation, not in actual payment. Value scales with performData length. uint256 internal constant REGISTRY_PER_SIGNER_GAS_OVERHEAD = 7_500; // Used only in maxPayment estimation, not in actual payment. Value scales with f. @@ -72,11 +73,12 @@ abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { OVM_GasPriceOracle internal constant OPTIMISM_ORACLE = OVM_GasPriceOracle(0x420000000000000000000000000000000000000F); ArbGasInfo internal constant ARB_NITRO_ORACLE = ArbGasInfo(0x000000000000000000000000000000000000006C); + ArbSys internal constant ARB_SYS = ArbSys(0x0000000000000000000000000000000000000064); LinkTokenInterface internal immutable i_link; AggregatorV3Interface internal immutable i_linkNativeFeed; AggregatorV3Interface internal immutable i_fastGasFeed; - PaymentModel internal immutable i_paymentModel; + Mode internal immutable i_mode; // @dev - The storage is gas optimised for one and only function - transmit. All the storage accessed in transmit // is stored compactly. Rest of the storage layout is not of much concern as transmit is the only hot path @@ -136,7 +138,6 @@ abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { error IncorrectNumberOfSignatures(); error OnlyActiveSigners(); error DuplicateSigners(); - error StaleReport(); error TooManyOracles(); error IncorrectNumberOfSigners(); error IncorrectNumberOfFaultyOracles(); @@ -158,7 +159,7 @@ abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { BIDIRECTIONAL } - enum PaymentModel { + enum Mode { DEFAULT, ARBITRUM, OPTIMISM @@ -259,18 +260,13 @@ abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { event Unpaused(address account); /** - * @param paymentModel the payment model of default, Arbitrum, or Optimism + * @param mode the contract mode of default, Arbitrum, or Optimism * @param link address of the LINK Token * @param linkNativeFeed address of the LINK/Native price feed * @param fastGasFeed address of the Fast Gas price feed */ - constructor( - PaymentModel paymentModel, - address link, - address linkNativeFeed, - address fastGasFeed - ) ConfirmedOwner(msg.sender) { - i_paymentModel = paymentModel; + constructor(Mode mode, address link, address linkNativeFeed, address fastGasFeed) ConfirmedOwner(msg.sender) { + i_mode = mode; i_link = LinkTokenInterface(link); i_linkNativeFeed = AggregatorV3Interface(linkNativeFeed); i_fastGasFeed = AggregatorV3Interface(fastGasFeed); @@ -280,8 +276,8 @@ abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { // GETTERS //////// - function getPaymentModel() external view returns (PaymentModel) { - return i_paymentModel; + function getMode() external view returns (Mode) { + return i_mode; } function getLinkAddress() external view returns (address) { @@ -355,7 +351,7 @@ abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { } uint256 l1CostWei = 0; - if (i_paymentModel == PaymentModel.OPTIMISM) { + if (i_mode == Mode.OPTIMISM) { bytes memory txCallData = new bytes(0); if (isExecution) { txCallData = bytes.concat(msg.data, L1_FEE_DATA_PADDING); @@ -366,7 +362,7 @@ abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { txCallData = new bytes(4 * s_storage.maxPerformDataSize); } l1CostWei = OPTIMISM_ORACLE.getL1Fee(txCallData); - } else if (i_paymentModel == PaymentModel.ARBITRUM) { + } else if (i_mode == Mode.ARBITRUM) { l1CostWei = ARB_NITRO_ORACLE.getCurrentTxL1GasFees(); } // if it's not performing upkeeps, use gas ceiling multiplier to estimate the upper bound @@ -444,6 +440,34 @@ abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { return transmitter.balance; } + /** + * @notice returns the current block number in a chain agnostic manner + */ + function _blockNum() internal view returns (uint256) { + if (i_mode == Mode.ARBITRUM) { + return ARB_SYS.arbBlockNumber(); + } else { + return block.number; + } + } + + /** + * @notice returns the blockhash of the provided block number in a chain agnostic manner + * @param n the blocknumber to retrieve the blockhash for + * @return blockhash the blockhash of block number n, or 0 if n is out queryable of range + */ + function _blockHash(uint256 n) internal view returns (bytes32) { + if (i_mode == Mode.ARBITRUM) { + uint256 blockNum = ARB_SYS.arbBlockNumber(); + if (n >= blockNum || blockNum - n > 256) { + return ""; + } + return ARB_SYS.arbBlockHash(n); + } else { + return blockhash(n); + } + } + /** * @notice replicates Open Zeppelin's ReentrancyGuard but optimized to fit our storage */ diff --git a/contracts/src/v0.8/automation/2_0/KeeperRegistryLogic2_0.sol b/contracts/src/v0.8/automation/2_0/KeeperRegistryLogic2_0.sol index 9b980be2657..a4c1156043c 100644 --- a/contracts/src/v0.8/automation/2_0/KeeperRegistryLogic2_0.sol +++ b/contracts/src/v0.8/automation/2_0/KeeperRegistryLogic2_0.sol @@ -15,17 +15,17 @@ contract KeeperRegistryLogic2_0 is KeeperRegistryBase2_0 { using EnumerableSet for EnumerableSet.UintSet; /** - * @param paymentModel one of Default, Arbitrum, Optimism + * @param mode one of Default, Arbitrum, Optimism * @param link address of the LINK Token * @param linkNativeFeed address of the LINK/Native price feed * @param fastGasFeed address of the Fast Gas price feed */ constructor( - PaymentModel paymentModel, + Mode mode, address link, address linkNativeFeed, address fastGasFeed - ) KeeperRegistryBase2_0(paymentModel, link, linkNativeFeed, fastGasFeed) {} + ) KeeperRegistryBase2_0(mode, link, linkNativeFeed, fastGasFeed) {} function checkUpkeep(uint256 id) external @@ -62,23 +62,25 @@ contract KeeperRegistryLogic2_0 is KeeperRegistryBase2_0 { (bool success, bytes memory result) = upkeep.target.call{gas: s_storage.checkGasLimit}(callData); gasUsed = gasUsed - gasleft(); - if (!success) return (false, bytes(""), UpkeepFailureReason.TARGET_CHECK_REVERTED, gasUsed, fastGasWei, linkNative); - - bytes memory userPerformData; - (upkeepNeeded, userPerformData) = abi.decode(result, (bool, bytes)); - if (!upkeepNeeded) - return (false, bytes(""), UpkeepFailureReason.UPKEEP_NOT_NEEDED, gasUsed, fastGasWei, linkNative); - if (userPerformData.length > s_storage.maxPerformDataSize) - return (false, bytes(""), UpkeepFailureReason.PERFORM_DATA_EXCEEDS_LIMIT, gasUsed, fastGasWei, linkNative); + if (!success) { + upkeepFailureReason = UpkeepFailureReason.TARGET_CHECK_REVERTED; + } else { + (upkeepNeeded, result) = abi.decode(result, (bool, bytes)); + if (!upkeepNeeded) + return (false, bytes(""), UpkeepFailureReason.UPKEEP_NOT_NEEDED, gasUsed, fastGasWei, linkNative); + if (result.length > s_storage.maxPerformDataSize) + return (false, bytes(""), UpkeepFailureReason.PERFORM_DATA_EXCEEDS_LIMIT, gasUsed, fastGasWei, linkNative); + } performData = abi.encode( PerformDataWrapper({ - checkBlockNumber: uint32(block.number - 1), - checkBlockhash: blockhash(block.number - 1), - performData: userPerformData + checkBlockNumber: uint32(_blockNum() - 1), + checkBlockhash: _blockHash(_blockNum() - 1), + performData: result }) ); - return (true, performData, UpkeepFailureReason.NONE, gasUsed, fastGasWei, linkNative); + + return (success, performData, upkeepFailureReason, gasUsed, fastGasWei, linkNative); } /** @@ -158,7 +160,7 @@ contract KeeperRegistryLogic2_0 is KeeperRegistryBase2_0 { ) external returns (uint256 id) { if (msg.sender != owner() && msg.sender != s_storage.registrar) revert OnlyCallableByOwnerOrRegistrar(); - id = uint256(keccak256(abi.encode(blockhash(block.number - 1), address(this), s_storage.nonce))); + id = uint256(keccak256(abi.encode(_blockHash(_blockNum() - 1), address(this), s_storage.nonce))); _createUpkeep(id, target, gasLimit, admin, 0, checkData, false); s_storage.nonce++; s_upkeepOffchainConfig[id] = offchainConfig; @@ -174,10 +176,10 @@ contract KeeperRegistryLogic2_0 is KeeperRegistryBase2_0 { bool canceled = upkeep.maxValidBlocknumber != UINT32_MAX; bool isOwner = msg.sender == owner(); - if (canceled && !(isOwner && upkeep.maxValidBlocknumber > block.number)) revert CannotCancel(); + if (canceled && !(isOwner && upkeep.maxValidBlocknumber > _blockNum())) revert CannotCancel(); if (!isOwner && msg.sender != s_upkeepAdmin[id]) revert OnlyCallableByOwnerOrAdmin(); - uint256 height = block.number; + uint256 height = _blockNum(); if (!isOwner) { height = height + CANCELLATION_DELAY; } @@ -220,7 +222,7 @@ contract KeeperRegistryLogic2_0 is KeeperRegistryBase2_0 { if (to == ZERO_ADDRESS) revert InvalidRecipient(); Upkeep memory upkeep = s_upkeep[id]; if (s_upkeepAdmin[id] != msg.sender) revert OnlyCallableByAdmin(); - if (upkeep.maxValidBlocknumber > block.number) revert UpkeepNotCanceled(); + if (upkeep.maxValidBlocknumber > _blockNum()) revert UpkeepNotCanceled(); uint96 amountToWithdraw = s_upkeep[id].balance; s_expectedLinkBalance = s_expectedLinkBalance - amountToWithdraw; diff --git a/contracts/src/v0.8/dev/ArbitrumValidator.sol b/contracts/src/v0.8/dev/ArbitrumValidator.sol index 472ec062bce..1ea82a75902 100644 --- a/contracts/src/v0.8/dev/ArbitrumValidator.sol +++ b/contracts/src/v0.8/dev/ArbitrumValidator.sol @@ -12,7 +12,7 @@ import "./interfaces/ArbitrumSequencerUptimeFeedInterface.sol"; import "./interfaces/FlagsInterface.sol"; import "./interfaces/IArbitrumDelayedInbox.sol"; import "./vendor/arb-bridge-eth/v0.8.0-custom/contracts/libraries/AddressAliasHelper.sol"; -import "./vendor/arb-os/e8d9696f21/contracts/arbos/builtin/ArbSys.sol"; +import "./vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; import "./vendor/openzeppelin-solidity/v4.3.1/contracts/utils/Address.sol"; /** diff --git a/contracts/src/v0.8/dev/vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol b/contracts/src/v0.8/dev/vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol new file mode 100644 index 00000000000..6966acb8a21 --- /dev/null +++ b/contracts/src/v0.8/dev/vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol @@ -0,0 +1,150 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity >=0.4.21 <0.9.0; + +/** + * @title System level functionality + * @notice For use by contracts to interact with core L2-specific functionality. + * Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064. + */ +interface ArbSys { + /** + * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0) + * @return block number as int + */ + function arbBlockNumber() external view returns (uint256); + + /** + * @notice Get Arbitrum block hash (reverts unless currentBlockNum-256 <= arbBlockNum < currentBlockNum) + * @return block hash + */ + function arbBlockHash(uint256 arbBlockNum) external view returns (bytes32); + + /** + * @notice Gets the rollup's unique chain identifier + * @return Chain identifier as int + */ + function arbChainID() external view returns (uint256); + + /** + * @notice Get internal version number identifying an ArbOS build + * @return version number as int + */ + function arbOSVersion() external view returns (uint256); + + /** + * @notice Returns 0 since Nitro has no concept of storage gas + * @return uint 0 + */ + function getStorageGasAvailable() external view returns (uint256); + + /** + * @notice (deprecated) check if current call is top level (meaning it was triggered by an EoA or a L1 contract) + * @dev this call has been deprecated and may be removed in a future release + * @return true if current execution frame is not a call by another L2 contract + */ + function isTopLevelCall() external view returns (bool); + + /** + * @notice map L1 sender contract address to its L2 alias + * @param sender sender address + * @param unused argument no longer used + * @return aliased sender address + */ + function mapL1SenderContractAddressToL2Alias(address sender, address unused) + external + pure + returns (address); + + /** + * @notice check if the caller (of this caller of this) is an aliased L1 contract address + * @return true iff the caller's address is an alias for an L1 contract address + */ + function wasMyCallersAddressAliased() external view returns (bool); + + /** + * @notice return the address of the caller (of this caller of this), without applying L1 contract address aliasing + * @return address of the caller's caller, without applying L1 contract address aliasing + */ + function myCallersAddressWithoutAliasing() external view returns (address); + + /** + * @notice Send given amount of Eth to dest from sender. + * This is a convenience function, which is equivalent to calling sendTxToL1 with empty data. + * @param destination recipient address on L1 + * @return unique identifier for this L2-to-L1 transaction. + */ + function withdrawEth(address destination) external payable returns (uint256); + + /** + * @notice Send a transaction to L1 + * @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data + * to a contract address without any code (as enforced by the Bridge contract). + * @param destination recipient address on L1 + * @param data (optional) calldata for L1 contract call + * @return a unique identifier for this L2-to-L1 transaction. + */ + function sendTxToL1(address destination, bytes calldata data) + external + payable + returns (uint256); + + /** + * @notice Get send Merkle tree state + * @return size number of sends in the history + * @return root root hash of the send history + * @return partials hashes of partial subtrees in the send history tree + */ + function sendMerkleTreeState() + external + view + returns ( + uint256 size, + bytes32 root, + bytes32[] memory partials + ); + + /** + * @notice creates a send txn from L2 to L1 + * @param position = (level << 192) + leaf = (0 << 192) + leaf = leaf + */ + event L2ToL1Tx( + address caller, + address indexed destination, + uint256 indexed hash, + uint256 indexed position, + uint256 arbBlockNum, + uint256 ethBlockNum, + uint256 timestamp, + uint256 callvalue, + bytes data + ); + + /// @dev DEPRECATED in favour of the new L2ToL1Tx event above after the nitro upgrade + event L2ToL1Transaction( + address caller, + address indexed destination, + uint256 indexed uniqueId, + uint256 indexed batchNumber, + uint256 indexInBatch, + uint256 arbBlockNum, + uint256 ethBlockNum, + uint256 timestamp, + uint256 callvalue, + bytes data + ); + + /** + * @notice logs a merkle branch for proof synthesis + * @param reserved an index meant only to align the 4th index with L2ToL1Transaction's 4th event + * @param hash the merkle hash + * @param position = (level << 192) + leaf + */ + event SendMerkleUpdate( + uint256 indexed reserved, + bytes32 indexed hash, + uint256 indexed position + ); +} diff --git a/contracts/src/v0.8/dev/vendor/arb-os/e8d9696f21/contracts/arbos/builtin/ArbSys.sol b/contracts/src/v0.8/dev/vendor/arb-os/e8d9696f21/contracts/arbos/builtin/ArbSys.sol deleted file mode 100644 index 7c89f0a3216..00000000000 --- a/contracts/src/v0.8/dev/vendor/arb-os/e8d9696f21/contracts/arbos/builtin/ArbSys.sol +++ /dev/null @@ -1,72 +0,0 @@ -// NOTICE: pragma change from original (>=0.4.21 <0.7.0) -pragma solidity >=0.4.21 <0.9.0; - -/** - * @title Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064. Exposes a variety of system-level functionality. - */ -interface ArbSys { - /** - * @notice Get internal version number identifying an ArbOS build - * @return version number as int - */ - function arbOSVersion() external pure returns (uint256); - - function arbChainID() external view returns (uint256); - - /** - * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0) - * @return block number as int - */ - function arbBlockNumber() external view returns (uint256); - - /** - * @notice Send given amount of Eth to dest from sender. - * This is a convenience function, which is equivalent to calling sendTxToL1 with empty calldataForL1. - * @param destination recipient address on L1 - * @return unique identifier for this L2-to-L1 transaction. - */ - function withdrawEth(address destination) external payable returns (uint256); - - /** - * @notice Send a transaction to L1 - * @param destination recipient address on L1 - * @param calldataForL1 (optional) calldata for L1 contract call - * @return a unique identifier for this L2-to-L1 transaction. - */ - function sendTxToL1(address destination, bytes calldata calldataForL1) external payable returns (uint256); - - /** - * @notice get the number of transactions issued by the given external account or the account sequence number of the given contract - * @param account target account - * @return the number of transactions issued by the given external account or the account sequence number of the given contract - */ - function getTransactionCount(address account) external view returns (uint256); - - /** - * @notice get the value of target L2 storage slot - * This function is only callable from address 0 to prevent contracts from being able to call it - * @param account target account - * @param index target index of storage slot - * @return stotage value for the given account at the given index - */ - function getStorageAt(address account, uint256 index) external view returns (uint256); - - /** - * @notice check if current call is coming from l1 - * @return true if the caller of this was called directly from L1 - */ - function isTopLevelCall() external view returns (bool); - - event L2ToL1Transaction( - address caller, - address indexed destination, - uint256 indexed uniqueId, - uint256 indexed batchNumber, - uint256 indexInBatch, - uint256 arbBlockNum, - uint256 ethBlockNum, - uint256 timestamp, - uint256 callvalue, - bytes data - ); -} diff --git a/contracts/src/v0.8/mocks/MockArbSys.sol b/contracts/src/v0.8/mocks/MockArbSys.sol new file mode 100644 index 00000000000..fbfdf0f49a0 --- /dev/null +++ b/contracts/src/v0.8/mocks/MockArbSys.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.6; + +/** + * @dev this contract mocks the arbitrum precompiled ArbSys contract + * https://developer.arbitrum.io/arbos/precompiles#ArbSys + */ +contract MockArbSys { + function arbBlockNumber() public view returns (uint256) { + return block.number; + } + + function arbBlockHash(uint256 arbBlockNum) external view returns (bytes32) { + return blockhash(arbBlockNum); + } +} diff --git a/contracts/test/v0.8/automation/KeeperRegistry2_0.test.ts b/contracts/test/v0.8/automation/KeeperRegistry2_0.test.ts index 12a0656e187..f4eb5da5f9b 100644 --- a/contracts/test/v0.8/automation/KeeperRegistry2_0.test.ts +++ b/contracts/test/v0.8/automation/KeeperRegistry2_0.test.ts @@ -13,6 +13,7 @@ import { KeeperRegistry20__factory as KeeperRegistryFactory } from '../../../typ import { MockArbGasInfo__factory as MockArbGasInfoFactory } from '../../../typechain/factories/MockArbGasInfo__factory' import { MockOVMGasPriceOracle__factory as MockOVMGasPriceOracleFactory } from '../../../typechain/factories/MockOVMGasPriceOracle__factory' import { KeeperRegistryLogic20__factory as KeeperRegistryLogicFactory } from '../../../typechain/factories/KeeperRegistryLogic20__factory' +import { MockArbSys__factory as MockArbSysFactory } from '../../../typechain/factories/MockArbSys__factory' import { KeeperRegistry20 as KeeperRegistry } from '../../../typechain/KeeperRegistry20' import { KeeperRegistryLogic20 as KeeperRegistryLogic } from '../../../typechain/KeeperRegistryLogic20' import { MockV3Aggregator } from '../../../typechain/MockV3Aggregator' @@ -22,6 +23,24 @@ import { MockArbGasInfo } from '../../../typechain/MockArbGasInfo' import { MockOVMGasPriceOracle } from '../../../typechain/MockOVMGasPriceOracle' import { UpkeepTranscoder } from '../../../typechain/UpkeepTranscoder' +// copied from AutomationRegistryInterface2_0.sol +enum UpkeepFailureReason { + NONE, + UPKEEP_CANCELLED, + UPKEEP_PAUSED, + TARGET_CHECK_REVERTED, + UPKEEP_NOT_NEEDED, + PERFORM_DATA_EXCEEDS_LIMIT, + INSUFFICIENT_BALANCE, +} + +// copied from AutomationRegistryInterface2_0.sol +enum Mode { + DEFAULT, + ARBITRUM, + OPTIMISM, +} + async function getUpkeepID(tx: any) { const receipt = await tx.wait() return receipt.events[0].args.id @@ -38,7 +57,7 @@ const transmitGasOverhead = BigNumber.from(800000) const checkGasOverhead = BigNumber.from(400000) // These values should match the constants declared in registry -const registryGasOverhead = BigNumber.from(65000) +const registryGasOverhead = BigNumber.from(70_000) const registryPerSignerGasOverhead = BigNumber.from(7500) const registryPerPerformByteGasOverhead = BigNumber.from(20) const cancellationDelay = 50 @@ -144,6 +163,38 @@ const parseUpkeepPerformedLogs = (receipt: any) => { return parsedLogs } +const parseReorgedUpkeepReportLogs = (receipt: any) => { + const logABI = [' event ReorgedUpkeepReport(uint256 indexed id)'] + const iface = new ethers.utils.Interface(logABI) + + const parsedLogs = [] + for (let i = 0; i < receipt.logs.length; i++) { + const log = receipt.logs[i] + try { + parsedLogs.push(iface.parseLog(log)) + } catch (e) { + // ignore log + } + } + return parsedLogs +} + +const parseStaleUpkeepReportLogs = (receipt: any) => { + const logABI = [' event StaleUpkeepReport(uint256 indexed id)'] + const iface = new ethers.utils.Interface(logABI) + + const parsedLogs = [] + for (let i = 0; i < receipt.logs.length; i++) { + const log = receipt.logs[i] + try { + parsedLogs.push(iface.parseLog(log)) + } catch (e) { + // ignore log + } + } + return parsedLogs +} + const parseInsufficientFundsUpkeepReportLogs = (receipt: any) => { const logABI = [' event InsufficientFundsUpkeepReport(uint256 indexed id)'] const iface = new ethers.utils.Interface(logABI) @@ -160,6 +211,22 @@ const parseInsufficientFundsUpkeepReportLogs = (receipt: any) => { return parsedLogs } +const parseCancelledUpkeepReportLogs = (receipt: any) => { + const logABI = [' event CancelledUpkeepReport(uint256 indexed id)'] + const iface = new ethers.utils.Interface(logABI) + + const parsedLogs = [] + for (let i = 0; i < receipt.logs.length; i++) { + const log = receipt.logs[i] + try { + parsedLogs.push(iface.parseLog(log)) + } catch (e) { + // ignore log + } + } + return parsedLogs +} + before(async () => { personas = (await getUsers()).personas @@ -291,7 +358,7 @@ describe('KeeperRegistry2_0', () => { } const verifyMaxPayment = async ( - paymentModel: number, + mode: number, multipliers: BigNumber[], gasAmounts: number[], premiums: number[], @@ -318,7 +385,7 @@ describe('KeeperRegistry2_0', () => { const registryLogic = await keeperRegistryLogicFactory .connect(owner) .deploy( - paymentModel, + mode, linkToken.address, linkEthFeed.address, gasPriceFeed.address, @@ -542,9 +609,23 @@ describe('KeeperRegistry2_0', () => { optOracleCode, ]) + const mockArbSys = await new MockArbSysFactory(owner).deploy() + const arbSysCode = await ethers.provider.send('eth_getCode', [ + mockArbSys.address, + ]) + await ethers.provider.send('hardhat_setCode', [ + '0x0000000000000000000000000000000000000064', + arbSysCode, + ]) + registryLogic = await keeperRegistryLogicFactory .connect(owner) - .deploy(0, linkToken.address, linkEthFeed.address, gasPriceFeed.address) + .deploy( + Mode.DEFAULT, + linkToken.address, + linkEthFeed.address, + gasPriceFeed.address, + ) config = { paymentPremiumPPB, @@ -656,7 +737,7 @@ describe('KeeperRegistry2_0', () => { await evmRevert(getTransmitTxWithReport(registry, keeper1, report, f + 1)) }) - it('reverts when no upkeeps are included in report', async () => { + it('returns early when no upkeeps are included in report', async () => { const upkeepIds: string[] = [] const wrappedPerformDatas: string[] = [] const report = ethers.utils.defaultAbiCoder.encode( @@ -664,22 +745,21 @@ describe('KeeperRegistry2_0', () => { [0, 0, upkeepIds, wrappedPerformDatas], ) - await evmRevert( - getTransmitTxWithReport(registry, keeper1, report, f + 1), - 'StaleReport()', - ) + await getTransmitTxWithReport(registry, keeper1, report, f + 1) }) - it('reverts when invalid upkeepIds are included in report', async () => { - await evmRevert( - getTransmitTx( - registry, - keeper1, - [upkeepId.add(BigNumber.from('1')).toString()], - f + 1, - ), - 'StaleReport()', + it('returns early when invalid upkeepIds are included in report', async () => { + const tx = await getTransmitTx( + registry, + keeper1, + [upkeepId.add(BigNumber.from('1')).toString()], + f + 1, ) + + const receipt = await tx.wait() + const cancelledUpkeepReportLogs = parseCancelledUpkeepReportLogs(receipt) + // exactly 1 CancelledUpkeepReport log should be emitted + assert.equal(cancelledUpkeepReportLogs.length, 1) }) it('reverts when duplicated upkeepIds are included in report', async () => { @@ -696,11 +776,19 @@ describe('KeeperRegistry2_0', () => { ) }) - it('reverts when upkeep has insufficient funds', async () => { - await evmRevert( - getTransmitTx(registry, keeper1, [upkeepId.toString()], f + 1), - 'StaleReport()', + it('returns early when upkeep has insufficient funds', async () => { + const tx = await getTransmitTx( + registry, + keeper1, + [upkeepId.toString()], + f + 1, ) + + const receipt = await tx.wait() + const insufficientFundsUpkeepReportLogs = + parseInsufficientFundsUpkeepReportLogs(receipt) + // exactly 1 InsufficientFundsUpkeepReportLogs log should be emitted + assert.equal(insufficientFundsUpkeepReportLogs.length, 1) }) context('When the upkeep is funded', async () => { @@ -709,7 +797,7 @@ describe('KeeperRegistry2_0', () => { await registry.connect(admin).addFunds(upkeepId, toWei('100')) }) - it('reverts when check block number is less than last perform', async () => { + it('returns early when check block number is less than last perform', async () => { // First perform an upkeep to put last perform block number on upkeep state const tx = await getTransmitTx( @@ -730,68 +818,72 @@ describe('KeeperRegistry2_0', () => { tx.blockNumber?.toString(), ) - // Try to transmit a report which has checkBlockNumber = lastPerformBlockNumber-1, should result in staleReport - await evmRevert( - getTransmitTx( - registry, - keeper1, - [upkeepId.toString()], - f + 1, - {}, - '0x', - lastPerformBlock.number - 1, - lastPerformBlock.parentHash, - ), - 'StaleReport()', + // Try to transmit a report which has checkBlockNumber = lastPerformBlockNumber-1, should result in stale report + const transmitTx = await getTransmitTx( + registry, + keeper1, + [upkeepId.toString()], + f + 1, + {}, + '0x', + lastPerformBlock.number - 1, + lastPerformBlock.parentHash, ) + + const receipt = await transmitTx.wait() + const staleUpkeepReportLogs = parseStaleUpkeepReportLogs(receipt) + // exactly 1 StaleUpkeepReportLogs log should be emitted + assert.equal(staleUpkeepReportLogs.length, 1) }) - it('reverts when check block hash does not match', async () => { + it('returns early when check block hash does not match', async () => { await registry.connect(admin).addFunds(upkeepId, toWei('100')) const latestBlock = await ethers.provider.getBlock('latest') // Try to transmit a report which has incorrect checkBlockHash - await evmRevert( - getTransmitTx( - registry, - keeper1, - [upkeepId.toString()], - f + 1, - {}, - '0x', - latestBlock.number - 1, - latestBlock.hash, - ), // should be latestBlock.parentHash + const tx = await getTransmitTx( + registry, + keeper1, + [upkeepId.toString()], + f + 1, + {}, + '0x', + latestBlock.number - 1, + latestBlock.hash, + ) // should be latestBlock.parentHash - 'StaleReport()', - ) + const receipt = await tx.wait() + const reorgedUpkeepReportLogs = parseReorgedUpkeepReportLogs(receipt) + // exactly 1 ReorgedUpkeepReportLogs log should be emitted + assert.equal(reorgedUpkeepReportLogs.length, 1) }) - it('reverts when check block number is older than 256 blocks', async () => { + it('returns early when check block number is older than 256 blocks', async () => { const latestBlockReport = await encodeLatestBlockReport([ { Id: upkeepId.toString() }, ]) - await registry.connect(admin).cancelUpkeep(upkeepId) - - for (let i = 0; i < cancellationDelay; i++) { + for (let i = 0; i < 256; i++) { await ethers.provider.send('evm_mine', []) } - await evmRevert( - registry - .connect(keeper1) - .transmit( - [emptyBytes32, emptyBytes32, emptyBytes32], - latestBlockReport, - [], - [], - emptyBytes32, - ), - 'StaleReport()', - ) + // Try to transmit a report which is older than 256 blocks so block hash cannot be matched + const tx = await registry + .connect(keeper1) + .transmit( + [emptyBytes32, emptyBytes32, emptyBytes32], + latestBlockReport, + [], + [], + emptyBytes32, + ) + + const receipt = await tx.wait() + const reorgedUpkeepReportLogs = parseReorgedUpkeepReportLogs(receipt) + // exactly 1 ReorgedUpkeepReportLogs log should be emitted + assert.equal(reorgedUpkeepReportLogs.length, 1) }) - it('reverts when upkeep is cancelled and cancellation delay has gone', async () => { + it('returns early when upkeep is cancelled and cancellation delay has gone', async () => { const latestBlockReport = await encodeLatestBlockReport([ { Id: upkeepId.toString() }, ]) @@ -801,12 +893,18 @@ describe('KeeperRegistry2_0', () => { await ethers.provider.send('evm_mine', []) } - // Try to transmit a report which is older than 256 blocks so block hash cannot be matched - await evmRevert( - getTransmitTxWithReport(registry, keeper1, latestBlockReport, f + 1), - - 'StaleReport()', + const tx = await getTransmitTxWithReport( + registry, + keeper1, + latestBlockReport, + f + 1, ) + + const receipt = await tx.wait() + const cancelledUpkeepReportLogs = + parseCancelledUpkeepReportLogs(receipt) + // exactly 1 CancelledUpkeepReport log should be emitted + assert.equal(cancelledUpkeepReportLogs.length, 1) }) it('does not revert if the target cannot execute', async () => { @@ -960,7 +1058,7 @@ describe('KeeperRegistry2_0', () => { const registryLogic = await keeperRegistryLogicFactory .connect(owner) .deploy( - 1, // arbitrum + Mode.ARBITRUM, linkToken.address, linkEthFeed.address, gasPriceFeed.address, @@ -1406,57 +1504,61 @@ describe('KeeperRegistry2_0', () => { assert.equal(upkeepPerformedLogs.length, 1) const upkeepPerformedLog = upkeepPerformedLogs[0] - const gasUsed = upkeepPerformedLog.args.gasUsed - const gasOverhead = upkeepPerformedLog.args.gasOverhead + const upkeepGasUsed = upkeepPerformedLog.args.gasUsed + const chargedGasOverhead = upkeepPerformedLog.args.gasOverhead + const actualGasOverhead = receipt.gasUsed.sub(upkeepGasUsed) - assert.isTrue(gasUsed.gt(BigNumber.from('0'))) - assert.isTrue(gasOverhead.gt(BigNumber.from('0'))) + assert.isTrue(upkeepGasUsed.gt(BigNumber.from('0'))) + assert.isTrue(chargedGasOverhead.gt(BigNumber.from('0'))) if (i == '0' && j == '0' && k == '0') { console.log( 'Gas Benchmarking - sig verification ( f =', newF, '): calculated overhead: ', - gasOverhead.toString(), + chargedGasOverhead.toString(), ' actual overhead: ', - receipt.gasUsed.sub(gasUsed).toString(), + actualGasOverhead.toString(), ' margin over gasUsed: ', - gasUsed.add(gasOverhead).sub(receipt.gasUsed).toString(), + chargedGasOverhead.sub(actualGasOverhead).toString(), ) } // Overhead should not get capped + const gasOverheadCap = registryGasOverhead + .add( + registryPerSignerGasOverhead.mul(BigNumber.from(newF + 1)), + ) + .add( + BigNumber.from( + registryPerPerformByteGasOverhead.toNumber() * + performData.length, + ), + ) + const gasCapMinusOverhead = + gasOverheadCap.sub(chargedGasOverhead) assert.isTrue( - gasOverhead.lt( - registryGasOverhead - .add( - registryPerSignerGasOverhead.mul( - BigNumber.from(newF + 1), - ), - ) - .add( - BigNumber.from( - registryPerPerformByteGasOverhead.toNumber() * - performData.length, - ), - ), - ), - 'Gas overhead got capped, increase VERIFY_SIGN_TX_GAS_OVERHEAD / VERIFY_PER_SIGNER_GAS_OVERHEAD', + gasCapMinusOverhead.gt(BigNumber.from(0)), + 'Gas overhead got capped. Verify gas overhead variables in test match those in the registry. To not have the overheads capped increase REGISTRY_GAS_OVERHEAD by atleast ' + + gasCapMinusOverhead.toString(), ) // total gas charged should be greater than tx gas but within gasCalculationMargin assert.isTrue( - gasUsed.add(gasOverhead).gt(receipt.gasUsed), - 'Gas overhead calculated is too low, increase account gas variables', + chargedGasOverhead.gt(actualGasOverhead), + 'Gas overhead calculated is too low, increase account gas variables (ACCOUNTING_FIXED_GAS_OVERHEAD/ACCOUNTING_PER_SIGNER_GAS_OVERHEAD) by atleast ' + + actualGasOverhead.sub(chargedGasOverhead).toString(), ) assert.isTrue( - gasUsed - .add(gasOverhead) - .lt( - receipt.gasUsed.add(BigNumber.from(gasCalculationMargin)), - ), + chargedGasOverhead + .sub(actualGasOverhead) + .lt(BigNumber.from(gasCalculationMargin)), ), - 'Gas overhead calculated is too high, decrease account gas variables' + 'Gas overhead calculated is too high, decrease account gas variables (ACCOUNTING_FIXED_GAS_OVERHEAD/ACCOUNTING_PER_SIGNER_GAS_OVERHEAD) by atleast ' + + chargedGasOverhead + .sub(chargedGasOverhead) + .sub(BigNumber.from(gasCalculationMargin)) + .toString() } } } @@ -1720,7 +1822,7 @@ describe('KeeperRegistry2_0', () => { if (overheadsGotCapped) { assert.isTrue( overheadCanGetCapped, - 'Gas overheads are too low, increase REGISTRY_GAS_OVERHEAD/VERIFY_SIGN_TX_GAS_OVERHEAD/VERIFY_PER_SIGNER_GAS_OVERHEAD', + 'Gas overhead got capped. Verify gas overhead variables in test match those in the registry. To not have the overheads capped increase REGISTRY_GAS_OVERHEAD', ) } @@ -1792,7 +1894,7 @@ describe('KeeperRegistry2_0', () => { }) }) - it('splits l1 payment among performed upkeeps', async () => { + it('splits l2 payment among performed upkeeps', async () => { const numUpkeeps = 7 const upkeepIds: string[] = [] // Same as MockArbGasInfo.sol @@ -1802,7 +1904,7 @@ describe('KeeperRegistry2_0', () => { const registryLogic = await keeperRegistryLogicFactory .connect(owner) .deploy( - 1, // arbitrum + Mode.ARBITRUM, linkToken.address, linkEthFeed.address, gasPriceFeed.address, @@ -1986,7 +2088,10 @@ describe('KeeperRegistry2_0', () => { .callStatic.checkUpkeep(upkeepId) assert.equal(checkUpkeepResult.upkeepNeeded, false) - assert.equal(checkUpkeepResult.upkeepFailureReason, 6) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.INSUFFICIENT_BALANCE, + ) await registry.connect(admin).addFunds(upkeepId, oneWei) checkUpkeepResult = await registry @@ -2032,32 +2137,37 @@ describe('KeeperRegistry2_0', () => { .connect(zeroAddress) .callStatic.checkUpkeep(upkeepID1) assert.equal(checkUpkeepResult.upkeepNeeded, false) - assert.equal(checkUpkeepResult.upkeepFailureReason, 6) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.INSUFFICIENT_BALANCE, + ) checkUpkeepResult = await registry .connect(zeroAddress) .callStatic.checkUpkeep(upkeepID2) assert.equal(checkUpkeepResult.upkeepNeeded, true) - // upkeep 1 perform should revert with max performData size' + // upkeep 1 perform should return with insufficient balance using max performData size let maxPerformData = '0x' for (let i = 0; i < maxPerformDataSize.toNumber(); i++) { maxPerformData += '11' } - await evmRevert( - getTransmitTx( - registry, - keeper1, - [upkeepID1.toString()], - f + 1, - { gasPrice: gasWei.mul(gasCeilingMultiplier) }, - maxPerformData, - ), - - 'StaleReport()', + const tx = await getTransmitTx( + registry, + keeper1, + [upkeepID1.toString()], + f + 1, + { gasPrice: gasWei.mul(gasCeilingMultiplier) }, + maxPerformData, ) + const receipt = await tx.wait() + const insufficientFundsUpkeepReportLogs = + parseInsufficientFundsUpkeepReportLogs(receipt) + // exactly 1 InsufficientFundsUpkeepReportLogs log should be emitted + assert.equal(insufficientFundsUpkeepReportLogs.length, 1) + // upkeep 1 perform should succeed with empty performData await getTransmitTx( registry, @@ -2258,7 +2368,10 @@ describe('KeeperRegistry2_0', () => { assert.equal(checkUpkeepResult.upkeepNeeded, false) assert.equal(checkUpkeepResult.performData, '0x') - assert.equal(checkUpkeepResult.upkeepFailureReason, 1) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.UPKEEP_CANCELLED, + ) assert.equal(checkUpkeepResult.gasUsed.toString(), '0') }) @@ -2271,7 +2384,10 @@ describe('KeeperRegistry2_0', () => { assert.equal(checkUpkeepResult.upkeepNeeded, false) assert.equal(checkUpkeepResult.performData, '0x') - assert.equal(checkUpkeepResult.upkeepFailureReason, 1) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.UPKEEP_CANCELLED, + ) assert.equal(checkUpkeepResult.gasUsed.toString(), '0') }) @@ -2284,7 +2400,10 @@ describe('KeeperRegistry2_0', () => { assert.equal(checkUpkeepResult.upkeepNeeded, false) assert.equal(checkUpkeepResult.performData, '0x') - assert.equal(checkUpkeepResult.upkeepFailureReason, 2) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.UPKEEP_PAUSED, + ) assert.equal(checkUpkeepResult.gasUsed.toString(), '0') }) @@ -2295,7 +2414,10 @@ describe('KeeperRegistry2_0', () => { assert.equal(checkUpkeepResult.upkeepNeeded, false) assert.equal(checkUpkeepResult.performData, '0x') - assert.equal(checkUpkeepResult.upkeepFailureReason, 6) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.INSUFFICIENT_BALANCE, + ) assert.equal(checkUpkeepResult.gasUsed.toString(), '0') }) @@ -2305,15 +2427,28 @@ describe('KeeperRegistry2_0', () => { await registry.connect(admin).addFunds(upkeepId, toWei('100')) }) - it('returns false and error code if the target check reverts', async () => { + it('returns false, error code, and revert data if the target check reverts', async () => { await mock.setShouldRevertCheck(true) const checkUpkeepResult = await registry .connect(zeroAddress) .callStatic.checkUpkeep(upkeepId) - assert.equal(checkUpkeepResult.upkeepNeeded, false) - assert.equal(checkUpkeepResult.performData, '0x') - assert.equal(checkUpkeepResult.upkeepFailureReason, 3) + + const wrappedPerfromData = ethers.utils.defaultAbiCoder.decode( + [ + 'tuple(uint32 checkBlockNum, bytes32 checkBlockHash, bytes performData)', + ], + checkUpkeepResult.performData, + ) + const revertReasonBytes = `0x${wrappedPerfromData[0][2].slice(10)}` // remove sighash + assert.equal( + ethers.utils.defaultAbiCoder.decode(['string'], revertReasonBytes)[0], + 'shouldRevertCheck should be false', + ) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.TARGET_CHECK_REVERTED, + ) assert.isTrue(checkUpkeepResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used }) @@ -2325,7 +2460,10 @@ describe('KeeperRegistry2_0', () => { assert.equal(checkUpkeepResult.upkeepNeeded, false) assert.equal(checkUpkeepResult.performData, '0x') - assert.equal(checkUpkeepResult.upkeepFailureReason, 4) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.UPKEEP_NOT_NEEDED, + ) assert.isTrue(checkUpkeepResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used }) @@ -2343,7 +2481,10 @@ describe('KeeperRegistry2_0', () => { assert.equal(checkUpkeepResult.upkeepNeeded, false) assert.equal(checkUpkeepResult.performData, '0x') - assert.equal(checkUpkeepResult.upkeepFailureReason, 5) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.PERFORM_DATA_EXCEEDS_LIMIT, + ) assert.isTrue(checkUpkeepResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used }) @@ -2376,7 +2517,10 @@ describe('KeeperRegistry2_0', () => { latestBlock.parentHash, ) assert.equal(wrappedPerfromData[0].performData, randomBytes) - assert.equal(checkUpkeepResult.upkeepFailureReason, 0) + assert.equal( + checkUpkeepResult.upkeepFailureReason, + UpkeepFailureReason.NONE, + ) assert.isTrue(checkUpkeepResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used assert.isTrue(checkUpkeepResult.fastGasWei.eq(gasWei)) assert.isTrue(checkUpkeepResult.linkNative.eq(linkEth)) @@ -2510,12 +2654,18 @@ describe('KeeperRegistry2_0', () => { const l1CostWeiOpt = BigNumber.from(2000000) it('calculates the max fee appropriately', async () => { - await verifyMaxPayment(0, multipliers, gasAmounts, premiums, flatFees) + await verifyMaxPayment( + Mode.DEFAULT, + multipliers, + gasAmounts, + premiums, + flatFees, + ) }) it('calculates the max fee appropriately for Arbitrum', async () => { await verifyMaxPayment( - 1, + Mode.ARBITRUM, multipliers, gasAmounts, premiums, @@ -2526,7 +2676,7 @@ describe('KeeperRegistry2_0', () => { it('calculates the max fee appropriately for Optimism', async () => { await verifyMaxPayment( - 2, + Mode.OPTIMISM, multipliers, gasAmounts, premiums, @@ -2643,7 +2793,7 @@ describe('KeeperRegistry2_0', () => { describe('#typeAndVersion', () => { it('uses the correct type and version', async () => { const typeAndVersion = await registry.typeAndVersion() - assert.equal(typeAndVersion, 'KeeperRegistry 2.0.1') + assert.equal(typeAndVersion, 'KeeperRegistry 2.0.2') }) }) @@ -3929,7 +4079,12 @@ describe('KeeperRegistry2_0', () => { beforeEach(async () => { registryLogic2 = await keeperRegistryLogicFactory .connect(owner) - .deploy(0, linkToken.address, linkEthFeed.address, gasPriceFeed.address) + .deploy( + Mode.DEFAULT, + linkToken.address, + linkEthFeed.address, + gasPriceFeed.address, + ) const config = { paymentPremiumPPB, @@ -4258,10 +4413,17 @@ describe('KeeperRegistry2_0', () => { it('immediately prevents upkeep', async () => { await registry.connect(owner).cancelUpkeep(upkeepId) - await evmRevert( - getTransmitTx(registry, keeper1, [upkeepId.toString()], f + 1), - 'StaleReport()', + const tx = await getTransmitTx( + registry, + keeper1, + [upkeepId.toString()], + f + 1, ) + const receipt = await tx.wait() + const cancelledUpkeepReportLogs = + parseCancelledUpkeepReportLogs(receipt) + // exactly 1 CancelledUpkeepReport log should be emitted + assert.equal(cancelledUpkeepReportLogs.length, 1) }) it('does not revert if reverts if called multiple times', async () => { @@ -4346,10 +4508,18 @@ describe('KeeperRegistry2_0', () => { await ethers.provider.send('evm_mine', []) } - await evmRevert( - getTransmitTx(registry, keeper1, [upkeepId.toString()], f + 1), - 'StaleReport()', + const tx = await getTransmitTx( + registry, + keeper1, + [upkeepId.toString()], + f + 1, ) + + const receipt = await tx.wait() + const cancelledUpkeepReportLogs = + parseCancelledUpkeepReportLogs(receipt) + // exactly 1 CancelledUpkeepReport log should be emitted + assert.equal(cancelledUpkeepReportLogs.length, 1) }) describe('when an upkeep has been performed', async () => { diff --git a/contracts/test/v0.8/dev/UpkeepTranscoder3_0.test.ts b/contracts/test/v0.8/dev/UpkeepTranscoder3_0.test.ts index 337149356a5..fed9642f8b2 100644 --- a/contracts/test/v0.8/dev/UpkeepTranscoder3_0.test.ts +++ b/contracts/test/v0.8/dev/UpkeepTranscoder3_0.test.ts @@ -46,7 +46,7 @@ const maxPerformGas = BigNumber.from(5000000) const minUpkeepSpend = BigNumber.from(0) const maxCheckDataSize = BigNumber.from(1000) const maxPerformDataSize = BigNumber.from(1000) -const paymentModel = BigNumber.from(0) +const mode = BigNumber.from(0) const linkEth = BigNumber.from(300000000) const gasWei = BigNumber.from(100) const registryGasOverhead = BigNumber.from('80000') @@ -278,12 +278,7 @@ async function deployRegistry20( const registryLogic = await keeperRegistryLogicFactory20 .connect(owner) - .deploy( - paymentModel, - linkToken.address, - linkEthFeed.address, - gasPriceFeed.address, - ) + .deploy(mode, linkToken.address, linkEthFeed.address, gasPriceFeed.address) const registry20 = await keeperRegistryFactory20 .connect(owner) diff --git a/core/gethwrappers/generated/keeper_registry_logic2_0/keeper_registry_logic2_0.go b/core/gethwrappers/generated/keeper_registry_logic2_0/keeper_registry_logic2_0.go index ad4d2364c44..8333abcc183 100644 --- a/core/gethwrappers/generated/keeper_registry_logic2_0/keeper_registry_logic2_0.go +++ b/core/gethwrappers/generated/keeper_registry_logic2_0/keeper_registry_logic2_0.go @@ -30,15 +30,15 @@ var ( ) var KeeperRegistryLogicMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"enumKeeperRegistryBase2_0.PaymentModel\",\"name\":\"paymentModel\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArrayHasNoEntries\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotCancel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CheckDataExceedsLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ConfigDigestMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateEntry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitOutsideRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfFaultyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnchainConfigNonEmpty\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveTransmitters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByLINKToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrRegistrar\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistryPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StaleReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"TargetCheckReverted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TranscoderNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"CancelledUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"FundsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InsufficientFundsUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"PayeesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ReorgedUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"StaleUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"atBlockHeight\",\"type\":\"uint64\"}],\"name\":\"UpkeepCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"UpkeepCheckDataUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"gasLimit\",\"type\":\"uint96\"}],\"name\":\"UpkeepGasLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"UpkeepMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"UpkeepOffchainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"checkBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasOverhead\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"totalPayment\",\"type\":\"uint96\"}],\"name\":\"UpkeepPerformed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"importedFrom\",\"type\":\"address\"}],\"name\":\"UpkeepReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"UpkeepRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepUnpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumUpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPaymentModel\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_0.PaymentModel\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistryBase2_0.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"updateCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101006040523480156200001257600080fd5b5060405162005ea838038062005ea88339810160408190526200003591620001ef565b838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c38162000126565b505050836002811115620000db57620000db62000251565b60e0816002811115620000f257620000f262000251565b60f81b9052506001600160601b0319606093841b811660805291831b821660a05290911b1660c05250620002679350505050565b6001600160a01b038116331415620001815760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001ea57600080fd5b919050565b600080600080608085870312156200020657600080fd5b8451600381106200021657600080fd5b93506200022660208601620001d2565b92506200023660408601620001d2565b91506200024660608601620001d2565b905092959194509250565b634e487b7160e01b600052602160045260246000fd5b60805160601c60a05160601c60c05160601c60e05160f81c615bae620002fa600039600081816104250152818161443201526145e90152600081816102370152614056015260008181610385015261413f0152600081816103ec01528181610f610152818161124601528181611bd90152818161224c0152818161258101528181612a680152612afb0152615bae6000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80638e86139b11610104578063b148ab6b116100a2578063eb5dcd6c11610071578063eb5dcd6c14610410578063f157014114610423578063f2fde38b14610451578063f7d334ba1461046457600080fd5b8063b148ab6b146103bc578063b79550be146103cf578063c8048022146103d7578063ca30e603146103ea57600080fd5b8063a710b221116100de578063a710b2211461035d578063a72aa27e14610370578063b10b673c14610383578063b121e147146103a957600080fd5b80638e86139b14610324578063948108f7146103375780639fab43861461034a57600080fd5b8063744bfe611161017c57806385c1b0ba1161014b57806385c1b0ba146102cd5780638765ecbe146102e05780638da5cb5b146102f35780638dcf0fe71461031157600080fd5b8063744bfe61146102a257806379ba5097146102b55780637d9b97e0146102bd5780638456cb59146102c557600080fd5b80633f4ba83a116101b85780633f4ba83a1461021a5780635165f2f5146102225780636709d0e5146102355780636ded9eae1461028157600080fd5b8063187256e8146101df5780631a2af011146101f45780633b9cce5914610207575b600080fd5b6101f26101ed366004614d0b565b610489565b005b6101f2610202366004615099565b6104fa565b6101f2610215366004614de8565b61064e565b6101f26108a4565b6101f2610230366004615067565b61090a565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61029461028f366004614d46565b610a84565b604051908152602001610278565b6101f26102b0366004615099565b610c61565b6101f261106c565b6101f261116e565b6101f26112d8565b6101f26102db366004614e2a565b611349565b6101f26102ee366004615067565b611c64565b60005473ffffffffffffffffffffffffffffffffffffffff16610257565b6101f261031f3660046150bc565b611deb565b6101f2610332366004614ffc565b611e4d565b6101f261034536600461512b565b612089565b6101f26103583660046150bc565b612328565b6101f261036b366004614cd8565b6123d7565b6101f261037e366004615108565b612662565b7f0000000000000000000000000000000000000000000000000000000000000000610257565b6101f26103b7366004614cbd565b612744565b6101f26103ca366004615067565b61283c565b6101f2612a2f565b6101f26103e5366004615067565b612b9a565b7f0000000000000000000000000000000000000000000000000000000000000000610257565b6101f261041e366004614cd8565b612f3d565b7f0000000000000000000000000000000000000000000000000000000000000000604051610278919061566d565b6101f261045f366004614cbd565b61309c565b610477610472366004615067565b6130b0565b604051610278969594939291906154de565b610491613744565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260166020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360038111156104f1576104f1615a8f565b02179055505050565b610503826137c7565b73ffffffffffffffffffffffffffffffffffffffff8116331415610553576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166105a0576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff82811691161461064a5760008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915590519091339185917fb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b3591a45b5050565b610656613744565b600b548114610691576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600b54811015610863576000600b82815481106106b3576106b3615aed565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff908116808452600c909252604083205491935016908585858181106106fd576106fd615aed565b90506020020160208101906107129190614cbd565b905073ffffffffffffffffffffffffffffffffffffffff811615806107a5575073ffffffffffffffffffffffffffffffffffffffff82161580159061078357508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156107a5575073ffffffffffffffffffffffffffffffffffffffff81811614155b156107dc576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8181161461084d5773ffffffffffffffffffffffffffffffffffffffff8381166000908152600c6020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169183169190911790555b505050808061085b906159d4565b915050610694565b507fa46de38886467c59be07a0675f14781206a5477d871628af46c2443822fcb725600b8383604051610898939291906152e4565b60405180910390a15050565b6108ac613744565b600f80547fffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffff1690556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa906020015b60405180910390a1565b610913816137c7565b600081815260046020908152604091829020825160e081018452815463ffffffff8082168352640100000000820481169483019490945268010000000000000000810460ff1615159482018590526901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c082015290610a15576040517f1b88a78400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff169055610a5460028361387a565b5060405182907f7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a4745690600090a25050565b6000805473ffffffffffffffffffffffffffffffffffffffff163314801590610ad557506011546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314155b15610b0c576040517fd48b678b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b1760014361590c565b6012546040805192406020840152309083015268010000000000000000900463ffffffff1660608201526080016040516020818303038152906040528051906020012060001c9050610ba48189898960008a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250925061388f915050565b6012805468010000000000000000900463ffffffff16906008610bc683615a0d565b825463ffffffff9182166101009390930a9283029190920219909116179055506000818152601760205260409020610bff9084846147dc565b506040805163ffffffff8916815273ffffffffffffffffffffffffffffffffffffffff8816602082015282917fbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d012910160405180910390a2979650505050505050565b600f546f01000000000000000000000000000000900460ff1615610cb1576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f80547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff166f0100000000000000000000000000000017905573ffffffffffffffffffffffffffffffffffffffff8116610d38576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600460209081526040808320815160e081018352815463ffffffff8082168352640100000000820481168387015260ff6801000000000000000083041615158386015273ffffffffffffffffffffffffffffffffffffffff6901000000000000000000909204821660608401526001909301546bffffffffffffffffffffffff80821660808501526c0100000000000000000000000082041660a08401527801000000000000000000000000000000000000000000000000900490921660c082015286855260059093529220549091163314610e45576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b43816020015163ffffffff161115610e89576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600460205260409020600101546015546c010000000000000000000000009091046bffffffffffffffffffffffff1690610ec990829061590c565b60155560008481526004602081905260409182902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff16905590517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116928201929092526bffffffffffffffffffffffff831660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015610fa757600080fd5b505af1158015610fbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdf9190614f87565b50604080516bffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8516602082015285917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a25050600f80547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff1690555050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146110f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611176613744565b6011546015546bffffffffffffffffffffffff9091169061119890829061590c565b601555601180547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690556040516bffffffffffffffffffffffff821681527f1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f19060200160405180910390a16040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b602060405180830381600087803b1580156112a057600080fd5b505af11580156112b4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064a9190614f87565b6112e0613744565b600f80547fffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffff166e0100000000000000000000000000001790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602001610900565b600173ffffffffffffffffffffffffffffffffffffffff821660009081526016602052604090205460ff16600381111561138557611385615a8f565b141580156113cd5750600373ffffffffffffffffffffffffffffffffffffffff821660009081526016602052604090205460ff1660038111156113ca576113ca615a8f565b14155b15611404576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6010546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16611463576040517fd12d7d8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8161149a576040517f2c2fc94100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290526000808567ffffffffffffffff8111156114ee576114ee615b1c565b60405190808252806020026020018201604052801561152157816020015b606081526020019060019003908161150c5790505b50905060008667ffffffffffffffff81111561153f5761153f615b1c565b604051908082528060200260200182016040528015611568578160200160208202803683370190505b50905060008767ffffffffffffffff81111561158657611586615b1c565b60405190808252806020026020018201604052801561160b57816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816115a45790505b50905060005b888110156119965789898281811061162b5761162b615aed565b60209081029290920135600081815260048452604090819020815160e081018352815463ffffffff8082168352640100000000820481169783019790975268010000000000000000810460ff16151593820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060830152600101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490931660c0840152985090965061170d9050876137c7565b8582828151811061172057611720615aed565b602002602001018190525060076000888152602001908152602001600020805461174990615980565b80601f016020809104026020016040519081016040528092919081815260200182805461177590615980565b80156117c25780601f10611797576101008083540402835291602001916117c2565b820191906000526020600020905b8154815290600101906020018083116117a557829003601f168201915b50505050508482815181106117d9576117d9615aed565b60200260200101819052506005600088815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683828151811061182a5761182a615aed565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015260a086015161186c906bffffffffffffffffffffffff16866157cc565b600088815260046020908152604080832080547fffffff000000000000000000000000000000000000000000000000000000000016815560010180547fffffffff00000000000000000000000000000000000000000000000000000000169055600790915281209196506118e0919061487e565b600087815260066020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561191f600288613cd2565b5060a0860151604080516bffffffffffffffffffffffff909216825273ffffffffffffffffffffffffffffffffffffffff8a16602083015288917fb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff910160405180910390a28061198e816159d4565b915050611611565b50836015546119a5919061590c565b6015556040516000906119c4908b908b90859088908890602001615394565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905260105490915073ffffffffffffffffffffffffffffffffffffffff808a1691638e86139b916c010000000000000000000000009091041663c71249ab60028c73ffffffffffffffffffffffffffffffffffffffff1663aab9edd66040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a7857600080fd5b505af1158015611a8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab0919061519e565b866040518463ffffffff1660e01b8152600401611acf939291906156bc565b60006040518083038186803b158015611ae757600080fd5b505afa158015611afb573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611b419190810190615032565b6040518263ffffffff1660e01b8152600401611b5d919061557b565b600060405180830381600087803b158015611b7757600080fd5b505af1158015611b8b573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b81166004830152602482018990527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150604401602060405180830381600087803b158015611c1f57600080fd5b505af1158015611c33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c579190614f87565b5050505050505050505050565b611c6d816137c7565b600081815260046020908152604091829020825160e081018452815463ffffffff8082168352640100000000820481169483019490945268010000000000000000810460ff16158015958301959095526901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c082015290611d71576040517f514b6c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff1668010000000000000000179055611dbb600283613cd2565b5060405182907f8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f90600090a25050565b611df4836137c7565b6000838152601760205260409020611e0d9083836147dc565b50827f3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf48508383604051611e4092919061552e565b60405180910390a2505050565b60023360009081526016602052604090205460ff166003811115611e7357611e73615a8f565b14158015611ea5575060033360009081526016602052604090205460ff166003811115611ea257611ea2615a8f565b14155b15611edc576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808080611eed85870187614e7e565b935093509350935060005b845181101561208057611fcf858281518110611f1657611f16615aed565b6020026020010151858381518110611f3057611f30615aed565b602002602001015160600151868481518110611f4e57611f4e615aed565b602002602001015160000151858581518110611f6c57611f6c615aed565b6020026020010151888681518110611f8657611f86615aed565b602002602001015160a00151888781518110611fa457611fa4615aed565b60200260200101518a8881518110611fbe57611fbe615aed565b60200260200101516040015161388f565b848181518110611fe157611fe1615aed565b60200260200101517f74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a7185838151811061201c5761201c615aed565b602002602001015160a00151336040516120669291906bffffffffffffffffffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a280612078816159d4565b915050611ef8565b50505050505050565b600082815260046020908152604091829020825160e081018452815463ffffffff80821683526401000000008204811694830185905268010000000000000000820460ff161515958301959095526901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004831660c0820152911461218b576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818160a0015161219b9190615809565b600084815260046020526040902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff166c010000000000000000000000006bffffffffffffffffffffffff93841602179055601554612201918416906157cc565b6015556040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526bffffffffffffffffffffffff831660448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401602060405180830381600087803b1580156122a557600080fd5b505af11580156122b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122dd9190614f87565b506040516bffffffffffffffffffffffff83168152339084907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a3505050565b612331836137c7565b60125474010000000000000000000000000000000000000000900463ffffffff1681111561238b576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602052604090206123a49083836147dc565b50827f7b778136e5211932b51a145badd01959415e79e051a933604b3d323f862dcabf8383604051611e4092919061552e565b73ffffffffffffffffffffffffffffffffffffffff8116612424576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600c6020526040902054163314612484576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f54600b546000916124bb91859170010000000000000000000000000000000090046bffffffffffffffffffffffff1690613cde565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020526040902080547fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff169055601554909150612525906bffffffffffffffffffffffff83169061590c565b6015556040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526bffffffffffffffffffffffff831660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b1580156125c557600080fd5b505af11580156125d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125fd9190614f87565b5060405133815273ffffffffffffffffffffffffffffffffffffffff808416916bffffffffffffffffffffffff8416918616907f9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f406989060200160405180910390a4505050565b6108fc8163ffffffff16108061268b575060125463ffffffff6401000000009091048116908216115b156126c2576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126cb826137c7565b60008281526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff8516908117909155915191825283917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff8181166000908152600d60205260409020541633146127a4576040517f6752e7aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600c602090815260408083208054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217909355600d909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b600081815260046020908152604091829020825160e081018452815463ffffffff80821683526401000000008204811694830185905268010000000000000000820460ff161515958301959095526901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004831660c0820152911461293e576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff16331461299b576040517f6352a85300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602090815260408083208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821790935560069094528285208054909216909155905173ffffffffffffffffffffffffffffffffffffffff90911692839186917f5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c91a4505050565b612a37613744565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015612abf57600080fd5b505afa158015612ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612af79190615080565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3360155484612b44919061590c565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401611286565b6000818152600460209081526040808320815160e081018352815463ffffffff80821683526401000000008204811695830186905260ff6801000000000000000083041615159483019490945273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004821660c08201529291141590612c8860005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16149050818015612cd85750808015612cd6575043836020015163ffffffff16115b155b15612d0f576040517ffbc0357800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015612d41575060008481526005602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15612d78576040517ffbdb8e5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4381612d8c57612d896032826157cc565b90505b6000858152600460205260409020805463ffffffff808416640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff90921691909117909155612de5906002908790613cd216565b5060105460808501516bffffffffffffffffffffffff9182169160009116821115612e4a576080860151612e199083615923565b90508560a001516bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612e4a575060a08501515b808660a00151612e5a9190615923565b600088815260046020526040902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff166c010000000000000000000000006bffffffffffffffffffffffff93841602179055601154612ec091839116615809565b601180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff9290921691909117905560405167ffffffffffffffff84169088907f91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f79118190600090a350505050505050565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600c6020526040902054163314612f9d576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116331415612fed576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600d602052604090205481169082161461064a5773ffffffffffffffffffffffffffffffffffffffff8281166000818152600d602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055513392917f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836791a45050565b6130a4613744565b6130ad81613f05565b50565b600060606000806000806130c2613ffb565b6000600f604051806101200160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900462ffffff1662ffffff1662ffffff16815260200160008201600c9054906101000a900461ffff1661ffff1661ffff16815260200160008201600e9054906101000a900460ff1615151515815260200160008201600f9054906101000a900460ff161515151581526020016000820160109054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160008201601c9054906101000a900463ffffffff1663ffffffff1663ffffffff168152505090506000600460008a81526020019081526020016000206040518060e00160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160089054906101000a900460ff161515151581526020016000820160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160018201600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681526020016001820160189054906101000a900463ffffffff1663ffffffff1663ffffffff1681525050905063ffffffff8016816020015163ffffffff16146133d757505060408051602081019091526000808252965094506001935085915081905061373b565b80604001511561340657505060408051602081019091526000808252965094506002935085915081905061373b565b61340f82614033565b825160125492965090945060009161344d9185917801000000000000000000000000000000000000000000000000900463ffffffff1688888661422f565b9050806bffffffffffffffffffffffff168260a001516bffffffffffffffffffffffff16101561349957600060405180602001604052806000815250600698509850985050505061373b565b5a60008b815260076020526040808220905192985090917f6e04ff0d00000000000000000000000000000000000000000000000000000000916134de9160240161558e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925260608501516012549251919350600092839273ffffffffffffffffffffffffffffffffffffffff9092169163ffffffff9091169061359a9086906152c8565b60006040518083038160008787f1925050503d80600081146135d8576040519150601f19603f3d011682016040523d82523d6000602084013e6135dd565b606091505b50915091505a6135ed908a61590c565b9850816136195760006040518060200160405280600081525060039b509b509b5050505050505061373b565b60608180602001905181019061362f9190614fab565b909d5090508c61365f5760006040518060200160405280600081525060049c509c509c505050505050505061373b565b6012548151780100000000000000000000000000000000000000000000000090910463ffffffff1610156136b35760006040518060200160405280600081525060059c509c509c505050505050505061373b565b60405180606001604052806001436136cb919061590c565b63ffffffff1681526020016136e160014361590c565b408152602001828152506040516020016136fb9190615687565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905260019d509b5060009a50505050505050505b91939550919395565b60005473ffffffffffffffffffffffffffffffffffffffff1633146137c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016110e9565b565b60008181526005602052604090205473ffffffffffffffffffffffffffffffffffffffff163314613824576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020526040902054640100000000900463ffffffff908116146130ad576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006138868383614278565b90505b92915050565b600f546e010000000000000000000000000000900460ff16156138de576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff86163b61392c576040517f09ee12d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125482517401000000000000000000000000000000000000000090910463ffffffff161015613988576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc8563ffffffff1610806139b1575060125463ffffffff6401000000009091048116908616115b156139e8576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000878152600460205260409020546901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1615613a51576040517f6e3b930b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060e001604052808663ffffffff16815260200163ffffffff8016815260200182151581526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152602001600063ffffffff168152506004600089815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548160ff02191690831515021790555060608201518160000160096101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160010160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060a082015181600101600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060c08201518160010160186101000a81548163ffffffff021916908363ffffffff160217905550905050836005600089815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826bffffffffffffffffffffffff16601554613c9a91906157cc565b60155560008781526007602090815260409091208351613cbc928501906148b8565b50613cc860028861387a565b5050505050505050565b600061388683836142c7565b73ffffffffffffffffffffffffffffffffffffffff831660009081526008602090815260408083208151608081018352905460ff80821615158352610100820416938201939093526bffffffffffffffffffffffff6201000084048116928201929092526e01000000000000000000000000000090920416606082018190528290613d699086615923565b90506000613d77858361584d565b90508083604001818151613d8b9190615809565b6bffffffffffffffffffffffff9081169091528716606085015250613db085826158e1565b613dba9083615923565b60118054600090613dda9084906bffffffffffffffffffffffff16615809565b825461010092830a6bffffffffffffffffffffffff81810219909216928216029190911790925573ffffffffffffffffffffffffffffffffffffffff999099166000908152600860209081526040918290208751815492890151938901516060909901517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009093169015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff161760ff909316909b02919091177fffffffffffff000000000000000000000000000000000000000000000000ffff1662010000878416027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff16176e010000000000000000000000000000919092160217909755509095945050505050565b73ffffffffffffffffffffffffffffffffffffffff8116331415613f85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016110e9565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b32156137c5576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806000836060015162ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156140ba57600080fd5b505afa1580156140ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140f2919061514e565b509450909250505060008113158061410957508142105b8061412a575082801561412a5750614121824261590c565b8463ffffffff16105b1561413957601354955061413d565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156141a357600080fd5b505afa1580156141b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141db919061514e565b50945090925050506000811315806141f257508142105b806142135750828015614213575061420a824261590c565b8463ffffffff16105b15614222576014549450614226565b8094505b50505050915091565b6000806142408689600001516143ba565b905060008061425b8a8a63ffffffff16858a8a60018b6143fd565b909250905061426a8183615809565b9a9950505050505050505050565b60008181526001830160205260408120546142bf57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155613889565b506000613889565b600081815260018301602052604081205480156143b05760006142eb60018361590c565b85549091506000906142ff9060019061590c565b905081811461436457600086600001828154811061431f5761431f615aed565b906000526020600020015490508087600001848154811061434257614342615aed565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061437557614375615abe565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050613889565b6000915050613889565b60006143cd63ffffffff84166014615878565b6143d88360016157e4565b6143e79060ff16611d4c615878565b6143f39061fde86157cc565b61388691906157cc565b6000806000896080015161ffff16876144169190615878565b90508380156144245750803a105b1561442c57503a5b600060027f0000000000000000000000000000000000000000000000000000000000000000600281111561446257614462615a8f565b14156145e55760408051600081526020810190915285156144c157600036604051806080016040528060488152602001615b5a604891396040516020016144ab939291906152a1565b604051602081830303815290604052905061453d565b6012546144f1907801000000000000000000000000000000000000000000000000900463ffffffff1660046158b5565b63ffffffff1667ffffffffffffffff81111561450f5761450f615b1c565b6040519080825280601f01601f191660200182016040528015614539576020820181803683370190505b5090505b6040517f49948e0e00000000000000000000000000000000000000000000000000000000815273420000000000000000000000000000000000000f906349948e0e9061458d90849060040161557b565b60206040518083038186803b1580156145a557600080fd5b505afa1580156145b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145dd9190615080565b9150506146a1565b60017f0000000000000000000000000000000000000000000000000000000000000000600281111561461957614619615a8f565b14156146a157606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561466657600080fd5b505afa15801561467a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061469e9190615080565b90505b846146bd57808b6080015161ffff166146ba9190615878565b90505b6146cb61ffff871682615839565b9050600087826146db8c8e6157cc565b6146e59086615878565b6146ef91906157cc565b61470190670de0b6b3a7640000615878565b61470b9190615839565b905060008c6040015163ffffffff1664e8d4a5100061472a9190615878565b898e6020015163ffffffff16858f886147439190615878565b61474d91906157cc565b61475b90633b9aca00615878565b6147659190615878565b61476f9190615839565b61477991906157cc565b90506b033b2e3c9fd0803ce800000061479282846157cc565b11156147ca576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909c909b509950505050505050505050565b8280546147e890615980565b90600052602060002090601f01602090048101928261480a576000855561486e565b82601f10614841578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082351617855561486e565b8280016001018555821561486e579182015b8281111561486e578235825591602001919060010190614853565b5061487a92915061492c565b5090565b50805461488a90615980565b6000825580601f1061489a575050565b601f0160209004906000526020600020908101906130ad919061492c565b8280546148c490615980565b90600052602060002090601f0160209004810192826148e6576000855561486e565b82601f106148ff57805160ff191683800117855561486e565b8280016001018555821561486e579182015b8281111561486e578251825591602001919060010190614911565b5b8082111561487a576000815560010161492d565b803573ffffffffffffffffffffffffffffffffffffffff8116811461496557600080fd5b919050565b60008083601f84011261497c57600080fd5b50813567ffffffffffffffff81111561499457600080fd5b6020830191508360208260051b85010111156149af57600080fd5b9250929050565b600082601f8301126149c757600080fd5b813560206149dc6149d783615762565b615713565b80838252828201915082860187848660051b89010111156149fc57600080fd5b60005b85811015614a2257614a1082614941565b845292840192908401906001016149ff565b5090979650505050505050565b600082601f830112614a4057600080fd5b81356020614a506149d783615762565b80838252828201915082860187848660051b8901011115614a7057600080fd5b60005b85811015614a2257813567ffffffffffffffff811115614a9257600080fd5b8801603f81018a13614aa357600080fd5b858101356040614ab56149d783615786565b8281528c82848601011115614ac957600080fd5b828285018a8301376000928101890192909252508552509284019290840190600101614a73565b600082601f830112614b0157600080fd5b81356020614b116149d783615762565b8281528181019085830160e080860288018501891015614b3057600080fd5b6000805b87811015614bd55782848c031215614b4a578182fd5b614b526156ea565b614b5b85614c73565b8152614b68888601614c73565b88820152604080860135614b7b81615b4b565b908201526060614b8c868201614941565b908201526080614b9d868201614ca1565b9082015260a0614bae868201614ca1565b9082015260c0614bbf868201614c73565b9082015286529486019492820192600101614b34565b50929998505050505050505050565b60008083601f840112614bf657600080fd5b50813567ffffffffffffffff811115614c0e57600080fd5b6020830191508360208285010111156149af57600080fd5b600082601f830112614c3757600080fd5b8151614c456149d782615786565b818152846020838601011115614c5a57600080fd5b614c6b826020830160208701615950565b949350505050565b803563ffffffff8116811461496557600080fd5b805169ffffffffffffffffffff8116811461496557600080fd5b80356bffffffffffffffffffffffff8116811461496557600080fd5b600060208284031215614ccf57600080fd5b61388682614941565b60008060408385031215614ceb57600080fd5b614cf483614941565b9150614d0260208401614941565b90509250929050565b60008060408385031215614d1e57600080fd5b614d2783614941565b9150602083013560048110614d3b57600080fd5b809150509250929050565b600080600080600080600060a0888a031215614d6157600080fd5b614d6a88614941565b9650614d7860208901614c73565b9550614d8660408901614941565b9450606088013567ffffffffffffffff80821115614da357600080fd5b614daf8b838c01614be4565b909650945060808a0135915080821115614dc857600080fd5b50614dd58a828b01614be4565b989b979a50959850939692959293505050565b60008060208385031215614dfb57600080fd5b823567ffffffffffffffff811115614e1257600080fd5b614e1e8582860161496a565b90969095509350505050565b600080600060408486031215614e3f57600080fd5b833567ffffffffffffffff811115614e5657600080fd5b614e628682870161496a565b9094509250614e75905060208501614941565b90509250925092565b60008060008060808587031215614e9457600080fd5b843567ffffffffffffffff80821115614eac57600080fd5b818701915087601f830112614ec057600080fd5b81356020614ed06149d783615762565b8083825282820191508286018c848660051b8901011115614ef057600080fd5b600096505b84871015614f13578035835260019690960195918301918301614ef5565b5098505088013592505080821115614f2a57600080fd5b614f3688838901614af0565b94506040870135915080821115614f4c57600080fd5b614f5888838901614a2f565b93506060870135915080821115614f6e57600080fd5b50614f7b878288016149b6565b91505092959194509250565b600060208284031215614f9957600080fd5b8151614fa481615b4b565b9392505050565b60008060408385031215614fbe57600080fd5b8251614fc981615b4b565b602084015190925067ffffffffffffffff811115614fe657600080fd5b614ff285828601614c26565b9150509250929050565b6000806020838503121561500f57600080fd5b823567ffffffffffffffff81111561502657600080fd5b614e1e85828601614be4565b60006020828403121561504457600080fd5b815167ffffffffffffffff81111561505b57600080fd5b614c6b84828501614c26565b60006020828403121561507957600080fd5b5035919050565b60006020828403121561509257600080fd5b5051919050565b600080604083850312156150ac57600080fd5b82359150614d0260208401614941565b6000806000604084860312156150d157600080fd5b83359250602084013567ffffffffffffffff8111156150ef57600080fd5b6150fb86828701614be4565b9497909650939450505050565b6000806040838503121561511b57600080fd5b82359150614d0260208401614c73565b6000806040838503121561513e57600080fd5b82359150614d0260208401614ca1565b600080600080600060a0868803121561516657600080fd5b61516f86614c87565b945060208601519350604086015192506060860151915061519260808701614c87565b90509295509295909350565b6000602082840312156151b057600080fd5b815160ff81168114614fa457600080fd5b600081518084526020808501945080840160005b8381101561520757815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016151d5565b509495945050505050565b6000815180845260208085019450848260051b860182860160005b85811015614a22578383038952615245838351615257565b9885019892509084019060010161522d565b6000815180845261526f816020860160208601615950565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8284823760008382016000815283516152be818360208801615950565b0195945050505050565b600082516152da818460208701615950565b9190910192915050565b6000604082016040835280865480835260608501915087600052602092508260002060005b8281101561533b57815473ffffffffffffffffffffffffffffffffffffffff1684529284019260019182019101615309565b505050838103828501528481528590820160005b868110156153885773ffffffffffffffffffffffffffffffffffffffff61537584614941565b168252918301919083019060010161534f565b50979650505050505050565b60006080808352868184015260a07f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8811156153cf57600080fd5b8760051b808a838701378085019050818101600081526020838784030181880152818a5180845260c093508385019150828c01945060005b818110156154a5578551805163ffffffff908116855285820151168585015260408082015115159085015260608082015173ffffffffffffffffffffffffffffffffffffffff1690850152888101516bffffffffffffffffffffffff168985015287810151615485898601826bffffffffffffffffffffffff169052565b5085015163ffffffff16838601529483019460e090920191600101615407565b505087810360408901526154b9818b615212565b9550505050505082810360608401526154d281856151c1565b98975050505050505050565b861515815260c0602082015260006154f960c0830188615257565b90506007861061550b5761550b615a8f565b8560408301528460608301528360808301528260a0830152979650505050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b6020815260006138866020830184615257565b600060208083526000845481600182811c9150808316806155b057607f831692505b8583108114156155e7577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b87860183815260200181801561560457600181146156335761565e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0086168252878201965061565e565b60008b81526020902060005b868110156156585781548482015290850190890161563f565b83019750505b50949998505050505050505050565b602081016003831061568157615681615a8f565b91905290565b6020815263ffffffff82511660208201526020820151604082015260006040830151606080840152614c6b6080840182615257565b60ff8416815260ff831660208201526060604082015260006156e16060830184615257565b95945050505050565b60405160e0810167ffffffffffffffff8111828210171561570d5761570d615b1c565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561575a5761575a615b1c565b604052919050565b600067ffffffffffffffff82111561577c5761577c615b1c565b5060051b60200190565b600067ffffffffffffffff8211156157a0576157a0615b1c565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082198211156157df576157df615a31565b500190565b600060ff821660ff84168060ff0382111561580157615801615a31565b019392505050565b60006bffffffffffffffffffffffff80831681851680830382111561583057615830615a31565b01949350505050565b60008261584857615848615a60565b500490565b60006bffffffffffffffffffffffff8084168061586c5761586c615a60565b92169190910492915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156158b0576158b0615a31565b500290565b600063ffffffff808316818516818304811182151516156158d8576158d8615a31565b02949350505050565b60006bffffffffffffffffffffffff808316818516818304811182151516156158d8576158d8615a31565b60008282101561591e5761591e615a31565b500390565b60006bffffffffffffffffffffffff8381169083168181101561594857615948615a31565b039392505050565b60005b8381101561596b578181015183820152602001615953565b8381111561597a576000848401525b50505050565b600181811c9082168061599457607f821691505b602082108114156159ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615a0657615a06615a31565b5060010190565b600063ffffffff80831681811415615a2757615a27615a31565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b80151581146130ad57600080fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"enumKeeperRegistryBase2_0.Mode\",\"name\":\"mode\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArrayHasNoEntries\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotCancel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CheckDataExceedsLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ConfigDigestMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateEntry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitOutsideRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfFaultyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnchainConfigNonEmpty\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveTransmitters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByLINKToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrRegistrar\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistryPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedTransmitter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"TargetCheckReverted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TranscoderNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"CancelledUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"FundsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InsufficientFundsUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"PayeesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ReorgedUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"StaleUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"atBlockHeight\",\"type\":\"uint64\"}],\"name\":\"UpkeepCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"UpkeepCheckDataUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"gasLimit\",\"type\":\"uint96\"}],\"name\":\"UpkeepGasLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"UpkeepMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"UpkeepOffchainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"checkBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasOverhead\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"totalPayment\",\"type\":\"uint96\"}],\"name\":\"UpkeepPerformed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"importedFrom\",\"type\":\"address\"}],\"name\":\"UpkeepReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"UpkeepRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepUnpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumUpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMode\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_0.Mode\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistryBase2_0.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"updateCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6101006040523480156200001257600080fd5b50604051620060e2380380620060e28339810160408190526200003591620001ef565b838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c38162000126565b505050836002811115620000db57620000db62000251565b60e0816002811115620000f257620000f262000251565b60f81b9052506001600160601b0319606093841b811660805291831b821660a05290911b1660c05250620002679350505050565b6001600160a01b038116331415620001815760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001ea57600080fd5b919050565b600080600080608085870312156200020657600080fd5b8451600381106200021657600080fd5b93506200022660208601620001d2565b92506200023660408601620001d2565b91506200024660608601620001d2565b905092959194509250565b634e487b7160e01b600052602160045260246000fd5b60805160601c60a05160601c60c05160601c60e05160f81c615dda6200030860003960008181610224015281816138870152818161394c0152818161466a015261482101526000818161026e015261428d0152600081816103b7015261437601526000818161041e01528181610f7e0152818161126301528181611bf6015281816122690152818161259e01528181612a850152612b180152615dda6000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80638dcf0fe711610104578063b121e147116100a2578063ca30e60311610071578063ca30e6031461041c578063eb5dcd6c14610442578063f2fde38b14610455578063f7d334ba1461046857600080fd5b8063b121e147146103db578063b148ab6b146103ee578063b79550be14610401578063c80480221461040957600080fd5b80639fab4386116100de5780639fab43861461037c578063a710b2211461038f578063a72aa27e146103a2578063b10b673c146103b557600080fd5b80638dcf0fe7146103435780638e86139b14610356578063948108f71461036957600080fd5b80636ded9eae1161017c5780638456cb591161014b5780638456cb59146102f757806385c1b0ba146102ff5780638765ecbe146103125780638da5cb5b1461032557600080fd5b80636ded9eae146102b3578063744bfe61146102d457806379ba5097146102e75780637d9b97e0146102ef57600080fd5b80633f4ba83a116101b85780633f4ba83a1461021a5780634b4fd03b146102225780635165f2f5146102595780636709d0e51461026c57600080fd5b8063187256e8146101df5780631a2af011146101f45780633b9cce5914610207575b600080fd5b6101f26101ed366004614f3e565b61048d565b005b6101f26102023660046152c5565b6104fe565b6101f261021536600461501b565b610652565b6101f26108a8565b7f00000000000000000000000000000000000000000000000000000000000000006040516102509190615899565b60405180910390f35b6101f26102673660046152ac565b61090e565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610250565b6102c66102c1366004614f79565b610a88565b604051908152602001610250565b6101f26102e23660046152c5565b610c77565b6101f2611089565b6101f261118b565b6101f26112f5565b6101f261030d36600461505d565b611366565b6101f26103203660046152ac565b611c81565b60005473ffffffffffffffffffffffffffffffffffffffff1661028e565b6101f26103513660046152e8565b611e08565b6101f2610364366004615241565b611e6a565b6101f2610377366004615357565b6120a6565b6101f261038a3660046152e8565b612345565b6101f261039d366004614f0b565b6123f4565b6101f26103b0366004615334565b61267f565b7f000000000000000000000000000000000000000000000000000000000000000061028e565b6101f26103e9366004614ef0565b612761565b6101f26103fc3660046152ac565b612859565b6101f2612a4c565b6101f26104173660046152ac565b612bb7565b7f000000000000000000000000000000000000000000000000000000000000000061028e565b6101f2610450366004614f0b565b612f6c565b6101f2610463366004614ef0565b6130cb565b61047b6104763660046152ac565b6130df565b6040516102509695949392919061570a565b610495613736565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260166020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360038111156104f5576104f5615cbb565b02179055505050565b610507826137b9565b73ffffffffffffffffffffffffffffffffffffffff8116331415610557576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81166105a4576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff82811691161461064e5760008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff851690811790915590519091339185917fb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b3591a45b5050565b61065a613736565b600b548114610695576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600b54811015610867576000600b82815481106106b7576106b7615d19565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff908116808452600c9092526040832054919350169085858581811061070157610701615d19565b90506020020160208101906107169190614ef0565b905073ffffffffffffffffffffffffffffffffffffffff811615806107a9575073ffffffffffffffffffffffffffffffffffffffff82161580159061078757508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156107a9575073ffffffffffffffffffffffffffffffffffffffff81811614155b156107e0576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff818116146108515773ffffffffffffffffffffffffffffffffffffffff8381166000908152600c6020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169183169190911790555b505050808061085f90615c00565b915050610698565b507fa46de38886467c59be07a0675f14781206a5477d871628af46c2443822fcb725600b838360405161089c93929190615510565b60405180910390a15050565b6108b0613736565b600f80547fffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffff1690556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa906020015b60405180910390a1565b610917816137b9565b600081815260046020908152604091829020825160e081018452815463ffffffff8082168352640100000000820481169483019490945268010000000000000000810460ff1615159482018590526901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c082015290610a19576040517f1b88a78400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff169055610a5860028361386c565b5060405182907f7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a4745690600090a25050565b6000805473ffffffffffffffffffffffffffffffffffffffff163314801590610ad957506011546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314155b15610b10576040517fd48b678b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2c6001610b1d613881565b610b279190615b38565b613946565b601254604080516020810193909352309083015268010000000000000000900463ffffffff1660608201526080016040516020818303038152906040528051906020012060001c9050610bba8189898960008a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250613ac6915050565b6012805468010000000000000000900463ffffffff16906008610bdc83615c39565b825463ffffffff9182166101009390930a9283029190920219909116179055506000818152601760205260409020610c15908484614a14565b506040805163ffffffff8916815273ffffffffffffffffffffffffffffffffffffffff8816602082015282917fbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d012910160405180910390a2979650505050505050565b600f546f01000000000000000000000000000000900460ff1615610cc7576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f80547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff166f0100000000000000000000000000000017905573ffffffffffffffffffffffffffffffffffffffff8116610d4e576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600460209081526040808320815160e081018352815463ffffffff8082168352640100000000820481168387015260ff6801000000000000000083041615158386015273ffffffffffffffffffffffffffffffffffffffff6901000000000000000000909204821660608401526001909301546bffffffffffffffffffffffff80821660808501526c0100000000000000000000000082041660a08401527801000000000000000000000000000000000000000000000000900490921660c082015286855260059093529220549091163314610e5b576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e63613881565b816020015163ffffffff161115610ea6576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600460205260409020600101546015546c010000000000000000000000009091046bffffffffffffffffffffffff1690610ee6908290615b38565b60155560008481526004602081905260409182902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff16905590517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116928201929092526bffffffffffffffffffffffff831660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015610fc457600080fd5b505af1158015610fd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffc91906151ba565b50604080516bffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8516602082015285917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a25050600f80547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff1690555050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461110f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611193613736565b6011546015546bffffffffffffffffffffffff909116906111b5908290615b38565b601555601180547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690556040516bffffffffffffffffffffffff821681527f1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f19060200160405180910390a16040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b602060405180830381600087803b1580156112bd57600080fd5b505af11580156112d1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906151ba565b6112fd613736565b600f80547fffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffff166e0100000000000000000000000000001790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602001610904565b600173ffffffffffffffffffffffffffffffffffffffff821660009081526016602052604090205460ff1660038111156113a2576113a2615cbb565b141580156113ea5750600373ffffffffffffffffffffffffffffffffffffffff821660009081526016602052604090205460ff1660038111156113e7576113e7615cbb565b14155b15611421576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6010546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff16611480576040517fd12d7d8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816114b7576040517f2c2fc94100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290526000808567ffffffffffffffff81111561150b5761150b615d48565b60405190808252806020026020018201604052801561153e57816020015b60608152602001906001900390816115295790505b50905060008667ffffffffffffffff81111561155c5761155c615d48565b604051908082528060200260200182016040528015611585578160200160208202803683370190505b50905060008767ffffffffffffffff8111156115a3576115a3615d48565b60405190808252806020026020018201604052801561162857816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816115c15790505b50905060005b888110156119b35789898281811061164857611648615d19565b60209081029290920135600081815260048452604090819020815160e081018352815463ffffffff8082168352640100000000820481169783019790975268010000000000000000810460ff16151593820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060830152600101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490931660c0840152985090965061172a9050876137b9565b8582828151811061173d5761173d615d19565b602002602001018190525060076000888152602001908152602001600020805461176690615bac565b80601f016020809104026020016040519081016040528092919081815260200182805461179290615bac565b80156117df5780601f106117b4576101008083540402835291602001916117df565b820191906000526020600020905b8154815290600101906020018083116117c257829003601f168201915b50505050508482815181106117f6576117f6615d19565b60200260200101819052506005600088815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683828151811061184757611847615d19565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015260a0860151611889906bffffffffffffffffffffffff16866159f8565b600088815260046020908152604080832080547fffffff000000000000000000000000000000000000000000000000000000000016815560010180547fffffffff00000000000000000000000000000000000000000000000000000000169055600790915281209196506118fd9190614ab6565b600087815260066020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561193c600288613f09565b5060a0860151604080516bffffffffffffffffffffffff909216825273ffffffffffffffffffffffffffffffffffffffff8a16602083015288917fb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff910160405180910390a2806119ab81615c00565b91505061162e565b50836015546119c29190615b38565b6015556040516000906119e1908b908b908590889088906020016155c0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905260105490915073ffffffffffffffffffffffffffffffffffffffff808a1691638e86139b916c010000000000000000000000009091041663c71249ab60028c73ffffffffffffffffffffffffffffffffffffffff1663aab9edd66040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a9557600080fd5b505af1158015611aa9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611acd91906153ca565b866040518463ffffffff1660e01b8152600401611aec939291906158e8565b60006040518083038186803b158015611b0457600080fd5b505afa158015611b18573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611b5e9190810190615277565b6040518263ffffffff1660e01b8152600401611b7a91906157a7565b600060405180830381600087803b158015611b9457600080fd5b505af1158015611ba8573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b81166004830152602482018990527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150604401602060405180830381600087803b158015611c3c57600080fd5b505af1158015611c50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7491906151ba565b5050505050505050505050565b611c8a816137b9565b600081815260046020908152604091829020825160e081018452815463ffffffff8082168352640100000000820481169483019490945268010000000000000000810460ff16158015958301959095526901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c082015290611d8e576040517f514b6c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff1668010000000000000000179055611dd8600283613f09565b5060405182907f8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f90600090a25050565b611e11836137b9565b6000838152601760205260409020611e2a908383614a14565b50827f3e8740446213c8a77d40e08f79136ce3f347d13ed270a6ebdf57159e0faf48508383604051611e5d92919061575a565b60405180910390a2505050565b60023360009081526016602052604090205460ff166003811115611e9057611e90615cbb565b14158015611ec2575060033360009081526016602052604090205460ff166003811115611ebf57611ebf615cbb565b14155b15611ef9576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808080611f0a858701876150b1565b935093509350935060005b845181101561209d57611fec858281518110611f3357611f33615d19565b6020026020010151858381518110611f4d57611f4d615d19565b602002602001015160600151868481518110611f6b57611f6b615d19565b602002602001015160000151858581518110611f8957611f89615d19565b6020026020010151888681518110611fa357611fa3615d19565b602002602001015160a00151888781518110611fc157611fc1615d19565b60200260200101518a8881518110611fdb57611fdb615d19565b602002602001015160400151613ac6565b848181518110611ffe57611ffe615d19565b60200260200101517f74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a7185838151811061203957612039615d19565b602002602001015160a00151336040516120839291906bffffffffffffffffffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a28061209581615c00565b915050611f15565b50505050505050565b600082815260046020908152604091829020825160e081018452815463ffffffff80821683526401000000008204811694830185905268010000000000000000820460ff161515958301959095526901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004831660c082015291146121a8576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818160a001516121b89190615a35565b600084815260046020526040902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff166c010000000000000000000000006bffffffffffffffffffffffff9384160217905560155461221e918416906159f8565b6015556040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526bffffffffffffffffffffffff831660448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401602060405180830381600087803b1580156122c257600080fd5b505af11580156122d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122fa91906151ba565b506040516bffffffffffffffffffffffff83168152339084907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a3505050565b61234e836137b9565b60125474010000000000000000000000000000000000000000900463ffffffff168111156123a8576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602052604090206123c1908383614a14565b50827f7b778136e5211932b51a145badd01959415e79e051a933604b3d323f862dcabf8383604051611e5d92919061575a565b73ffffffffffffffffffffffffffffffffffffffff8116612441576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600c60205260409020541633146124a1576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f54600b546000916124d891859170010000000000000000000000000000000090046bffffffffffffffffffffffff1690613f15565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260086020526040902080547fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff169055601554909150612542906bffffffffffffffffffffffff831690615b38565b6015556040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301526bffffffffffffffffffffffff831660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b1580156125e257600080fd5b505af11580156125f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061261a91906151ba565b5060405133815273ffffffffffffffffffffffffffffffffffffffff808416916bffffffffffffffffffffffff8416918616907f9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f406989060200160405180910390a4505050565b6108fc8163ffffffff1610806126a8575060125463ffffffff6401000000009091048116908216115b156126df576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6126e8826137b9565b60008281526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff8516908117909155915191825283917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff8181166000908152600d60205260409020541633146127c1576040517f6752e7aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600c602090815260408083208054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217909355600d909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b600081815260046020908152604091829020825160e081018452815463ffffffff80821683526401000000008204811694830185905268010000000000000000820460ff161515958301959095526901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004831660c0820152911461295b576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1633146129b8576040517f6352a85300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526005602090815260408083208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821790935560069094528285208054909216909155905173ffffffffffffffffffffffffffffffffffffffff90911692839186917f5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c91a4505050565b612a54613736565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b158015612adc57600080fd5b505afa158015612af0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b149190615228565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3360155484612b619190615b38565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016112a3565b6000818152600460209081526040808320815160e081018352815463ffffffff80821683526401000000008204811695830186905260ff6801000000000000000083041615159483019490945273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a083015278010000000000000000000000000000000000000000000000009004821660c08201529291141590612ca560005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16149050818015612cfc5750808015612cfa5750612ced613881565b836020015163ffffffff16115b155b15612d33576040517ffbc0357800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015612d65575060008481526005602052604090205473ffffffffffffffffffffffffffffffffffffffff163314155b15612d9c576040517ffbdb8e5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612da6613881565b905081612dbb57612db86032826159f8565b90505b6000858152600460205260409020805463ffffffff808416640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff90921691909117909155612e14906002908790613f0916565b5060105460808501516bffffffffffffffffffffffff9182169160009116821115612e79576080860151612e489083615b4f565b90508560a001516bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612e79575060a08501515b808660a00151612e899190615b4f565b600088815260046020526040902060010180547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff166c010000000000000000000000006bffffffffffffffffffffffff93841602179055601154612eef91839116615a35565b601180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff9290921691909117905560405167ffffffffffffffff84169088907f91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f79118190600090a350505050505050565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600c6020526040902054163314612fcc576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811633141561301c576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600d602052604090205481169082161461064e5773ffffffffffffffffffffffffffffffffffffffff8281166000818152600d602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055513392917f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836791a45050565b6130d3613736565b6130dc8161413c565b50565b600060606000806000806130f1614232565b6000600f604051806101200160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160099054906101000a900462ffffff1662ffffff1662ffffff16815260200160008201600c9054906101000a900461ffff1661ffff1661ffff16815260200160008201600e9054906101000a900460ff1615151515815260200160008201600f9054906101000a900460ff161515151581526020016000820160109054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160008201601c9054906101000a900463ffffffff1663ffffffff1663ffffffff168152505090506000600460008a81526020019081526020016000206040518060e00160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160089054906101000a900460ff161515151581526020016000820160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200160018201600c9054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681526020016001820160189054906101000a900463ffffffff1663ffffffff1663ffffffff1681525050905063ffffffff8016816020015163ffffffff161461340657505060408051602081019091526000808252965094506001935085915081905061372d565b80604001511561343557505060408051602081019091526000808252965094506002935085915081905061372d565b61343e8261426a565b825160125492965090945060009161347c9185917801000000000000000000000000000000000000000000000000900463ffffffff16888886614466565b9050806bffffffffffffffffffffffff168260a001516bffffffffffffffffffffffff1610156134c857600060405180602001604052806000815250600698509850985050505061372d565b5a60008b815260076020526040808220905192985090917f6e04ff0d000000000000000000000000000000000000000000000000000000009161350d916024016157ba565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925260608501516012549251919350600092839273ffffffffffffffffffffffffffffffffffffffff9092169163ffffffff909116906135c99086906154f4565b60006040518083038160008787f1925050503d8060008114613607576040519150601f19603f3d011682016040523d82523d6000602084013e61360c565b606091505b50915091505a61361c908a615b38565b98508161362c57600399506136c2565b8080602001905181019061364091906151d7565b909c5090508b61366f5760006040518060200160405280600081525060049b509b509b5050505050505061372d565b6012548151780100000000000000000000000000000000000000000000000090910463ffffffff1610156136c25760006040518060200160405280600081525060059b509b509b5050505050505061372d565b604051806060016040528060016136d7613881565b6136e19190615b38565b63ffffffff1681526020016136f96001610b1d613881565b81526020018281525060405160200161371291906158b3565b6040516020818303038152906040529a50819b505050505050505b91939550919395565b60005473ffffffffffffffffffffffffffffffffffffffff1633146137b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401611106565b565b60008181526005602052604090205473ffffffffffffffffffffffffffffffffffffffff163314613816576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020526040902054640100000000900463ffffffff908116146130dc576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061387883836144af565b90505b92915050565b600060017f000000000000000000000000000000000000000000000000000000000000000060028111156138b7576138b7615cbb565b141561394157606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561390457600080fd5b505afa158015613918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061393c9190615228565b905090565b504390565b600060017f0000000000000000000000000000000000000000000000000000000000000000600281111561397c5761397c615cbb565b1415613abc576000606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156139cb57600080fd5b505afa1580156139df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a039190615228565b90508083101580613a1e5750610100613a1c8483615b38565b115b15613a2c5750600092915050565b6040517f2b407a8200000000000000000000000000000000000000000000000000000000815260048101849052606490632b407a829060240160206040518083038186803b158015613a7d57600080fd5b505afa158015613a91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ab59190615228565b9392505050565b504090565b919050565b600f546e010000000000000000000000000000900460ff1615613b15576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff86163b613b63576040517f09ee12d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125482517401000000000000000000000000000000000000000090910463ffffffff161015613bbf576040517fae7235df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc8563ffffffff161080613be8575060125463ffffffff6401000000009091048116908616115b15613c1f576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000878152600460205260409020546901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1615613c88576040517f6e3b930b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060e001604052808663ffffffff16815260200163ffffffff8016815260200182151581526020018773ffffffffffffffffffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152602001600063ffffffff168152506004600089815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548160ff02191690831515021790555060608201518160000160096101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160010160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060a082015181600101600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060c08201518160010160186101000a81548163ffffffff021916908363ffffffff160217905550905050836005600089815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826bffffffffffffffffffffffff16601554613ed191906159f8565b60155560008781526007602090815260409091208351613ef392850190614af0565b50613eff60028861386c565b5050505050505050565b600061387883836144fe565b73ffffffffffffffffffffffffffffffffffffffff831660009081526008602090815260408083208151608081018352905460ff80821615158352610100820416938201939093526bffffffffffffffffffffffff6201000084048116928201929092526e01000000000000000000000000000090920416606082018190528290613fa09086615b4f565b90506000613fae8583615a79565b90508083604001818151613fc29190615a35565b6bffffffffffffffffffffffff9081169091528716606085015250613fe78582615b0d565b613ff19083615b4f565b601180546000906140119084906bffffffffffffffffffffffff16615a35565b825461010092830a6bffffffffffffffffffffffff81810219909216928216029190911790925573ffffffffffffffffffffffffffffffffffffffff999099166000908152600860209081526040918290208751815492890151938901516060909901517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009093169015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff161760ff909316909b02919091177fffffffffffff000000000000000000000000000000000000000000000000ffff1662010000878416027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff16176e010000000000000000000000000000919092160217909755509095945050505050565b73ffffffffffffffffffffffffffffffffffffffff81163314156141bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401611106565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b32156137b7576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806000836060015162ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156142f157600080fd5b505afa158015614305573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614329919061537a565b509450909250505060008113158061434057508142105b80614361575082801561436157506143588242615b38565b8463ffffffff16105b15614370576013549550614374565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156143da57600080fd5b505afa1580156143ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614412919061537a565b509450909250505060008113158061442957508142105b8061444a575082801561444a57506144418242615b38565b8463ffffffff16105b1561445957601454945061445d565b8094505b50505050915091565b6000806144778689600001516145f1565b90506000806144928a8a63ffffffff16858a8a60018b614635565b90925090506144a18183615a35565b9a9950505050505050505050565b60008181526001830160205260408120546144f65750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561387b565b50600061387b565b600081815260018301602052604081205480156145e7576000614522600183615b38565b855490915060009061453690600190615b38565b905081811461459b57600086600001828154811061455657614556615d19565b906000526020600020015490508087600001848154811061457957614579615d19565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806145ac576145ac615cea565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061387b565b600091505061387b565b600061460463ffffffff84166014615aa4565b61460f836001615a10565b61461e9060ff16611d4c615aa4565b61462b90620111706159f8565b61387891906159f8565b6000806000896080015161ffff168761464e9190615aa4565b905083801561465c5750803a105b1561466457503a5b600060027f0000000000000000000000000000000000000000000000000000000000000000600281111561469a5761469a615cbb565b141561481d5760408051600081526020810190915285156146f957600036604051806080016040528060488152602001615d86604891396040516020016146e3939291906154cd565b6040516020818303038152906040529050614775565b601254614729907801000000000000000000000000000000000000000000000000900463ffffffff166004615ae1565b63ffffffff1667ffffffffffffffff81111561474757614747615d48565b6040519080825280601f01601f191660200182016040528015614771576020820181803683370190505b5090505b6040517f49948e0e00000000000000000000000000000000000000000000000000000000815273420000000000000000000000000000000000000f906349948e0e906147c59084906004016157a7565b60206040518083038186803b1580156147dd57600080fd5b505afa1580156147f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148159190615228565b9150506148d9565b60017f0000000000000000000000000000000000000000000000000000000000000000600281111561485157614851615cbb565b14156148d957606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561489e57600080fd5b505afa1580156148b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906148d69190615228565b90505b846148f557808b6080015161ffff166148f29190615aa4565b90505b61490361ffff871682615a65565b9050600087826149138c8e6159f8565b61491d9086615aa4565b61492791906159f8565b61493990670de0b6b3a7640000615aa4565b6149439190615a65565b905060008c6040015163ffffffff1664e8d4a510006149629190615aa4565b898e6020015163ffffffff16858f8861497b9190615aa4565b61498591906159f8565b61499390633b9aca00615aa4565b61499d9190615aa4565b6149a79190615a65565b6149b191906159f8565b90506b033b2e3c9fd0803ce80000006149ca82846159f8565b1115614a02576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909c909b509950505050505050505050565b828054614a2090615bac565b90600052602060002090601f016020900481019282614a425760008555614aa6565b82601f10614a79578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555614aa6565b82800160010185558215614aa6579182015b82811115614aa6578235825591602001919060010190614a8b565b50614ab2929150614b64565b5090565b508054614ac290615bac565b6000825580601f10614ad2575050565b601f0160209004906000526020600020908101906130dc9190614b64565b828054614afc90615bac565b90600052602060002090601f016020900481019282614b1e5760008555614aa6565b82601f10614b3757805160ff1916838001178555614aa6565b82800160010185558215614aa6579182015b82811115614aa6578251825591602001919060010190614b49565b5b80821115614ab25760008155600101614b65565b803573ffffffffffffffffffffffffffffffffffffffff81168114613ac157600080fd5b60008083601f840112614baf57600080fd5b50813567ffffffffffffffff811115614bc757600080fd5b6020830191508360208260051b8501011115614be257600080fd5b9250929050565b600082601f830112614bfa57600080fd5b81356020614c0f614c0a8361598e565b61593f565b80838252828201915082860187848660051b8901011115614c2f57600080fd5b60005b85811015614c5557614c4382614b79565b84529284019290840190600101614c32565b5090979650505050505050565b600082601f830112614c7357600080fd5b81356020614c83614c0a8361598e565b80838252828201915082860187848660051b8901011115614ca357600080fd5b60005b85811015614c5557813567ffffffffffffffff811115614cc557600080fd5b8801603f81018a13614cd657600080fd5b858101356040614ce8614c0a836159b2565b8281528c82848601011115614cfc57600080fd5b828285018a8301376000928101890192909252508552509284019290840190600101614ca6565b600082601f830112614d3457600080fd5b81356020614d44614c0a8361598e565b8281528181019085830160e080860288018501891015614d6357600080fd5b6000805b87811015614e085782848c031215614d7d578182fd5b614d85615916565b614d8e85614ea6565b8152614d9b888601614ea6565b88820152604080860135614dae81615d77565b908201526060614dbf868201614b79565b908201526080614dd0868201614ed4565b9082015260a0614de1868201614ed4565b9082015260c0614df2868201614ea6565b9082015286529486019492820192600101614d67565b50929998505050505050505050565b60008083601f840112614e2957600080fd5b50813567ffffffffffffffff811115614e4157600080fd5b602083019150836020828501011115614be257600080fd5b600082601f830112614e6a57600080fd5b8151614e78614c0a826159b2565b818152846020838601011115614e8d57600080fd5b614e9e826020830160208701615b7c565b949350505050565b803563ffffffff81168114613ac157600080fd5b805169ffffffffffffffffffff81168114613ac157600080fd5b80356bffffffffffffffffffffffff81168114613ac157600080fd5b600060208284031215614f0257600080fd5b61387882614b79565b60008060408385031215614f1e57600080fd5b614f2783614b79565b9150614f3560208401614b79565b90509250929050565b60008060408385031215614f5157600080fd5b614f5a83614b79565b9150602083013560048110614f6e57600080fd5b809150509250929050565b600080600080600080600060a0888a031215614f9457600080fd5b614f9d88614b79565b9650614fab60208901614ea6565b9550614fb960408901614b79565b9450606088013567ffffffffffffffff80821115614fd657600080fd5b614fe28b838c01614e17565b909650945060808a0135915080821115614ffb57600080fd5b506150088a828b01614e17565b989b979a50959850939692959293505050565b6000806020838503121561502e57600080fd5b823567ffffffffffffffff81111561504557600080fd5b61505185828601614b9d565b90969095509350505050565b60008060006040848603121561507257600080fd5b833567ffffffffffffffff81111561508957600080fd5b61509586828701614b9d565b90945092506150a8905060208501614b79565b90509250925092565b600080600080608085870312156150c757600080fd5b843567ffffffffffffffff808211156150df57600080fd5b818701915087601f8301126150f357600080fd5b81356020615103614c0a8361598e565b8083825282820191508286018c848660051b890101111561512357600080fd5b600096505b84871015615146578035835260019690960195918301918301615128565b509850508801359250508082111561515d57600080fd5b61516988838901614d23565b9450604087013591508082111561517f57600080fd5b61518b88838901614c62565b935060608701359150808211156151a157600080fd5b506151ae87828801614be9565b91505092959194509250565b6000602082840312156151cc57600080fd5b8151613ab581615d77565b600080604083850312156151ea57600080fd5b82516151f581615d77565b602084015190925067ffffffffffffffff81111561521257600080fd5b61521e85828601614e59565b9150509250929050565b60006020828403121561523a57600080fd5b5051919050565b6000806020838503121561525457600080fd5b823567ffffffffffffffff81111561526b57600080fd5b61505185828601614e17565b60006020828403121561528957600080fd5b815167ffffffffffffffff8111156152a057600080fd5b614e9e84828501614e59565b6000602082840312156152be57600080fd5b5035919050565b600080604083850312156152d857600080fd5b82359150614f3560208401614b79565b6000806000604084860312156152fd57600080fd5b83359250602084013567ffffffffffffffff81111561531b57600080fd5b61532786828701614e17565b9497909650939450505050565b6000806040838503121561534757600080fd5b82359150614f3560208401614ea6565b6000806040838503121561536a57600080fd5b82359150614f3560208401614ed4565b600080600080600060a0868803121561539257600080fd5b61539b86614eba565b94506020860151935060408601519250606086015191506153be60808701614eba565b90509295509295909350565b6000602082840312156153dc57600080fd5b815160ff81168114613ab557600080fd5b600081518084526020808501945080840160005b8381101561543357815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101615401565b509495945050505050565b6000815180845260208085019450848260051b860182860160005b85811015614c55578383038952615471838351615483565b98850198925090840190600101615459565b6000815180845261549b816020860160208601615b7c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8284823760008382016000815283516154ea818360208801615b7c565b0195945050505050565b60008251615506818460208701615b7c565b9190910192915050565b6000604082016040835280865480835260608501915087600052602092508260002060005b8281101561556757815473ffffffffffffffffffffffffffffffffffffffff1684529284019260019182019101615535565b505050838103828501528481528590820160005b868110156155b45773ffffffffffffffffffffffffffffffffffffffff6155a184614b79565b168252918301919083019060010161557b565b50979650505050505050565b60006080808352868184015260a07f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8811156155fb57600080fd5b8760051b808a838701378085019050818101600081526020838784030181880152818a5180845260c093508385019150828c01945060005b818110156156d1578551805163ffffffff908116855285820151168585015260408082015115159085015260608082015173ffffffffffffffffffffffffffffffffffffffff1690850152888101516bffffffffffffffffffffffff1689850152878101516156b1898601826bffffffffffffffffffffffff169052565b5085015163ffffffff16838601529483019460e090920191600101615633565b505087810360408901526156e5818b61543e565b9550505050505082810360608401526156fe81856153ed565b98975050505050505050565b861515815260c06020820152600061572560c0830188615483565b90506007861061573757615737615cbb565b8560408301528460608301528360808301528260a0830152979650505050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b6020815260006138786020830184615483565b600060208083526000845481600182811c9150808316806157dc57607f831692505b858310811415615813577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b878601838152602001818015615830576001811461585f5761588a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0086168252878201965061588a565b60008b81526020902060005b868110156158845781548482015290850190890161586b565b83019750505b50949998505050505050505050565b60208101600383106158ad576158ad615cbb565b91905290565b6020815263ffffffff82511660208201526020820151604082015260006040830151606080840152614e9e6080840182615483565b60ff8416815260ff8316602082015260606040820152600061590d6060830184615483565b95945050505050565b60405160e0810167ffffffffffffffff8111828210171561593957615939615d48565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561598657615986615d48565b604052919050565b600067ffffffffffffffff8211156159a8576159a8615d48565b5060051b60200190565b600067ffffffffffffffff8211156159cc576159cc615d48565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008219821115615a0b57615a0b615c5d565b500190565b600060ff821660ff84168060ff03821115615a2d57615a2d615c5d565b019392505050565b60006bffffffffffffffffffffffff808316818516808303821115615a5c57615a5c615c5d565b01949350505050565b600082615a7457615a74615c8c565b500490565b60006bffffffffffffffffffffffff80841680615a9857615a98615c8c565b92169190910492915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615adc57615adc615c5d565b500290565b600063ffffffff80831681851681830481118215151615615b0457615b04615c5d565b02949350505050565b60006bffffffffffffffffffffffff80831681851681830481118215151615615b0457615b04615c5d565b600082821015615b4a57615b4a615c5d565b500390565b60006bffffffffffffffffffffffff83811690831681811015615b7457615b74615c5d565b039392505050565b60005b83811015615b97578181015183820152602001615b7f565b83811115615ba6576000848401525b50505050565b600181811c90821680615bc057607f821691505b60208210811415615bfa577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615c3257615c32615c5d565b5060010190565b600063ffffffff80831681811415615c5357615c53615c5d565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b80151581146130dc57600080fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", } var KeeperRegistryLogicABI = KeeperRegistryLogicMetaData.ABI var KeeperRegistryLogicBin = KeeperRegistryLogicMetaData.Bin -func DeployKeeperRegistryLogic(auth *bind.TransactOpts, backend bind.ContractBackend, paymentModel uint8, link common.Address, linkNativeFeed common.Address, fastGasFeed common.Address) (common.Address, *types.Transaction, *KeeperRegistryLogic, error) { +func DeployKeeperRegistryLogic(auth *bind.TransactOpts, backend bind.ContractBackend, mode uint8, link common.Address, linkNativeFeed common.Address, fastGasFeed common.Address) (common.Address, *types.Transaction, *KeeperRegistryLogic, error) { parsed, err := KeeperRegistryLogicMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -47,7 +47,7 @@ func DeployKeeperRegistryLogic(auth *bind.TransactOpts, backend bind.ContractBac return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeeperRegistryLogicBin), backend, paymentModel, link, linkNativeFeed, fastGasFeed) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeeperRegistryLogicBin), backend, mode, link, linkNativeFeed, fastGasFeed) if err != nil { return common.Address{}, nil, nil, err } @@ -236,9 +236,9 @@ func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) GetLinkNativeFeedA return _KeeperRegistryLogic.Contract.GetLinkNativeFeedAddress(&_KeeperRegistryLogic.CallOpts) } -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) GetPaymentModel(opts *bind.CallOpts) (uint8, error) { +func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) GetMode(opts *bind.CallOpts) (uint8, error) { var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "getPaymentModel") + err := _KeeperRegistryLogic.contract.Call(opts, &out, "getMode") if err != nil { return *new(uint8), err @@ -250,12 +250,12 @@ func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) GetPaymentModel(opts *bin } -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) GetPaymentModel() (uint8, error) { - return _KeeperRegistryLogic.Contract.GetPaymentModel(&_KeeperRegistryLogic.CallOpts) +func (_KeeperRegistryLogic *KeeperRegistryLogicSession) GetMode() (uint8, error) { + return _KeeperRegistryLogic.Contract.GetMode(&_KeeperRegistryLogic.CallOpts) } -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) GetPaymentModel() (uint8, error) { - return _KeeperRegistryLogic.Contract.GetPaymentModel(&_KeeperRegistryLogic.CallOpts) +func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) GetMode() (uint8, error) { + return _KeeperRegistryLogic.Contract.GetMode(&_KeeperRegistryLogic.CallOpts) } func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) Owner(opts *bind.CallOpts) (common.Address, error) { @@ -4303,7 +4303,7 @@ type KeeperRegistryLogicInterface interface { GetLinkNativeFeedAddress(opts *bind.CallOpts) (common.Address, error) - GetPaymentModel(opts *bind.CallOpts) (uint8, error) + GetMode(opts *bind.CallOpts) (uint8, error) Owner(opts *bind.CallOpts) (common.Address, error) diff --git a/core/gethwrappers/generated/keeper_registry_wrapper2_0/keeper_registry_wrapper2_0.go b/core/gethwrappers/generated/keeper_registry_wrapper2_0/keeper_registry_wrapper2_0.go index 143f1652fb7..0df7b6b5458 100644 --- a/core/gethwrappers/generated/keeper_registry_wrapper2_0/keeper_registry_wrapper2_0.go +++ b/core/gethwrappers/generated/keeper_registry_wrapper2_0/keeper_registry_wrapper2_0.go @@ -72,8 +72,8 @@ type UpkeepInfo struct { } var KeeperRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractKeeperRegistryBase2_0\",\"name\":\"keeperRegistryLogic\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArrayHasNoEntries\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotCancel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CheckDataExceedsLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ConfigDigestMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateEntry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitOutsideRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfFaultyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnchainConfigNonEmpty\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveTransmitters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByLINKToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrRegistrar\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistryPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StaleReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"TargetCheckReverted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TranscoderNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"CancelledUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"FundsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InsufficientFundsUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"PayeesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ReorgedUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"StaleUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"atBlockHeight\",\"type\":\"uint64\"}],\"name\":\"UpkeepCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"UpkeepCheckDataUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"gasLimit\",\"type\":\"uint96\"}],\"name\":\"UpkeepGasLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"UpkeepMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"UpkeepOffchainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"checkBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasOverhead\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"totalPayment\",\"type\":\"uint96\"}],\"name\":\"UpkeepPerformed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"importedFrom\",\"type\":\"address\"}],\"name\":\"UpkeepReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"UpkeepRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepUnpaused\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumUpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getKeeperRegistryLogicAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPaymentModel\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_0.PaymentModel\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_0.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structState\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structOnchainConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structUpkeepInfo\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistryBase2_0.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"rawReport\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"updateCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x6101206040523480156200001257600080fd5b506040516200615c3803806200615c8339810160408190526200003591620003a7565b806001600160a01b031663f15701416040518163ffffffff1660e01b815260040160206040518083038186803b1580156200006f57600080fd5b505afa15801562000084573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000aa9190620003ce565b816001600160a01b031663ca30e6036040518163ffffffff1660e01b815260040160206040518083038186803b158015620000e457600080fd5b505afa158015620000f9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011f9190620003a7565b826001600160a01b031663b10b673c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200015957600080fd5b505afa1580156200016e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001949190620003a7565b836001600160a01b0316636709d0e56040518163ffffffff1660e01b815260040160206040518083038186803b158015620001ce57600080fd5b505afa158015620001e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002099190620003a7565b3380600081620002605760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b038481169190911790915581161562000293576200029381620002fb565b505050836002811115620002ab57620002ab620003f1565b60e0816002811115620002c257620002c2620003f1565b60f81b9052506001600160601b0319606093841b811660805291831b821660a052821b811660c05292901b909116610100525062000420565b6001600160a01b038116331415620003565760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000257565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620003ba57600080fd5b8151620003c78162000407565b9392505050565b600060208284031215620003e157600080fd5b815160038110620003c757600080fd5b634e487b7160e01b600052602160045260246000fd5b6001600160a01b03811681146200041d57600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160f81c6101005160601c615cbe6200049e6000396000818161054c0152610a820152600081816109b40152818161423101526143e80152600081816105a0015261341d01526000818161082601526135060152600081816108e101526113210152615cbe6000f3fe6080604052600436106103175760003560e01c8063948108f71161019a578063b657bc9c116100e1578063eb5dcd6c1161008a578063f2fde38b11610064578063f2fde38b146109d8578063f7d334ba146109f8578063faa3e99614610a2a57610326565b8063eb5dcd6c1461072d578063ed56b3e114610925578063f1570141146109a557610326565b8063c8048022116100bb578063c80480221461051d578063ca30e603146108d2578063e3d0e7121461090557610326565b8063b657bc9c14610885578063b79550be14610473578063c7c3a19a146108a557610326565b8063aed2e92911610143578063b121e1471161011d578063b121e1471461084a578063b148ab6b1461051d578063b1dc65a41461086557610326565b8063aed2e9291461078a578063afcb95d7146107c1578063b10b673c1461081757610326565b8063a710b22111610174578063a710b2211461072d578063a72aa27e14610748578063aab9edd61461076357610326565b8063948108f7146106f25780639fab4386146106bc578063a4c0ed361461070d57610326565b80636709d0e51161025e5780638456cb59116102075780638da5cb5b116101e15780638da5cb5b146106915780638dcf0fe7146106bc5780638e86139b146106d757610326565b80638456cb591461047357806385c1b0ba146106715780638765ecbe1461051d57610326565b806379ba50971161023857806379ba5097146105f25780637d9b97e01461047357806381ff70481461060757610326565b80636709d0e5146105915780636ded9eae146105c4578063744bfe611461043d57610326565b80633b9cce59116102c057806348013d7b1161029a57806348013d7b146104fb5780635165f2f51461051d578063572e05e11461053d57610326565b80633b9cce59146104585780633f4ba83a14610473578063421d183b1461048857610326565b80631865c57d116102f15780631865c57d146103f7578063187256e81461041d5780631a2af0111461043d57610326565b806306e3b6321461032e5780630e08ae8414610364578063181f5a77146103a157610326565b3661032657610324610a7d565b005b610324610a7d565b34801561033a57600080fd5b5061034e610349366004614f72565b610aa8565b60405161035b9190615321565b60405180910390f35b34801561037057600080fd5b5061038461037f3660046150b4565b610ba2565b6040516bffffffffffffffffffffffff909116815260200161035b565b3480156103ad57600080fd5b506103ea6040518060400160405280601481526020017f4b6565706572526567697374727920322e302e3100000000000000000000000081525081565b60405161035b91906153cf565b34801561040357600080fd5b5061040c610ce5565b60405161035b959493929190615409565b34801561042957600080fd5b50610324610438366004614a56565b6110a8565b34801561044957600080fd5b50610324610438366004614f01565b34801561046457600080fd5b50610324610438366004614b8c565b34801561047f57600080fd5b506103246110b4565b34801561049457600080fd5b506104a86104a3366004614a00565b6110bc565b60408051951515865260ff90941660208601526bffffffffffffffffffffffff9283169385019390935216606083015273ffffffffffffffffffffffffffffffffffffffff16608082015260a00161035b565b34801561050757600080fd5b50610510600081565b60405161035b91906153fc565b34801561052957600080fd5b50610324610538366004614ecf565b6111da565b34801561054957600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161035b565b34801561059d57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061056c565b3480156105d057600080fd5b506105e46105df366004614ae4565b6111e5565b60405190815260200161035b565b3480156105fe57600080fd5b506103246111fa565b34801561061357600080fd5b5061064e601254600e5463ffffffff6c0100000000000000000000000083048116937001000000000000000000000000000000009093041691565b6040805163ffffffff94851681529390921660208401529082015260600161035b565b34801561067d57600080fd5b5061032461068c366004614d52565b6112fc565b34801561069d57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661056c565b3480156106c857600080fd5b5061032461068c366004614f26565b3480156106e357600080fd5b50610324610438366004614da9565b3480156106fe57600080fd5b5061032461043836600461508f565b34801561071957600080fd5b50610324610728366004614a88565b611309565b34801561073957600080fd5b50610324610438366004614a1d565b34801561075457600080fd5b5061032461043836600461506a565b34801561076f57600080fd5b50610778600281565b60405160ff909116815260200161035b565b34801561079657600080fd5b506107aa6107a5366004614f26565b611524565b60408051921515835260208301919091520161035b565b3480156107cd57600080fd5b50600e54600f54604080516000815260208101939093527c010000000000000000000000000000000000000000000000000000000090910463ffffffff169082015260600161035b565b34801561082357600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061056c565b34801561085657600080fd5b50610324610538366004614a00565b34801561087157600080fd5b50610324610880366004614c9b565b61168f565b34801561089157600080fd5b506103846108a0366004614ecf565b612265565b3480156108b157600080fd5b506108c56108c0366004614ecf565b612289565b60405161035b9190615516565b3480156108de57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061056c565b34801561091157600080fd5b50610324610920366004614bce565b6125b4565b34801561093157600080fd5b5061098c610940366004614a00565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602090815260409182902082518084019093525460ff8082161515808552610100909204169290910182905291565b60408051921515835260ff90911660208301520161035b565b3480156109b157600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610510565b3480156109e457600080fd5b506103246109f3366004614a00565b613385565b348015610a0457600080fd5b50610a18610a13366004614ecf565b613396565b60405161035b96959493929190615365565b348015610a3657600080fd5b50610a70610a45366004614a00565b73ffffffffffffffffffffffffffffffffffffffff1660009081526016602052604090205460ff1690565b60405161035b91906153e2565b610aa67f00000000000000000000000000000000000000000000000000000000000000006133b9565b565b60606000610ab660026133dd565b9050808410610af1576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82610b0357610b008482615a23565b92505b60008367ffffffffffffffff811115610b1e57610b1e615bdc565b604051908082528060200260200182016040528015610b47578160200160208202803683370190505b50905060005b84811015610b9957610b6a610b6282886158a4565b6002906133e7565b828281518110610b7c57610b7c615bad565b602090810291909101015280610b9181615ae7565b915050610b4d565b50949350505050565b6040805161012081018252600f5460ff808216835263ffffffff6101008084048216602086015265010000000000840482169585019590955262ffffff6901000000000000000000840416606085015261ffff6c0100000000000000000000000084041660808501526e01000000000000000000000000000083048216151560a08501526f010000000000000000000000000000008304909116151560c08401526bffffffffffffffffffffffff70010000000000000000000000000000000083041660e08401527c010000000000000000000000000000000000000000000000000000000090910416918101919091526000908180610ca1836133fa565b6012549193509150610cdc90849087907801000000000000000000000000000000000000000000000000900463ffffffff16858560006135f6565b95945050505050565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810191909152604080516101a081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081018290526101608101829052610180810191909152604080516101408101825260125468010000000000000000900463ffffffff1681526011546bffffffffffffffffffffffff908116602083015260155492820192909252600f54700100000000000000000000000000000000900490911660608083019190915290819060009060808101610e1a60026133dd565b815260125463ffffffff6c01000000000000000000000000808304821660208086019190915270010000000000000000000000000000000084048316604080870191909152600e54606080880191909152600f547c0100000000000000000000000000000000000000000000000000000000810486166080808a019190915260ff6e01000000000000000000000000000083048116151560a09a8b015284516101a0810186526101008085048a1682526501000000000085048a1682890152898b168288015262ffffff69010000000000000000008604169582019590955261ffff88850416928101929092526010546bffffffffffffffffffffffff81169a83019a909a526401000000008904881660c0830152740100000000000000000000000000000000000000008904881660e083015278010000000000000000000000000000000000000000000000009098049096169186019190915260135461012086015260145461014086015273ffffffffffffffffffffffffffffffffffffffff96849004871661016086015260115493909304909516610180840152600a8054865181840281018401909752808752969b509299508a958a959394600b949316929185919083018282801561102757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610ffc575b505050505092508180548060200260200160405190810160405280929190818152602001828054801561109057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611065575b50505050509150945094509450945094509091929394565b6110b0610a7d565b5050565b610aa6610a7d565b73ffffffffffffffffffffffffffffffffffffffff811660009081526008602090815260408083208151608081018352905460ff80821615158352610100820416938201939093526bffffffffffffffffffffffff6201000084048116928201929092526e010000000000000000000000000000909204811660608301819052600f54849384938493849384926111689291700100000000000000000000000000000000900416615a3a565b600b5490915060009061117b908361593b565b9050826000015183602001518285604001516111979190615900565b6060959095015173ffffffffffffffffffffffffffffffffffffffff9b8c166000908152600c6020526040902054929c919b959a50985093169550919350505050565b6111e2610a7d565b50565b60006111ef610a7d565b979650505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611280576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611304610a7d565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611378576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081146113b2576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006113c082840184614ecf565b600081815260046020526040902054909150640100000000900463ffffffff90811614611419576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600460205260409020600101546114549085906c0100000000000000000000000090046bffffffffffffffffffffffff16615900565b600082815260046020526040902060010180546bffffffffffffffffffffffff929092166c01000000000000000000000000027fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff9092169190911790556015546114bf9085906158a4565b6015556040516bffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169082907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a35050505050565b60008061152f613641565b600f546e010000000000000000000000000000900460ff161561157e576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260046020908152604091829020825160e081018452815463ffffffff8082168352640100000000820481168386015268010000000000000000820460ff16151583870152690100000000000000000090910473ffffffffffffffffffffffffffffffffffffffff1660608301526001909201546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201528251601f87018390048302810183019093528583529161168291839190889088908190840183828082843760009201919091525061367992505050565b9250925050935093915050565b60005a6040805161012081018252600f5460ff808216835261010080830463ffffffff90811660208601526501000000000084048116958501959095526901000000000000000000830462ffffff1660608501526c01000000000000000000000000830461ffff1660808501526e0100000000000000000000000000008304821615801560a08601526f010000000000000000000000000000008404909216151560c085015270010000000000000000000000000000000083046bffffffffffffffffffffffff1660e08501527c0100000000000000000000000000000000000000000000000000000000909204909316908201529192506117bd576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526008602052604090205460ff16611806576040517f1099ed7500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006118478a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506137df92505050565b9050600081604001515167ffffffffffffffff81111561186957611869615bdc565b60405190808252806020026020018201604052801561191d57816020015b604080516101a081018252600060c0820181815260e083018290526101008301829052610120830182905261014083018290526101608301829052610180830182905282526020808301829052928201819052606082018190526080820181905260a082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816118875790505b5090506000805b836040015151811015611bc957600460008560400151838151811061194b5761194b615bad565b6020908102919091018101518252818101929092526040908101600020815160e081018352815463ffffffff8082168352640100000000820481169583019590955268010000000000000000810460ff16151593820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060830152600101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201528351849083908110611a3557611a35615bad565b602002602001015160000181905250611a9e85848381518110611a5a57611a5a615bad565b6020026020010151600001516000015186606001518481518110611a8057611a80615bad565b602002602001015160400151518760000151886020015160016135f6565b838281518110611ab057611ab0615bad565b6020026020010151604001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff1681525050611b5e84604001518281518110611af757611af7615bad565b602002602001015185606001518381518110611b1557611b15615bad565b6020026020010151858481518110611b2f57611b2f615bad565b602002602001015160000151868581518110611b4d57611b4d615bad565b60200260200101516040015161388b565b838281518110611b7057611b70615bad565b60200260200101516020019015159081151581525050828181518110611b9857611b98615bad565b60200260200101516020015115611bb757611bb460018361587e565b91505b80611bc181615ae7565b915050611924565b5061ffff8116611c05576040517ff803a2ca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e548d3514611c41576040517fdfdcf8e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8351611c4e9060016158db565b60ff1689141580611c5f5750888714155b15611c96576040517f0244f71a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ca68d8d8d8d8d8d8d8d6139cd565b60005b836040015151811015611e8257828181518110611cc857611cc8615bad565b60200260200101516020015115611e70574363ffffffff166004600086604001518481518110611cfa57611cfa615bad565b6020026020010151815260200190815260200160002060010160189054906101000a900463ffffffff1663ffffffff161415611d62576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611daa838281518110611d7757611d77615bad565b60200260200101516000015185606001518381518110611d9957611d99615bad565b602002602001015160400151613679565b848381518110611dbc57611dbc615bad565b6020026020010151606001858481518110611dd957611dd9615bad565b60200260200101516080018281525082151515158152505050828181518110611e0457611e04615bad565b60200260200101516080015186611e1b9190615a23565b9550436004600086604001518481518110611e3857611e38615bad565b6020026020010151815260200190815260200160002060010160186101000a81548163ffffffff021916908363ffffffff1602179055505b80611e7a81615ae7565b915050611ca9565b508351611e909060016158db565b611e9f9060ff1661044c615966565b616914611ead8d6010615966565b5a611eb89089615a23565b611ec291906158a4565b611ecc91906158a4565b611ed691906158a4565b94506116a8611ee961ffff831687615927565b611ef391906158a4565b945060008060008060005b8760400151518110156120fe57868181518110611f1d57611f1d615bad565b602002602001015160200151156120ec57611f5f8a89606001518381518110611f4857611f48615bad565b602002602001015160400151518b60000151613c36565b878281518110611f7157611f71615bad565b602002602001015160a0018181525050611fcd8989604001518381518110611f9b57611f9b615bad565b6020026020010151898481518110611fb557611fb5615bad565b60200260200101518b600001518c602001518b613c54565b9093509150611fdc8285615900565b9350611fe88386615900565b9450868181518110611ffc57611ffc615bad565b60200260200101516060015115158860400151828151811061202057612020615bad565b60200260200101517f29233ba1d7b302b8fe230ad0b81423aba5371b2a6f6b821228212385ee6a44208a60600151848151811061205f5761205f615bad565b6020026020010151600001518a858151811061207d5761207d615bad565b6020026020010151608001518b868151811061209b5761209b615bad565b602002602001015160a0015187896120b39190615900565b6040805163ffffffff90951685526020850193909352918301526bffffffffffffffffffffffff16606082015260800160405180910390a35b806120f681615ae7565b915050611efe565b505033600090815260086020526040902080548492506002906121369084906201000090046bffffffffffffffffffffffff16615900565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080600f60000160108282829054906101000a90046bffffffffffffffffffffffff166121909190615900565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060008f6001600381106121d3576121d3615bad565b602002013560001c9050600060088264ffffffffff16901c905087610100015163ffffffff168163ffffffff16111561225257600f80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff8416021790555b5050505050505050505050505050505050565b6000818152600460205260408120546122839063ffffffff16610ba2565b92915050565b604080516101408101825260008082526020820181905260609282018390528282018190526080820181905260a0820181905260c0820181905260e082018190526101008201526101208101919091526000828152600460209081526040808320815160e081018352815463ffffffff8082168352640100000000820481168387015268010000000000000000820460ff16151583860152690100000000000000000090910473ffffffffffffffffffffffffffffffffffffffff908116606084019081526001909401546bffffffffffffffffffffffff80821660808601526c0100000000000000000000000082041660a085015278010000000000000000000000000000000000000000000000009004821660c08401528451610140810186529351168352815116828501528685526007909352928190208054929392918301916123d590615a93565b80601f016020809104026020016040519081016040528092919081815260200182805461240190615a93565b801561244e5780601f106124235761010080835404028352916020019161244e565b820191906000526020600020905b81548152906001019060200180831161243157829003601f168201915b505050505081526020018260a001516bffffffffffffffffffffffff1681526020016005600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001826020015163ffffffff1667ffffffffffffffff1681526020018260c0015163ffffffff16815260200182608001516bffffffffffffffffffffffff16815260200182604001511515815260200160176000868152602001908152602001600020805461252b90615a93565b80601f016020809104026020016040519081016040528092919081815260200182805461255790615a93565b80156125a45780601f10612579576101008083540402835291602001916125a4565b820191906000526020600020905b81548152906001019060200180831161258757829003601f168201915b5050505050815250915050919050565b6125bc613d47565b601f865111156125f8576040517f25d0209c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff8416612632576040517fe77dba5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8451865114158061265157506126498460036159cf565b60ff16865111155b15612688576040517f1d2d1c5800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f54600b547001000000000000000000000000000000009091046bffffffffffffffffffffffff169060005b816bffffffffffffffffffffffff1681101561271d5761270a600b82815481106126e1576126e1615bad565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff168484613dc8565b508061271581615ae7565b9150506126b5565b5060008060005b836bffffffffffffffffffffffff1681101561282657600a818154811061274d5761274d615bad565b600091825260209091200154600b805473ffffffffffffffffffffffffffffffffffffffff9092169450908290811061278857612788615bad565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff868116845260098352604080852080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690559116808452600890925290912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905591508061281e81615ae7565b915050612724565b50612833600a6000614627565b61283f600b6000614627565b604080516080810182526000808252602082018190529181018290526060810182905290805b8c51811015612bc357600960008e838151811061288457612884615bad565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff16156128ef576040517f77cea0fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052806001151581526020018260ff16815250600960008f848151811061292057612920615bad565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528181019290925260400160002082518154939092015160ff16610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909316929092171790558b518c90829081106129c8576129c8615bad565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff81166000908152600883526040908190208151608081018352905460ff80821615801584526101008304909116958301959095526bffffffffffffffffffffffff6201000082048116938301939093526e0100000000000000000000000000009004909116606082015294509250612a8d576040517f6a7281ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001835260ff80821660208086019182526bffffffffffffffffffffffff808b166060880190815273ffffffffffffffffffffffffffffffffffffffff871660009081526008909352604092839020885181549551948a0151925184166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff939094166201000002929092167fffffffffffff000000000000000000000000000000000000000000000000ffff94909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169490941717919091169290921791909117905580612bbb81615ae7565b915050612865565b50508a51612bd99150600a9060208d0190614645565b508851612bed90600b9060208c0190614645565b50600087806020019051810190612c049190614ddf565b60125460c082015191925063ffffffff640100000000909104811691161015612c59576040517f39abc10400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125460e082015163ffffffff74010000000000000000000000000000000000000000909204821691161015612cbb576040517f1fa9bdcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125461010082015163ffffffff7801000000000000000000000000000000000000000000000000909204821691161015612d22576040517fd1d5faa800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518061012001604052808a60ff168152602001826000015163ffffffff168152602001826020015163ffffffff168152602001826060015162ffffff168152602001826080015161ffff168152602001600015158152602001600015158152602001866bffffffffffffffffffffffff168152602001600063ffffffff16815250600f60008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160056101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160096101000a81548162ffffff021916908362ffffff160217905550608082015181600001600c6101000a81548161ffff021916908361ffff16021790555060a082015181600001600e6101000a81548160ff02191690831515021790555060c082015181600001600f6101000a81548160ff02191690831515021790555060e08201518160000160106101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061010082015181600001601c6101000a81548163ffffffff021916908363ffffffff1602179055509050506040518061016001604052808260a001516bffffffffffffffffffffffff16815260200182610160015173ffffffffffffffffffffffffffffffffffffffff168152602001601060010160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200182610180015173ffffffffffffffffffffffffffffffffffffffff168152602001826040015163ffffffff1681526020018260c0015163ffffffff168152602001601060020160089054906101000a900463ffffffff1663ffffffff1681526020016010600201600c9054906101000a900463ffffffff1663ffffffff168152602001601060020160109054906101000a900463ffffffff1663ffffffff1681526020018260e0015163ffffffff16815260200182610100015163ffffffff16815250601060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550606082015181600101600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160020160006101000a81548163ffffffff021916908363ffffffff16021790555060a08201518160020160046101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160020160086101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600201600c6101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160020160106101000a81548163ffffffff021916908363ffffffff1602179055506101208201518160020160146101000a81548163ffffffff021916908363ffffffff1602179055506101408201518160020160186101000a81548163ffffffff021916908363ffffffff1602179055509050508061012001516013819055508061014001516014819055506000601060020160109054906101000a900463ffffffff16905043601060020160106101000a81548163ffffffff021916908363ffffffff16021790555060016010600201600c8282829054906101000a900463ffffffff166132c991906158bc565b92506101000a81548163ffffffff021916908363ffffffff16021790555061331346306010600201600c9054906101000a900463ffffffff1663ffffffff168f8f8f8f8f8f613fef565b600e819055507f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0581600e546010600201600c9054906101000a900463ffffffff168f8f8f8f8f8f60405161336f999897969594939291906156f2565b60405180910390a1505050505050505050505050565b61338d613d47565b6111e281614099565b600060606000806000806133a8613641565b6133b0610a7d565b91939550919395565b3660008037600080366000845af43d6000803e8080156133d8573d6000f35b3d6000fd5b6000612283825490565b60006133f3838361418f565b9392505050565b6000806000836060015162ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561348157600080fd5b505afa158015613495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134b991906150d1565b50945090925050506000811315806134d057508142105b806134f157508280156134f157506134e88242615a23565b8463ffffffff16105b15613500576013549550613504565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561356a57600080fd5b505afa15801561357e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135a291906150d1565b50945090925050506000811315806135b957508142105b806135da57508280156135da57506135d18242615a23565b8463ffffffff16105b156135e95760145494506135ed565b8094505b50505050915091565b6000806136078689600001516141b9565b90506000806136228a8a63ffffffff16858a8a60018b6141fc565b90925090506136318183615900565b93505050505b9695505050505050565b3215610aa6576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f5460009081906f01000000000000000000000000000000900460ff16156136ce576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f80547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff166f010000000000000000000000000000001790555a90506000634585e33b60e01b8460405160240161372691906153cf565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905061379e856000015163ffffffff168660600151836145db565b92505a6137ab9083615a23565b915050600f80547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff16905590939092509050565b61380a6040518060800160405280600081526020016000815260200160608152602001606081525090565b600080600080858060200190518101906138249190614f94565b93509350935093508051825114613867576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051608081018252948552602085019390935291830152606082015292915050565b60008260c0015163ffffffff16846000015163ffffffff1610156138dc5760405185907f5aa44821f7938098502bff537fbbdc9aaaa2fa655c10740646fce27e54987a8990600090a25060006139c5565b6020840151845163ffffffff1640146139225760405185907f561ff77e59394941a01a456497a9418dea82e2a39abb3ecebfb1cef7e0bfdc1390600090a25060006139c5565b43836020015163ffffffff16116139665760405185907fd84831b6a3a7fbd333f42fe7f9104a139da6cca4cc1507aef4ddad79b31d017f90600090a25060006139c5565b816bffffffffffffffffffffffff168360a001516bffffffffffffffffffffffff1610156139c15760405185907f7895fdfe292beab0842d5beccd078e85296b9e17a30eaee4c261a2696b84eb9690600090a25060006139c5565b5060015b949350505050565b600087876040516139df9291906152ea565b6040519081900381206139f6918b906020016153b5565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201208383019092526000808452908301819052909250906000805b88811015613bcd57600185878360208110613a6257613a62615bad565b613a6f91901a601b6158db565b8c8c85818110613a8157613a81615bad565b905060200201358b8b86818110613a9a57613a9a615bad565b9050602002013560405160008152602001604052604051613ad7949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015613af9573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526009602090815290849020838501909452925460ff8082161515808552610100909204169383019390935290955093509050613ba7576040517f0f4c073700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826020015160080260ff166001901b840193508080613bc590615ae7565b915050613a45565b50827e01010101010101010101010101010101010101010101010101010101010101841614613c28576040517fc103be2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050565b6000613c4283836141b9565b9050808410156133f357509192915050565b600080613c6f8887608001518860a0015188888860016141fc565b90925090506000613c808284615900565b600089815260046020526040902060010180549192508291600c90613cc49084906c0100000000000000000000000090046bffffffffffffffffffffffff16615a3a565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008a815260046020526040812060010180548594509092613d0d91859116615900565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555050965096945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610aa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401611277565b73ffffffffffffffffffffffffffffffffffffffff831660009081526008602090815260408083208151608081018352905460ff80821615158352610100820416938201939093526bffffffffffffffffffffffff6201000084048116928201929092526e01000000000000000000000000000090920416606082018190528290613e539086615a3a565b90506000613e61858361593b565b90508083604001818151613e759190615900565b6bffffffffffffffffffffffff9081169091528716606085015250613e9a85826159f8565b613ea49083615a3a565b60118054600090613ec49084906bffffffffffffffffffffffff16615900565b825461010092830a6bffffffffffffffffffffffff81810219909216928216029190911790925573ffffffffffffffffffffffffffffffffffffffff999099166000908152600860209081526040918290208751815492890151938901516060909901517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009093169015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff161760ff909316909b02919091177fffffffffffff000000000000000000000000000000000000000000000000ffff1662010000878416027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff16176e010000000000000000000000000000919092160217909755509095945050505050565b6000808a8a8a8a8a8a8a8a8a6040516020016140139998979695949392919061564d565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179b9a5050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116331415614119576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401611277565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008260000182815481106141a6576141a6615bad565b9060005260206000200154905092915050565b60006141cc63ffffffff84166014615966565b6141d78360016158db565b6141e69060ff16611d4c615966565b6141f29061fde86158a4565b6133f391906158a4565b6000806000896080015161ffff16876142159190615966565b90508380156142235750803a105b1561422b57503a5b600060027f0000000000000000000000000000000000000000000000000000000000000000600281111561426157614261615b7e565b14156143e45760408051600081526020810190915285156142c057600036604051806080016040528060488152602001615c6a604891396040516020016142aa939291906152fa565b604051602081830303815290604052905061433c565b6012546142f0907801000000000000000000000000000000000000000000000000900463ffffffff1660046159a3565b63ffffffff1667ffffffffffffffff81111561430e5761430e615bdc565b6040519080825280601f01601f191660200182016040528015614338576020820181803683370190505b5090505b6040517f49948e0e00000000000000000000000000000000000000000000000000000000815273420000000000000000000000000000000000000f906349948e0e9061438c9084906004016153cf565b60206040518083038186803b1580156143a457600080fd5b505afa1580156143b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143dc9190614ee8565b9150506144a0565b60017f0000000000000000000000000000000000000000000000000000000000000000600281111561441857614418615b7e565b14156144a057606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561446557600080fd5b505afa158015614479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061449d9190614ee8565b90505b846144bc57808b6080015161ffff166144b99190615966565b90505b6144ca61ffff871682615927565b9050600087826144da8c8e6158a4565b6144e49086615966565b6144ee91906158a4565b61450090670de0b6b3a7640000615966565b61450a9190615927565b905060008c6040015163ffffffff1664e8d4a510006145299190615966565b898e6020015163ffffffff16858f886145429190615966565b61454c91906158a4565b61455a90633b9aca00615966565b6145649190615966565b61456e9190615927565b61457891906158a4565b90506b033b2e3c9fd0803ce800000061459182846158a4565b11156145c9576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909c909b509950505050505050505050565b60005a6113888110156145ed57600080fd5b61138881039050846040820482031161460557600080fd5b50823b61461157600080fd5b60008083516020850160008789f1949350505050565b50805460008255906000526020600020908101906111e291906146cf565b8280548282559060005260206000209081019282156146bf579160200282015b828111156146bf57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190614665565b506146cb9291506146cf565b5090565b5b808211156146cb57600081556001016146d0565b80516146ef81615c1b565b919050565b60008083601f84011261470657600080fd5b50813567ffffffffffffffff81111561471e57600080fd5b6020830191508360208260051b850101111561473957600080fd5b9250929050565b600082601f83011261475157600080fd5b8135602061476661476183615814565b6157c5565b80838252828201915082860187848660051b890101111561478657600080fd5b60005b858110156147ae57813561479c81615c1b565b84529284019290840190600101614789565b5090979650505050505050565b600082601f8301126147cc57600080fd5b815160206147dc61476183615814565b80838252828201915082860187848660051b89010111156147fc57600080fd5b60005b858110156147ae57815167ffffffffffffffff8082111561481f57600080fd5b818a0191506060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848e0301121561485757600080fd5b61485f615778565b8884015161486c81615c3d565b81526040848101518a83015291840151918383111561488a57600080fd5b82850194508d603f86011261489e57600080fd5b8985015193506148b061476185615838565b92508383528d818587010111156148c657600080fd5b6148d5848b8501838801615a67565b8101919091528652505092840192908401906001016147ff565b60008083601f84011261490157600080fd5b50813567ffffffffffffffff81111561491957600080fd5b60208301915083602082850101111561473957600080fd5b600082601f83011261494257600080fd5b813561495061476182615838565b81815284602083860101111561496557600080fd5b816020850160208301376000918101602001919091529392505050565b805161ffff811681146146ef57600080fd5b805162ffffff811681146146ef57600080fd5b80516146ef81615c3d565b803567ffffffffffffffff811681146146ef57600080fd5b803560ff811681146146ef57600080fd5b805169ffffffffffffffffffff811681146146ef57600080fd5b80516146ef81615c4f565b600060208284031215614a1257600080fd5b81356133f381615c1b565b60008060408385031215614a3057600080fd5b8235614a3b81615c1b565b91506020830135614a4b81615c1b565b809150509250929050565b60008060408385031215614a6957600080fd5b8235614a7481615c1b565b9150602083013560048110614a4b57600080fd5b60008060008060608587031215614a9e57600080fd5b8435614aa981615c1b565b935060208501359250604085013567ffffffffffffffff811115614acc57600080fd5b614ad8878288016148ef565b95989497509550505050565b600080600080600080600060a0888a031215614aff57600080fd5b8735614b0a81615c1b565b96506020880135614b1a81615c3d565b95506040880135614b2a81615c1b565b9450606088013567ffffffffffffffff80821115614b4757600080fd5b614b538b838c016148ef565b909650945060808a0135915080821115614b6c57600080fd5b50614b798a828b016148ef565b989b979a50959850939692959293505050565b60008060208385031215614b9f57600080fd5b823567ffffffffffffffff811115614bb657600080fd5b614bc2858286016146f4565b90969095509350505050565b60008060008060008060c08789031215614be757600080fd5b863567ffffffffffffffff80821115614bff57600080fd5b614c0b8a838b01614740565b97506020890135915080821115614c2157600080fd5b614c2d8a838b01614740565b9650614c3b60408a016149ca565b95506060890135915080821115614c5157600080fd5b614c5d8a838b01614931565b9450614c6b60808a016149b2565b935060a0890135915080821115614c8157600080fd5b50614c8e89828a01614931565b9150509295509295509295565b60008060008060008060008060e0898b031215614cb757600080fd5b606089018a811115614cc857600080fd5b8998503567ffffffffffffffff80821115614ce257600080fd5b614cee8c838d016148ef565b909950975060808b0135915080821115614d0757600080fd5b614d138c838d016146f4565b909750955060a08b0135915080821115614d2c57600080fd5b50614d398b828c016146f4565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215614d6757600080fd5b833567ffffffffffffffff811115614d7e57600080fd5b614d8a868287016146f4565b9094509250506020840135614d9e81615c1b565b809150509250925092565b60008060208385031215614dbc57600080fd5b823567ffffffffffffffff811115614dd357600080fd5b614bc2858286016148ef565b60006101a08284031215614df257600080fd5b614dfa6157a1565b614e03836149a7565b8152614e11602084016149a7565b6020820152614e22604084016149a7565b6040820152614e3360608401614994565b6060820152614e4460808401614982565b6080820152614e5560a084016149f5565b60a0820152614e6660c084016149a7565b60c0820152614e7760e084016149a7565b60e0820152610100614e8a8185016149a7565b9082015261012083810151908201526101408084015190820152610160614eb28185016146e4565b90820152610180614ec48482016146e4565b908201529392505050565b600060208284031215614ee157600080fd5b5035919050565b600060208284031215614efa57600080fd5b5051919050565b60008060408385031215614f1457600080fd5b823591506020830135614a4b81615c1b565b600080600060408486031215614f3b57600080fd5b83359250602084013567ffffffffffffffff811115614f5957600080fd5b614f65868287016148ef565b9497909650939450505050565b60008060408385031215614f8557600080fd5b50508035926020909101359150565b60008060008060808587031215614faa57600080fd5b845193506020808601519350604086015167ffffffffffffffff80821115614fd157600080fd5b818801915088601f830112614fe557600080fd5b8151614ff361476182615814565b8082825285820191508585018c878560051b880101111561501357600080fd5b600095505b83861015615036578051835260019590950194918601918601615018565b5060608b0151909750945050508083111561505057600080fd5b505061505e878288016147bb565b91505092959194509250565b6000806040838503121561507d57600080fd5b823591506020830135614a4b81615c3d565b600080604083850312156150a257600080fd5b823591506020830135614a4b81615c4f565b6000602082840312156150c657600080fd5b81356133f381615c3d565b600080600080600060a086880312156150e957600080fd5b6150f2866149db565b9450602086015193506040860151925060608601519150615115608087016149db565b90509295509295909350565b600081518084526020808501945080840160005b8381101561516757815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101615135565b509495945050505050565b6000815180845261518a816020860160208601615a67565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b805163ffffffff16825260208101516151dd602084018263ffffffff169052565b5060408101516151f5604084018263ffffffff169052565b50606081015161520c606084018262ffffff169052565b506080810151615222608084018261ffff169052565b5060a081015161524260a08401826bffffffffffffffffffffffff169052565b5060c081015161525a60c084018263ffffffff169052565b5060e081015161527260e084018263ffffffff169052565b506101008181015163ffffffff8116848301525050610120818101519083015261014080820151908301526101608082015173ffffffffffffffffffffffffffffffffffffffff81168285015250506101808181015173ffffffffffffffffffffffffffffffffffffffff8116848301525b50505050565b8183823760009101908152919050565b828482376000838201600081528351615317818360208801615a67565b0195945050505050565b6020808252825182820181905260009190848201906040850190845b818110156153595783518352928401929184019160010161533d565b50909695505050505050565b861515815260c06020820152600061538060c0830188615172565b90506007861061539257615392615b7e565b8560408301528460608301528360808301528260a0830152979650505050505050565b828152608081016060836020840137600081529392505050565b6020815260006133f36020830184615172565b60208101600483106153f6576153f6615b7e565b91905290565b602081016153f683615c0b565b855163ffffffff1681526000610340602088015161543760208501826bffffffffffffffffffffffff169052565b5060408801516040840152606088015161546160608501826bffffffffffffffffffffffff169052565b506080880151608084015260a088015161548360a085018263ffffffff169052565b5060c088015161549b60c085018263ffffffff169052565b5060e088015160e0840152610100808901516154be8286018263ffffffff169052565b5050610120888101511515908401526154db6101408401886151bc565b806102e08401526154ee81840187615121565b90508281036103008401526155038186615121565b91505061363761032083018460ff169052565b6020815261553d60208201835173ffffffffffffffffffffffffffffffffffffffff169052565b60006020830151615556604084018263ffffffff169052565b506040830151610140806060850152615573610160850183615172565b9150606085015161559460808601826bffffffffffffffffffffffff169052565b50608085015173ffffffffffffffffffffffffffffffffffffffff811660a08601525060a085015167ffffffffffffffff811660c08601525060c085015163ffffffff811660e08601525060e0850151610100615600818701836bffffffffffffffffffffffff169052565b86015190506101206156158682018315159052565b8601518584037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018387015290506136378382615172565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526156948285018b615121565b915083820360808501526156a8828a615121565b915060ff881660a085015283820360c08501526156c58288615172565b90861660e085015283810361010085015290506156e28185615172565b9c9b505050505050505050505050565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526157228184018a615121565b905082810360808401526157368189615121565b905060ff871660a084015282810360c08401526157538187615172565b905067ffffffffffffffff851660e08401528281036101008401526156e28185615172565b6040516060810167ffffffffffffffff8111828210171561579b5761579b615bdc565b60405290565b6040516101a0810167ffffffffffffffff8111828210171561579b5761579b615bdc565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561580c5761580c615bdc565b604052919050565b600067ffffffffffffffff82111561582e5761582e615bdc565b5060051b60200190565b600067ffffffffffffffff82111561585257615852615bdc565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600061ffff80831681851680830382111561589b5761589b615b20565b01949350505050565b600082198211156158b7576158b7615b20565b500190565b600063ffffffff80831681851680830382111561589b5761589b615b20565b600060ff821660ff84168060ff038211156158f8576158f8615b20565b019392505050565b60006bffffffffffffffffffffffff80831681851680830382111561589b5761589b615b20565b60008261593657615936615b4f565b500490565b60006bffffffffffffffffffffffff8084168061595a5761595a615b4f565b92169190910492915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561599e5761599e615b20565b500290565b600063ffffffff808316818516818304811182151516156159c6576159c6615b20565b02949350505050565b600060ff821660ff84168160ff04811182151516156159f0576159f0615b20565b029392505050565b60006bffffffffffffffffffffffff808316818516818304811182151516156159c6576159c6615b20565b600082821015615a3557615a35615b20565b500390565b60006bffffffffffffffffffffffff83811690831681811015615a5f57615a5f615b20565b039392505050565b60005b83811015615a82578181015183820152602001615a6a565b838111156152e45750506000910152565b600181811c90821680615aa757607f821691505b60208210811415615ae1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615b1957615b19615b20565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600381106111e2576111e2615b7e565b73ffffffffffffffffffffffffffffffffffffffff811681146111e257600080fd5b63ffffffff811681146111e257600080fd5b6bffffffffffffffffffffffff811681146111e257600080fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", + ABI: "[{\"inputs\":[{\"internalType\":\"contractKeeperRegistryBase2_0\",\"name\":\"keeperRegistryLogic\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArrayHasNoEntries\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotCancel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CheckDataExceedsLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ConfigDigestMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateEntry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitOutsideRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfFaultyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCheckDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxPerformDataSizeCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnchainConfigNonEmpty\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveTransmitters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByLINKToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrRegistrar\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistryPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedTransmitter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"TargetCheckReverted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TranscoderNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"CancelledUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"FundsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"InsufficientFundsUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"PayeesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"ReorgedUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"StaleUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"atBlockHeight\",\"type\":\"uint64\"}],\"name\":\"UpkeepCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"UpkeepCheckDataUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"gasLimit\",\"type\":\"uint96\"}],\"name\":\"UpkeepGasLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"UpkeepMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"UpkeepOffchainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"checkBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasOverhead\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"totalPayment\",\"type\":\"uint96\"}],\"name\":\"UpkeepPerformed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"importedFrom\",\"type\":\"address\"}],\"name\":\"UpkeepReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"UpkeepRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepUnpaused\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"enumUpkeepFailureReason\",\"name\":\"upkeepFailureReason\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fastGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkNative\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFastGasFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getKeeperRegistryLogicAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkNativeFeedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMode\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_0.Mode\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase2_0.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getSignerInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"totalPremium\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"latestConfigBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"latestConfigDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"latestEpoch\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"internalType\":\"structState\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structOnchainConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getTransmitterInfo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"lastCollected\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"lastPerformBlockNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"internalType\":\"structUpkeepInfo\",\"name\":\"upkeepInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistryBase2_0.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"}],\"name\":\"setUpkeepOffchainConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"simulatePerformUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"rawReport\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"updateCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepVersion\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x6101206040523480156200001257600080fd5b50604051620063c0380380620063c08339810160408190526200003591620003a7565b806001600160a01b0316634b4fd03b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200006f57600080fd5b505afa15801562000084573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000aa9190620003ce565b816001600160a01b031663ca30e6036040518163ffffffff1660e01b815260040160206040518083038186803b158015620000e457600080fd5b505afa158015620000f9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011f9190620003a7565b826001600160a01b031663b10b673c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200015957600080fd5b505afa1580156200016e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001949190620003a7565b836001600160a01b0316636709d0e56040518163ffffffff1660e01b815260040160206040518083038186803b158015620001ce57600080fd5b505afa158015620001e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002099190620003a7565b3380600081620002605760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b038481169190911790915581161562000293576200029381620002fb565b505050836002811115620002ab57620002ab620003f1565b60e0816002811115620002c257620002c2620003f1565b60f81b9052506001600160601b0319606093841b811660805291831b821660a052821b811660c05292901b909116610100525062000420565b6001600160a01b038116331415620003565760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000257565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620003ba57600080fd5b8151620003c78162000407565b9392505050565b600060208284031215620003e157600080fd5b815160038110620003c757600080fd5b634e487b7160e01b600052602160045260246000fd5b6001600160a01b03811681146200041d57600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160f81c6101005160601c615f14620004ac6000396000818161057f0152610a8201526000818161052c01528181613c5801528181614313015281816144ca015261470f0152600081816105d3015261342a015260008181610859015261351301526000818161091401526113210152615f146000f3fe6080604052600436106103175760003560e01c80638e86139b1161019a578063b1dc65a4116100e1578063e3d0e7121161008a578063f2fde38b11610064578063f2fde38b146109d8578063f7d334ba146109f8578063faa3e99614610a2a57610326565b8063e3d0e71214610938578063eb5dcd6c14610760578063ed56b3e11461095857610326565b8063c7c3a19a116100bb578063c7c3a19a146108d8578063c804802214610550578063ca30e6031461090557610326565b8063b1dc65a414610898578063b657bc9c146108b8578063b79550be1461047357610326565b8063aab9edd611610143578063b10b673c1161011d578063b10b673c1461084a578063b121e1471461087d578063b148ab6b1461055057610326565b8063aab9edd614610796578063aed2e929146107bd578063afcb95d7146107f457610326565b8063a4c0ed3611610174578063a4c0ed3614610740578063a710b22114610760578063a72aa27e1461077b57610326565b80638e86139b1461070a578063948108f7146107255780639fab4386146106ef57610326565b8063572e05e11161025e57806381ff7048116102075780638765ecbe116101e15780638765ecbe146105505780638da5cb5b146106c45780638dcf0fe7146106ef57610326565b806381ff70481461063a5780638456cb591461047357806385c1b0ba146106a457610326565b8063744bfe6111610238578063744bfe611461043d57806379ba5097146106255780637d9b97e01461047357610326565b8063572e05e1146105705780636709d0e5146105c45780636ded9eae146105f757610326565b80633b9cce59116102c057806348013d7b1161029a57806348013d7b146104fb5780634b4fd03b1461051d5780635165f2f51461055057610326565b80633b9cce59146104585780633f4ba83a14610473578063421d183b1461048857610326565b80631865c57d116102f15780631865c57d146103f7578063187256e81461041d5780631a2af0111461043d57610326565b806306e3b6321461032e5780630e08ae8414610364578063181f5a77146103a157610326565b3661032657610324610a7d565b005b610324610a7d565b34801561033a57600080fd5b5061034e6103493660046151c8565b610aa8565b60405161035b9190615577565b60405180910390f35b34801561037057600080fd5b5061038461037f36600461530a565b610ba2565b6040516bffffffffffffffffffffffff909116815260200161035b565b3480156103ad57600080fd5b506103ea6040518060400160405280601481526020017f4b6565706572526567697374727920322e302e3200000000000000000000000081525081565b60405161035b9190615625565b34801561040357600080fd5b5061040c610ce5565b60405161035b95949392919061565f565b34801561042957600080fd5b50610324610438366004614cac565b6110a8565b34801561044957600080fd5b50610324610438366004615157565b34801561046457600080fd5b50610324610438366004614de2565b34801561047f57600080fd5b506103246110b4565b34801561049457600080fd5b506104a86104a3366004614c56565b6110bc565b60408051951515865260ff90941660208601526bffffffffffffffffffffffff9283169385019390935216606083015273ffffffffffffffffffffffffffffffffffffffff16608082015260a00161035b565b34801561050757600080fd5b50610510600081565b60405161035b9190615652565b34801561052957600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610510565b34801561055c57600080fd5b5061032461056b36600461513e565b6111da565b34801561057c57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161035b565b3480156105d057600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061059f565b34801561060357600080fd5b50610617610612366004614d3a565b6111e5565b60405190815260200161035b565b34801561063157600080fd5b506103246111fa565b34801561064657600080fd5b50610681601254600e5463ffffffff6c0100000000000000000000000083048116937001000000000000000000000000000000009093041691565b6040805163ffffffff94851681529390921660208401529082015260600161035b565b3480156106b057600080fd5b506103246106bf366004614fa8565b6112fc565b3480156106d057600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661059f565b3480156106fb57600080fd5b506103246106bf36600461517c565b34801561071657600080fd5b50610324610438366004615018565b34801561073157600080fd5b506103246104383660046152e5565b34801561074c57600080fd5b5061032461075b366004614cde565b611309565b34801561076c57600080fd5b50610324610438366004614c73565b34801561078757600080fd5b506103246104383660046152c0565b3480156107a257600080fd5b506107ab600281565b60405160ff909116815260200161035b565b3480156107c957600080fd5b506107dd6107d836600461517c565b611524565b60408051921515835260208301919091520161035b565b34801561080057600080fd5b50600e54600f54604080516000815260208101939093527c010000000000000000000000000000000000000000000000000000000090910463ffffffff169082015260600161035b565b34801561085657600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061059f565b34801561088957600080fd5b5061032461056b366004614c56565b3480156108a457600080fd5b506103246108b3366004614ef1565b61168f565b3480156108c457600080fd5b506103846108d336600461513e565b61224c565b3480156108e457600080fd5b506108f86108f336600461513e565b612270565b60405161035b919061576c565b34801561091157600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061059f565b34801561094457600080fd5b50610324610953366004614e24565b61259b565b34801561096457600080fd5b506109bf610973366004614c56565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602090815260409182902082518084019093525460ff8082161515808552610100909204169290910182905291565b60408051921515835260ff90911660208301520161035b565b3480156109e457600080fd5b506103246109f3366004614c56565b613392565b348015610a0457600080fd5b50610a18610a1336600461513e565b6133a3565b60405161035b969594939291906155bb565b348015610a3657600080fd5b50610a70610a45366004614c56565b73ffffffffffffffffffffffffffffffffffffffff1660009081526016602052604090205460ff1690565b60405161035b9190615638565b610aa67f00000000000000000000000000000000000000000000000000000000000000006133c6565b565b60606000610ab660026133ea565b9050808410610af1576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82610b0357610b008482615c79565b92505b60008367ffffffffffffffff811115610b1e57610b1e615e32565b604051908082528060200260200182016040528015610b47578160200160208202803683370190505b50905060005b84811015610b9957610b6a610b628288615afa565b6002906133f4565b828281518110610b7c57610b7c615e03565b602090810291909101015280610b9181615d3d565b915050610b4d565b50949350505050565b6040805161012081018252600f5460ff808216835263ffffffff6101008084048216602086015265010000000000840482169585019590955262ffffff6901000000000000000000840416606085015261ffff6c0100000000000000000000000084041660808501526e01000000000000000000000000000083048216151560a08501526f010000000000000000000000000000008304909116151560c08401526bffffffffffffffffffffffff70010000000000000000000000000000000083041660e08401527c010000000000000000000000000000000000000000000000000000000090910416918101919091526000908180610ca183613407565b6012549193509150610cdc90849087907801000000000000000000000000000000000000000000000000900463ffffffff1685856000613603565b95945050505050565b6040805161014081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810191909152604080516101a081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081018290526101608101829052610180810191909152604080516101408101825260125468010000000000000000900463ffffffff1681526011546bffffffffffffffffffffffff908116602083015260155492820192909252600f54700100000000000000000000000000000000900490911660608083019190915290819060009060808101610e1a60026133ea565b815260125463ffffffff6c01000000000000000000000000808304821660208086019190915270010000000000000000000000000000000084048316604080870191909152600e54606080880191909152600f547c0100000000000000000000000000000000000000000000000000000000810486166080808a019190915260ff6e01000000000000000000000000000083048116151560a09a8b015284516101a0810186526101008085048a1682526501000000000085048a1682890152898b168288015262ffffff69010000000000000000008604169582019590955261ffff88850416928101929092526010546bffffffffffffffffffffffff81169a83019a909a526401000000008904881660c0830152740100000000000000000000000000000000000000008904881660e083015278010000000000000000000000000000000000000000000000009098049096169186019190915260135461012086015260145461014086015273ffffffffffffffffffffffffffffffffffffffff96849004871661016086015260115493909304909516610180840152600a8054865181840281018401909752808752969b509299508a958a959394600b949316929185919083018282801561102757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610ffc575b505050505092508180548060200260200160405190810160405280929190818152602001828054801561109057602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611065575b50505050509150945094509450945094509091929394565b6110b0610a7d565b5050565b610aa6610a7d565b73ffffffffffffffffffffffffffffffffffffffff811660009081526008602090815260408083208151608081018352905460ff80821615158352610100820416938201939093526bffffffffffffffffffffffff6201000084048116928201929092526e010000000000000000000000000000909204811660608301819052600f54849384938493849384926111689291700100000000000000000000000000000000900416615c90565b600b5490915060009061117b9083615b91565b9050826000015183602001518285604001516111979190615b56565b6060959095015173ffffffffffffffffffffffffffffffffffffffff9b8c166000908152600c6020526040902054929c919b959a50985093169550919350505050565b6111e2610a7d565b50565b60006111ef610a7d565b979650505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611280576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611304610a7d565b505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611378576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081146113b2576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006113c08284018461513e565b600081815260046020526040902054909150640100000000900463ffffffff90811614611419576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600460205260409020600101546114549085906c0100000000000000000000000090046bffffffffffffffffffffffff16615b56565b600082815260046020526040902060010180546bffffffffffffffffffffffff929092166c01000000000000000000000000027fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff9092169190911790556015546114bf908590615afa565b6015556040516bffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169082907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a35050505050565b60008061152f61364e565b600f546e010000000000000000000000000000900460ff161561157e576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260046020908152604091829020825160e081018452815463ffffffff8082168352640100000000820481168386015268010000000000000000820460ff16151583870152690100000000000000000090910473ffffffffffffffffffffffffffffffffffffffff1660608301526001909201546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201528251601f87018390048302810183019093528583529161168291839190889088908190840183828082843760009201919091525061368692505050565b9250925050935093915050565b60005a6040805161012081018252600f5460ff808216835261010080830463ffffffff90811660208601526501000000000084048116958501959095526901000000000000000000830462ffffff1660608501526c01000000000000000000000000830461ffff1660808501526e0100000000000000000000000000008304821615801560a08601526f010000000000000000000000000000008404909216151560c085015270010000000000000000000000000000000083046bffffffffffffffffffffffff1660e08501527c0100000000000000000000000000000000000000000000000000000000909204909316908201529192506117bd576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526008602052604090205460ff16611806576040517f1099ed7500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006118478a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506137ec92505050565b9050600081604001515167ffffffffffffffff81111561186957611869615e32565b60405190808252806020026020018201604052801561191d57816020015b604080516101a081018252600060c0820181815260e083018290526101008301829052610120830182905261014083018290526101608301829052610180830182905282526020808301829052928201819052606082018190526080820181905260a082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816118875790505b5090506000805b836040015151811015611bc957600460008560400151838151811061194b5761194b615e03565b6020908102919091018101518252818101929092526040908101600020815160e081018352815463ffffffff8082168352640100000000820481169583019590955268010000000000000000810460ff16151593820193909352690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060830152600101546bffffffffffffffffffffffff80821660808401526c0100000000000000000000000082041660a08301527801000000000000000000000000000000000000000000000000900490911660c08201528351849083908110611a3557611a35615e03565b602002602001015160000181905250611a9e85848381518110611a5a57611a5a615e03565b6020026020010151600001516000015186606001518481518110611a8057611a80615e03565b60200260200101516040015151876000015188602001516001613603565b838281518110611ab057611ab0615e03565b6020026020010151604001906bffffffffffffffffffffffff1690816bffffffffffffffffffffffff1681525050611b5e84604001518281518110611af757611af7615e03565b602002602001015185606001518381518110611b1557611b15615e03565b6020026020010151858481518110611b2f57611b2f615e03565b602002602001015160000151868581518110611b4d57611b4d615e03565b602002602001015160400151613898565b838281518110611b7057611b70615e03565b60200260200101516020019015159081151581525050828181518110611b9857611b98615e03565b60200260200101516020015115611bb757611bb4600183615ad4565b91505b80611bc181615d3d565b915050611924565b5061ffff8116611bdd575050505050612242565b600e548d3514611c19576040517fdfdcf8e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8351611c26906001615b31565b60ff1689141580611c375750888714155b15611c6e576040517f0244f71a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c7e8d8d8d8d8d8d8d8d6139e9565b60005b836040015151811015611e6857828181518110611ca057611ca0615e03565b60200260200101516020015115611e5657611cb9613c52565b63ffffffff166004600086604001518481518110611cd957611cd9615e03565b6020026020010151815260200190815260200160002060010160189054906101000a900463ffffffff1663ffffffff161415611d41576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611d89838281518110611d5657611d56615e03565b60200260200101516000015185606001518381518110611d7857611d78615e03565b602002602001015160400151613686565b848381518110611d9b57611d9b615e03565b6020026020010151606001858481518110611db857611db8615e03565b60200260200101516080018281525082151515158152505050828181518110611de357611de3615e03565b60200260200101516080015186611dfa9190615c79565b9550611e04613c52565b6004600086604001518481518110611e1e57611e1e615e03565b6020026020010151815260200190815260200160002060010160186101000a81548163ffffffff021916908363ffffffff1602179055505b80611e6081615d3d565b915050611c81565b508351611e76906001615b31565b611e859060ff1661044c615bbc565b616914611e938d6010615bbc565b5a611e9e9089615c79565b611ea89190615afa565b611eb29190615afa565b611ebc9190615afa565b94506116a8611ecf61ffff831687615b7d565b611ed99190615afa565b945060008060008060005b8760400151518110156120e457868181518110611f0357611f03615e03565b602002602001015160200151156120d257611f458a89606001518381518110611f2e57611f2e615e03565b602002602001015160400151518b60000151613d17565b878281518110611f5757611f57615e03565b602002602001015160a0018181525050611fb38989604001518381518110611f8157611f81615e03565b6020026020010151898481518110611f9b57611f9b615e03565b60200260200101518b600001518c602001518b613d35565b9093509150611fc28285615b56565b9350611fce8386615b56565b9450868181518110611fe257611fe2615e03565b60200260200101516060015115158860400151828151811061200657612006615e03565b60200260200101517f29233ba1d7b302b8fe230ad0b81423aba5371b2a6f6b821228212385ee6a44208a60600151848151811061204557612045615e03565b6020026020010151600001518a858151811061206357612063615e03565b6020026020010151608001518b868151811061208157612081615e03565b602002602001015160a0015187896120999190615b56565b6040805163ffffffff90951685526020850193909352918301526bffffffffffffffffffffffff16606082015260800160405180910390a35b806120dc81615d3d565b915050611ee4565b5050336000908152600860205260409020805484925060029061211c9084906201000090046bffffffffffffffffffffffff16615b56565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080600f60000160108282829054906101000a90046bffffffffffffffffffffffff166121769190615b56565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060008f6001600381106121b9576121b9615e03565b602002013560001c9050600060088264ffffffffff16901c905087610100015163ffffffff168163ffffffff16111561223857600f80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff8416021790555b5050505050505050505b5050505050505050565b60008181526004602052604081205461226a9063ffffffff16610ba2565b92915050565b604080516101408101825260008082526020820181905260609282018390528282018190526080820181905260a0820181905260c0820181905260e082018190526101008201526101208101919091526000828152600460209081526040808320815160e081018352815463ffffffff8082168352640100000000820481168387015268010000000000000000820460ff16151583860152690100000000000000000090910473ffffffffffffffffffffffffffffffffffffffff908116606084019081526001909401546bffffffffffffffffffffffff80821660808601526c0100000000000000000000000082041660a085015278010000000000000000000000000000000000000000000000009004821660c08401528451610140810186529351168352815116828501528685526007909352928190208054929392918301916123bc90615ce9565b80601f01602080910402602001604051908101604052809291908181526020018280546123e890615ce9565b80156124355780601f1061240a57610100808354040283529160200191612435565b820191906000526020600020905b81548152906001019060200180831161241857829003601f168201915b505050505081526020018260a001516bffffffffffffffffffffffff1681526020016005600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001826020015163ffffffff1667ffffffffffffffff1681526020018260c0015163ffffffff16815260200182608001516bffffffffffffffffffffffff16815260200182604001511515815260200160176000868152602001908152602001600020805461251290615ce9565b80601f016020809104026020016040519081016040528092919081815260200182805461253e90615ce9565b801561258b5780601f106125605761010080835404028352916020019161258b565b820191906000526020600020905b81548152906001019060200180831161256e57829003601f168201915b5050505050815250915050919050565b6125a3613e28565b601f865111156125df576040517f25d0209c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff8416612619576040517fe77dba5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845186511415806126385750612630846003615c25565b60ff16865111155b1561266f576040517f1d2d1c5800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f54600b547001000000000000000000000000000000009091046bffffffffffffffffffffffff169060005b816bffffffffffffffffffffffff16811015612704576126f1600b82815481106126c8576126c8615e03565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff168484613ea9565b50806126fc81615d3d565b91505061269c565b5060008060005b836bffffffffffffffffffffffff1681101561280d57600a818154811061273457612734615e03565b600091825260209091200154600b805473ffffffffffffffffffffffffffffffffffffffff9092169450908290811061276f5761276f615e03565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff868116845260098352604080852080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690559116808452600890925290912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905591508061280581615d3d565b91505061270b565b5061281a600a6000614882565b612826600b6000614882565b604080516080810182526000808252602082018190529181018290526060810182905290805b8c51811015612baa57600960008e838151811061286b5761286b615e03565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff16156128d6576040517f77cea0fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052806001151581526020018260ff16815250600960008f848151811061290757612907615e03565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528181019290925260400160002082518154939092015160ff16610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909316929092171790558b518c90829081106129af576129af615e03565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff81166000908152600883526040908190208151608081018352905460ff80821615801584526101008304909116958301959095526bffffffffffffffffffffffff6201000082048116938301939093526e0100000000000000000000000000009004909116606082015294509250612a74576040517f6a7281ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001835260ff80821660208086019182526bffffffffffffffffffffffff808b166060880190815273ffffffffffffffffffffffffffffffffffffffff871660009081526008909352604092839020885181549551948a0151925184166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff939094166201000002929092167fffffffffffff000000000000000000000000000000000000000000000000ffff94909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169490941717919091169290921791909117905580612ba281615d3d565b91505061284c565b50508a51612bc09150600a9060208d01906148a0565b508851612bd490600b9060208c01906148a0565b50600087806020019051810190612beb919061504e565b60125460c082015191925063ffffffff640100000000909104811691161015612c40576040517f39abc10400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125460e082015163ffffffff74010000000000000000000000000000000000000000909204821691161015612ca2576040517f1fa9bdcb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125461010082015163ffffffff7801000000000000000000000000000000000000000000000000909204821691161015612d09576040517fd1d5faa800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518061012001604052808a60ff168152602001826000015163ffffffff168152602001826020015163ffffffff168152602001826060015162ffffff168152602001826080015161ffff168152602001600015158152602001600015158152602001866bffffffffffffffffffffffff168152602001600063ffffffff16815250600f60008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160056101000a81548163ffffffff021916908363ffffffff16021790555060608201518160000160096101000a81548162ffffff021916908362ffffff160217905550608082015181600001600c6101000a81548161ffff021916908361ffff16021790555060a082015181600001600e6101000a81548160ff02191690831515021790555060c082015181600001600f6101000a81548160ff02191690831515021790555060e08201518160000160106101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061010082015181600001601c6101000a81548163ffffffff021916908363ffffffff1602179055509050506040518061016001604052808260a001516bffffffffffffffffffffffff16815260200182610160015173ffffffffffffffffffffffffffffffffffffffff168152602001601060010160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16815260200182610180015173ffffffffffffffffffffffffffffffffffffffff168152602001826040015163ffffffff1681526020018260c0015163ffffffff168152602001601060020160089054906101000a900463ffffffff1663ffffffff1681526020016010600201600c9054906101000a900463ffffffff1663ffffffff168152602001601060020160109054906101000a900463ffffffff1663ffffffff1681526020018260e0015163ffffffff16815260200182610100015163ffffffff16815250601060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550606082015181600101600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160020160006101000a81548163ffffffff021916908363ffffffff16021790555060a08201518160020160046101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160020160086101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600201600c6101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160020160106101000a81548163ffffffff021916908363ffffffff1602179055506101208201518160020160146101000a81548163ffffffff021916908363ffffffff1602179055506101408201518160020160186101000a81548163ffffffff021916908363ffffffff1602179055509050508061012001516013819055508061014001516014819055506000601060020160109054906101000a900463ffffffff16905061326f613c52565b601280547fffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000063ffffffff9384160217808255600192600c916132d69185916c01000000000000000000000000900416615b12565b92506101000a81548163ffffffff021916908363ffffffff16021790555061332046306010600201600c9054906101000a900463ffffffff1663ffffffff168f8f8f8f8f8f6140d0565b600e819055507f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0581600e546010600201600c9054906101000a900463ffffffff168f8f8f8f8f8f60405161337c99989796959493929190615948565b60405180910390a1505050505050505050505050565b61339a613e28565b6111e28161417a565b600060606000806000806133b561364e565b6133bd610a7d565b91939550919395565b3660008037600080366000845af43d6000803e8080156133e5573d6000f35b3d6000fd5b600061226a825490565b60006134008383614270565b9392505050565b6000806000836060015162ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561348e57600080fd5b505afa1580156134a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134c69190615327565b50945090925050506000811315806134dd57508142105b806134fe57508280156134fe57506134f58242615c79565b8463ffffffff16105b1561350d576013549550613511565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561357757600080fd5b505afa15801561358b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135af9190615327565b50945090925050506000811315806135c657508142105b806135e757508280156135e757506135de8242615c79565b8463ffffffff16105b156135f65760145494506135fa565b8094505b50505050915091565b60008061361486896000015161429a565b905060008061362f8a8a63ffffffff16858a8a60018b6142de565b909250905061363e8183615b56565b93505050505b9695505050505050565b3215610aa6576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f5460009081906f01000000000000000000000000000000900460ff16156136db576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f80547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff166f010000000000000000000000000000001790555a90506000634585e33b60e01b846040516024016137339190615625565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506137ab856000015163ffffffff168660600151836146bd565b92505a6137b89083615c79565b915050600f80547fffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffff16905590939092509050565b6138176040518060800160405280600081526020016000815260200160608152602001606081525090565b6000806000808580602001905181019061383191906151ea565b93509350935093508051825114613874576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051608081018252948552602085019390935291830152606082015292915050565b60008260c0015163ffffffff16846000015163ffffffff1610156138e95760405185907f5aa44821f7938098502bff537fbbdc9aaaa2fa655c10740646fce27e54987a8990600090a25060006139e1565b602084015184516138ff9063ffffffff16614709565b146139375760405185907f561ff77e59394941a01a456497a9418dea82e2a39abb3ecebfb1cef7e0bfdc1390600090a25060006139e1565b61393f613c52565b836020015163ffffffff16116139825760405185907fd84831b6a3a7fbd333f42fe7f9104a139da6cca4cc1507aef4ddad79b31d017f90600090a25060006139e1565b816bffffffffffffffffffffffff168360a001516bffffffffffffffffffffffff1610156139dd5760405185907f7895fdfe292beab0842d5beccd078e85296b9e17a30eaee4c261a2696b84eb9690600090a25060006139e1565b5060015b949350505050565b600087876040516139fb929190615540565b604051908190038120613a12918b9060200161560b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201208383019092526000808452908301819052909250906000805b88811015613be957600185878360208110613a7e57613a7e615e03565b613a8b91901a601b615b31565b8c8c85818110613a9d57613a9d615e03565b905060200201358b8b86818110613ab657613ab6615e03565b9050602002013560405160008152602001604052604051613af3949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015613b15573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526009602090815290849020838501909452925460ff8082161515808552610100909204169383019390935290955093509050613bc3576040517f0f4c073700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826020015160080260ff166001901b840193508080613be190615d3d565b915050613a61565b50827e01010101010101010101010101010101010101010101010101010101010101841614613c44576040517fc103be2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050565b600060017f00000000000000000000000000000000000000000000000000000000000000006002811115613c8857613c88615dd4565b1415613d1257606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b158015613cd557600080fd5b505afa158015613ce9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d0d9190614fff565b905090565b504390565b6000613d23838361429a565b90508084101561340057509192915050565b600080613d508887608001518860a0015188888860016142de565b90925090506000613d618284615b56565b600089815260046020526040902060010180549192508291600c90613da59084906c0100000000000000000000000090046bffffffffffffffffffffffff16615c90565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008a815260046020526040812060010180548594509092613dee91859116615b56565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555050965096945050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610aa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401611277565b73ffffffffffffffffffffffffffffffffffffffff831660009081526008602090815260408083208151608081018352905460ff80821615158352610100820416938201939093526bffffffffffffffffffffffff6201000084048116928201929092526e01000000000000000000000000000090920416606082018190528290613f349086615c90565b90506000613f428583615b91565b90508083604001818151613f569190615b56565b6bffffffffffffffffffffffff9081169091528716606085015250613f7b8582615c4e565b613f859083615c90565b60118054600090613fa59084906bffffffffffffffffffffffff16615b56565b825461010092830a6bffffffffffffffffffffffff81810219909216928216029190911790925573ffffffffffffffffffffffffffffffffffffffff999099166000908152600860209081526040918290208751815492890151938901516060909901517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009093169015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff161760ff909316909b02919091177fffffffffffff000000000000000000000000000000000000000000000000ffff1662010000878416027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff16176e010000000000000000000000000000919092160217909755509095945050505050565b6000808a8a8a8a8a8a8a8a8a6040516020016140f4999897969594939291906158a3565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179b9a5050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff81163314156141fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401611277565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600082600001828154811061428757614287615e03565b9060005260206000200154905092915050565b60006142ad63ffffffff84166014615bbc565b6142b8836001615b31565b6142c79060ff16611d4c615bbc565b6142d49062011170615afa565b6134009190615afa565b6000806000896080015161ffff16876142f79190615bbc565b90508380156143055750803a105b1561430d57503a5b600060027f0000000000000000000000000000000000000000000000000000000000000000600281111561434357614343615dd4565b14156144c65760408051600081526020810190915285156143a257600036604051806080016040528060488152602001615ec06048913960405160200161438c93929190615550565b604051602081830303815290604052905061441e565b6012546143d2907801000000000000000000000000000000000000000000000000900463ffffffff166004615bf9565b63ffffffff1667ffffffffffffffff8111156143f0576143f0615e32565b6040519080825280601f01601f19166020018201604052801561441a576020820181803683370190505b5090505b6040517f49948e0e00000000000000000000000000000000000000000000000000000000815273420000000000000000000000000000000000000f906349948e0e9061446e908490600401615625565b60206040518083038186803b15801561448657600080fd5b505afa15801561449a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144be9190614fff565b915050614582565b60017f000000000000000000000000000000000000000000000000000000000000000060028111156144fa576144fa615dd4565b141561458257606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561454757600080fd5b505afa15801561455b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061457f9190614fff565b90505b8461459e57808b6080015161ffff1661459b9190615bbc565b90505b6145ac61ffff871682615b7d565b9050600087826145bc8c8e615afa565b6145c69086615bbc565b6145d09190615afa565b6145e290670de0b6b3a7640000615bbc565b6145ec9190615b7d565b905060008c6040015163ffffffff1664e8d4a5100061460b9190615bbc565b898e6020015163ffffffff16858f886146249190615bbc565b61462e9190615afa565b61463c90633b9aca00615bbc565b6146469190615bbc565b6146509190615b7d565b61465a9190615afa565b90506b033b2e3c9fd0803ce80000006146738284615afa565b11156146ab576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b909c909b509950505050505050505050565b60005a6113888110156146cf57600080fd5b6113888103905084604082048203116146e757600080fd5b50823b6146f357600080fd5b60008083516020850160008789f1949350505050565b600060017f0000000000000000000000000000000000000000000000000000000000000000600281111561473f5761473f615dd4565b1415614878576000606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561478e57600080fd5b505afa1580156147a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147c69190614fff565b905080831015806147e157506101006147df8483615c79565b115b156147ef5750600092915050565b6040517f2b407a8200000000000000000000000000000000000000000000000000000000815260048101849052606490632b407a829060240160206040518083038186803b15801561484057600080fd5b505afa158015614854573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134009190614fff565b504090565b919050565b50805460008255906000526020600020908101906111e2919061492a565b82805482825590600052602060002090810192821561491a579160200282015b8281111561491a57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020909201916001909101906148c0565b5061492692915061492a565b5090565b5b80821115614926576000815560010161492b565b805161487d81615e71565b60008083601f84011261495c57600080fd5b50813567ffffffffffffffff81111561497457600080fd5b6020830191508360208260051b850101111561498f57600080fd5b9250929050565b600082601f8301126149a757600080fd5b813560206149bc6149b783615a6a565b615a1b565b80838252828201915082860187848660051b89010111156149dc57600080fd5b60005b85811015614a045781356149f281615e71565b845292840192908401906001016149df565b5090979650505050505050565b600082601f830112614a2257600080fd5b81516020614a326149b783615a6a565b80838252828201915082860187848660051b8901011115614a5257600080fd5b60005b85811015614a0457815167ffffffffffffffff80821115614a7557600080fd5b818a0191506060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848e03011215614aad57600080fd5b614ab56159ce565b88840151614ac281615e93565b81526040848101518a830152918401519183831115614ae057600080fd5b82850194508d603f860112614af457600080fd5b898501519350614b066149b785615a8e565b92508383528d81858701011115614b1c57600080fd5b614b2b848b8501838801615cbd565b810191909152865250509284019290840190600101614a55565b60008083601f840112614b5757600080fd5b50813567ffffffffffffffff811115614b6f57600080fd5b60208301915083602082850101111561498f57600080fd5b600082601f830112614b9857600080fd5b8135614ba66149b782615a8e565b818152846020838601011115614bbb57600080fd5b816020850160208301376000918101602001919091529392505050565b805161ffff8116811461487d57600080fd5b805162ffffff8116811461487d57600080fd5b805161487d81615e93565b803567ffffffffffffffff8116811461487d57600080fd5b803560ff8116811461487d57600080fd5b805169ffffffffffffffffffff8116811461487d57600080fd5b805161487d81615ea5565b600060208284031215614c6857600080fd5b813561340081615e71565b60008060408385031215614c8657600080fd5b8235614c9181615e71565b91506020830135614ca181615e71565b809150509250929050565b60008060408385031215614cbf57600080fd5b8235614cca81615e71565b9150602083013560048110614ca157600080fd5b60008060008060608587031215614cf457600080fd5b8435614cff81615e71565b935060208501359250604085013567ffffffffffffffff811115614d2257600080fd5b614d2e87828801614b45565b95989497509550505050565b600080600080600080600060a0888a031215614d5557600080fd5b8735614d6081615e71565b96506020880135614d7081615e93565b95506040880135614d8081615e71565b9450606088013567ffffffffffffffff80821115614d9d57600080fd5b614da98b838c01614b45565b909650945060808a0135915080821115614dc257600080fd5b50614dcf8a828b01614b45565b989b979a50959850939692959293505050565b60008060208385031215614df557600080fd5b823567ffffffffffffffff811115614e0c57600080fd5b614e188582860161494a565b90969095509350505050565b60008060008060008060c08789031215614e3d57600080fd5b863567ffffffffffffffff80821115614e5557600080fd5b614e618a838b01614996565b97506020890135915080821115614e7757600080fd5b614e838a838b01614996565b9650614e9160408a01614c20565b95506060890135915080821115614ea757600080fd5b614eb38a838b01614b87565b9450614ec160808a01614c08565b935060a0890135915080821115614ed757600080fd5b50614ee489828a01614b87565b9150509295509295509295565b60008060008060008060008060e0898b031215614f0d57600080fd5b606089018a811115614f1e57600080fd5b8998503567ffffffffffffffff80821115614f3857600080fd5b614f448c838d01614b45565b909950975060808b0135915080821115614f5d57600080fd5b614f698c838d0161494a565b909750955060a08b0135915080821115614f8257600080fd5b50614f8f8b828c0161494a565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215614fbd57600080fd5b833567ffffffffffffffff811115614fd457600080fd5b614fe08682870161494a565b9094509250506020840135614ff481615e71565b809150509250925092565b60006020828403121561501157600080fd5b5051919050565b6000806020838503121561502b57600080fd5b823567ffffffffffffffff81111561504257600080fd5b614e1885828601614b45565b60006101a0828403121561506157600080fd5b6150696159f7565b61507283614bfd565b815261508060208401614bfd565b602082015261509160408401614bfd565b60408201526150a260608401614bea565b60608201526150b360808401614bd8565b60808201526150c460a08401614c4b565b60a08201526150d560c08401614bfd565b60c08201526150e660e08401614bfd565b60e08201526101006150f9818501614bfd565b908201526101208381015190820152610140808401519082015261016061512181850161493f565b9082015261018061513384820161493f565b908201529392505050565b60006020828403121561515057600080fd5b5035919050565b6000806040838503121561516a57600080fd5b823591506020830135614ca181615e71565b60008060006040848603121561519157600080fd5b83359250602084013567ffffffffffffffff8111156151af57600080fd5b6151bb86828701614b45565b9497909650939450505050565b600080604083850312156151db57600080fd5b50508035926020909101359150565b6000806000806080858703121561520057600080fd5b845193506020808601519350604086015167ffffffffffffffff8082111561522757600080fd5b818801915088601f83011261523b57600080fd5b81516152496149b782615a6a565b8082825285820191508585018c878560051b880101111561526957600080fd5b600095505b8386101561528c57805183526001959095019491860191860161526e565b5060608b015190975094505050808311156152a657600080fd5b50506152b487828801614a11565b91505092959194509250565b600080604083850312156152d357600080fd5b823591506020830135614ca181615e93565b600080604083850312156152f857600080fd5b823591506020830135614ca181615ea5565b60006020828403121561531c57600080fd5b813561340081615e93565b600080600080600060a0868803121561533f57600080fd5b61534886614c31565b945060208601519350604086015192506060860151915061536b60808701614c31565b90509295509295909350565b600081518084526020808501945080840160005b838110156153bd57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161538b565b509495945050505050565b600081518084526153e0816020860160208601615cbd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b805163ffffffff1682526020810151615433602084018263ffffffff169052565b50604081015161544b604084018263ffffffff169052565b506060810151615462606084018262ffffff169052565b506080810151615478608084018261ffff169052565b5060a081015161549860a08401826bffffffffffffffffffffffff169052565b5060c08101516154b060c084018263ffffffff169052565b5060e08101516154c860e084018263ffffffff169052565b506101008181015163ffffffff8116848301525050610120818101519083015261014080820151908301526101608082015173ffffffffffffffffffffffffffffffffffffffff81168285015250506101808181015173ffffffffffffffffffffffffffffffffffffffff8116848301525b50505050565b8183823760009101908152919050565b82848237600083820160008152835161556d818360208801615cbd565b0195945050505050565b6020808252825182820181905260009190848201906040850190845b818110156155af57835183529284019291840191600101615593565b50909695505050505050565b861515815260c0602082015260006155d660c08301886153c8565b9050600786106155e8576155e8615dd4565b8560408301528460608301528360808301528260a0830152979650505050505050565b828152608081016060836020840137600081529392505050565b60208152600061340060208301846153c8565b602081016004831061564c5761564c615dd4565b91905290565b6020810161564c83615e61565b855163ffffffff1681526000610340602088015161568d60208501826bffffffffffffffffffffffff169052565b506040880151604084015260608801516156b760608501826bffffffffffffffffffffffff169052565b506080880151608084015260a08801516156d960a085018263ffffffff169052565b5060c08801516156f160c085018263ffffffff169052565b5060e088015160e0840152610100808901516157148286018263ffffffff169052565b505061012088810151151590840152615731610140840188615412565b806102e084015261574481840187615377565b90508281036103008401526157598186615377565b91505061364461032083018460ff169052565b6020815261579360208201835173ffffffffffffffffffffffffffffffffffffffff169052565b600060208301516157ac604084018263ffffffff169052565b5060408301516101408060608501526157c96101608501836153c8565b915060608501516157ea60808601826bffffffffffffffffffffffff169052565b50608085015173ffffffffffffffffffffffffffffffffffffffff811660a08601525060a085015167ffffffffffffffff811660c08601525060c085015163ffffffff811660e08601525060e0850151610100615856818701836bffffffffffffffffffffffff169052565b860151905061012061586b8682018315159052565b8601518584037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00183870152905061364483826153c8565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526158ea8285018b615377565b915083820360808501526158fe828a615377565b915060ff881660a085015283820360c085015261591b82886153c8565b90861660e0850152838103610100850152905061593881856153c8565b9c9b505050505050505050505050565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526159788184018a615377565b9050828103608084015261598c8189615377565b905060ff871660a084015282810360c08401526159a981876153c8565b905067ffffffffffffffff851660e084015282810361010084015261593881856153c8565b6040516060810167ffffffffffffffff811182821017156159f1576159f1615e32565b60405290565b6040516101a0810167ffffffffffffffff811182821017156159f1576159f1615e32565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715615a6257615a62615e32565b604052919050565b600067ffffffffffffffff821115615a8457615a84615e32565b5060051b60200190565b600067ffffffffffffffff821115615aa857615aa8615e32565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600061ffff808316818516808303821115615af157615af1615d76565b01949350505050565b60008219821115615b0d57615b0d615d76565b500190565b600063ffffffff808316818516808303821115615af157615af1615d76565b600060ff821660ff84168060ff03821115615b4e57615b4e615d76565b019392505050565b60006bffffffffffffffffffffffff808316818516808303821115615af157615af1615d76565b600082615b8c57615b8c615da5565b500490565b60006bffffffffffffffffffffffff80841680615bb057615bb0615da5565b92169190910492915050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615bf457615bf4615d76565b500290565b600063ffffffff80831681851681830481118215151615615c1c57615c1c615d76565b02949350505050565b600060ff821660ff84168160ff0481118215151615615c4657615c46615d76565b029392505050565b60006bffffffffffffffffffffffff80831681851681830481118215151615615c1c57615c1c615d76565b600082821015615c8b57615c8b615d76565b500390565b60006bffffffffffffffffffffffff83811690831681811015615cb557615cb5615d76565b039392505050565b60005b83811015615cd8578181015183820152602001615cc0565b8381111561553a5750506000910152565b600181811c90821680615cfd57607f821691505b60208210811415615d37577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615d6f57615d6f615d76565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600381106111e2576111e2615dd4565b73ffffffffffffffffffffffffffffffffffffffff811681146111e257600080fd5b63ffffffff811681146111e257600080fd5b6bffffffffffffffffffffffff811681146111e257600080fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", } var KeeperRegistryABI = KeeperRegistryMetaData.ABI @@ -366,9 +366,9 @@ func (_KeeperRegistry *KeeperRegistryCallerSession) GetMinBalanceForUpkeep(id *b return _KeeperRegistry.Contract.GetMinBalanceForUpkeep(&_KeeperRegistry.CallOpts, id) } -func (_KeeperRegistry *KeeperRegistryCaller) GetPaymentModel(opts *bind.CallOpts) (uint8, error) { +func (_KeeperRegistry *KeeperRegistryCaller) GetMode(opts *bind.CallOpts) (uint8, error) { var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getPaymentModel") + err := _KeeperRegistry.contract.Call(opts, &out, "getMode") if err != nil { return *new(uint8), err @@ -380,12 +380,12 @@ func (_KeeperRegistry *KeeperRegistryCaller) GetPaymentModel(opts *bind.CallOpts } -func (_KeeperRegistry *KeeperRegistrySession) GetPaymentModel() (uint8, error) { - return _KeeperRegistry.Contract.GetPaymentModel(&_KeeperRegistry.CallOpts) +func (_KeeperRegistry *KeeperRegistrySession) GetMode() (uint8, error) { + return _KeeperRegistry.Contract.GetMode(&_KeeperRegistry.CallOpts) } -func (_KeeperRegistry *KeeperRegistryCallerSession) GetPaymentModel() (uint8, error) { - return _KeeperRegistry.Contract.GetPaymentModel(&_KeeperRegistry.CallOpts) +func (_KeeperRegistry *KeeperRegistryCallerSession) GetMode() (uint8, error) { + return _KeeperRegistry.Contract.GetMode(&_KeeperRegistry.CallOpts) } func (_KeeperRegistry *KeeperRegistryCaller) GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) { @@ -5065,7 +5065,7 @@ type KeeperRegistryInterface interface { GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) - GetPaymentModel(opts *bind.CallOpts) (uint8, error) + GetMode(opts *bind.CallOpts) (uint8, error) GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) diff --git a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt index 65d41eac80b..c92316fcd81 100644 --- a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -16,11 +16,11 @@ gas_wrapper: ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrappe keeper_registrar_wrapper1_2: ../../contracts/solc/v0.8.6/KeeperRegistrar.abi ../../contracts/solc/v0.8.6/KeeperRegistrar.bin e49b2f8b23da17af1ed2209b8ae0968cc04350554d636711e6c24a3ad3118692 keeper_registrar_wrapper2_0: ../../contracts/solc/v0.8.6/KeeperRegistrar2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistrar2_0.bin 647f125c2f0dafabcdc545cb77b15dc2ec3ea9429357806813179b1fd555c2d2 keeper_registry_logic1_3: ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3.bin e1bee66ce7cd0085469f923c46f0eddb58fd45dec207def1bb383b37e413a6ca -keeper_registry_logic2_0: ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0.bin cf563c2e48d6d6e11c19910c1f1c4d4df46b2ddd950c0c6e0640e8bde9f4c183 +keeper_registry_logic2_0: ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0.bin ba5c23c495c4e1e487560ed56d917632f0047266c06fda4af9edbcda5aca99fa keeper_registry_wrapper1_1: ../../contracts/solc/v0.7/KeeperRegistry1_1.abi ../../contracts/solc/v0.7/KeeperRegistry1_1.bin 6ce079f2738f015f7374673a2816e8e9787143d00b780ea7652c8aa9ad9e1e20 keeper_registry_wrapper1_2: ../../contracts/solc/v0.8.6/KeeperRegistry1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_2.bin 41faf687ad6a5171cc91e627244d0b3d6f62d393c418ca22d4ba7fc921fd32c6 keeper_registry_wrapper1_3: ../../contracts/solc/v0.8.6/KeeperRegistry1_3.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_3.bin 5e1414eacbc1880b7349a4f253b7eca176f7f6300ef3cd834c493ce795a17e25 -keeper_registry_wrapper2_0: ../../contracts/solc/v0.8.6/KeeperRegistry2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistry2_0.bin 8a0eb2803c64ffbad57361a28161deac8aff11189202227d214520fc008532dc +keeper_registry_wrapper2_0: ../../contracts/solc/v0.8.6/KeeperRegistry2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistry2_0.bin c32dea7d5ef66b7c58ddc84ddf69aa44df1b3ae8601fbc271c95be4ff5853056 keepers_vrf_consumer: ../../contracts/solc/v0.8.6/KeepersVRFConsumer.abi ../../contracts/solc/v0.8.6/KeepersVRFConsumer.bin fa75572e689c9e84705c63e8dbe1b7b8aa1a8fe82d66356c4873d024bb9166e8 log_emitter: ../../contracts/solc/v0.8.6/LogEmitter.abi ../../contracts/solc/v0.8.6/LogEmitter.bin 375488d19b6ee1c180d42048be10abea9146e2a58347fd180358850d435cb854 mercury_exposed_verifier: ../../contracts/solc/v0.8.6/ExposedVerifier.abi ../../contracts/solc/v0.8.6/ExposedVerifier.bin 66b77ef97f730e58e0c8646eebb2909be5abe78a5769427a531b8e7d075186ee diff --git a/integration-tests/contracts/contract_deployer.go b/integration-tests/contracts/contract_deployer.go index 93f119a82a1..7b9408b9ee0 100644 --- a/integration-tests/contracts/contract_deployer.go +++ b/integration-tests/contracts/contract_deployer.go @@ -540,16 +540,16 @@ func (e *EthereumContractDeployer) DeployKeeperRegistrar(registryVersion eth_con func (e *EthereumContractDeployer) DeployKeeperRegistry( opts *KeeperRegistryOpts, ) (KeeperRegistry, error) { - var paymentModel uint8 + var mode uint8 switch e.client.GetChainID() { //Arbitrum payment model case big.NewInt(421613): - paymentModel = uint8(1) + mode = uint8(1) //Optimism payment model case big.NewInt(420): - paymentModel = uint8(2) + mode = uint8(2) default: - paymentModel = uint8(0) + mode = uint8(0) } registryGasOverhead := big.NewInt(80000) switch opts.RegistryVersion { @@ -631,7 +631,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( return keeper_registry_logic1_3.DeployKeeperRegistryLogic( auth, backend, - paymentModel, // Default payment model + mode, // Default payment model registryGasOverhead, // Registry gas overhead common.HexToAddress(opts.LinkAddr), common.HexToAddress(opts.ETHFeedAddr), @@ -689,7 +689,7 @@ func (e *EthereumContractDeployer) DeployKeeperRegistry( return keeper_registry_logic2_0.DeployKeeperRegistryLogic( auth, backend, - paymentModel, // Default payment model + mode, // Default payment model common.HexToAddress(opts.LinkAddr), common.HexToAddress(opts.ETHFeedAddr), common.HexToAddress(opts.GasFeedAddr),