From b4a1077a8379f8d522a0630530e9573f14f06d6a Mon Sep 17 00:00:00 2001 From: aBear Date: Mon, 28 Oct 2024 19:00:23 +0100 Subject: [PATCH 01/24] skip zero amount withdrawals to reduce number of withdrawals processed --- .../pkg/core/state/statedb.go | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/mod/state-transition/pkg/core/state/statedb.go b/mod/state-transition/pkg/core/state/statedb.go index 115816152c..9edb37d595 100644 --- a/mod/state-transition/pkg/core/state/statedb.go +++ b/mod/state-transition/pkg/core/state/statedb.go @@ -225,10 +225,6 @@ func (s *StateDB[ // Iterate through indices to find the next validators to withdraw. for range bound { - var ( - withdrawal WithdrawalT - amount math.Gwei - ) validator, err = s.ValidatorByIndex(validatorIndex) if err != nil { return nil, err @@ -247,21 +243,24 @@ func (s *StateDB[ // Set the amount of the withdrawal depending on the balance of the // validator. + var withdrawal WithdrawalT if validator.IsFullyWithdrawable(balance, epoch) { - amount = balance + withdrawals = append(withdrawals, withdrawal.New( + math.U64(withdrawalIndex), + validatorIndex, + withdrawalAddress, + balance, + )) } else if validator.IsPartiallyWithdrawable( balance, math.Gwei(s.cs.MaxEffectiveBalance()), ) { - amount = balance - math.Gwei(s.cs.MaxEffectiveBalance()) + withdrawals = append(withdrawals, withdrawal.New( + math.U64(withdrawalIndex), + validatorIndex, + withdrawalAddress, + balance-math.Gwei(s.cs.MaxEffectiveBalance()), + )) } - withdrawal = withdrawal.New( - math.U64(withdrawalIndex), - validatorIndex, - withdrawalAddress, - amount, - ) - - withdrawals = append(withdrawals, withdrawal) // Increment the withdrawal index to process the next withdrawal. withdrawalIndex++ From f4a7d795e9d0c005617fc8a4fc6f31c12de3ed4e Mon Sep 17 00:00:00 2001 From: aBear Date: Tue, 29 Oct 2024 15:45:26 +0100 Subject: [PATCH 02/24] wip: adding UTs to state transition package --- .../pkg/core/state_processor_genesis_test.go | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 mod/state-transition/pkg/core/state_processor_genesis_test.go diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go new file mode 100644 index 0000000000..cc30205815 --- /dev/null +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2024, Berachain Foundation. All rights reserved. +// Use of this software is governed by the Business Source License included +// in the LICENSE file of this repository and at www.mariadb.com/bsl11. +// +// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY +// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER +// VERSIONS OF THE LICENSED WORK. +// +// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF +// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF +// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). +// +// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON +// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND +// TITLE. + +package core_test + +import ( + "testing" + + "github.com/berachain/beacon-kit/mod/config/pkg/spec" + "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" + engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" + "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" + "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" +) + +type ( + TestBeaconStateMarshallableT = types.BeaconState[ + *types.BeaconBlockHeader, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.Validator, + types.BeaconBlockHeader, + types.Eth1Data, + types.ExecutionPayloadHeader, + types.Fork, + types.Validator, + ] + + TestKVStoreT = beacondb.KVStore[ + *types.BeaconBlockHeader, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.Validator, + types.Validators, + ] + + TestBeaconStateT = statedb.StateDB[ + *types.BeaconBlockHeader, + *TestBeaconStateMarshallableT, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *TestKVStoreT, + *types.Validator, + types.Validators, + *engineprimitives.Withdrawal, + types.WithdrawalCredentials, + ] +) + +func TestInitialize(t *testing.T) { + cs := spec.TestnetChainSpec() + // in.ExecutionEngine, + mocksSigner := &mocks.BLSSigner{} + + _ = core.NewStateProcessor[ + *types.BeaconBlock, + *types.BeaconBlockBody, + *types.BeaconBlockHeader, + *TestBeaconStateT, + + *transition.Context, + *types.Deposit, + *types.Eth1Data, + *types.ExecutionPayload, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.ForkData, + *TestKVStoreT, + *types.Validator, + types.Validators, + *engineprimitives.Withdrawal, + engineprimitives.Withdrawals, + types.WithdrawalCredentials, + ]( + cs, + nil, + mocksSigner, + ) + + // vals, err := sp.InitializePreminedBeaconStateFromEth1() + // require.NoError(t, err) + + // This is not the right assert, just want to get to compile + // require.Empty(t, vals) + +} From 0f461722ebcd59cbf8cfa935b9cd28fc37503a56 Mon Sep 17 00:00:00 2001 From: aBear Date: Tue, 29 Oct 2024 17:17:16 +0100 Subject: [PATCH 03/24] wip: completed simple UT for state transition package --- .../pkg/core/state_processor_genesis_test.go | 120 +++++++++++++++++- 1 file changed, 114 insertions(+), 6 deletions(-) diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index cc30205815..4184c762e1 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -21,16 +21,33 @@ package core_test import ( + "context" + "fmt" "testing" + corestore "cosmossdk.io/core/store" + "cosmossdk.io/log" + "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + storetypes "cosmossdk.io/store/types" "github.com/berachain/beacon-kit/mod/config/pkg/spec" "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + "github.com/berachain/beacon-kit/mod/node-core/pkg/components" + "github.com/berachain/beacon-kit/mod/primitives/pkg/common" "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" + "github.com/berachain/beacon-kit/mod/primitives/pkg/math" "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + "github.com/berachain/beacon-kit/mod/primitives/pkg/version" "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" + "github.com/berachain/beacon-kit/mod/storage/pkg/db" + "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" + dbm "github.com/cosmos/cosmos-db" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" ) type ( @@ -75,12 +92,11 @@ func TestInitialize(t *testing.T) { // in.ExecutionEngine, mocksSigner := &mocks.BLSSigner{} - _ = core.NewStateProcessor[ + sp := core.NewStateProcessor[ *types.BeaconBlock, *types.BeaconBlockBody, *types.BeaconBlockHeader, *TestBeaconStateT, - *transition.Context, *types.Deposit, *types.Eth1Data, @@ -100,10 +116,102 @@ func TestInitialize(t *testing.T) { mocksSigner, ) - // vals, err := sp.InitializePreminedBeaconStateFromEth1() - // require.NoError(t, err) + kvStore, err := initTestStore() + require.NoError(t, err) + + var ( + beaconState = new(TestBeaconStateT).NewFromDB(kvStore, cs) + deposits = []*types.Deposit{ + { + Pubkey: [48]byte{0x01}, + Amount: math.Gwei(1_000), + Index: uint64(0), + }, + { + Pubkey: [48]byte{0x02}, + Amount: math.Gwei(2_000), + Index: uint64(1), + }, + } + executionPayloadHeader = new(types.ExecutionPayloadHeader).Empty() + genesisVersion = version.FromUint32[common.Version](version.Deneb) + ) + + mocksSigner.On( + "VerifySignature", + mock.Anything, + mock.Anything, + mock.Anything, + ).Return(nil) + + vals, err := sp.InitializePreminedBeaconStateFromEth1( + beaconState, + deposits, + executionPayloadHeader, + genesisVersion, + ) + require.NoError(t, err) + require.Len(t, vals, len(deposits)) +} + +// Unit tests helpers + +type testKVStoreService struct { + ctx sdk.Context +} + +func (kvs *testKVStoreService) OpenKVStore(context.Context) corestore.KVStore { + //nolint:contextcheck // fine with tests + return components.NewKVStore( + sdk.UnwrapSDKContext(kvs.ctx).KVStore(testStoreKey), + ) +} + +var ( + testStoreKey = storetypes.NewKVStoreKey("state-transition-tests") + testCodec = &encoding.SSZInterfaceCodec[*types.ExecutionPayloadHeader]{} +) + +func initTestStore() ( + *beacondb.KVStore[ + *types.BeaconBlockHeader, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.Validator, + types.Validators, + ], error) { + db, err := db.OpenDB("", dbm.MemDBBackend) + if err != nil { + return nil, fmt.Errorf("failed opening mem db: %w", err) + } + var ( + nopLog = log.NewNopLogger() + nopMetrics = metrics.NewNoOpMetrics() + ) + + cms := store.NewCommitMultiStore( + db, + nopLog, + nopMetrics, + ) - // This is not the right assert, just want to get to compile - // require.Empty(t, vals) + ctx := sdk.NewContext(cms, true, nopLog) + cms.MountStoreWithDB(testStoreKey, storetypes.StoreTypeIAVL, nil) + if err = cms.LoadLatestVersion(); err != nil { + return nil, fmt.Errorf("failed to load latest version: %w", err) + } + testStoreService := &testKVStoreService{ctx: ctx} + return beacondb.New[ + *types.BeaconBlockHeader, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.Validator, + types.Validators, + ]( + testStoreService, + testCodec, + ), nil } From 22c7717d0648daf68814321d0f1e9d0fb826da29 Mon Sep 17 00:00:00 2001 From: aBear Date: Tue, 29 Oct 2024 22:07:41 +0100 Subject: [PATCH 04/24] wip: minimal execution engine stub --- mod/state-transition/pkg/core/helpers_test.go | 113 ++++++++++++++++++ .../pkg/core/state_processor_genesis_test.go | 78 +----------- 2 files changed, 115 insertions(+), 76 deletions(-) create mode 100644 mod/state-transition/pkg/core/helpers_test.go diff --git a/mod/state-transition/pkg/core/helpers_test.go b/mod/state-transition/pkg/core/helpers_test.go new file mode 100644 index 0000000000..1631830784 --- /dev/null +++ b/mod/state-transition/pkg/core/helpers_test.go @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2024, Berachain Foundation. All rights reserved. +// Use of this software is governed by the Business Source License included +// in the LICENSE file of this repository and at www.mariadb.com/bsl11. +// +// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY +// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER +// VERSIONS OF THE LICENSED WORK. +// +// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF +// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF +// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). +// +// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON +// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND +// TITLE. + +package core_test + +import ( + "context" + "fmt" + + corestore "cosmossdk.io/core/store" + "cosmossdk.io/log" + "cosmossdk.io/store" + "cosmossdk.io/store/metrics" + storetypes "cosmossdk.io/store/types" + "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" + engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + "github.com/berachain/beacon-kit/mod/node-core/pkg/components" + "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" + "github.com/berachain/beacon-kit/mod/storage/pkg/db" + "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" + dbm "github.com/cosmos/cosmos-db" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// TODO: replace with proper mock +type testExecutionEngine struct{} + +func (tee *testExecutionEngine) VerifyAndNotifyNewPayload( + _ context.Context, + _ *engineprimitives.NewPayloadRequest[ + *types.ExecutionPayload, + engineprimitives.Withdrawals, + ], +) error { + return nil +} + +type testKVStoreService struct { + ctx sdk.Context +} + +func (kvs *testKVStoreService) OpenKVStore(context.Context) corestore.KVStore { + //nolint:contextcheck // fine with tests + return components.NewKVStore( + sdk.UnwrapSDKContext(kvs.ctx).KVStore(testStoreKey), + ) +} + +var ( + testStoreKey = storetypes.NewKVStoreKey("state-transition-tests") + testCodec = &encoding.SSZInterfaceCodec[*types.ExecutionPayloadHeader]{} +) + +func initTestStore() ( + *beacondb.KVStore[ + *types.BeaconBlockHeader, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.Validator, + types.Validators, + ], error) { + db, err := db.OpenDB("", dbm.MemDBBackend) + if err != nil { + return nil, fmt.Errorf("failed opening mem db: %w", err) + } + var ( + nopLog = log.NewNopLogger() + nopMetrics = metrics.NewNoOpMetrics() + ) + + cms := store.NewCommitMultiStore( + db, + nopLog, + nopMetrics, + ) + + ctx := sdk.NewContext(cms, true, nopLog) + cms.MountStoreWithDB(testStoreKey, storetypes.StoreTypeIAVL, nil) + if err = cms.LoadLatestVersion(); err != nil { + return nil, fmt.Errorf("failed to load latest version: %w", err) + } + testStoreService := &testKVStoreService{ctx: ctx} + + return beacondb.New[ + *types.BeaconBlockHeader, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.Validator, + types.Validators, + ]( + testStoreService, + testCodec, + ), nil +} diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index 4184c762e1..d27efca6a1 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -21,19 +21,11 @@ package core_test import ( - "context" - "fmt" "testing" - corestore "cosmossdk.io/core/store" - "cosmossdk.io/log" - "cosmossdk.io/store" - "cosmossdk.io/store/metrics" - storetypes "cosmossdk.io/store/types" "github.com/berachain/beacon-kit/mod/config/pkg/spec" "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components" "github.com/berachain/beacon-kit/mod/primitives/pkg/common" "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" "github.com/berachain/beacon-kit/mod/primitives/pkg/math" @@ -42,10 +34,6 @@ import ( "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" - "github.com/berachain/beacon-kit/mod/storage/pkg/db" - "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" - dbm "github.com/cosmos/cosmos-db" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) @@ -89,7 +77,7 @@ type ( func TestInitialize(t *testing.T) { cs := spec.TestnetChainSpec() - // in.ExecutionEngine, + execEngine := &testExecutionEngine{} mocksSigner := &mocks.BLSSigner{} sp := core.NewStateProcessor[ @@ -112,7 +100,7 @@ func TestInitialize(t *testing.T) { types.WithdrawalCredentials, ]( cs, - nil, + execEngine, mocksSigner, ) @@ -153,65 +141,3 @@ func TestInitialize(t *testing.T) { require.NoError(t, err) require.Len(t, vals, len(deposits)) } - -// Unit tests helpers - -type testKVStoreService struct { - ctx sdk.Context -} - -func (kvs *testKVStoreService) OpenKVStore(context.Context) corestore.KVStore { - //nolint:contextcheck // fine with tests - return components.NewKVStore( - sdk.UnwrapSDKContext(kvs.ctx).KVStore(testStoreKey), - ) -} - -var ( - testStoreKey = storetypes.NewKVStoreKey("state-transition-tests") - testCodec = &encoding.SSZInterfaceCodec[*types.ExecutionPayloadHeader]{} -) - -func initTestStore() ( - *beacondb.KVStore[ - *types.BeaconBlockHeader, - *types.Eth1Data, - *types.ExecutionPayloadHeader, - *types.Fork, - *types.Validator, - types.Validators, - ], error) { - db, err := db.OpenDB("", dbm.MemDBBackend) - if err != nil { - return nil, fmt.Errorf("failed opening mem db: %w", err) - } - var ( - nopLog = log.NewNopLogger() - nopMetrics = metrics.NewNoOpMetrics() - ) - - cms := store.NewCommitMultiStore( - db, - nopLog, - nopMetrics, - ) - - ctx := sdk.NewContext(cms, true, nopLog) - cms.MountStoreWithDB(testStoreKey, storetypes.StoreTypeIAVL, nil) - if err = cms.LoadLatestVersion(); err != nil { - return nil, fmt.Errorf("failed to load latest version: %w", err) - } - testStoreService := &testKVStoreService{ctx: ctx} - - return beacondb.New[ - *types.BeaconBlockHeader, - *types.Eth1Data, - *types.ExecutionPayloadHeader, - *types.Fork, - *types.Validator, - types.Validators, - ]( - testStoreService, - testCodec, - ), nil -} From 05cba8072be6c116b7a733f881653316053056e4 Mon Sep 17 00:00:00 2001 From: aBear Date: Tue, 29 Oct 2024 22:15:12 +0100 Subject: [PATCH 05/24] extended asserts --- .../pkg/core/state_processor_genesis_test.go | 43 ++++++++++++++++--- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index d27efca6a1..88450c897b 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -27,6 +27,7 @@ import ( "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" "github.com/berachain/beacon-kit/mod/primitives/pkg/math" "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" @@ -76,6 +77,7 @@ type ( ) func TestInitialize(t *testing.T) { + // Create state processor to test cs := spec.TestnetChainSpec() execEngine := &testExecutionEngine{} mocksSigner := &mocks.BLSSigner{} @@ -104,6 +106,7 @@ func TestInitialize(t *testing.T) { mocksSigner, ) + // create test inputs kvStore, err := initTestStore() require.NoError(t, err) @@ -112,12 +115,12 @@ func TestInitialize(t *testing.T) { deposits = []*types.Deposit{ { Pubkey: [48]byte{0x01}, - Amount: math.Gwei(1_000), + Amount: math.Gwei(cs.MaxEffectiveBalance()), Index: uint64(0), }, { Pubkey: [48]byte{0x02}, - Amount: math.Gwei(2_000), + Amount: math.Gwei(cs.MaxEffectiveBalance() / 2), Index: uint64(1), }, } @@ -125,19 +128,49 @@ func TestInitialize(t *testing.T) { genesisVersion = version.FromUint32[common.Version](version.Deneb) ) + // define mocks expectations mocksSigner.On( "VerifySignature", - mock.Anything, - mock.Anything, - mock.Anything, + mock.Anything, mock.Anything, mock.Anything, ).Return(nil) + // run test vals, err := sp.InitializePreminedBeaconStateFromEth1( beaconState, deposits, executionPayloadHeader, genesisVersion, ) + + // check outputs require.NoError(t, err) require.Len(t, vals, len(deposits)) + + // check beacon state changes + resSlot, err := beaconState.GetSlot() + require.NoError(t, err) + require.Equal(t, math.Slot(0), resSlot) + + resFork, err := beaconState.GetFork() + require.NoError(t, err) + require.Equal(t, + &types.Fork{ + PreviousVersion: genesisVersion, + CurrentVersion: genesisVersion, + Epoch: math.Epoch(constants.GenesisEpoch), + }, + resFork) + + for _, dep := range deposits { + var idx math.U64 + idx, err = beaconState.ValidatorIndexByPubkey(dep.Pubkey) + require.NoError(t, err) + require.Equal(t, math.U64(dep.Index), idx) + + var val *types.Validator + val, err = beaconState.ValidatorByIndex(idx) + require.NoError(t, err) + require.Equal(t, dep.Pubkey, val.Pubkey) + require.Equal(t, dep.Amount, val.EffectiveBalance) + } } From 443ac1b524ff4bf2bb79fa61485a7414cf566930 Mon Sep 17 00:00:00 2001 From: aBear Date: Tue, 29 Oct 2024 23:40:42 +0100 Subject: [PATCH 06/24] added test case --- .../pkg/core/state_processor_genesis_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index 88450c897b..a37cca2a1e 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -123,6 +123,11 @@ func TestInitialize(t *testing.T) { Amount: math.Gwei(cs.MaxEffectiveBalance() / 2), Index: uint64(1), }, + { + Pubkey: [48]byte{0x03}, + Amount: math.Gwei(cs.EffectiveBalanceIncrement()), + Index: uint64(2), + }, } executionPayloadHeader = new(types.ExecutionPayloadHeader).Empty() genesisVersion = version.FromUint32[common.Version](version.Deneb) From 10efd5ebef93349d9e2096c4e1a16be3fc91c389 Mon Sep 17 00:00:00 2001 From: aBear Date: Tue, 29 Oct 2024 23:51:17 +0100 Subject: [PATCH 07/24] nits --- .../pkg/core/state_processor_staking.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/mod/state-transition/pkg/core/state_processor_staking.go b/mod/state-transition/pkg/core/state_processor_staking.go index a98def71a3..fc336908da 100644 --- a/mod/state-transition/pkg/core/state_processor_staking.go +++ b/mod/state-transition/pkg/core/state_processor_staking.go @@ -131,12 +131,6 @@ func (sp *StateProcessor[ st BeaconStateT, dep DepositT, ) error { - var ( - genesisValidatorsRoot common.Root - epoch math.Epoch - err error - ) - // Get the current slot. slot, err := st.GetSlot() if err != nil { @@ -144,9 +138,8 @@ func (sp *StateProcessor[ } // At genesis, the validators sign over an empty root. - if slot == 0 { - genesisValidatorsRoot = common.Root{} - } else { + genesisValidatorsRoot := common.Root{} + if slot != 0 { // Get the genesis validators root to be used to find fork data later. genesisValidatorsRoot, err = st.GetGenesisValidatorsRoot() if err != nil { @@ -155,7 +148,7 @@ func (sp *StateProcessor[ } // Get the current epoch. - epoch = sp.cs.SlotToEpoch(slot) + epoch := sp.cs.SlotToEpoch(slot) // Verify that the message was signed correctly. var d ForkDataT @@ -192,7 +185,6 @@ func (sp *StateProcessor[ ) // TODO: This is a bug that lives on bArtio. Delete this eventually. - const bArtioChainID = 80084 if sp.cs.DepositEth1ChainID() == bArtioChainID { if err := st.AddValidatorBartio(val); err != nil { return err From 099716dbbf3b190b5622493a85a3279fd3b27821 Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Wed, 30 Oct 2024 12:22:16 +0530 Subject: [PATCH 08/24] tests for helpers in state transition using mock Signed-off-by: nidhi-singh02 --- .mockery.yaml | 5 + .../pkg/types/deposit_message_test.go | 2 +- .../mocks/blobs_bundle.mock.go | 13 +- .../mocks/built_execution_payload_env.mock.go | 16 +- .../backend/mocks/availability_store.mock.go | 24 +- .../backend/mocks/beacon_block_header.mock.go | 38 +- .../backend/mocks/beacon_state.mock.go | 164 +- .../backend/mocks/block_store.mock.go | 42 +- .../backend/mocks/state_processor.mock.go | 16 +- mod/node-api/backend/mocks/validator.mock.go | 28 +- mod/node-api/backend/mocks/withdrawal.mock.go | 14 +- .../pkg/crypto/mocks/bls_signer.mock.go | 66 +- mod/state-transition/pkg/core/helpers_test.go | 43 +- .../pkg/core/mocks/beacon_block.mock.go | 313 +++ .../pkg/core/mocks/beacon_block_body.mock.go | 320 +++ .../core/mocks/beacon_block_header.mock.go | 399 +++ .../pkg/core/mocks/beacon_state.mock.go | 2395 +++++++++++++++++ .../pkg/core/mocks/context.mock.go | 411 +++ .../pkg/core/mocks/deposit.mock.go | 225 ++ .../pkg/core/mocks/execution_engine.mock.go | 86 + .../pkg/core/mocks/execution_payload.mock.go | 1122 ++++++++ .../mocks/execution_payload_header.mock.go | 83 + .../pkg/core/mocks/fork_data.mock.go | 134 + .../core/mocks/read_only_beacon_state.mock.go | 1326 +++++++++ .../core/mocks/read_only_eth_1_data.mock.go | 197 ++ .../core/mocks/read_only_randao_mixes.mock.go | 94 + .../core/mocks/read_only_state_roots.mock.go | 94 + .../core/mocks/read_only_validators.mock.go | 149 + .../core/mocks/read_only_withdrawals.mock.go | 89 + .../pkg/core/mocks/validator.mock.go | 500 ++++ .../pkg/core/mocks/validators.mock.go | 83 + .../pkg/core/mocks/withdrawal.mock.go | 266 ++ .../core/mocks/withdrawals_constraint.mock.go | 115 + .../mocks/write_only_beacon_state.mock.go | 919 +++++++ .../core/mocks/write_only_eth_1_data.mock.go | 170 ++ .../mocks/write_only_randao_mixes.mock.go | 83 + .../core/mocks/write_only_state_roots.mock.go | 83 + .../core/mocks/write_only_validators.mock.go | 174 ++ .../pkg/core/state_processor_genesis_test.go | 12 +- mod/state-transition/pkg/core/types.go | 11 +- mod/storage/pkg/filedb/range_db_test.go | 4 +- mod/storage/pkg/interfaces/mocks/db.mock.go | 82 +- 42 files changed, 10138 insertions(+), 272 deletions(-) create mode 100644 mod/state-transition/pkg/core/mocks/beacon_block.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/beacon_block_body.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/beacon_block_header.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/beacon_state.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/context.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/deposit.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/execution_engine.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/execution_payload.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/execution_payload_header.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/fork_data.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/read_only_beacon_state.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/read_only_eth_1_data.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/read_only_randao_mixes.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/read_only_state_roots.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/read_only_validators.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/read_only_withdrawals.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/validator.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/validators.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/withdrawal.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/withdrawals_constraint.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/write_only_beacon_state.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/write_only_eth_1_data.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/write_only_randao_mixes.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/write_only_state_roots.mock.go create mode 100644 mod/state-transition/pkg/core/mocks/write_only_validators.mock.go diff --git a/.mockery.yaml b/.mockery.yaml index 6062236306..dbbc916112 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -68,3 +68,8 @@ packages: recursive: False with-expecter: true all: True + github.com/berachain/beacon-kit/mod/state-transition/pkg/core: + config: + recursive: False + with-expecter: true + all: True diff --git a/mod/consensus-types/pkg/types/deposit_message_test.go b/mod/consensus-types/pkg/types/deposit_message_test.go index 66e4f89a3d..02cd17ab7b 100644 --- a/mod/consensus-types/pkg/types/deposit_message_test.go +++ b/mod/consensus-types/pkg/types/deposit_message_test.go @@ -44,7 +44,7 @@ func TestCreateAndSignDepositMessage(t *testing.T) { 0x01, 0x00, 0x00, 0x00, } - mocksSigner := &mocks.BLSSigner{} + mocksSigner := &mocks.Blssigner{} mocksSigner.On("PublicKey").Return(crypto.BLSPubkey{}) mocksSigner.On("Sign", mock.Anything).Return(crypto.BLSSignature{}, nil) diff --git a/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go b/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go index 94ad0fad6e..688aad3a39 100644 --- a/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go +++ b/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go @@ -3,7 +3,6 @@ package mocks import ( - bytes "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" eip4844 "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" mock "github.com/stretchr/testify/mock" @@ -117,19 +116,19 @@ func (_c *BlobsBundle_GetCommitments_Call) RunAndReturn(run func() []eip4844.KZG } // GetProofs provides a mock function with given fields: -func (_m *BlobsBundle) GetProofs() []bytes.B48 { +func (_m *BlobsBundle) GetProofs() []eip4844.KZGProof { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetProofs") } - var r0 []bytes.B48 - if rf, ok := ret.Get(0).(func() []bytes.B48); ok { + var r0 []eip4844.KZGProof + if rf, ok := ret.Get(0).(func() []eip4844.KZGProof); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]bytes.B48) + r0 = ret.Get(0).([]eip4844.KZGProof) } } @@ -153,12 +152,12 @@ func (_c *BlobsBundle_GetProofs_Call) Run(run func()) *BlobsBundle_GetProofs_Cal return _c } -func (_c *BlobsBundle_GetProofs_Call) Return(_a0 []bytes.B48) *BlobsBundle_GetProofs_Call { +func (_c *BlobsBundle_GetProofs_Call) Return(_a0 []eip4844.KZGProof) *BlobsBundle_GetProofs_Call { _c.Call.Return(_a0) return _c } -func (_c *BlobsBundle_GetProofs_Call) RunAndReturn(run func() []bytes.B48) *BlobsBundle_GetProofs_Call { +func (_c *BlobsBundle_GetProofs_Call) RunAndReturn(run func() []eip4844.KZGProof) *BlobsBundle_GetProofs_Call { _c.Call.Return(run) return _c } diff --git a/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go b/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go index 0ec103484e..01235c4ba2 100644 --- a/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go +++ b/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go @@ -4,9 +4,9 @@ package mocks import ( engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - mock "github.com/stretchr/testify/mock" + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - uint256 "github.com/holiman/uint256" + mock "github.com/stretchr/testify/mock" ) // BuiltExecutionPayloadEnv is an autogenerated mock type for the BuiltExecutionPayloadEnv type @@ -115,19 +115,19 @@ func (_c *BuiltExecutionPayloadEnv_GetExecutionPayload_Call[ExecutionPayloadT]) } // GetValue provides a mock function with given fields: -func (_m *BuiltExecutionPayloadEnv[ExecutionPayloadT]) GetValue() *uint256.Int { +func (_m *BuiltExecutionPayloadEnv[ExecutionPayloadT]) GetValue() *math.U256 { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetValue") } - var r0 *uint256.Int - if rf, ok := ret.Get(0).(func() *uint256.Int); ok { + var r0 *math.U256 + if rf, ok := ret.Get(0).(func() *math.U256); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*uint256.Int) + r0 = ret.Get(0).(*math.U256) } } @@ -151,12 +151,12 @@ func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) Run(run fun return _c } -func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) Return(_a0 *uint256.Int) *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT] { +func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) Return(_a0 *math.U256) *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT] { _c.Call.Return(_a0) return _c } -func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) RunAndReturn(run func() *uint256.Int) *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT] { +func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) RunAndReturn(run func() *math.U256) *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/availability_store.mock.go b/mod/node-api/backend/mocks/availability_store.mock.go index 17d2d80e87..784cdda804 100644 --- a/mod/node-api/backend/mocks/availability_store.mock.go +++ b/mod/node-api/backend/mocks/availability_store.mock.go @@ -23,7 +23,7 @@ func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) EXPECT() *Availabi } // IsDataAvailable provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) IsDataAvailable(_a0 context.Context, _a1 math.U64, _a2 BeaconBlockBodyT) bool { +func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) IsDataAvailable(_a0 context.Context, _a1 math.Slot, _a2 BeaconBlockBodyT) bool { ret := _m.Called(_a0, _a1, _a2) if len(ret) == 0 { @@ -31,7 +31,7 @@ func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) IsDataAvailable(_a } var r0 bool - if rf, ok := ret.Get(0).(func(context.Context, math.U64, BeaconBlockBodyT) bool); ok { + if rf, ok := ret.Get(0).(func(context.Context, math.Slot, BeaconBlockBodyT) bool); ok { r0 = rf(_a0, _a1, _a2) } else { r0 = ret.Get(0).(bool) @@ -47,15 +47,15 @@ type AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT any, BlobSidecarsT // IsDataAvailable is a helper method to define mock.On call // - _a0 context.Context -// - _a1 math.U64 +// - _a1 math.Slot // - _a2 BeaconBlockBodyT func (_e *AvailabilityStore_Expecter[BeaconBlockBodyT, BlobSidecarsT]) IsDataAvailable(_a0 interface{}, _a1 interface{}, _a2 interface{}) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { return &AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]{Call: _e.mock.On("IsDataAvailable", _a0, _a1, _a2)} } -func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]) Run(run func(_a0 context.Context, _a1 math.U64, _a2 BeaconBlockBodyT)) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { +func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]) Run(run func(_a0 context.Context, _a1 math.Slot, _a2 BeaconBlockBodyT)) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(math.U64), args[2].(BeaconBlockBodyT)) + run(args[0].(context.Context), args[1].(math.Slot), args[2].(BeaconBlockBodyT)) }) return _c } @@ -65,13 +65,13 @@ func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT return _c } -func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]) RunAndReturn(run func(context.Context, math.U64, BeaconBlockBodyT) bool) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { +func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]) RunAndReturn(run func(context.Context, math.Slot, BeaconBlockBodyT) bool) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { _c.Call.Return(run) return _c } // Persist provides a mock function with given fields: _a0, _a1 -func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) Persist(_a0 math.U64, _a1 BlobSidecarsT) error { +func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) Persist(_a0 math.Slot, _a1 BlobSidecarsT) error { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -79,7 +79,7 @@ func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) Persist(_a0 math.U } var r0 error - if rf, ok := ret.Get(0).(func(math.U64, BlobSidecarsT) error); ok { + if rf, ok := ret.Get(0).(func(math.Slot, BlobSidecarsT) error); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) @@ -94,15 +94,15 @@ type AvailabilityStore_Persist_Call[BeaconBlockBodyT any, BlobSidecarsT any] str } // Persist is a helper method to define mock.On call -// - _a0 math.U64 +// - _a0 math.Slot // - _a1 BlobSidecarsT func (_e *AvailabilityStore_Expecter[BeaconBlockBodyT, BlobSidecarsT]) Persist(_a0 interface{}, _a1 interface{}) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { return &AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]{Call: _e.mock.On("Persist", _a0, _a1)} } -func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) Run(run func(_a0 math.U64, _a1 BlobSidecarsT)) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { +func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) Run(run func(_a0 math.Slot, _a1 BlobSidecarsT)) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64), args[1].(BlobSidecarsT)) + run(args[0].(math.Slot), args[1].(BlobSidecarsT)) }) return _c } @@ -112,7 +112,7 @@ func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) Retur return _c } -func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) RunAndReturn(run func(math.U64, BlobSidecarsT) error) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { +func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) RunAndReturn(run func(math.Slot, BlobSidecarsT) error) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/beacon_block_header.mock.go b/mod/node-api/backend/mocks/beacon_block_header.mock.go index c9d0cd0b6d..5e019b5821 100644 --- a/mod/node-api/backend/mocks/beacon_block_header.mock.go +++ b/mod/node-api/backend/mocks/beacon_block_header.mock.go @@ -117,18 +117,18 @@ func (_c *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]) RunAndR } // GetProposerIndex provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetProposerIndex() math.U64 { +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetProposerIndex() math.ValidatorIndex { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetProposerIndex") } - var r0 math.U64 - if rf, ok := ret.Get(0).(func() math.U64); ok { + var r0 math.ValidatorIndex + if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.ValidatorIndex) } return r0 @@ -151,29 +151,29 @@ func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Run(run f return _c } -func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Return(_a0 math.U64) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Return(_a0 math.ValidatorIndex) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { _c.Call.Return(_a0) return _c } -func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.U64) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.ValidatorIndex) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { _c.Call.Return(run) return _c } // GetSlot provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetSlot() math.U64 { +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetSlot() math.Slot { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetSlot") } - var r0 math.U64 - if rf, ok := ret.Get(0).(func() math.U64); ok { + var r0 math.Slot + if rf, ok := ret.Get(0).(func() math.Slot); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.Slot) } return r0 @@ -196,12 +196,12 @@ func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Run(run func()) *B return _c } -func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Return(_a0 math.U64) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Return(_a0 math.Slot) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { _c.Call.Return(_a0) return _c } -func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.U64) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.Slot) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { _c.Call.Return(run) return _c } @@ -358,7 +358,7 @@ func (_c *BeaconBlockHeader_MarshalSSZ_Call[BeaconBlockHeaderT]) RunAndReturn(ru } // New provides a mock function with given fields: slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) New(slot math.U64, proposerIndex math.U64, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root) BeaconBlockHeaderT { +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) New(slot math.Slot, proposerIndex math.ValidatorIndex, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root) BeaconBlockHeaderT { ret := _m.Called(slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot) if len(ret) == 0 { @@ -366,7 +366,7 @@ func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) New(slot math.U64, proposerInde } var r0 BeaconBlockHeaderT - if rf, ok := ret.Get(0).(func(math.U64, math.U64, common.Root, common.Root, common.Root) BeaconBlockHeaderT); ok { + if rf, ok := ret.Get(0).(func(math.Slot, math.ValidatorIndex, common.Root, common.Root, common.Root) BeaconBlockHeaderT); ok { r0 = rf(slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot) } else { r0 = ret.Get(0).(BeaconBlockHeaderT) @@ -381,8 +381,8 @@ type BeaconBlockHeader_New_Call[BeaconBlockHeaderT any] struct { } // New is a helper method to define mock.On call -// - slot math.U64 -// - proposerIndex math.U64 +// - slot math.Slot +// - proposerIndex math.ValidatorIndex // - parentBlockRoot common.Root // - stateRoot common.Root // - bodyRoot common.Root @@ -390,9 +390,9 @@ func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) New(slot interface{}, return &BeaconBlockHeader_New_Call[BeaconBlockHeaderT]{Call: _e.mock.On("New", slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot)} } -func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Run(run func(slot math.U64, proposerIndex math.U64, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root)) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Run(run func(slot math.Slot, proposerIndex math.ValidatorIndex, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root)) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64), args[1].(math.U64), args[2].(common.Root), args[3].(common.Root), args[4].(common.Root)) + run(args[0].(math.Slot), args[1].(math.ValidatorIndex), args[2].(common.Root), args[3].(common.Root), args[4].(common.Root)) }) return _c } @@ -402,7 +402,7 @@ func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Return(_a0 BeaconBlock return _c } -func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) RunAndReturn(run func(math.U64, math.U64, common.Root, common.Root, common.Root) BeaconBlockHeaderT) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) RunAndReturn(run func(math.Slot, math.ValidatorIndex, common.Root, common.Root, common.Root) BeaconBlockHeaderT) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/beacon_state.mock.go b/mod/node-api/backend/mocks/beacon_state.mock.go index 184d2d7024..1f9fdf1302 100644 --- a/mod/node-api/backend/mocks/beacon_state.mock.go +++ b/mod/node-api/backend/mocks/beacon_state.mock.go @@ -3,9 +3,7 @@ package mocks import ( - bytes "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" @@ -84,25 +82,25 @@ func (_c *BeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, Ex } // GetBalance provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 math.U64) (math.U64, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 math.ValidatorIndex) (math.Gwei, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetBalance") } - var r0 math.U64 + var r0 math.Gwei var r1 error - if rf, ok := ret.Get(0).(func(math.U64) (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (math.Gwei, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(math.U64) math.U64); ok { + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) math.Gwei); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.Gwei) } - if rf, ok := ret.Get(1).(func(math.U64) error); ok { + if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) @@ -117,24 +115,24 @@ type BeaconState_GetBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, Executio } // GetBalance is a helper method to define mock.On call -// - _a0 math.U64 +// - _a0 math.ValidatorIndex func (_e *BeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 interface{}) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { return &BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBalance", _a0)} } -func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.U64)) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64)) + run(args[0].(math.ValidatorIndex)) }) return _c } -func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.U64) (math.U64, error)) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (math.Gwei, error)) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } @@ -585,22 +583,22 @@ func (_c *BeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, } // GetNextWithdrawalValidatorIndex provides a mock function with given fields: -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() (math.U64, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() (math.ValidatorIndex, error) { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetNextWithdrawalValidatorIndex") } - var r0 math.U64 + var r0 math.ValidatorIndex var r1 error - if rf, ok := ret.Get(0).(func() (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func() (math.ValidatorIndex, error)); ok { return rf() } - if rf, ok := ret.Get(0).(func() math.U64); ok { + if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.ValidatorIndex) } if rf, ok := ret.Get(1).(func() error); ok { @@ -629,34 +627,34 @@ func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, E return _c } -func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.U64, error)) *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.ValidatorIndex, error)) *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetRandaoMixAtIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 uint64) (bytes.B32, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 uint64) (common.Bytes32, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetRandaoMixAtIndex") } - var r0 bytes.B32 + var r0 common.Bytes32 var r1 error - if rf, ok := ret.Get(0).(func(uint64) (bytes.B32, error)); ok { + if rf, ok := ret.Get(0).(func(uint64) (common.Bytes32, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(uint64) bytes.B32); ok { + if rf, ok := ret.Get(0).(func(uint64) common.Bytes32); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(bytes.B32) + r0 = ret.Get(0).(common.Bytes32) } } @@ -687,33 +685,33 @@ func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, Ex return _c } -func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 bytes.B32, _a1 error) *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Bytes32, _a1 error) *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (bytes.B32, error)) *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Bytes32, error)) *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetSlashingAtIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 uint64) (math.U64, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 uint64) (math.Gwei, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetSlashingAtIndex") } - var r0 math.U64 + var r0 math.Gwei var r1 error - if rf, ok := ret.Get(0).(func(uint64) (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(uint64) math.U64); ok { + if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.Gwei) } if rf, ok := ret.Get(1).(func(uint64) error); ok { @@ -743,33 +741,33 @@ func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, Exe return _c } -func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.U64, error)) *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetSlot provides a mock function with given fields: -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() (math.U64, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() (math.Slot, error) { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetSlot") } - var r0 math.U64 + var r0 math.Slot var r1 error - if rf, ok := ret.Get(0).(func() (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func() (math.Slot, error)); ok { return rf() } - if rf, ok := ret.Get(0).(func() math.U64); ok { + if rf, ok := ret.Get(0).(func() math.Slot); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.Slot) } if rf, ok := ret.Get(1).(func() error); ok { @@ -798,33 +796,33 @@ func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPaylo return _c } -func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Slot, _a1 error) *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.U64, error)) *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Slot, error)) *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetTotalActiveBalances provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 uint64) (math.U64, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 uint64) (math.Gwei, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetTotalActiveBalances") } - var r0 math.U64 + var r0 math.Gwei var r1 error - if rf, ok := ret.Get(0).(func(uint64) (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(uint64) math.U64); ok { + if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.Gwei) } if rf, ok := ret.Get(1).(func(uint64) error); ok { @@ -854,33 +852,33 @@ func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, return _c } -func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.U64, error)) *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetTotalSlashing provides a mock function with given fields: -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() (math.U64, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() (math.Gwei, error) { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetTotalSlashing") } - var r0 math.U64 + var r0 math.Gwei var r1 error - if rf, ok := ret.Get(0).(func() (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func() (math.Gwei, error)); ok { return rf() } - if rf, ok := ret.Get(0).(func() math.U64); ok { + if rf, ok := ret.Get(0).(func() math.Gwei); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.Gwei) } if rf, ok := ret.Get(1).(func() error); ok { @@ -909,12 +907,12 @@ func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, Execu return _c } -func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.U64, error)) *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Gwei, error)) *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } @@ -1087,7 +1085,7 @@ func (_c *BeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, E } // SetSlot provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 math.U64) error { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 math.Slot) error { ret := _m.Called(_a0) if len(ret) == 0 { @@ -1095,7 +1093,7 @@ func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, Fo } var r0 error - if rf, ok := ret.Get(0).(func(math.U64) error); ok { + if rf, ok := ret.Get(0).(func(math.Slot) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) @@ -1110,14 +1108,14 @@ type BeaconState_SetSlot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPa } // SetSlot is a helper method to define mock.On call -// - _a0 math.U64 +// - _a0 math.Slot func (_e *BeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 interface{}) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { return &BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetSlot", _a0)} } -func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.U64)) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.Slot)) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64)) + run(args[0].(math.Slot)) }) return _c } @@ -1127,7 +1125,7 @@ func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPaylo return _c } -func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.U64) error) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.Slot) error) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } @@ -1191,7 +1189,7 @@ func (_c *BeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, Execu } // ValidatorByIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 math.U64) (ValidatorT, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 math.ValidatorIndex) (ValidatorT, error) { ret := _m.Called(_a0) if len(ret) == 0 { @@ -1200,16 +1198,16 @@ func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, Fo var r0 ValidatorT var r1 error - if rf, ok := ret.Get(0).(func(math.U64) (ValidatorT, error)); ok { + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (ValidatorT, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(math.U64) ValidatorT); ok { + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) ValidatorT); ok { r0 = rf(_a0) } else { r0 = ret.Get(0).(ValidatorT) } - if rf, ok := ret.Get(1).(func(math.U64) error); ok { + if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) @@ -1224,14 +1222,14 @@ type BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, Ex } // ValidatorByIndex is a helper method to define mock.On call -// - _a0 math.U64 +// - _a0 math.ValidatorIndex func (_e *BeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 interface{}) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { return &BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorByIndex", _a0)} } -func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.U64)) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64)) + run(args[0].(math.ValidatorIndex)) }) return _c } @@ -1241,28 +1239,28 @@ func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, Execu return _c } -func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.U64) (ValidatorT, error)) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (ValidatorT, error)) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // ValidatorIndexByCometBFTAddress provides a mock function with given fields: cometBFTAddress -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress []byte) (math.U64, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress []byte) (math.ValidatorIndex, error) { ret := _m.Called(cometBFTAddress) if len(ret) == 0 { panic("no return value specified for ValidatorIndexByCometBFTAddress") } - var r0 math.U64 + var r0 math.ValidatorIndex var r1 error - if rf, ok := ret.Get(0).(func([]byte) (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func([]byte) (math.ValidatorIndex, error)); ok { return rf(cometBFTAddress) } - if rf, ok := ret.Get(0).(func([]byte) math.U64); ok { + if rf, ok := ret.Get(0).(func([]byte) math.ValidatorIndex); ok { r0 = rf(cometBFTAddress) } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.ValidatorIndex) } if rf, ok := ret.Get(1).(func([]byte) error); ok { @@ -1292,33 +1290,33 @@ func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, E return _c } -func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func([]byte) (math.U64, error)) *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func([]byte) (math.ValidatorIndex, error)) *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // ValidatorIndexByPubkey provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.U64, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.ValidatorIndex, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for ValidatorIndexByPubkey") } - var r0 math.U64 + var r0 math.ValidatorIndex var r1 error - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.ValidatorIndex, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.U64); ok { + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.ValidatorIndex); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.ValidatorIndex) } if rf, ok := ret.Get(1).(func(crypto.BLSPubkey) error); ok { @@ -1348,12 +1346,12 @@ func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, return _c } -func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(crypto.BLSPubkey) (math.U64, error)) *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(crypto.BLSPubkey) (math.ValidatorIndex, error)) *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/block_store.mock.go b/mod/node-api/backend/mocks/block_store.mock.go index 4e532a619f..74f3b716a2 100644 --- a/mod/node-api/backend/mocks/block_store.mock.go +++ b/mod/node-api/backend/mocks/block_store.mock.go @@ -23,22 +23,22 @@ func (_m *BlockStore[BeaconBlockT]) EXPECT() *BlockStore_Expecter[BeaconBlockT] } // GetParentSlotByTimestamp provides a mock function with given fields: timestamp -func (_m *BlockStore[BeaconBlockT]) GetParentSlotByTimestamp(timestamp math.U64) (math.U64, error) { +func (_m *BlockStore[BeaconBlockT]) GetParentSlotByTimestamp(timestamp math.U64) (math.Slot, error) { ret := _m.Called(timestamp) if len(ret) == 0 { panic("no return value specified for GetParentSlotByTimestamp") } - var r0 math.U64 + var r0 math.Slot var r1 error - if rf, ok := ret.Get(0).(func(math.U64) (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func(math.U64) (math.Slot, error)); ok { return rf(timestamp) } - if rf, ok := ret.Get(0).(func(math.U64) math.U64); ok { + if rf, ok := ret.Get(0).(func(math.U64) math.Slot); ok { r0 = rf(timestamp) } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.Slot) } if rf, ok := ret.Get(1).(func(math.U64) error); ok { @@ -68,33 +68,33 @@ func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) Run(run func(t return _c } -func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT] { +func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) Return(_a0 math.Slot, _a1 error) *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) RunAndReturn(run func(math.U64) (math.U64, error)) *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT] { +func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) RunAndReturn(run func(math.U64) (math.Slot, error)) *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT] { _c.Call.Return(run) return _c } // GetSlotByBlockRoot provides a mock function with given fields: root -func (_m *BlockStore[BeaconBlockT]) GetSlotByBlockRoot(root common.Root) (math.U64, error) { +func (_m *BlockStore[BeaconBlockT]) GetSlotByBlockRoot(root common.Root) (math.Slot, error) { ret := _m.Called(root) if len(ret) == 0 { panic("no return value specified for GetSlotByBlockRoot") } - var r0 math.U64 + var r0 math.Slot var r1 error - if rf, ok := ret.Get(0).(func(common.Root) (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func(common.Root) (math.Slot, error)); ok { return rf(root) } - if rf, ok := ret.Get(0).(func(common.Root) math.U64); ok { + if rf, ok := ret.Get(0).(func(common.Root) math.Slot); ok { r0 = rf(root) } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.Slot) } if rf, ok := ret.Get(1).(func(common.Root) error); ok { @@ -124,33 +124,33 @@ func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) Run(run func(root co return _c } -func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) Return(_a0 math.Slot, _a1 error) *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.U64, error)) *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.Slot, error)) *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT] { _c.Call.Return(run) return _c } // GetSlotByStateRoot provides a mock function with given fields: root -func (_m *BlockStore[BeaconBlockT]) GetSlotByStateRoot(root common.Root) (math.U64, error) { +func (_m *BlockStore[BeaconBlockT]) GetSlotByStateRoot(root common.Root) (math.Slot, error) { ret := _m.Called(root) if len(ret) == 0 { panic("no return value specified for GetSlotByStateRoot") } - var r0 math.U64 + var r0 math.Slot var r1 error - if rf, ok := ret.Get(0).(func(common.Root) (math.U64, error)); ok { + if rf, ok := ret.Get(0).(func(common.Root) (math.Slot, error)); ok { return rf(root) } - if rf, ok := ret.Get(0).(func(common.Root) math.U64); ok { + if rf, ok := ret.Get(0).(func(common.Root) math.Slot); ok { r0 = rf(root) } else { - r0 = ret.Get(0).(math.U64) + r0 = ret.Get(0).(math.Slot) } if rf, ok := ret.Get(1).(func(common.Root) error); ok { @@ -180,12 +180,12 @@ func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Run(run func(root co return _c } -func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Return(_a0 math.Slot, _a1 error) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.U64, error)) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.Slot, error)) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/state_processor.mock.go b/mod/node-api/backend/mocks/state_processor.mock.go index a7103536ed..7dcf5f3002 100644 --- a/mod/node-api/backend/mocks/state_processor.mock.go +++ b/mod/node-api/backend/mocks/state_processor.mock.go @@ -23,7 +23,7 @@ func (_m *StateProcessor[BeaconStateT]) EXPECT() *StateProcessor_Expecter[Beacon } // ProcessSlots provides a mock function with given fields: _a0, _a1 -func (_m *StateProcessor[BeaconStateT]) ProcessSlots(_a0 BeaconStateT, _a1 math.U64) (transition.ValidatorUpdates, error) { +func (_m *StateProcessor[BeaconStateT]) ProcessSlots(_a0 BeaconStateT, _a1 math.Slot) (transition.ValidatorUpdates, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -32,10 +32,10 @@ func (_m *StateProcessor[BeaconStateT]) ProcessSlots(_a0 BeaconStateT, _a1 math. var r0 transition.ValidatorUpdates var r1 error - if rf, ok := ret.Get(0).(func(BeaconStateT, math.U64) (transition.ValidatorUpdates, error)); ok { + if rf, ok := ret.Get(0).(func(BeaconStateT, math.Slot) (transition.ValidatorUpdates, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(BeaconStateT, math.U64) transition.ValidatorUpdates); ok { + if rf, ok := ret.Get(0).(func(BeaconStateT, math.Slot) transition.ValidatorUpdates); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { @@ -43,7 +43,7 @@ func (_m *StateProcessor[BeaconStateT]) ProcessSlots(_a0 BeaconStateT, _a1 math. } } - if rf, ok := ret.Get(1).(func(BeaconStateT, math.U64) error); ok { + if rf, ok := ret.Get(1).(func(BeaconStateT, math.Slot) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -59,14 +59,14 @@ type StateProcessor_ProcessSlots_Call[BeaconStateT any] struct { // ProcessSlots is a helper method to define mock.On call // - _a0 BeaconStateT -// - _a1 math.U64 +// - _a1 math.Slot func (_e *StateProcessor_Expecter[BeaconStateT]) ProcessSlots(_a0 interface{}, _a1 interface{}) *StateProcessor_ProcessSlots_Call[BeaconStateT] { return &StateProcessor_ProcessSlots_Call[BeaconStateT]{Call: _e.mock.On("ProcessSlots", _a0, _a1)} } -func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) Run(run func(_a0 BeaconStateT, _a1 math.U64)) *StateProcessor_ProcessSlots_Call[BeaconStateT] { +func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) Run(run func(_a0 BeaconStateT, _a1 math.Slot)) *StateProcessor_ProcessSlots_Call[BeaconStateT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(BeaconStateT), args[1].(math.U64)) + run(args[0].(BeaconStateT), args[1].(math.Slot)) }) return _c } @@ -76,7 +76,7 @@ func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) Return(_a0 transition. return _c } -func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) RunAndReturn(run func(BeaconStateT, math.U64) (transition.ValidatorUpdates, error)) *StateProcessor_ProcessSlots_Call[BeaconStateT] { +func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) RunAndReturn(run func(BeaconStateT, math.Slot) (transition.ValidatorUpdates, error)) *StateProcessor_ProcessSlots_Call[BeaconStateT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/validator.mock.go b/mod/node-api/backend/mocks/validator.mock.go index 73404aa0d7..655e2123b2 100644 --- a/mod/node-api/backend/mocks/validator.mock.go +++ b/mod/node-api/backend/mocks/validator.mock.go @@ -68,7 +68,7 @@ func (_c *Validator_GetWithdrawalCredentials_Call[WithdrawalCredentialsT]) RunAn } // IsFullyWithdrawable provides a mock function with given fields: amount, epoch -func (_m *Validator[WithdrawalCredentialsT]) IsFullyWithdrawable(amount math.U64, epoch math.U64) bool { +func (_m *Validator[WithdrawalCredentialsT]) IsFullyWithdrawable(amount math.Gwei, epoch math.Epoch) bool { ret := _m.Called(amount, epoch) if len(ret) == 0 { @@ -76,7 +76,7 @@ func (_m *Validator[WithdrawalCredentialsT]) IsFullyWithdrawable(amount math.U64 } var r0 bool - if rf, ok := ret.Get(0).(func(math.U64, math.U64) bool); ok { + if rf, ok := ret.Get(0).(func(math.Gwei, math.Epoch) bool); ok { r0 = rf(amount, epoch) } else { r0 = ret.Get(0).(bool) @@ -91,15 +91,15 @@ type Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT backend.Withdrawa } // IsFullyWithdrawable is a helper method to define mock.On call -// - amount math.U64 -// - epoch math.U64 +// - amount math.Gwei +// - epoch math.Epoch func (_e *Validator_Expecter[WithdrawalCredentialsT]) IsFullyWithdrawable(amount interface{}, epoch interface{}) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { return &Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]{Call: _e.mock.On("IsFullyWithdrawable", amount, epoch)} } -func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) Run(run func(amount math.U64, epoch math.U64)) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { +func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) Run(run func(amount math.Gwei, epoch math.Epoch)) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64), args[1].(math.U64)) + run(args[0].(math.Gwei), args[1].(math.Epoch)) }) return _c } @@ -109,13 +109,13 @@ func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) Return(_a0 return _c } -func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) RunAndReturn(run func(math.U64, math.U64) bool) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { +func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) RunAndReturn(run func(math.Gwei, math.Epoch) bool) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { _c.Call.Return(run) return _c } // IsPartiallyWithdrawable provides a mock function with given fields: amount1, amount2 -func (_m *Validator[WithdrawalCredentialsT]) IsPartiallyWithdrawable(amount1 math.U64, amount2 math.U64) bool { +func (_m *Validator[WithdrawalCredentialsT]) IsPartiallyWithdrawable(amount1 math.Gwei, amount2 math.Gwei) bool { ret := _m.Called(amount1, amount2) if len(ret) == 0 { @@ -123,7 +123,7 @@ func (_m *Validator[WithdrawalCredentialsT]) IsPartiallyWithdrawable(amount1 mat } var r0 bool - if rf, ok := ret.Get(0).(func(math.U64, math.U64) bool); ok { + if rf, ok := ret.Get(0).(func(math.Gwei, math.Gwei) bool); ok { r0 = rf(amount1, amount2) } else { r0 = ret.Get(0).(bool) @@ -138,15 +138,15 @@ type Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT backend.Withd } // IsPartiallyWithdrawable is a helper method to define mock.On call -// - amount1 math.U64 -// - amount2 math.U64 +// - amount1 math.Gwei +// - amount2 math.Gwei func (_e *Validator_Expecter[WithdrawalCredentialsT]) IsPartiallyWithdrawable(amount1 interface{}, amount2 interface{}) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { return &Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]{Call: _e.mock.On("IsPartiallyWithdrawable", amount1, amount2)} } -func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) Run(run func(amount1 math.U64, amount2 math.U64)) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { +func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) Run(run func(amount1 math.Gwei, amount2 math.Gwei)) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64), args[1].(math.U64)) + run(args[0].(math.Gwei), args[1].(math.Gwei)) }) return _c } @@ -156,7 +156,7 @@ func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) Return return _c } -func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) RunAndReturn(run func(math.U64, math.U64) bool) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { +func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) RunAndReturn(run func(math.Gwei, math.Gwei) bool) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/withdrawal.mock.go b/mod/node-api/backend/mocks/withdrawal.mock.go index d7dbcb6747..72fd41fa44 100644 --- a/mod/node-api/backend/mocks/withdrawal.mock.go +++ b/mod/node-api/backend/mocks/withdrawal.mock.go @@ -23,7 +23,7 @@ func (_m *Withdrawal[T]) EXPECT() *Withdrawal_Expecter[T] { } // New provides a mock function with given fields: index, validator, address, amount -func (_m *Withdrawal[T]) New(index math.U64, validator math.U64, address common.ExecutionAddress, amount math.U64) T { +func (_m *Withdrawal[T]) New(index math.U64, validator math.ValidatorIndex, address common.ExecutionAddress, amount math.Gwei) T { ret := _m.Called(index, validator, address, amount) if len(ret) == 0 { @@ -31,7 +31,7 @@ func (_m *Withdrawal[T]) New(index math.U64, validator math.U64, address common. } var r0 T - if rf, ok := ret.Get(0).(func(math.U64, math.U64, common.ExecutionAddress, math.U64) T); ok { + if rf, ok := ret.Get(0).(func(math.U64, math.ValidatorIndex, common.ExecutionAddress, math.Gwei) T); ok { r0 = rf(index, validator, address, amount) } else { r0 = ret.Get(0).(T) @@ -47,16 +47,16 @@ type Withdrawal_New_Call[T any] struct { // New is a helper method to define mock.On call // - index math.U64 -// - validator math.U64 +// - validator math.ValidatorIndex // - address common.ExecutionAddress -// - amount math.U64 +// - amount math.Gwei func (_e *Withdrawal_Expecter[T]) New(index interface{}, validator interface{}, address interface{}, amount interface{}) *Withdrawal_New_Call[T] { return &Withdrawal_New_Call[T]{Call: _e.mock.On("New", index, validator, address, amount)} } -func (_c *Withdrawal_New_Call[T]) Run(run func(index math.U64, validator math.U64, address common.ExecutionAddress, amount math.U64)) *Withdrawal_New_Call[T] { +func (_c *Withdrawal_New_Call[T]) Run(run func(index math.U64, validator math.ValidatorIndex, address common.ExecutionAddress, amount math.Gwei)) *Withdrawal_New_Call[T] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64), args[1].(math.U64), args[2].(common.ExecutionAddress), args[3].(math.U64)) + run(args[0].(math.U64), args[1].(math.ValidatorIndex), args[2].(common.ExecutionAddress), args[3].(math.Gwei)) }) return _c } @@ -66,7 +66,7 @@ func (_c *Withdrawal_New_Call[T]) Return(_a0 T) *Withdrawal_New_Call[T] { return _c } -func (_c *Withdrawal_New_Call[T]) RunAndReturn(run func(math.U64, math.U64, common.ExecutionAddress, math.U64) T) *Withdrawal_New_Call[T] { +func (_c *Withdrawal_New_Call[T]) RunAndReturn(run func(math.U64, math.ValidatorIndex, common.ExecutionAddress, math.Gwei) T) *Withdrawal_New_Call[T] { _c.Call.Return(run) return _c } diff --git a/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go b/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go index 4ea1d83c10..a9e52cb133 100644 --- a/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go +++ b/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go @@ -7,21 +7,21 @@ import ( mock "github.com/stretchr/testify/mock" ) -// BLSSigner is an autogenerated mock type for the BLSSigner type -type BLSSigner struct { +// Blssigner is an autogenerated mock type for the BLSSigner type +type Blssigner struct { mock.Mock } -type BLSSigner_Expecter struct { +type Blssigner_Expecter struct { mock *mock.Mock } -func (_m *BLSSigner) EXPECT() *BLSSigner_Expecter { - return &BLSSigner_Expecter{mock: &_m.Mock} +func (_m *Blssigner) EXPECT() *Blssigner_Expecter { + return &Blssigner_Expecter{mock: &_m.Mock} } // PublicKey provides a mock function with given fields: -func (_m *BLSSigner) PublicKey() crypto.BLSPubkey { +func (_m *Blssigner) PublicKey() crypto.BLSPubkey { ret := _m.Called() if len(ret) == 0 { @@ -40,35 +40,35 @@ func (_m *BLSSigner) PublicKey() crypto.BLSPubkey { return r0 } -// BLSSigner_PublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublicKey' -type BLSSigner_PublicKey_Call struct { +// Blssigner_PublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublicKey' +type Blssigner_PublicKey_Call struct { *mock.Call } // PublicKey is a helper method to define mock.On call -func (_e *BLSSigner_Expecter) PublicKey() *BLSSigner_PublicKey_Call { - return &BLSSigner_PublicKey_Call{Call: _e.mock.On("PublicKey")} +func (_e *Blssigner_Expecter) PublicKey() *Blssigner_PublicKey_Call { + return &Blssigner_PublicKey_Call{Call: _e.mock.On("PublicKey")} } -func (_c *BLSSigner_PublicKey_Call) Run(run func()) *BLSSigner_PublicKey_Call { +func (_c *Blssigner_PublicKey_Call) Run(run func()) *Blssigner_PublicKey_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *BLSSigner_PublicKey_Call) Return(_a0 crypto.BLSPubkey) *BLSSigner_PublicKey_Call { +func (_c *Blssigner_PublicKey_Call) Return(_a0 crypto.BLSPubkey) *Blssigner_PublicKey_Call { _c.Call.Return(_a0) return _c } -func (_c *BLSSigner_PublicKey_Call) RunAndReturn(run func() crypto.BLSPubkey) *BLSSigner_PublicKey_Call { +func (_c *Blssigner_PublicKey_Call) RunAndReturn(run func() crypto.BLSPubkey) *Blssigner_PublicKey_Call { _c.Call.Return(run) return _c } // Sign provides a mock function with given fields: _a0 -func (_m *BLSSigner) Sign(_a0 []byte) (crypto.BLSSignature, error) { +func (_m *Blssigner) Sign(_a0 []byte) (crypto.BLSSignature, error) { ret := _m.Called(_a0) if len(ret) == 0 { @@ -97,36 +97,36 @@ func (_m *BLSSigner) Sign(_a0 []byte) (crypto.BLSSignature, error) { return r0, r1 } -// BLSSigner_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' -type BLSSigner_Sign_Call struct { +// Blssigner_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' +type Blssigner_Sign_Call struct { *mock.Call } // Sign is a helper method to define mock.On call // - _a0 []byte -func (_e *BLSSigner_Expecter) Sign(_a0 interface{}) *BLSSigner_Sign_Call { - return &BLSSigner_Sign_Call{Call: _e.mock.On("Sign", _a0)} +func (_e *Blssigner_Expecter) Sign(_a0 interface{}) *Blssigner_Sign_Call { + return &Blssigner_Sign_Call{Call: _e.mock.On("Sign", _a0)} } -func (_c *BLSSigner_Sign_Call) Run(run func(_a0 []byte)) *BLSSigner_Sign_Call { +func (_c *Blssigner_Sign_Call) Run(run func(_a0 []byte)) *Blssigner_Sign_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte)) }) return _c } -func (_c *BLSSigner_Sign_Call) Return(_a0 crypto.BLSSignature, _a1 error) *BLSSigner_Sign_Call { +func (_c *Blssigner_Sign_Call) Return(_a0 crypto.BLSSignature, _a1 error) *Blssigner_Sign_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *BLSSigner_Sign_Call) RunAndReturn(run func([]byte) (crypto.BLSSignature, error)) *BLSSigner_Sign_Call { +func (_c *Blssigner_Sign_Call) RunAndReturn(run func([]byte) (crypto.BLSSignature, error)) *Blssigner_Sign_Call { _c.Call.Return(run) return _c } // VerifySignature provides a mock function with given fields: pubKey, msg, signature -func (_m *BLSSigner) VerifySignature(pubKey crypto.BLSPubkey, msg []byte, signature crypto.BLSSignature) error { +func (_m *Blssigner) VerifySignature(pubKey crypto.BLSPubkey, msg []byte, signature crypto.BLSSignature) error { ret := _m.Called(pubKey, msg, signature) if len(ret) == 0 { @@ -143,8 +143,8 @@ func (_m *BLSSigner) VerifySignature(pubKey crypto.BLSPubkey, msg []byte, signat return r0 } -// BLSSigner_VerifySignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifySignature' -type BLSSigner_VerifySignature_Call struct { +// Blssigner_VerifySignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifySignature' +type Blssigner_VerifySignature_Call struct { *mock.Call } @@ -152,34 +152,34 @@ type BLSSigner_VerifySignature_Call struct { // - pubKey crypto.BLSPubkey // - msg []byte // - signature crypto.BLSSignature -func (_e *BLSSigner_Expecter) VerifySignature(pubKey interface{}, msg interface{}, signature interface{}) *BLSSigner_VerifySignature_Call { - return &BLSSigner_VerifySignature_Call{Call: _e.mock.On("VerifySignature", pubKey, msg, signature)} +func (_e *Blssigner_Expecter) VerifySignature(pubKey interface{}, msg interface{}, signature interface{}) *Blssigner_VerifySignature_Call { + return &Blssigner_VerifySignature_Call{Call: _e.mock.On("VerifySignature", pubKey, msg, signature)} } -func (_c *BLSSigner_VerifySignature_Call) Run(run func(pubKey crypto.BLSPubkey, msg []byte, signature crypto.BLSSignature)) *BLSSigner_VerifySignature_Call { +func (_c *Blssigner_VerifySignature_Call) Run(run func(pubKey crypto.BLSPubkey, msg []byte, signature crypto.BLSSignature)) *Blssigner_VerifySignature_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(crypto.BLSPubkey), args[1].([]byte), args[2].(crypto.BLSSignature)) }) return _c } -func (_c *BLSSigner_VerifySignature_Call) Return(_a0 error) *BLSSigner_VerifySignature_Call { +func (_c *Blssigner_VerifySignature_Call) Return(_a0 error) *Blssigner_VerifySignature_Call { _c.Call.Return(_a0) return _c } -func (_c *BLSSigner_VerifySignature_Call) RunAndReturn(run func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) *BLSSigner_VerifySignature_Call { +func (_c *Blssigner_VerifySignature_Call) RunAndReturn(run func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) *Blssigner_VerifySignature_Call { _c.Call.Return(run) return _c } -// NewBLSSigner creates a new instance of BLSSigner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// NewBlssigner creates a new instance of Blssigner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. -func NewBLSSigner(t interface { +func NewBlssigner(t interface { mock.TestingT Cleanup(func()) -}) *BLSSigner { - mock := &BLSSigner{} +}) *Blssigner { + mock := &Blssigner{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/mod/state-transition/pkg/core/helpers_test.go b/mod/state-transition/pkg/core/helpers_test.go index 1631830784..b982800a67 100644 --- a/mod/state-transition/pkg/core/helpers_test.go +++ b/mod/state-transition/pkg/core/helpers_test.go @@ -23,6 +23,7 @@ package core_test import ( "context" "fmt" + "testing" corestore "cosmossdk.io/core/store" "cosmossdk.io/log" @@ -32,24 +33,48 @@ import ( "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" "github.com/berachain/beacon-kit/mod/node-core/pkg/components" + "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" "github.com/berachain/beacon-kit/mod/storage/pkg/db" "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" ) -// TODO: replace with proper mock -type testExecutionEngine struct{} - -func (tee *testExecutionEngine) VerifyAndNotifyNewPayload( - _ context.Context, - _ *engineprimitives.NewPayloadRequest[ +func TestExecutionEngine_VerifyAndNotifyNewPayload(t *testing.T) { + mockEngine := mocks.NewExecutionEngine[ *types.ExecutionPayload, + *types.ExecutionPayloadHeader, engineprimitives.Withdrawals, - ], -) error { - return nil + ](t) + + t.Run("successful verification with complete payload", func(t *testing.T) { + req := &engineprimitives.NewPayloadRequest[ + *types.ExecutionPayload, + engineprimitives.Withdrawals, + ]{ + ExecutionPayload: &types.ExecutionPayload{}, + VersionedHashes: []common.ExecutionHash{ + {0x1}, + {0x2}, + }, + ParentBeaconBlockRoot: &common.Root{0x3}, + Optimistic: false, + } + + // Set up expectation for successful verification + mockEngine.EXPECT(). + VerifyAndNotifyNewPayload( + context.Background(), + req, + ). + Return(nil) + + err := mockEngine.VerifyAndNotifyNewPayload(context.Background(), req) + require.NoError(t, err) + }) } type testKVStoreService struct { diff --git a/mod/state-transition/pkg/core/mocks/beacon_block.mock.go b/mod/state-transition/pkg/core/mocks/beacon_block.mock.go new file mode 100644 index 0000000000..9b7182a9b9 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/beacon_block.mock.go @@ -0,0 +1,313 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + core "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// BeaconBlock is an autogenerated mock type for the BeaconBlock type +type BeaconBlock[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + mock.Mock +} + +type BeaconBlock_Expecter[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + mock *mock.Mock +} + +func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) EXPECT() *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{mock: &_m.Mock} +} + +// GetBody provides a mock function with given fields: +func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBody() BeaconBlockBodyT { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBody") + } + + var r0 BeaconBlockBodyT + if rf, ok := ret.Get(0).(func() BeaconBlockBodyT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(BeaconBlockBodyT) + } + + return r0 +} + +// BeaconBlock_GetBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBody' +type BeaconBlock_GetBody_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// GetBody is a helper method to define mock.On call +func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBody() *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBody")} +} + +func (_c *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 BeaconBlockBodyT) *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() BeaconBlockBodyT) *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetParentBlockRoot provides a mock function with given fields: +func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetParentBlockRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetParentBlockRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// BeaconBlock_GetParentBlockRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParentBlockRoot' +type BeaconBlock_GetParentBlockRoot_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// GetParentBlockRoot is a helper method to define mock.On call +func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetParentBlockRoot() *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetParentBlockRoot")} +} + +func (_c *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Root) *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Root) *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetProposerIndex provides a mock function with given fields: +func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetProposerIndex() math.ValidatorIndex { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetProposerIndex") + } + + var r0 math.ValidatorIndex + if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + return r0 +} + +// BeaconBlock_GetProposerIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProposerIndex' +type BeaconBlock_GetProposerIndex_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// GetProposerIndex is a helper method to define mock.On call +func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetProposerIndex() *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetProposerIndex")} +} + +func (_c *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.ValidatorIndex) *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.ValidatorIndex) *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetSlot provides a mock function with given fields: +func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetSlot() math.Slot { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetSlot") + } + + var r0 math.Slot + if rf, ok := ret.Get(0).(func() math.Slot); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Slot) + } + + return r0 +} + +// BeaconBlock_GetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlot' +type BeaconBlock_GetSlot_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// GetSlot is a helper method to define mock.On call +func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetSlot() *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetSlot")} +} + +func (_c *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.Slot) *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.Slot) *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetStateRoot provides a mock function with given fields: +func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetStateRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetStateRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// BeaconBlock_GetStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStateRoot' +type BeaconBlock_GetStateRoot_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// GetStateRoot is a helper method to define mock.On call +func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetStateRoot() *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetStateRoot")} +} + +func (_c *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Root) *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Root) *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// IsNil provides a mock function with given fields: +func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) IsNil() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsNil") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// BeaconBlock_IsNil_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNil' +type BeaconBlock_IsNil_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// IsNil is a helper method to define mock.On call +func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) IsNil() *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("IsNil")} +} + +func (_c *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 bool) *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() bool) *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// NewBeaconBlock creates a new instance of BeaconBlock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBeaconBlock[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any](t interface { + mock.TestingT + Cleanup(func()) +}) *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + mock := &BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/beacon_block_body.mock.go b/mod/state-transition/pkg/core/mocks/beacon_block_body.mock.go new file mode 100644 index 0000000000..cc750bf211 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/beacon_block_body.mock.go @@ -0,0 +1,320 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + core "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + + crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + + eip4844 "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + + mock "github.com/stretchr/testify/mock" +) + +// BeaconBlockBody is an autogenerated mock type for the BeaconBlockBody type +type BeaconBlockBody[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + mock.Mock +} + +type BeaconBlockBody_Expecter[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + mock *mock.Mock +} + +func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) EXPECT() *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{mock: &_m.Mock} +} + +// Empty provides a mock function with given fields: _a0 +func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Empty(_a0 uint32) BeaconBlockBodyT { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Empty") + } + + var r0 BeaconBlockBodyT + if rf, ok := ret.Get(0).(func(uint32) BeaconBlockBodyT); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(BeaconBlockBodyT) + } + + return r0 +} + +// BeaconBlockBody_Empty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Empty' +type BeaconBlockBody_Empty_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// Empty is a helper method to define mock.On call +// - _a0 uint32 +func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Empty(_a0 interface{}) *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("Empty", _a0)} +} + +func (_c *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(_a0 uint32)) *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint32)) + }) + return _c +} + +func (_c *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 BeaconBlockBodyT) *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func(uint32) BeaconBlockBodyT) *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetBlobKzgCommitments provides a mock function with given fields: +func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlobKzgCommitments() eip4844.KZGCommitments[common.ExecutionHash] { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBlobKzgCommitments") + } + + var r0 eip4844.KZGCommitments[common.ExecutionHash] + if rf, ok := ret.Get(0).(func() eip4844.KZGCommitments[common.ExecutionHash]); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(eip4844.KZGCommitments[common.ExecutionHash]) + } + } + + return r0 +} + +// BeaconBlockBody_GetBlobKzgCommitments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlobKzgCommitments' +type BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// GetBlobKzgCommitments is a helper method to define mock.On call +func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlobKzgCommitments() *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBlobKzgCommitments")} +} + +func (_c *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 eip4844.KZGCommitments[common.ExecutionHash]) *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() eip4844.KZGCommitments[common.ExecutionHash]) *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetDeposits provides a mock function with given fields: +func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetDeposits() []DepositT { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetDeposits") + } + + var r0 []DepositT + if rf, ok := ret.Get(0).(func() []DepositT); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]DepositT) + } + } + + return r0 +} + +// BeaconBlockBody_GetDeposits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDeposits' +type BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// GetDeposits is a helper method to define mock.On call +func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetDeposits() *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetDeposits")} +} + +func (_c *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 []DepositT) *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() []DepositT) *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetExecutionPayload provides a mock function with given fields: +func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExecutionPayload() ExecutionPayloadT { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetExecutionPayload") + } + + var r0 ExecutionPayloadT + if rf, ok := ret.Get(0).(func() ExecutionPayloadT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ExecutionPayloadT) + } + + return r0 +} + +// BeaconBlockBody_GetExecutionPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExecutionPayload' +type BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// GetExecutionPayload is a helper method to define mock.On call +func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExecutionPayload() *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetExecutionPayload")} +} + +func (_c *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 ExecutionPayloadT) *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() ExecutionPayloadT) *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetRandaoReveal provides a mock function with given fields: +func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetRandaoReveal() crypto.BLSSignature { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetRandaoReveal") + } + + var r0 crypto.BLSSignature + if rf, ok := ret.Get(0).(func() crypto.BLSSignature); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(crypto.BLSSignature) + } + } + + return r0 +} + +// BeaconBlockBody_GetRandaoReveal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRandaoReveal' +type BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// GetRandaoReveal is a helper method to define mock.On call +func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetRandaoReveal() *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetRandaoReveal")} +} + +func (_c *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 crypto.BLSSignature) *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() crypto.BLSSignature) *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// HashTreeRoot provides a mock function with given fields: +func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) HashTreeRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HashTreeRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// BeaconBlockBody_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' +type BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { + *mock.Call +} + +// HashTreeRoot is a helper method to define mock.On call +func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) HashTreeRoot() *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("HashTreeRoot")} +} + +func (_c *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Root) *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Root) *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// NewBeaconBlockBody creates a new instance of BeaconBlockBody. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBeaconBlockBody[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any](t interface { + mock.TestingT + Cleanup(func()) +}) *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + mock := &BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/beacon_block_header.mock.go b/mod/state-transition/pkg/core/mocks/beacon_block_header.mock.go new file mode 100644 index 0000000000..e8353c6e6d --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/beacon_block_header.mock.go @@ -0,0 +1,399 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// BeaconBlockHeader is an autogenerated mock type for the BeaconBlockHeader type +type BeaconBlockHeader[BeaconBlockHeaderT any] struct { + mock.Mock +} + +type BeaconBlockHeader_Expecter[BeaconBlockHeaderT any] struct { + mock *mock.Mock +} + +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) EXPECT() *BeaconBlockHeader_Expecter[BeaconBlockHeaderT] { + return &BeaconBlockHeader_Expecter[BeaconBlockHeaderT]{mock: &_m.Mock} +} + +// GetBodyRoot provides a mock function with given fields: +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetBodyRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBodyRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// BeaconBlockHeader_GetBodyRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBodyRoot' +type BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT any] struct { + *mock.Call +} + +// GetBodyRoot is a helper method to define mock.On call +func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetBodyRoot() *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT] { + return &BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetBodyRoot")} +} + +func (_c *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT]) Return(_a0 common.Root) *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() common.Root) *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return(run) + return _c +} + +// GetParentBlockRoot provides a mock function with given fields: +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetParentBlockRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetParentBlockRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// BeaconBlockHeader_GetParentBlockRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParentBlockRoot' +type BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT any] struct { + *mock.Call +} + +// GetParentBlockRoot is a helper method to define mock.On call +func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetParentBlockRoot() *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT] { + return &BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetParentBlockRoot")} +} + +func (_c *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]) Return(_a0 common.Root) *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() common.Root) *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return(run) + return _c +} + +// GetProposerIndex provides a mock function with given fields: +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetProposerIndex() math.ValidatorIndex { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetProposerIndex") + } + + var r0 math.ValidatorIndex + if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + return r0 +} + +// BeaconBlockHeader_GetProposerIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProposerIndex' +type BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT any] struct { + *mock.Call +} + +// GetProposerIndex is a helper method to define mock.On call +func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetProposerIndex() *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { + return &BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetProposerIndex")} +} + +func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Return(_a0 math.ValidatorIndex) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.ValidatorIndex) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { + _c.Call.Return(run) + return _c +} + +// GetSlot provides a mock function with given fields: +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetSlot() math.Slot { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetSlot") + } + + var r0 math.Slot + if rf, ok := ret.Get(0).(func() math.Slot); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Slot) + } + + return r0 +} + +// BeaconBlockHeader_GetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlot' +type BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT any] struct { + *mock.Call +} + +// GetSlot is a helper method to define mock.On call +func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetSlot() *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { + return &BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetSlot")} +} + +func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Return(_a0 math.Slot) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.Slot) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { + _c.Call.Return(run) + return _c +} + +// GetStateRoot provides a mock function with given fields: +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetStateRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetStateRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// BeaconBlockHeader_GetStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStateRoot' +type BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT any] struct { + *mock.Call +} + +// GetStateRoot is a helper method to define mock.On call +func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetStateRoot() *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT] { + return &BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetStateRoot")} +} + +func (_c *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT]) Return(_a0 common.Root) *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() common.Root) *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return(run) + return _c +} + +// HashTreeRoot provides a mock function with given fields: +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) HashTreeRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HashTreeRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// BeaconBlockHeader_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' +type BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT any] struct { + *mock.Call +} + +// HashTreeRoot is a helper method to define mock.On call +func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) HashTreeRoot() *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT] { + return &BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("HashTreeRoot")} +} + +func (_c *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT]) Return(_a0 common.Root) *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() common.Root) *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return(run) + return _c +} + +// New provides a mock function with given fields: slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) New(slot math.Slot, proposerIndex math.ValidatorIndex, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root) BeaconBlockHeaderT { + ret := _m.Called(slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot) + + if len(ret) == 0 { + panic("no return value specified for New") + } + + var r0 BeaconBlockHeaderT + if rf, ok := ret.Get(0).(func(math.Slot, math.ValidatorIndex, common.Root, common.Root, common.Root) BeaconBlockHeaderT); ok { + r0 = rf(slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot) + } else { + r0 = ret.Get(0).(BeaconBlockHeaderT) + } + + return r0 +} + +// BeaconBlockHeader_New_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'New' +type BeaconBlockHeader_New_Call[BeaconBlockHeaderT any] struct { + *mock.Call +} + +// New is a helper method to define mock.On call +// - slot math.Slot +// - proposerIndex math.ValidatorIndex +// - parentBlockRoot common.Root +// - stateRoot common.Root +// - bodyRoot common.Root +func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) New(slot interface{}, proposerIndex interface{}, parentBlockRoot interface{}, stateRoot interface{}, bodyRoot interface{}) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { + return &BeaconBlockHeader_New_Call[BeaconBlockHeaderT]{Call: _e.mock.On("New", slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot)} +} + +func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Run(run func(slot math.Slot, proposerIndex math.ValidatorIndex, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root)) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.Slot), args[1].(math.ValidatorIndex), args[2].(common.Root), args[3].(common.Root), args[4].(common.Root)) + }) + return _c +} + +func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Return(_a0 BeaconBlockHeaderT) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) RunAndReturn(run func(math.Slot, math.ValidatorIndex, common.Root, common.Root, common.Root) BeaconBlockHeaderT) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { + _c.Call.Return(run) + return _c +} + +// SetStateRoot provides a mock function with given fields: _a0 +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) SetStateRoot(_a0 common.Root) { + _m.Called(_a0) +} + +// BeaconBlockHeader_SetStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStateRoot' +type BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT any] struct { + *mock.Call +} + +// SetStateRoot is a helper method to define mock.On call +// - _a0 common.Root +func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) SetStateRoot(_a0 interface{}) *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT] { + return &BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("SetStateRoot", _a0)} +} + +func (_c *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT]) Run(run func(_a0 common.Root)) *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Root)) + }) + return _c +} + +func (_c *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT]) Return() *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return() + return _c +} + +func (_c *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func(common.Root)) *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT] { + _c.Call.Return(run) + return _c +} + +// NewBeaconBlockHeader creates a new instance of BeaconBlockHeader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBeaconBlockHeader[BeaconBlockHeaderT any](t interface { + mock.TestingT + Cleanup(func()) +}) *BeaconBlockHeader[BeaconBlockHeaderT] { + mock := &BeaconBlockHeader[BeaconBlockHeaderT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/beacon_state.mock.go b/mod/state-transition/pkg/core/mocks/beacon_state.mock.go new file mode 100644 index 0000000000..c857192228 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/beacon_state.mock.go @@ -0,0 +1,2395 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + context "context" + + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// BeaconState is an autogenerated mock type for the BeaconState type +type BeaconState[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + mock.Mock +} + +type BeaconState_Expecter[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + mock *mock.Mock +} + +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) EXPECT() *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{mock: &_m.Mock} +} + +// AddValidator provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) AddValidator(_a0 ValidatorT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for AddValidator") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_AddValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidator' +type BeaconState_AddValidator_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// AddValidator is a helper method to define mock.On call +// - _a0 ValidatorT +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) AddValidator(_a0 interface{}) *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("AddValidator", _a0)} +} + +func (_c *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 ValidatorT)) *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ValidatorT)) + }) + return _c +} + +func (_c *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(ValidatorT) error) *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// AddValidatorBartio provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) AddValidatorBartio(_a0 ValidatorT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for AddValidatorBartio") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_AddValidatorBartio_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidatorBartio' +type BeaconState_AddValidatorBartio_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// AddValidatorBartio is a helper method to define mock.On call +// - _a0 ValidatorT +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) AddValidatorBartio(_a0 interface{}) *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("AddValidatorBartio", _a0)} +} + +func (_c *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 ValidatorT)) *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ValidatorT)) + }) + return _c +} + +func (_c *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(ValidatorT) error) *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// Context provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Context() context.Context { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Context") + } + + var r0 context.Context + if rf, ok := ret.Get(0).(func() context.Context); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(context.Context) + } + } + + return r0 +} + +// BeaconState_Context_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Context' +type BeaconState_Context_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// Context is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Context() *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("Context")} +} + +func (_c *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 context.Context) *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() context.Context) *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// Copy provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Copy() T { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Copy") + } + + var r0 T + if rf, ok := ret.Get(0).(func() T); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(T) + } + + return r0 +} + +// BeaconState_Copy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Copy' +type BeaconState_Copy_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// Copy is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Copy() *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("Copy")} +} + +func (_c *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 T) *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() T) *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// DecreaseBalance provides a mock function with given fields: _a0, _a1 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) DecreaseBalance(_a0 math.ValidatorIndex, _a1 math.Gwei) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for DecreaseBalance") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex, math.Gwei) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_DecreaseBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DecreaseBalance' +type BeaconState_DecreaseBalance_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// DecreaseBalance is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +// - _a1 math.Gwei +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) DecreaseBalance(_a0 interface{}, _a1 interface{}) *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("DecreaseBalance", _a0, _a1)} +} + +func (_c *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex, _a1 math.Gwei)) *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex), args[1].(math.Gwei)) + }) + return _c +} + +func (_c *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex, math.Gwei) error) *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// ExpectedWithdrawals provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ExpectedWithdrawals() ([]WithdrawalT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for ExpectedWithdrawals") + } + + var r0 []WithdrawalT + var r1 error + if rf, ok := ret.Get(0).(func() ([]WithdrawalT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []WithdrawalT); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]WithdrawalT) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_ExpectedWithdrawals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExpectedWithdrawals' +type BeaconState_ExpectedWithdrawals_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// ExpectedWithdrawals is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ExpectedWithdrawals() *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ExpectedWithdrawals")} +} + +func (_c *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 []WithdrawalT, _a1 error) *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() ([]WithdrawalT, error)) *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetBalance provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 math.ValidatorIndex) (math.Gwei, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetBalance") + } + + var r0 math.Gwei + var r1 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (math.Gwei, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) math.Gwei); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(math.Gwei) + } + + if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBalance' +type BeaconState_GetBalance_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetBalance is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 interface{}) *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBalance", _a0)} +} + +func (_c *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex)) + }) + return _c +} + +func (_c *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (math.Gwei, error)) *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetBlockRootAtIndex provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetBlockRootAtIndex(_a0 uint64) (common.Root, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetBlockRootAtIndex") + } + + var r0 common.Root + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetBlockRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockRootAtIndex' +type BeaconState_GetBlockRootAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetBlockRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetBlockRootAtIndex(_a0 interface{}) *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBlockRootAtIndex", _a0)} +} + +func (_c *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Root, error)) *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetEth1Data provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1Data() (Eth1DataT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetEth1Data") + } + + var r0 Eth1DataT + var r1 error + if rf, ok := ret.Get(0).(func() (Eth1DataT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() Eth1DataT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(Eth1DataT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1Data' +type BeaconState_GetEth1Data_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetEth1Data is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1Data() *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetEth1Data")} +} + +func (_c *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 Eth1DataT, _a1 error) *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (Eth1DataT, error)) *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetEth1DepositIndex provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1DepositIndex() (uint64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetEth1DepositIndex") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func() (uint64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1DepositIndex' +type BeaconState_GetEth1DepositIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetEth1DepositIndex is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1DepositIndex() *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetEth1DepositIndex")} +} + +func (_c *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetFork provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetFork() (ForkT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetFork") + } + + var r0 ForkT + var r1 error + if rf, ok := ret.Get(0).(func() (ForkT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() ForkT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ForkT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetFork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFork' +type BeaconState_GetFork_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetFork is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetFork() *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetFork")} +} + +func (_c *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ForkT, _a1 error) *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ForkT, error)) *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetGenesisValidatorsRoot provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetGenesisValidatorsRoot() (common.Root, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetGenesisValidatorsRoot") + } + + var r0 common.Root + var r1 error + if rf, ok := ret.Get(0).(func() (common.Root, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetGenesisValidatorsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGenesisValidatorsRoot' +type BeaconState_GetGenesisValidatorsRoot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetGenesisValidatorsRoot is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetGenesisValidatorsRoot() *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetGenesisValidatorsRoot")} +} + +func (_c *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (common.Root, error)) *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetLatestBlockHeader provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestBlockHeader() (BeaconBlockHeaderT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLatestBlockHeader") + } + + var r0 BeaconBlockHeaderT + var r1 error + if rf, ok := ret.Get(0).(func() (BeaconBlockHeaderT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() BeaconBlockHeaderT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(BeaconBlockHeaderT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestBlockHeader' +type BeaconState_GetLatestBlockHeader_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetLatestBlockHeader is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestBlockHeader() *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetLatestBlockHeader")} +} + +func (_c *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 BeaconBlockHeaderT, _a1 error) *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (BeaconBlockHeaderT, error)) *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetLatestExecutionPayloadHeader provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestExecutionPayloadHeader() (ExecutionPayloadHeaderT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLatestExecutionPayloadHeader") + } + + var r0 ExecutionPayloadHeaderT + var r1 error + if rf, ok := ret.Get(0).(func() (ExecutionPayloadHeaderT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() ExecutionPayloadHeaderT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ExecutionPayloadHeaderT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestExecutionPayloadHeader' +type BeaconState_GetLatestExecutionPayloadHeader_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetLatestExecutionPayloadHeader is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestExecutionPayloadHeader() *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetLatestExecutionPayloadHeader")} +} + +func (_c *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ExecutionPayloadHeaderT, _a1 error) *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ExecutionPayloadHeaderT, error)) *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetNextWithdrawalIndex provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalIndex() (uint64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNextWithdrawalIndex") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func() (uint64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetNextWithdrawalIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextWithdrawalIndex' +type BeaconState_GetNextWithdrawalIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetNextWithdrawalIndex is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalIndex() *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetNextWithdrawalIndex")} +} + +func (_c *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetNextWithdrawalValidatorIndex provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() (math.ValidatorIndex, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNextWithdrawalValidatorIndex") + } + + var r0 math.ValidatorIndex + var r1 error + if rf, ok := ret.Get(0).(func() (math.ValidatorIndex, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetNextWithdrawalValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextWithdrawalValidatorIndex' +type BeaconState_GetNextWithdrawalValidatorIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetNextWithdrawalValidatorIndex is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetNextWithdrawalValidatorIndex")} +} + +func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.ValidatorIndex, error)) *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetRandaoMixAtIndex provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 uint64) (common.Bytes32, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetRandaoMixAtIndex") + } + + var r0 common.Bytes32 + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (common.Bytes32, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) common.Bytes32); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Bytes32) + } + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRandaoMixAtIndex' +type BeaconState_GetRandaoMixAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetRandaoMixAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 interface{}) *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetRandaoMixAtIndex", _a0)} +} + +func (_c *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Bytes32, _a1 error) *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Bytes32, error)) *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetSlashingAtIndex provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 uint64) (math.Gwei, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetSlashingAtIndex") + } + + var r0 math.Gwei + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(math.Gwei) + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetSlashingAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlashingAtIndex' +type BeaconState_GetSlashingAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetSlashingAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 interface{}) *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetSlashingAtIndex", _a0)} +} + +func (_c *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetSlot provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() (math.Slot, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetSlot") + } + + var r0 math.Slot + var r1 error + if rf, ok := ret.Get(0).(func() (math.Slot, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() math.Slot); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Slot) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlot' +type BeaconState_GetSlot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetSlot is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetSlot")} +} + +func (_c *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Slot, _a1 error) *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Slot, error)) *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetTotalActiveBalances provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 uint64) (math.Gwei, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetTotalActiveBalances") + } + + var r0 math.Gwei + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(math.Gwei) + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetTotalActiveBalances_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalActiveBalances' +type BeaconState_GetTotalActiveBalances_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetTotalActiveBalances is a helper method to define mock.On call +// - _a0 uint64 +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 interface{}) *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalActiveBalances", _a0)} +} + +func (_c *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetTotalSlashing provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() (math.Gwei, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTotalSlashing") + } + + var r0 math.Gwei + var r1 error + if rf, ok := ret.Get(0).(func() (math.Gwei, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() math.Gwei); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Gwei) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetTotalSlashing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalSlashing' +type BeaconState_GetTotalSlashing_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetTotalSlashing is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalSlashing")} +} + +func (_c *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Gwei, error)) *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetTotalValidators provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalValidators() (uint64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTotalValidators") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func() (uint64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetTotalValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalValidators' +type BeaconState_GetTotalValidators_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetTotalValidators is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalValidators() *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalValidators")} +} + +func (_c *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetValidators provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidators() (ValidatorsT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetValidators") + } + + var r0 ValidatorsT + var r1 error + if rf, ok := ret.Get(0).(func() (ValidatorsT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() ValidatorsT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ValidatorsT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidators' +type BeaconState_GetValidators_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetValidators is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidators() *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetValidators")} +} + +func (_c *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ValidatorsT, _a1 error) *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ValidatorsT, error)) *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetValidatorsByEffectiveBalance provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidatorsByEffectiveBalance() ([]ValidatorT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetValidatorsByEffectiveBalance") + } + + var r0 []ValidatorT + var r1 error + if rf, ok := ret.Get(0).(func() ([]ValidatorT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []ValidatorT); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]ValidatorT) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_GetValidatorsByEffectiveBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidatorsByEffectiveBalance' +type BeaconState_GetValidatorsByEffectiveBalance_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetValidatorsByEffectiveBalance is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidatorsByEffectiveBalance() *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetValidatorsByEffectiveBalance")} +} + +func (_c *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 []ValidatorT, _a1 error) *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() ([]ValidatorT, error)) *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// HashTreeRoot provides a mock function with given fields: +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) HashTreeRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HashTreeRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// BeaconState_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' +type BeaconState_HashTreeRoot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// HashTreeRoot is a helper method to define mock.On call +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) HashTreeRoot() *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("HashTreeRoot")} +} + +func (_c *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root) *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() common.Root) *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// IncreaseBalance provides a mock function with given fields: _a0, _a1 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) IncreaseBalance(_a0 math.ValidatorIndex, _a1 math.Gwei) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for IncreaseBalance") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex, math.Gwei) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_IncreaseBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncreaseBalance' +type BeaconState_IncreaseBalance_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// IncreaseBalance is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +// - _a1 math.Gwei +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) IncreaseBalance(_a0 interface{}, _a1 interface{}) *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("IncreaseBalance", _a0, _a1)} +} + +func (_c *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex, _a1 math.Gwei)) *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex), args[1].(math.Gwei)) + }) + return _c +} + +func (_c *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex, math.Gwei) error) *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// NewFromDB provides a mock function with given fields: bdb, cs +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) NewFromDB(bdb KVStoreT, cs common.ChainSpec) T { + ret := _m.Called(bdb, cs) + + if len(ret) == 0 { + panic("no return value specified for NewFromDB") + } + + var r0 T + if rf, ok := ret.Get(0).(func(KVStoreT, common.ChainSpec) T); ok { + r0 = rf(bdb, cs) + } else { + r0 = ret.Get(0).(T) + } + + return r0 +} + +// BeaconState_NewFromDB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewFromDB' +type BeaconState_NewFromDB_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// NewFromDB is a helper method to define mock.On call +// - bdb KVStoreT +// - cs common.ChainSpec +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) NewFromDB(bdb interface{}, cs interface{}) *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("NewFromDB", bdb, cs)} +} + +func (_c *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(bdb KVStoreT, cs common.ChainSpec)) *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(KVStoreT), args[1].(common.ChainSpec)) + }) + return _c +} + +func (_c *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 T) *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(KVStoreT, common.ChainSpec) T) *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetEth1Data provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetEth1Data(_a0 Eth1DataT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetEth1Data") + } + + var r0 error + if rf, ok := ret.Get(0).(func(Eth1DataT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1Data' +type BeaconState_SetEth1Data_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetEth1Data is a helper method to define mock.On call +// - _a0 Eth1DataT +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetEth1Data(_a0 interface{}) *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetEth1Data", _a0)} +} + +func (_c *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 Eth1DataT)) *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Eth1DataT)) + }) + return _c +} + +func (_c *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(Eth1DataT) error) *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetEth1DepositIndex provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetEth1DepositIndex(_a0 uint64) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetEth1DepositIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1DepositIndex' +type BeaconState_SetEth1DepositIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetEth1DepositIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetEth1DepositIndex(_a0 interface{}) *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetEth1DepositIndex", _a0)} +} + +func (_c *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) error) *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetFork provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetFork(_a0 ForkT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetFork") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ForkT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetFork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFork' +type BeaconState_SetFork_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetFork is a helper method to define mock.On call +// - _a0 ForkT +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetFork(_a0 interface{}) *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetFork", _a0)} +} + +func (_c *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 ForkT)) *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ForkT)) + }) + return _c +} + +func (_c *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(ForkT) error) *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetGenesisValidatorsRoot provides a mock function with given fields: root +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetGenesisValidatorsRoot(root common.Root) error { + ret := _m.Called(root) + + if len(ret) == 0 { + panic("no return value specified for SetGenesisValidatorsRoot") + } + + var r0 error + if rf, ok := ret.Get(0).(func(common.Root) error); ok { + r0 = rf(root) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetGenesisValidatorsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetGenesisValidatorsRoot' +type BeaconState_SetGenesisValidatorsRoot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetGenesisValidatorsRoot is a helper method to define mock.On call +// - root common.Root +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetGenesisValidatorsRoot(root interface{}) *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetGenesisValidatorsRoot", root)} +} + +func (_c *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(root common.Root)) *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Root)) + }) + return _c +} + +func (_c *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(common.Root) error) *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetLatestBlockHeader provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetLatestBlockHeader(_a0 BeaconBlockHeaderT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetLatestBlockHeader") + } + + var r0 error + if rf, ok := ret.Get(0).(func(BeaconBlockHeaderT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestBlockHeader' +type BeaconState_SetLatestBlockHeader_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetLatestBlockHeader is a helper method to define mock.On call +// - _a0 BeaconBlockHeaderT +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetLatestBlockHeader(_a0 interface{}) *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetLatestBlockHeader", _a0)} +} + +func (_c *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 BeaconBlockHeaderT)) *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(BeaconBlockHeaderT)) + }) + return _c +} + +func (_c *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(BeaconBlockHeaderT) error) *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetLatestExecutionPayloadHeader provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetLatestExecutionPayloadHeader(_a0 ExecutionPayloadHeaderT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetLatestExecutionPayloadHeader") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ExecutionPayloadHeaderT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestExecutionPayloadHeader' +type BeaconState_SetLatestExecutionPayloadHeader_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetLatestExecutionPayloadHeader is a helper method to define mock.On call +// - _a0 ExecutionPayloadHeaderT +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetLatestExecutionPayloadHeader(_a0 interface{}) *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetLatestExecutionPayloadHeader", _a0)} +} + +func (_c *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 ExecutionPayloadHeaderT)) *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ExecutionPayloadHeaderT)) + }) + return _c +} + +func (_c *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(ExecutionPayloadHeaderT) error) *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetNextWithdrawalIndex provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetNextWithdrawalIndex(_a0 uint64) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetNextWithdrawalIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetNextWithdrawalIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNextWithdrawalIndex' +type BeaconState_SetNextWithdrawalIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetNextWithdrawalIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetNextWithdrawalIndex(_a0 interface{}) *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetNextWithdrawalIndex", _a0)} +} + +func (_c *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) error) *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetNextWithdrawalValidatorIndex provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetNextWithdrawalValidatorIndex(_a0 math.ValidatorIndex) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetNextWithdrawalValidatorIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetNextWithdrawalValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNextWithdrawalValidatorIndex' +type BeaconState_SetNextWithdrawalValidatorIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetNextWithdrawalValidatorIndex is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetNextWithdrawalValidatorIndex(_a0 interface{}) *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetNextWithdrawalValidatorIndex", _a0)} +} + +func (_c *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex)) + }) + return _c +} + +func (_c *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) error) *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetSlot provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 math.Slot) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetSlot") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.Slot) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSlot' +type BeaconState_SetSlot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetSlot is a helper method to define mock.On call +// - _a0 math.Slot +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 interface{}) *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetSlot", _a0)} +} + +func (_c *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.Slot)) *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.Slot)) + }) + return _c +} + +func (_c *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.Slot) error) *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// SetTotalSlashing provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetTotalSlashing(_a0 math.Gwei) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetTotalSlashing") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.Gwei) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_SetTotalSlashing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTotalSlashing' +type BeaconState_SetTotalSlashing_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// SetTotalSlashing is a helper method to define mock.On call +// - _a0 math.Gwei +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetTotalSlashing(_a0 interface{}) *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetTotalSlashing", _a0)} +} + +func (_c *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.Gwei)) *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.Gwei)) + }) + return _c +} + +func (_c *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.Gwei) error) *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// StateRootAtIndex provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) StateRootAtIndex(_a0 uint64) (common.Root, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for StateRootAtIndex") + } + + var r0 common.Root + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_StateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateRootAtIndex' +type BeaconState_StateRootAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// StateRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) StateRootAtIndex(_a0 interface{}) *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("StateRootAtIndex", _a0)} +} + +func (_c *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Root, error)) *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// UpdateBlockRootAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateBlockRootAtIndex(_a0 uint64, _a1 common.Root) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateBlockRootAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_UpdateBlockRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBlockRootAtIndex' +type BeaconState_UpdateBlockRootAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// UpdateBlockRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 common.Root +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateBlockRootAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateBlockRootAtIndex", _a0, _a1)} +} + +func (_c *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64, _a1 common.Root)) *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(common.Root)) + }) + return _c +} + +func (_c *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64, common.Root) error) *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// UpdateRandaoMixAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateRandaoMixAtIndex(_a0 uint64, _a1 common.Bytes32) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateRandaoMixAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, common.Bytes32) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_UpdateRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRandaoMixAtIndex' +type BeaconState_UpdateRandaoMixAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// UpdateRandaoMixAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 common.Bytes32 +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateRandaoMixAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateRandaoMixAtIndex", _a0, _a1)} +} + +func (_c *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64, _a1 common.Bytes32)) *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(common.Bytes32)) + }) + return _c +} + +func (_c *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64, common.Bytes32) error) *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// UpdateSlashingAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateSlashingAtIndex(_a0 uint64, _a1 math.Gwei) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateSlashingAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, math.Gwei) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_UpdateSlashingAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSlashingAtIndex' +type BeaconState_UpdateSlashingAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// UpdateSlashingAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 math.Gwei +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateSlashingAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateSlashingAtIndex", _a0, _a1)} +} + +func (_c *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64, _a1 math.Gwei)) *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(math.Gwei)) + }) + return _c +} + +func (_c *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64, math.Gwei) error) *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// UpdateStateRootAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateStateRootAtIndex(_a0 uint64, _a1 common.Root) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateStateRootAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_UpdateStateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateRootAtIndex' +type BeaconState_UpdateStateRootAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// UpdateStateRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 common.Root +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateStateRootAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateStateRootAtIndex", _a0, _a1)} +} + +func (_c *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64, _a1 common.Root)) *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(common.Root)) + }) + return _c +} + +func (_c *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64, common.Root) error) *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// UpdateValidatorAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateValidatorAtIndex(_a0 math.ValidatorIndex, _a1 ValidatorT) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateValidatorAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex, ValidatorT) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// BeaconState_UpdateValidatorAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateValidatorAtIndex' +type BeaconState_UpdateValidatorAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// UpdateValidatorAtIndex is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +// - _a1 ValidatorT +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateValidatorAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateValidatorAtIndex", _a0, _a1)} +} + +func (_c *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex, _a1 ValidatorT)) *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex), args[1].(ValidatorT)) + }) + return _c +} + +func (_c *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex, ValidatorT) error) *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// ValidatorByIndex provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 math.ValidatorIndex) (ValidatorT, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for ValidatorByIndex") + } + + var r0 ValidatorT + var r1 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (ValidatorT, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) ValidatorT); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(ValidatorT) + } + + if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_ValidatorByIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorByIndex' +type BeaconState_ValidatorByIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// ValidatorByIndex is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 interface{}) *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorByIndex", _a0)} +} + +func (_c *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex)) + }) + return _c +} + +func (_c *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ValidatorT, _a1 error) *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (ValidatorT, error)) *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// ValidatorIndexByCometBFTAddress provides a mock function with given fields: cometBFTAddress +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress []byte) (math.ValidatorIndex, error) { + ret := _m.Called(cometBFTAddress) + + if len(ret) == 0 { + panic("no return value specified for ValidatorIndexByCometBFTAddress") + } + + var r0 math.ValidatorIndex + var r1 error + if rf, ok := ret.Get(0).(func([]byte) (math.ValidatorIndex, error)); ok { + return rf(cometBFTAddress) + } + if rf, ok := ret.Get(0).(func([]byte) math.ValidatorIndex); ok { + r0 = rf(cometBFTAddress) + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + if rf, ok := ret.Get(1).(func([]byte) error); ok { + r1 = rf(cometBFTAddress) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_ValidatorIndexByCometBFTAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByCometBFTAddress' +type BeaconState_ValidatorIndexByCometBFTAddress_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// ValidatorIndexByCometBFTAddress is a helper method to define mock.On call +// - cometBFTAddress []byte +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress interface{}) *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorIndexByCometBFTAddress", cometBFTAddress)} +} + +func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(cometBFTAddress []byte)) *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func([]byte) (math.ValidatorIndex, error)) *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// ValidatorIndexByPubkey provides a mock function with given fields: _a0 +func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.ValidatorIndex, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for ValidatorIndexByPubkey") + } + + var r0 math.ValidatorIndex + var r1 error + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.ValidatorIndex, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.ValidatorIndex); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + if rf, ok := ret.Get(1).(func(crypto.BLSPubkey) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BeaconState_ValidatorIndexByPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByPubkey' +type BeaconState_ValidatorIndexByPubkey_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// ValidatorIndexByPubkey is a helper method to define mock.On call +// - _a0 crypto.BLSPubkey +func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 interface{}) *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + return &BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorIndexByPubkey", _a0)} +} + +func (_c *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 crypto.BLSPubkey)) *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(crypto.BLSPubkey)) + }) + return _c +} + +func (_c *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(crypto.BLSPubkey) (math.ValidatorIndex, error)) *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// NewBeaconState creates a new instance of BeaconState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBeaconState[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any](t interface { + mock.TestingT + Cleanup(func()) +}) *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { + mock := &BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/context.mock.go b/mod/state-transition/pkg/core/mocks/context.mock.go new file mode 100644 index 0000000000..580f0c7713 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/context.mock.go @@ -0,0 +1,411 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + time "time" + + mock "github.com/stretchr/testify/mock" +) + +// Context is an autogenerated mock type for the Context type +type Context struct { + mock.Mock +} + +type Context_Expecter struct { + mock *mock.Mock +} + +func (_m *Context) EXPECT() *Context_Expecter { + return &Context_Expecter{mock: &_m.Mock} +} + +// Deadline provides a mock function with given fields: +func (_m *Context) Deadline() (time.Time, bool) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Deadline") + } + + var r0 time.Time + var r1 bool + if rf, ok := ret.Get(0).(func() (time.Time, bool)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() time.Time); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(time.Time) + } + + if rf, ok := ret.Get(1).(func() bool); ok { + r1 = rf() + } else { + r1 = ret.Get(1).(bool) + } + + return r0, r1 +} + +// Context_Deadline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deadline' +type Context_Deadline_Call struct { + *mock.Call +} + +// Deadline is a helper method to define mock.On call +func (_e *Context_Expecter) Deadline() *Context_Deadline_Call { + return &Context_Deadline_Call{Call: _e.mock.On("Deadline")} +} + +func (_c *Context_Deadline_Call) Run(run func()) *Context_Deadline_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Context_Deadline_Call) Return(deadline time.Time, ok bool) *Context_Deadline_Call { + _c.Call.Return(deadline, ok) + return _c +} + +func (_c *Context_Deadline_Call) RunAndReturn(run func() (time.Time, bool)) *Context_Deadline_Call { + _c.Call.Return(run) + return _c +} + +// Done provides a mock function with given fields: +func (_m *Context) Done() <-chan struct{} { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Done") + } + + var r0 <-chan struct{} + if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan struct{}) + } + } + + return r0 +} + +// Context_Done_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Done' +type Context_Done_Call struct { + *mock.Call +} + +// Done is a helper method to define mock.On call +func (_e *Context_Expecter) Done() *Context_Done_Call { + return &Context_Done_Call{Call: _e.mock.On("Done")} +} + +func (_c *Context_Done_Call) Run(run func()) *Context_Done_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Context_Done_Call) Return(_a0 <-chan struct{}) *Context_Done_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Context_Done_Call) RunAndReturn(run func() <-chan struct{}) *Context_Done_Call { + _c.Call.Return(run) + return _c +} + +// Err provides a mock function with given fields: +func (_m *Context) Err() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Err") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Context_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err' +type Context_Err_Call struct { + *mock.Call +} + +// Err is a helper method to define mock.On call +func (_e *Context_Expecter) Err() *Context_Err_Call { + return &Context_Err_Call{Call: _e.mock.On("Err")} +} + +func (_c *Context_Err_Call) Run(run func()) *Context_Err_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Context_Err_Call) Return(_a0 error) *Context_Err_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Context_Err_Call) RunAndReturn(run func() error) *Context_Err_Call { + _c.Call.Return(run) + return _c +} + +// GetOptimisticEngine provides a mock function with given fields: +func (_m *Context) GetOptimisticEngine() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetOptimisticEngine") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Context_GetOptimisticEngine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOptimisticEngine' +type Context_GetOptimisticEngine_Call struct { + *mock.Call +} + +// GetOptimisticEngine is a helper method to define mock.On call +func (_e *Context_Expecter) GetOptimisticEngine() *Context_GetOptimisticEngine_Call { + return &Context_GetOptimisticEngine_Call{Call: _e.mock.On("GetOptimisticEngine")} +} + +func (_c *Context_GetOptimisticEngine_Call) Run(run func()) *Context_GetOptimisticEngine_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Context_GetOptimisticEngine_Call) Return(_a0 bool) *Context_GetOptimisticEngine_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Context_GetOptimisticEngine_Call) RunAndReturn(run func() bool) *Context_GetOptimisticEngine_Call { + _c.Call.Return(run) + return _c +} + +// GetSkipPayloadVerification provides a mock function with given fields: +func (_m *Context) GetSkipPayloadVerification() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetSkipPayloadVerification") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Context_GetSkipPayloadVerification_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSkipPayloadVerification' +type Context_GetSkipPayloadVerification_Call struct { + *mock.Call +} + +// GetSkipPayloadVerification is a helper method to define mock.On call +func (_e *Context_Expecter) GetSkipPayloadVerification() *Context_GetSkipPayloadVerification_Call { + return &Context_GetSkipPayloadVerification_Call{Call: _e.mock.On("GetSkipPayloadVerification")} +} + +func (_c *Context_GetSkipPayloadVerification_Call) Run(run func()) *Context_GetSkipPayloadVerification_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Context_GetSkipPayloadVerification_Call) Return(_a0 bool) *Context_GetSkipPayloadVerification_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Context_GetSkipPayloadVerification_Call) RunAndReturn(run func() bool) *Context_GetSkipPayloadVerification_Call { + _c.Call.Return(run) + return _c +} + +// GetSkipValidateRandao provides a mock function with given fields: +func (_m *Context) GetSkipValidateRandao() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetSkipValidateRandao") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Context_GetSkipValidateRandao_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSkipValidateRandao' +type Context_GetSkipValidateRandao_Call struct { + *mock.Call +} + +// GetSkipValidateRandao is a helper method to define mock.On call +func (_e *Context_Expecter) GetSkipValidateRandao() *Context_GetSkipValidateRandao_Call { + return &Context_GetSkipValidateRandao_Call{Call: _e.mock.On("GetSkipValidateRandao")} +} + +func (_c *Context_GetSkipValidateRandao_Call) Run(run func()) *Context_GetSkipValidateRandao_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Context_GetSkipValidateRandao_Call) Return(_a0 bool) *Context_GetSkipValidateRandao_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Context_GetSkipValidateRandao_Call) RunAndReturn(run func() bool) *Context_GetSkipValidateRandao_Call { + _c.Call.Return(run) + return _c +} + +// GetSkipValidateResult provides a mock function with given fields: +func (_m *Context) GetSkipValidateResult() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetSkipValidateResult") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Context_GetSkipValidateResult_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSkipValidateResult' +type Context_GetSkipValidateResult_Call struct { + *mock.Call +} + +// GetSkipValidateResult is a helper method to define mock.On call +func (_e *Context_Expecter) GetSkipValidateResult() *Context_GetSkipValidateResult_Call { + return &Context_GetSkipValidateResult_Call{Call: _e.mock.On("GetSkipValidateResult")} +} + +func (_c *Context_GetSkipValidateResult_Call) Run(run func()) *Context_GetSkipValidateResult_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Context_GetSkipValidateResult_Call) Return(_a0 bool) *Context_GetSkipValidateResult_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Context_GetSkipValidateResult_Call) RunAndReturn(run func() bool) *Context_GetSkipValidateResult_Call { + _c.Call.Return(run) + return _c +} + +// Value provides a mock function with given fields: key +func (_m *Context) Value(key any) any { + ret := _m.Called(key) + + if len(ret) == 0 { + panic("no return value specified for Value") + } + + var r0 any + if rf, ok := ret.Get(0).(func(any) any); ok { + r0 = rf(key) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(any) + } + } + + return r0 +} + +// Context_Value_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Value' +type Context_Value_Call struct { + *mock.Call +} + +// Value is a helper method to define mock.On call +// - key any +func (_e *Context_Expecter) Value(key interface{}) *Context_Value_Call { + return &Context_Value_Call{Call: _e.mock.On("Value", key)} +} + +func (_c *Context_Value_Call) Run(run func(key any)) *Context_Value_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(any)) + }) + return _c +} + +func (_c *Context_Value_Call) Return(_a0 any) *Context_Value_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Context_Value_Call) RunAndReturn(run func(any) any) *Context_Value_Call { + _c.Call.Return(run) + return _c +} + +// NewContext creates a new instance of Context. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewContext(t interface { + mock.TestingT + Cleanup(func()) +}) *Context { + mock := &Context{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/deposit.mock.go b/mod/state-transition/pkg/core/mocks/deposit.mock.go new file mode 100644 index 0000000000..d424fc8c1d --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/deposit.mock.go @@ -0,0 +1,225 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// Deposit is an autogenerated mock type for the Deposit type +type Deposit[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { + mock.Mock +} + +type Deposit_Expecter[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { + mock *mock.Mock +} + +func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) EXPECT() *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT] { + return &Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]{mock: &_m.Mock} +} + +// GetAmount provides a mock function with given fields: +func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) GetAmount() math.Gwei { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAmount") + } + + var r0 math.Gwei + if rf, ok := ret.Get(0).(func() math.Gwei); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Gwei) + } + + return r0 +} + +// Deposit_GetAmount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAmount' +type Deposit_GetAmount_Call[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// GetAmount is a helper method to define mock.On call +func (_e *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]) GetAmount() *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT] { + return &Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT]{Call: _e.mock.On("GetAmount")} +} + +func (_c *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT]) Run(run func()) *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT]) Return(_a0 math.Gwei) *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT]) RunAndReturn(run func() math.Gwei) *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Return(run) + return _c +} + +// GetPubkey provides a mock function with given fields: +func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) GetPubkey() crypto.BLSPubkey { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPubkey") + } + + var r0 crypto.BLSPubkey + if rf, ok := ret.Get(0).(func() crypto.BLSPubkey); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(crypto.BLSPubkey) + } + } + + return r0 +} + +// Deposit_GetPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPubkey' +type Deposit_GetPubkey_Call[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// GetPubkey is a helper method to define mock.On call +func (_e *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]) GetPubkey() *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT] { + return &Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT]{Call: _e.mock.On("GetPubkey")} +} + +func (_c *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT]) Run(run func()) *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT]) Return(_a0 crypto.BLSPubkey) *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT]) RunAndReturn(run func() crypto.BLSPubkey) *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Return(run) + return _c +} + +// GetWithdrawalCredentials provides a mock function with given fields: +func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) GetWithdrawalCredentials() WithdrawlCredentialsT { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetWithdrawalCredentials") + } + + var r0 WithdrawlCredentialsT + if rf, ok := ret.Get(0).(func() WithdrawlCredentialsT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(WithdrawlCredentialsT) + } + + return r0 +} + +// Deposit_GetWithdrawalCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWithdrawalCredentials' +type Deposit_GetWithdrawalCredentials_Call[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// GetWithdrawalCredentials is a helper method to define mock.On call +func (_e *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]) GetWithdrawalCredentials() *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT] { + return &Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT]{Call: _e.mock.On("GetWithdrawalCredentials")} +} + +func (_c *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT]) Run(run func()) *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT]) Return(_a0 WithdrawlCredentialsT) *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT]) RunAndReturn(run func() WithdrawlCredentialsT) *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Return(run) + return _c +} + +// VerifySignature provides a mock function with given fields: forkData, domainType, signatureVerificationFn +func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) VerifySignature(forkData ForkDataT, domainType common.DomainType, signatureVerificationFn func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) error { + ret := _m.Called(forkData, domainType, signatureVerificationFn) + + if len(ret) == 0 { + panic("no return value specified for VerifySignature") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ForkDataT, common.DomainType, func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) error); ok { + r0 = rf(forkData, domainType, signatureVerificationFn) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Deposit_VerifySignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifySignature' +type Deposit_VerifySignature_Call[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// VerifySignature is a helper method to define mock.On call +// - forkData ForkDataT +// - domainType common.DomainType +// - signatureVerificationFn func(crypto.BLSPubkey , []byte , crypto.BLSSignature) error +func (_e *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]) VerifySignature(forkData interface{}, domainType interface{}, signatureVerificationFn interface{}) *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT] { + return &Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT]{Call: _e.mock.On("VerifySignature", forkData, domainType, signatureVerificationFn)} +} + +func (_c *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT]) Run(run func(forkData ForkDataT, domainType common.DomainType, signatureVerificationFn func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error)) *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ForkDataT), args[1].(common.DomainType), args[2].(func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error)) + }) + return _c +} + +func (_c *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT]) Return(_a0 error) *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT]) RunAndReturn(run func(ForkDataT, common.DomainType, func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) error) *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT] { + _c.Call.Return(run) + return _c +} + +// NewDeposit creates a new instance of Deposit. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewDeposit[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }](t interface { + mock.TestingT + Cleanup(func()) +}) *Deposit[ForkDataT, WithdrawlCredentialsT] { + mock := &Deposit[ForkDataT, WithdrawlCredentialsT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/execution_engine.mock.go b/mod/state-transition/pkg/core/mocks/execution_engine.mock.go new file mode 100644 index 0000000000..77baa04080 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/execution_engine.mock.go @@ -0,0 +1,86 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + context "context" + + engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + core "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + + mock "github.com/stretchr/testify/mock" +) + +// ExecutionEngine is an autogenerated mock type for the ExecutionEngine type +type ExecutionEngine[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.WithdrawalsConstraint] struct { + mock.Mock +} + +type ExecutionEngine_Expecter[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.WithdrawalsConstraint] struct { + mock *mock.Mock +} + +func (_m *ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) EXPECT() *ExecutionEngine_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionEngine_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{mock: &_m.Mock} +} + +// VerifyAndNotifyNewPayload provides a mock function with given fields: ctx, req +func (_m *ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) VerifyAndNotifyNewPayload(ctx context.Context, req *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT]) error { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for VerifyAndNotifyNewPayload") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT]) error); ok { + r0 = rf(ctx, req) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ExecutionEngine_VerifyAndNotifyNewPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyAndNotifyNewPayload' +type ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.WithdrawalsConstraint] struct { + *mock.Call +} + +// VerifyAndNotifyNewPayload is a helper method to define mock.On call +// - ctx context.Context +// - req *engineprimitives.NewPayloadRequest[ExecutionPayloadT,WithdrawalsT] +func (_e *ExecutionEngine_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) VerifyAndNotifyNewPayload(ctx interface{}, req interface{}) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("VerifyAndNotifyNewPayload", ctx, req)} +} + +func (_c *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(ctx context.Context, req *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT])) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT])) + }) + return _c +} + +func (_c *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 error) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func(context.Context, *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT]) error) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// NewExecutionEngine creates a new instance of ExecutionEngine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewExecutionEngine[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.WithdrawalsConstraint](t interface { + mock.TestingT + Cleanup(func()) +}) *ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + mock := &ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/execution_payload.mock.go b/mod/state-transition/pkg/core/mocks/execution_payload.mock.go new file mode 100644 index 0000000000..9f22de5ead --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/execution_payload.mock.go @@ -0,0 +1,1122 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + bytes "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// ExecutionPayload is an autogenerated mock type for the ExecutionPayload type +type ExecutionPayload[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + mock.Mock +} + +type ExecutionPayload_Expecter[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + mock *mock.Mock +} + +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) EXPECT() *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{mock: &_m.Mock} +} + +// Empty provides a mock function with given fields: _a0 +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Empty(_a0 uint32) ExecutionPayloadT { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Empty") + } + + var r0 ExecutionPayloadT + if rf, ok := ret.Get(0).(func(uint32) ExecutionPayloadT); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(ExecutionPayloadT) + } + + return r0 +} + +// ExecutionPayload_Empty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Empty' +type ExecutionPayload_Empty_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// Empty is a helper method to define mock.On call +// - _a0 uint32 +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Empty(_a0 interface{}) *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("Empty", _a0)} +} + +func (_c *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(_a0 uint32)) *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint32)) + }) + return _c +} + +func (_c *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 ExecutionPayloadT) *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func(uint32) ExecutionPayloadT) *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetBaseFeePerGas provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBaseFeePerGas() *math.U256 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBaseFeePerGas") + } + + var r0 *math.U256 + if rf, ok := ret.Get(0).(func() *math.U256); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*math.U256) + } + } + + return r0 +} + +// ExecutionPayload_GetBaseFeePerGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBaseFeePerGas' +type ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetBaseFeePerGas is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBaseFeePerGas() *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBaseFeePerGas")} +} + +func (_c *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 *math.U256) *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() *math.U256) *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetBlobGasUsed provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlobGasUsed() math.U64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBlobGasUsed") + } + + var r0 math.U64 + if rf, ok := ret.Get(0).(func() math.U64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.U64) + } + + return r0 +} + +// ExecutionPayload_GetBlobGasUsed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlobGasUsed' +type ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetBlobGasUsed is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlobGasUsed() *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBlobGasUsed")} +} + +func (_c *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetBlockHash provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlockHash() common.ExecutionHash { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBlockHash") + } + + var r0 common.ExecutionHash + if rf, ok := ret.Get(0).(func() common.ExecutionHash); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.ExecutionHash) + } + } + + return r0 +} + +// ExecutionPayload_GetBlockHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockHash' +type ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetBlockHash is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlockHash() *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBlockHash")} +} + +func (_c *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.ExecutionHash) *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.ExecutionHash) *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetExcessBlobGas provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExcessBlobGas() math.U64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetExcessBlobGas") + } + + var r0 math.U64 + if rf, ok := ret.Get(0).(func() math.U64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.U64) + } + + return r0 +} + +// ExecutionPayload_GetExcessBlobGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExcessBlobGas' +type ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetExcessBlobGas is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExcessBlobGas() *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetExcessBlobGas")} +} + +func (_c *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetExtraData provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExtraData() []byte { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetExtraData") + } + + var r0 []byte + if rf, ok := ret.Get(0).(func() []byte); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + return r0 +} + +// ExecutionPayload_GetExtraData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExtraData' +type ExecutionPayload_GetExtraData_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetExtraData is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExtraData() *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetExtraData")} +} + +func (_c *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 []byte) *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() []byte) *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetFeeRecipient provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetFeeRecipient() common.ExecutionAddress { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetFeeRecipient") + } + + var r0 common.ExecutionAddress + if rf, ok := ret.Get(0).(func() common.ExecutionAddress); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.ExecutionAddress) + } + } + + return r0 +} + +// ExecutionPayload_GetFeeRecipient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFeeRecipient' +type ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetFeeRecipient is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetFeeRecipient() *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetFeeRecipient")} +} + +func (_c *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.ExecutionAddress) *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.ExecutionAddress) *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetGasLimit provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetGasLimit() math.U64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetGasLimit") + } + + var r0 math.U64 + if rf, ok := ret.Get(0).(func() math.U64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.U64) + } + + return r0 +} + +// ExecutionPayload_GetGasLimit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGasLimit' +type ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetGasLimit is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetGasLimit() *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetGasLimit")} +} + +func (_c *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetGasUsed provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetGasUsed() math.U64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetGasUsed") + } + + var r0 math.U64 + if rf, ok := ret.Get(0).(func() math.U64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.U64) + } + + return r0 +} + +// ExecutionPayload_GetGasUsed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGasUsed' +type ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetGasUsed is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetGasUsed() *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetGasUsed")} +} + +func (_c *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetLogsBloom provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetLogsBloom() bytes.B256 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLogsBloom") + } + + var r0 bytes.B256 + if rf, ok := ret.Get(0).(func() bytes.B256); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(bytes.B256) + } + } + + return r0 +} + +// ExecutionPayload_GetLogsBloom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogsBloom' +type ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetLogsBloom is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetLogsBloom() *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetLogsBloom")} +} + +func (_c *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 bytes.B256) *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() bytes.B256) *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetNumber provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetNumber() math.U64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNumber") + } + + var r0 math.U64 + if rf, ok := ret.Get(0).(func() math.U64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.U64) + } + + return r0 +} + +// ExecutionPayload_GetNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNumber' +type ExecutionPayload_GetNumber_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetNumber is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetNumber() *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetNumber")} +} + +func (_c *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetParentHash provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetParentHash() common.ExecutionHash { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetParentHash") + } + + var r0 common.ExecutionHash + if rf, ok := ret.Get(0).(func() common.ExecutionHash); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.ExecutionHash) + } + } + + return r0 +} + +// ExecutionPayload_GetParentHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParentHash' +type ExecutionPayload_GetParentHash_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetParentHash is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetParentHash() *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetParentHash")} +} + +func (_c *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.ExecutionHash) *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.ExecutionHash) *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetPrevRandao provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetPrevRandao() common.Bytes32 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPrevRandao") + } + + var r0 common.Bytes32 + if rf, ok := ret.Get(0).(func() common.Bytes32); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Bytes32) + } + } + + return r0 +} + +// ExecutionPayload_GetPrevRandao_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPrevRandao' +type ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetPrevRandao is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetPrevRandao() *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetPrevRandao")} +} + +func (_c *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Bytes32) *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Bytes32) *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetReceiptsRoot provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetReceiptsRoot() common.Bytes32 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetReceiptsRoot") + } + + var r0 common.Bytes32 + if rf, ok := ret.Get(0).(func() common.Bytes32); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Bytes32) + } + } + + return r0 +} + +// ExecutionPayload_GetReceiptsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReceiptsRoot' +type ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetReceiptsRoot is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetReceiptsRoot() *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetReceiptsRoot")} +} + +func (_c *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Bytes32) *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Bytes32) *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetStateRoot provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetStateRoot() common.Bytes32 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetStateRoot") + } + + var r0 common.Bytes32 + if rf, ok := ret.Get(0).(func() common.Bytes32); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Bytes32) + } + } + + return r0 +} + +// ExecutionPayload_GetStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStateRoot' +type ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetStateRoot is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetStateRoot() *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetStateRoot")} +} + +func (_c *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Bytes32) *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Bytes32) *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetTimestamp provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetTimestamp() math.U64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTimestamp") + } + + var r0 math.U64 + if rf, ok := ret.Get(0).(func() math.U64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.U64) + } + + return r0 +} + +// ExecutionPayload_GetTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimestamp' +type ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetTimestamp is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetTimestamp() *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetTimestamp")} +} + +func (_c *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetTransactions provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetTransactions() engineprimitives.Transactions { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTransactions") + } + + var r0 engineprimitives.Transactions + if rf, ok := ret.Get(0).(func() engineprimitives.Transactions); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(engineprimitives.Transactions) + } + } + + return r0 +} + +// ExecutionPayload_GetTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactions' +type ExecutionPayload_GetTransactions_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetTransactions is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetTransactions() *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetTransactions")} +} + +func (_c *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 engineprimitives.Transactions) *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() engineprimitives.Transactions) *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// GetWithdrawals provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetWithdrawals() WithdrawalsT { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetWithdrawals") + } + + var r0 WithdrawalsT + if rf, ok := ret.Get(0).(func() WithdrawalsT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(WithdrawalsT) + } + + return r0 +} + +// ExecutionPayload_GetWithdrawals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWithdrawals' +type ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// GetWithdrawals is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetWithdrawals() *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetWithdrawals")} +} + +func (_c *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 WithdrawalsT) *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() WithdrawalsT) *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// IsNil provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) IsNil() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsNil") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// ExecutionPayload_IsNil_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNil' +type ExecutionPayload_IsNil_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// IsNil is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) IsNil() *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("IsNil")} +} + +func (_c *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 bool) *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() bool) *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// MarshalJSON provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) MarshalJSON() ([]byte, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for MarshalJSON") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []byte); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ExecutionPayload_MarshalJSON_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarshalJSON' +type ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// MarshalJSON is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) MarshalJSON() *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("MarshalJSON")} +} + +func (_c *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 []byte, _a1 error) *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() ([]byte, error)) *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// ToHeader provides a mock function with given fields: maxWithdrawalsPerPayload, eth1ChainID +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) ToHeader(maxWithdrawalsPerPayload uint64, eth1ChainID uint64) (ExecutionPayloadHeaderT, error) { + ret := _m.Called(maxWithdrawalsPerPayload, eth1ChainID) + + if len(ret) == 0 { + panic("no return value specified for ToHeader") + } + + var r0 ExecutionPayloadHeaderT + var r1 error + if rf, ok := ret.Get(0).(func(uint64, uint64) (ExecutionPayloadHeaderT, error)); ok { + return rf(maxWithdrawalsPerPayload, eth1ChainID) + } + if rf, ok := ret.Get(0).(func(uint64, uint64) ExecutionPayloadHeaderT); ok { + r0 = rf(maxWithdrawalsPerPayload, eth1ChainID) + } else { + r0 = ret.Get(0).(ExecutionPayloadHeaderT) + } + + if rf, ok := ret.Get(1).(func(uint64, uint64) error); ok { + r1 = rf(maxWithdrawalsPerPayload, eth1ChainID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ExecutionPayload_ToHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ToHeader' +type ExecutionPayload_ToHeader_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// ToHeader is a helper method to define mock.On call +// - maxWithdrawalsPerPayload uint64 +// - eth1ChainID uint64 +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) ToHeader(maxWithdrawalsPerPayload interface{}, eth1ChainID interface{}) *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("ToHeader", maxWithdrawalsPerPayload, eth1ChainID)} +} + +func (_c *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(maxWithdrawalsPerPayload uint64, eth1ChainID uint64)) *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(uint64)) + }) + return _c +} + +func (_c *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 ExecutionPayloadHeaderT, _a1 error) *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func(uint64, uint64) (ExecutionPayloadHeaderT, error)) *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// UnmarshalJSON provides a mock function with given fields: _a0 +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) UnmarshalJSON(_a0 []byte) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for UnmarshalJSON") + } + + var r0 error + if rf, ok := ret.Get(0).(func([]byte) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ExecutionPayload_UnmarshalJSON_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnmarshalJSON' +type ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// UnmarshalJSON is a helper method to define mock.On call +// - _a0 []byte +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) UnmarshalJSON(_a0 interface{}) *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("UnmarshalJSON", _a0)} +} + +func (_c *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(_a0 []byte)) *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 error) *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func([]byte) error) *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// Version provides a mock function with given fields: +func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Version() uint32 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Version") + } + + var r0 uint32 + if rf, ok := ret.Get(0).(func() uint32); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint32) + } + + return r0 +} + +// ExecutionPayload_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version' +type ExecutionPayload_Version_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { + *mock.Call +} + +// Version is a helper method to define mock.On call +func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Version() *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("Version")} +} + +func (_c *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 uint32) *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() uint32) *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// NewExecutionPayload creates a new instance of ExecutionPayload. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewExecutionPayload[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any](t interface { + mock.TestingT + Cleanup(func()) +}) *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + mock := &ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/execution_payload_header.mock.go b/mod/state-transition/pkg/core/mocks/execution_payload_header.mock.go new file mode 100644 index 0000000000..eda051f23d --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/execution_payload_header.mock.go @@ -0,0 +1,83 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + mock "github.com/stretchr/testify/mock" +) + +// ExecutionPayloadHeader is an autogenerated mock type for the ExecutionPayloadHeader type +type ExecutionPayloadHeader struct { + mock.Mock +} + +type ExecutionPayloadHeader_Expecter struct { + mock *mock.Mock +} + +func (_m *ExecutionPayloadHeader) EXPECT() *ExecutionPayloadHeader_Expecter { + return &ExecutionPayloadHeader_Expecter{mock: &_m.Mock} +} + +// GetBlockHash provides a mock function with given fields: +func (_m *ExecutionPayloadHeader) GetBlockHash() common.ExecutionHash { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetBlockHash") + } + + var r0 common.ExecutionHash + if rf, ok := ret.Get(0).(func() common.ExecutionHash); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.ExecutionHash) + } + } + + return r0 +} + +// ExecutionPayloadHeader_GetBlockHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockHash' +type ExecutionPayloadHeader_GetBlockHash_Call struct { + *mock.Call +} + +// GetBlockHash is a helper method to define mock.On call +func (_e *ExecutionPayloadHeader_Expecter) GetBlockHash() *ExecutionPayloadHeader_GetBlockHash_Call { + return &ExecutionPayloadHeader_GetBlockHash_Call{Call: _e.mock.On("GetBlockHash")} +} + +func (_c *ExecutionPayloadHeader_GetBlockHash_Call) Run(run func()) *ExecutionPayloadHeader_GetBlockHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ExecutionPayloadHeader_GetBlockHash_Call) Return(_a0 common.ExecutionHash) *ExecutionPayloadHeader_GetBlockHash_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionPayloadHeader_GetBlockHash_Call) RunAndReturn(run func() common.ExecutionHash) *ExecutionPayloadHeader_GetBlockHash_Call { + _c.Call.Return(run) + return _c +} + +// NewExecutionPayloadHeader creates a new instance of ExecutionPayloadHeader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewExecutionPayloadHeader(t interface { + mock.TestingT + Cleanup(func()) +}) *ExecutionPayloadHeader { + mock := &ExecutionPayloadHeader{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/fork_data.mock.go b/mod/state-transition/pkg/core/mocks/fork_data.mock.go new file mode 100644 index 0000000000..5b0d48628a --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/fork_data.mock.go @@ -0,0 +1,134 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// ForkData is an autogenerated mock type for the ForkData type +type ForkData[ForkDataT any] struct { + mock.Mock +} + +type ForkData_Expecter[ForkDataT any] struct { + mock *mock.Mock +} + +func (_m *ForkData[ForkDataT]) EXPECT() *ForkData_Expecter[ForkDataT] { + return &ForkData_Expecter[ForkDataT]{mock: &_m.Mock} +} + +// ComputeRandaoSigningRoot provides a mock function with given fields: domainType, epoch +func (_m *ForkData[ForkDataT]) ComputeRandaoSigningRoot(domainType common.DomainType, epoch math.Epoch) common.Root { + ret := _m.Called(domainType, epoch) + + if len(ret) == 0 { + panic("no return value specified for ComputeRandaoSigningRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func(common.DomainType, math.Epoch) common.Root); ok { + r0 = rf(domainType, epoch) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// ForkData_ComputeRandaoSigningRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ComputeRandaoSigningRoot' +type ForkData_ComputeRandaoSigningRoot_Call[ForkDataT any] struct { + *mock.Call +} + +// ComputeRandaoSigningRoot is a helper method to define mock.On call +// - domainType common.DomainType +// - epoch math.Epoch +func (_e *ForkData_Expecter[ForkDataT]) ComputeRandaoSigningRoot(domainType interface{}, epoch interface{}) *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT] { + return &ForkData_ComputeRandaoSigningRoot_Call[ForkDataT]{Call: _e.mock.On("ComputeRandaoSigningRoot", domainType, epoch)} +} + +func (_c *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT]) Run(run func(domainType common.DomainType, epoch math.Epoch)) *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.DomainType), args[1].(math.Epoch)) + }) + return _c +} + +func (_c *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT]) Return(_a0 common.Root) *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT]) RunAndReturn(run func(common.DomainType, math.Epoch) common.Root) *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT] { + _c.Call.Return(run) + return _c +} + +// New provides a mock function with given fields: _a0, _a1 +func (_m *ForkData[ForkDataT]) New(_a0 common.Version, _a1 common.Root) ForkDataT { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for New") + } + + var r0 ForkDataT + if rf, ok := ret.Get(0).(func(common.Version, common.Root) ForkDataT); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Get(0).(ForkDataT) + } + + return r0 +} + +// ForkData_New_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'New' +type ForkData_New_Call[ForkDataT any] struct { + *mock.Call +} + +// New is a helper method to define mock.On call +// - _a0 common.Version +// - _a1 common.Root +func (_e *ForkData_Expecter[ForkDataT]) New(_a0 interface{}, _a1 interface{}) *ForkData_New_Call[ForkDataT] { + return &ForkData_New_Call[ForkDataT]{Call: _e.mock.On("New", _a0, _a1)} +} + +func (_c *ForkData_New_Call[ForkDataT]) Run(run func(_a0 common.Version, _a1 common.Root)) *ForkData_New_Call[ForkDataT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Version), args[1].(common.Root)) + }) + return _c +} + +func (_c *ForkData_New_Call[ForkDataT]) Return(_a0 ForkDataT) *ForkData_New_Call[ForkDataT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ForkData_New_Call[ForkDataT]) RunAndReturn(run func(common.Version, common.Root) ForkDataT) *ForkData_New_Call[ForkDataT] { + _c.Call.Return(run) + return _c +} + +// NewForkData creates a new instance of ForkData. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewForkData[ForkDataT any](t interface { + mock.TestingT + Cleanup(func()) +}) *ForkData[ForkDataT] { + mock := &ForkData[ForkDataT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/read_only_beacon_state.mock.go b/mod/state-transition/pkg/core/mocks/read_only_beacon_state.mock.go new file mode 100644 index 0000000000..d008b496f2 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/read_only_beacon_state.mock.go @@ -0,0 +1,1326 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// ReadOnlyBeaconState is an autogenerated mock type for the ReadOnlyBeaconState type +type ReadOnlyBeaconState[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + mock.Mock +} + +type ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + mock *mock.Mock +} + +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) EXPECT() *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{mock: &_m.Mock} +} + +// ExpectedWithdrawals provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ExpectedWithdrawals() ([]WithdrawalT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for ExpectedWithdrawals") + } + + var r0 []WithdrawalT + var r1 error + if rf, ok := ret.Get(0).(func() ([]WithdrawalT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []WithdrawalT); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]WithdrawalT) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_ExpectedWithdrawals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExpectedWithdrawals' +type ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// ExpectedWithdrawals is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ExpectedWithdrawals() *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ExpectedWithdrawals")} +} + +func (_c *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 []WithdrawalT, _a1 error) *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() ([]WithdrawalT, error)) *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetBalance provides a mock function with given fields: _a0 +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 math.ValidatorIndex) (math.Gwei, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetBalance") + } + + var r0 math.Gwei + var r1 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (math.Gwei, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) math.Gwei); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(math.Gwei) + } + + if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBalance' +type ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetBalance is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 interface{}) *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBalance", _a0)} +} + +func (_c *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex)) + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (math.Gwei, error)) *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetBlockRootAtIndex provides a mock function with given fields: _a0 +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBlockRootAtIndex(_a0 uint64) (common.Root, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetBlockRootAtIndex") + } + + var r0 common.Root + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetBlockRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockRootAtIndex' +type ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetBlockRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBlockRootAtIndex(_a0 interface{}) *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBlockRootAtIndex", _a0)} +} + +func (_c *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Root, error)) *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetEth1Data provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1Data() (Eth1DataT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetEth1Data") + } + + var r0 Eth1DataT + var r1 error + if rf, ok := ret.Get(0).(func() (Eth1DataT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() Eth1DataT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(Eth1DataT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1Data' +type ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetEth1Data is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1Data() *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetEth1Data")} +} + +func (_c *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 Eth1DataT, _a1 error) *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (Eth1DataT, error)) *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetEth1DepositIndex provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1DepositIndex() (uint64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetEth1DepositIndex") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func() (uint64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1DepositIndex' +type ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetEth1DepositIndex is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1DepositIndex() *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetEth1DepositIndex")} +} + +func (_c *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetFork provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetFork() (ForkT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetFork") + } + + var r0 ForkT + var r1 error + if rf, ok := ret.Get(0).(func() (ForkT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() ForkT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ForkT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetFork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFork' +type ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetFork is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetFork() *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetFork")} +} + +func (_c *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ForkT, _a1 error) *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ForkT, error)) *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetGenesisValidatorsRoot provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetGenesisValidatorsRoot() (common.Root, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetGenesisValidatorsRoot") + } + + var r0 common.Root + var r1 error + if rf, ok := ret.Get(0).(func() (common.Root, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGenesisValidatorsRoot' +type ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetGenesisValidatorsRoot is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetGenesisValidatorsRoot() *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetGenesisValidatorsRoot")} +} + +func (_c *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (common.Root, error)) *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetLatestBlockHeader provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestBlockHeader() (BeaconBlockHeaderT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLatestBlockHeader") + } + + var r0 BeaconBlockHeaderT + var r1 error + if rf, ok := ret.Get(0).(func() (BeaconBlockHeaderT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() BeaconBlockHeaderT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(BeaconBlockHeaderT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestBlockHeader' +type ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetLatestBlockHeader is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestBlockHeader() *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetLatestBlockHeader")} +} + +func (_c *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 BeaconBlockHeaderT, _a1 error) *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (BeaconBlockHeaderT, error)) *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetLatestExecutionPayloadHeader provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestExecutionPayloadHeader() (ExecutionPayloadHeaderT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLatestExecutionPayloadHeader") + } + + var r0 ExecutionPayloadHeaderT + var r1 error + if rf, ok := ret.Get(0).(func() (ExecutionPayloadHeaderT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() ExecutionPayloadHeaderT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ExecutionPayloadHeaderT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestExecutionPayloadHeader' +type ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetLatestExecutionPayloadHeader is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestExecutionPayloadHeader() *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetLatestExecutionPayloadHeader")} +} + +func (_c *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ExecutionPayloadHeaderT, _a1 error) *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ExecutionPayloadHeaderT, error)) *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetNextWithdrawalIndex provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalIndex() (uint64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNextWithdrawalIndex") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func() (uint64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetNextWithdrawalIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextWithdrawalIndex' +type ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetNextWithdrawalIndex is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalIndex() *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetNextWithdrawalIndex")} +} + +func (_c *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetNextWithdrawalValidatorIndex provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() (math.ValidatorIndex, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNextWithdrawalValidatorIndex") + } + + var r0 math.ValidatorIndex + var r1 error + if rf, ok := ret.Get(0).(func() (math.ValidatorIndex, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextWithdrawalValidatorIndex' +type ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetNextWithdrawalValidatorIndex is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetNextWithdrawalValidatorIndex")} +} + +func (_c *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.ValidatorIndex, error)) *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetRandaoMixAtIndex provides a mock function with given fields: _a0 +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 uint64) (common.Bytes32, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetRandaoMixAtIndex") + } + + var r0 common.Bytes32 + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (common.Bytes32, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) common.Bytes32); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Bytes32) + } + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRandaoMixAtIndex' +type ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetRandaoMixAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 interface{}) *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetRandaoMixAtIndex", _a0)} +} + +func (_c *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Bytes32, _a1 error) *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Bytes32, error)) *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetSlashingAtIndex provides a mock function with given fields: _a0 +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 uint64) (math.Gwei, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetSlashingAtIndex") + } + + var r0 math.Gwei + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(math.Gwei) + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetSlashingAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlashingAtIndex' +type ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetSlashingAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 interface{}) *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetSlashingAtIndex", _a0)} +} + +func (_c *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetSlot provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() (math.Slot, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetSlot") + } + + var r0 math.Slot + var r1 error + if rf, ok := ret.Get(0).(func() (math.Slot, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() math.Slot); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Slot) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlot' +type ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetSlot is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetSlot")} +} + +func (_c *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Slot, _a1 error) *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Slot, error)) *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetTotalActiveBalances provides a mock function with given fields: _a0 +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 uint64) (math.Gwei, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetTotalActiveBalances") + } + + var r0 math.Gwei + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(math.Gwei) + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetTotalActiveBalances_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalActiveBalances' +type ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetTotalActiveBalances is a helper method to define mock.On call +// - _a0 uint64 +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 interface{}) *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalActiveBalances", _a0)} +} + +func (_c *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetTotalSlashing provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() (math.Gwei, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTotalSlashing") + } + + var r0 math.Gwei + var r1 error + if rf, ok := ret.Get(0).(func() (math.Gwei, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() math.Gwei); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Gwei) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetTotalSlashing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalSlashing' +type ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetTotalSlashing is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalSlashing")} +} + +func (_c *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Gwei, error)) *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetTotalValidators provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalValidators() (uint64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetTotalValidators") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func() (uint64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetTotalValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalValidators' +type ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetTotalValidators is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalValidators() *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalValidators")} +} + +func (_c *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetValidators provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidators() (ValidatorsT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetValidators") + } + + var r0 ValidatorsT + var r1 error + if rf, ok := ret.Get(0).(func() (ValidatorsT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() ValidatorsT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ValidatorsT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidators' +type ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetValidators is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidators() *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetValidators")} +} + +func (_c *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ValidatorsT, _a1 error) *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ValidatorsT, error)) *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetValidatorsByEffectiveBalance provides a mock function with given fields: +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidatorsByEffectiveBalance() ([]ValidatorT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetValidatorsByEffectiveBalance") + } + + var r0 []ValidatorT + var r1 error + if rf, ok := ret.Get(0).(func() ([]ValidatorT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []ValidatorT); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]ValidatorT) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidatorsByEffectiveBalance' +type ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// GetValidatorsByEffectiveBalance is a helper method to define mock.On call +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidatorsByEffectiveBalance() *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetValidatorsByEffectiveBalance")} +} + +func (_c *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 []ValidatorT, _a1 error) *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() ([]ValidatorT, error)) *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// StateRootAtIndex provides a mock function with given fields: _a0 +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) StateRootAtIndex(_a0 uint64) (common.Root, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for StateRootAtIndex") + } + + var r0 common.Root + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_StateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateRootAtIndex' +type ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// StateRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) StateRootAtIndex(_a0 interface{}) *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("StateRootAtIndex", _a0)} +} + +func (_c *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Root, error)) *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// ValidatorByIndex provides a mock function with given fields: _a0 +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 math.ValidatorIndex) (ValidatorT, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for ValidatorByIndex") + } + + var r0 ValidatorT + var r1 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (ValidatorT, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) ValidatorT); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(ValidatorT) + } + + if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_ValidatorByIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorByIndex' +type ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// ValidatorByIndex is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 interface{}) *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorByIndex", _a0)} +} + +func (_c *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex)) + }) + return _c +} + +func (_c *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ValidatorT, _a1 error) *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (ValidatorT, error)) *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// ValidatorIndexByCometBFTAddress provides a mock function with given fields: cometBFTAddress +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress []byte) (math.ValidatorIndex, error) { + ret := _m.Called(cometBFTAddress) + + if len(ret) == 0 { + panic("no return value specified for ValidatorIndexByCometBFTAddress") + } + + var r0 math.ValidatorIndex + var r1 error + if rf, ok := ret.Get(0).(func([]byte) (math.ValidatorIndex, error)); ok { + return rf(cometBFTAddress) + } + if rf, ok := ret.Get(0).(func([]byte) math.ValidatorIndex); ok { + r0 = rf(cometBFTAddress) + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + if rf, ok := ret.Get(1).(func([]byte) error); ok { + r1 = rf(cometBFTAddress) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByCometBFTAddress' +type ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// ValidatorIndexByCometBFTAddress is a helper method to define mock.On call +// - cometBFTAddress []byte +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress interface{}) *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorIndexByCometBFTAddress", cometBFTAddress)} +} + +func (_c *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(cometBFTAddress []byte)) *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func([]byte) (math.ValidatorIndex, error)) *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// ValidatorIndexByPubkey provides a mock function with given fields: _a0 +func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.ValidatorIndex, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for ValidatorIndexByPubkey") + } + + var r0 math.ValidatorIndex + var r1 error + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.ValidatorIndex, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.ValidatorIndex); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + if rf, ok := ret.Get(1).(func(crypto.BLSPubkey) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyBeaconState_ValidatorIndexByPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByPubkey' +type ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { + *mock.Call +} + +// ValidatorIndexByPubkey is a helper method to define mock.On call +// - _a0 crypto.BLSPubkey +func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 interface{}) *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + return &ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorIndexByPubkey", _a0)} +} + +func (_c *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 crypto.BLSPubkey)) *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(crypto.BLSPubkey)) + }) + return _c +} + +func (_c *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(crypto.BLSPubkey) (math.ValidatorIndex, error)) *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// NewReadOnlyBeaconState creates a new instance of ReadOnlyBeaconState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewReadOnlyBeaconState[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any](t interface { + mock.TestingT + Cleanup(func()) +}) *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { + mock := &ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/read_only_eth_1_data.mock.go b/mod/state-transition/pkg/core/mocks/read_only_eth_1_data.mock.go new file mode 100644 index 0000000000..1956f9c88f --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/read_only_eth_1_data.mock.go @@ -0,0 +1,197 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// ReadOnlyEth1Data is an autogenerated mock type for the ReadOnlyEth1Data type +type ReadOnlyEth1Data[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + mock.Mock +} + +type ReadOnlyEth1Data_Expecter[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + mock *mock.Mock +} + +func (_m *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) EXPECT() *ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT] { + return &ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]{mock: &_m.Mock} +} + +// GetEth1Data provides a mock function with given fields: +func (_m *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) GetEth1Data() (Eth1DataT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetEth1Data") + } + + var r0 Eth1DataT + var r1 error + if rf, ok := ret.Get(0).(func() (Eth1DataT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() Eth1DataT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(Eth1DataT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyEth1Data_GetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1Data' +type ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + *mock.Call +} + +// GetEth1Data is a helper method to define mock.On call +func (_e *ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) GetEth1Data() *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { + return &ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("GetEth1Data")} +} + +func (_c *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func()) *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 Eth1DataT, _a1 error) *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func() (Eth1DataT, error)) *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(run) + return _c +} + +// GetEth1DepositIndex provides a mock function with given fields: +func (_m *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) GetEth1DepositIndex() (uint64, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetEth1DepositIndex") + } + + var r0 uint64 + var r1 error + if rf, ok := ret.Get(0).(func() (uint64, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() uint64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint64) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyEth1Data_GetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1DepositIndex' +type ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + *mock.Call +} + +// GetEth1DepositIndex is a helper method to define mock.On call +func (_e *ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) GetEth1DepositIndex() *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { + return &ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("GetEth1DepositIndex")} +} + +func (_c *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func()) *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 uint64, _a1 error) *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func() (uint64, error)) *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(run) + return _c +} + +// GetLatestExecutionPayloadHeader provides a mock function with given fields: +func (_m *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) GetLatestExecutionPayloadHeader() (ExecutionPayloadHeaderT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetLatestExecutionPayloadHeader") + } + + var r0 ExecutionPayloadHeaderT + var r1 error + if rf, ok := ret.Get(0).(func() (ExecutionPayloadHeaderT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() ExecutionPayloadHeaderT); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ExecutionPayloadHeaderT) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestExecutionPayloadHeader' +type ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + *mock.Call +} + +// GetLatestExecutionPayloadHeader is a helper method to define mock.On call +func (_e *ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) GetLatestExecutionPayloadHeader() *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { + return &ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("GetLatestExecutionPayloadHeader")} +} + +func (_c *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func()) *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 ExecutionPayloadHeaderT, _a1 error) *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func() (ExecutionPayloadHeaderT, error)) *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(run) + return _c +} + +// NewReadOnlyEth1Data creates a new instance of ReadOnlyEth1Data. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewReadOnlyEth1Data[Eth1DataT any, ExecutionPayloadHeaderT any](t interface { + mock.TestingT + Cleanup(func()) +}) *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT] { + mock := &ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/read_only_randao_mixes.mock.go b/mod/state-transition/pkg/core/mocks/read_only_randao_mixes.mock.go new file mode 100644 index 0000000000..099e28e5d2 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/read_only_randao_mixes.mock.go @@ -0,0 +1,94 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + mock "github.com/stretchr/testify/mock" +) + +// ReadOnlyRandaoMixes is an autogenerated mock type for the ReadOnlyRandaoMixes type +type ReadOnlyRandaoMixes struct { + mock.Mock +} + +type ReadOnlyRandaoMixes_Expecter struct { + mock *mock.Mock +} + +func (_m *ReadOnlyRandaoMixes) EXPECT() *ReadOnlyRandaoMixes_Expecter { + return &ReadOnlyRandaoMixes_Expecter{mock: &_m.Mock} +} + +// GetRandaoMixAtIndex provides a mock function with given fields: _a0 +func (_m *ReadOnlyRandaoMixes) GetRandaoMixAtIndex(_a0 uint64) (common.Bytes32, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for GetRandaoMixAtIndex") + } + + var r0 common.Bytes32 + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (common.Bytes32, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) common.Bytes32); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Bytes32) + } + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRandaoMixAtIndex' +type ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call struct { + *mock.Call +} + +// GetRandaoMixAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *ReadOnlyRandaoMixes_Expecter) GetRandaoMixAtIndex(_a0 interface{}) *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call { + return &ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call{Call: _e.mock.On("GetRandaoMixAtIndex", _a0)} +} + +func (_c *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call) Run(run func(_a0 uint64)) *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call) Return(_a0 common.Bytes32, _a1 error) *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call) RunAndReturn(run func(uint64) (common.Bytes32, error)) *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call { + _c.Call.Return(run) + return _c +} + +// NewReadOnlyRandaoMixes creates a new instance of ReadOnlyRandaoMixes. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewReadOnlyRandaoMixes(t interface { + mock.TestingT + Cleanup(func()) +}) *ReadOnlyRandaoMixes { + mock := &ReadOnlyRandaoMixes{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/read_only_state_roots.mock.go b/mod/state-transition/pkg/core/mocks/read_only_state_roots.mock.go new file mode 100644 index 0000000000..be45aad8a2 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/read_only_state_roots.mock.go @@ -0,0 +1,94 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + mock "github.com/stretchr/testify/mock" +) + +// ReadOnlyStateRoots is an autogenerated mock type for the ReadOnlyStateRoots type +type ReadOnlyStateRoots struct { + mock.Mock +} + +type ReadOnlyStateRoots_Expecter struct { + mock *mock.Mock +} + +func (_m *ReadOnlyStateRoots) EXPECT() *ReadOnlyStateRoots_Expecter { + return &ReadOnlyStateRoots_Expecter{mock: &_m.Mock} +} + +// StateRootAtIndex provides a mock function with given fields: _a0 +func (_m *ReadOnlyStateRoots) StateRootAtIndex(_a0 uint64) (common.Root, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for StateRootAtIndex") + } + + var r0 common.Root + var r1 error + if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + if rf, ok := ret.Get(1).(func(uint64) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyStateRoots_StateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateRootAtIndex' +type ReadOnlyStateRoots_StateRootAtIndex_Call struct { + *mock.Call +} + +// StateRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *ReadOnlyStateRoots_Expecter) StateRootAtIndex(_a0 interface{}) *ReadOnlyStateRoots_StateRootAtIndex_Call { + return &ReadOnlyStateRoots_StateRootAtIndex_Call{Call: _e.mock.On("StateRootAtIndex", _a0)} +} + +func (_c *ReadOnlyStateRoots_StateRootAtIndex_Call) Run(run func(_a0 uint64)) *ReadOnlyStateRoots_StateRootAtIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *ReadOnlyStateRoots_StateRootAtIndex_Call) Return(_a0 common.Root, _a1 error) *ReadOnlyStateRoots_StateRootAtIndex_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyStateRoots_StateRootAtIndex_Call) RunAndReturn(run func(uint64) (common.Root, error)) *ReadOnlyStateRoots_StateRootAtIndex_Call { + _c.Call.Return(run) + return _c +} + +// NewReadOnlyStateRoots creates a new instance of ReadOnlyStateRoots. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewReadOnlyStateRoots(t interface { + mock.TestingT + Cleanup(func()) +}) *ReadOnlyStateRoots { + mock := &ReadOnlyStateRoots{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/read_only_validators.mock.go b/mod/state-transition/pkg/core/mocks/read_only_validators.mock.go new file mode 100644 index 0000000000..935e713699 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/read_only_validators.mock.go @@ -0,0 +1,149 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// ReadOnlyValidators is an autogenerated mock type for the ReadOnlyValidators type +type ReadOnlyValidators[ValidatorT any] struct { + mock.Mock +} + +type ReadOnlyValidators_Expecter[ValidatorT any] struct { + mock *mock.Mock +} + +func (_m *ReadOnlyValidators[ValidatorT]) EXPECT() *ReadOnlyValidators_Expecter[ValidatorT] { + return &ReadOnlyValidators_Expecter[ValidatorT]{mock: &_m.Mock} +} + +// ValidatorByIndex provides a mock function with given fields: _a0 +func (_m *ReadOnlyValidators[ValidatorT]) ValidatorByIndex(_a0 math.ValidatorIndex) (ValidatorT, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for ValidatorByIndex") + } + + var r0 ValidatorT + var r1 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (ValidatorT, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) ValidatorT); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(ValidatorT) + } + + if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyValidators_ValidatorByIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorByIndex' +type ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT any] struct { + *mock.Call +} + +// ValidatorByIndex is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +func (_e *ReadOnlyValidators_Expecter[ValidatorT]) ValidatorByIndex(_a0 interface{}) *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT] { + return &ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT]{Call: _e.mock.On("ValidatorByIndex", _a0)} +} + +func (_c *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT]) Run(run func(_a0 math.ValidatorIndex)) *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex)) + }) + return _c +} + +func (_c *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT]) Return(_a0 ValidatorT, _a1 error) *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT]) RunAndReturn(run func(math.ValidatorIndex) (ValidatorT, error)) *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT] { + _c.Call.Return(run) + return _c +} + +// ValidatorIndexByPubkey provides a mock function with given fields: _a0 +func (_m *ReadOnlyValidators[ValidatorT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.ValidatorIndex, error) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for ValidatorIndexByPubkey") + } + + var r0 math.ValidatorIndex + var r1 error + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.ValidatorIndex, error)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.ValidatorIndex); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + if rf, ok := ret.Get(1).(func(crypto.BLSPubkey) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyValidators_ValidatorIndexByPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByPubkey' +type ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT any] struct { + *mock.Call +} + +// ValidatorIndexByPubkey is a helper method to define mock.On call +// - _a0 crypto.BLSPubkey +func (_e *ReadOnlyValidators_Expecter[ValidatorT]) ValidatorIndexByPubkey(_a0 interface{}) *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT] { + return &ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT]{Call: _e.mock.On("ValidatorIndexByPubkey", _a0)} +} + +func (_c *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT]) Run(run func(_a0 crypto.BLSPubkey)) *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(crypto.BLSPubkey)) + }) + return _c +} + +func (_c *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT]) Return(_a0 math.ValidatorIndex, _a1 error) *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT]) RunAndReturn(run func(crypto.BLSPubkey) (math.ValidatorIndex, error)) *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT] { + _c.Call.Return(run) + return _c +} + +// NewReadOnlyValidators creates a new instance of ReadOnlyValidators. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewReadOnlyValidators[ValidatorT any](t interface { + mock.TestingT + Cleanup(func()) +}) *ReadOnlyValidators[ValidatorT] { + mock := &ReadOnlyValidators[ValidatorT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/read_only_withdrawals.mock.go b/mod/state-transition/pkg/core/mocks/read_only_withdrawals.mock.go new file mode 100644 index 0000000000..82b8b930d6 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/read_only_withdrawals.mock.go @@ -0,0 +1,89 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// ReadOnlyWithdrawals is an autogenerated mock type for the ReadOnlyWithdrawals type +type ReadOnlyWithdrawals[WithdrawalT any] struct { + mock.Mock +} + +type ReadOnlyWithdrawals_Expecter[WithdrawalT any] struct { + mock *mock.Mock +} + +func (_m *ReadOnlyWithdrawals[WithdrawalT]) EXPECT() *ReadOnlyWithdrawals_Expecter[WithdrawalT] { + return &ReadOnlyWithdrawals_Expecter[WithdrawalT]{mock: &_m.Mock} +} + +// ExpectedWithdrawals provides a mock function with given fields: +func (_m *ReadOnlyWithdrawals[WithdrawalT]) ExpectedWithdrawals() ([]WithdrawalT, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for ExpectedWithdrawals") + } + + var r0 []WithdrawalT + var r1 error + if rf, ok := ret.Get(0).(func() ([]WithdrawalT, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []WithdrawalT); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]WithdrawalT) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ReadOnlyWithdrawals_ExpectedWithdrawals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExpectedWithdrawals' +type ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT any] struct { + *mock.Call +} + +// ExpectedWithdrawals is a helper method to define mock.On call +func (_e *ReadOnlyWithdrawals_Expecter[WithdrawalT]) ExpectedWithdrawals() *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT] { + return &ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT]{Call: _e.mock.On("ExpectedWithdrawals")} +} + +func (_c *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT]) Run(run func()) *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT]) Return(_a0 []WithdrawalT, _a1 error) *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT]) RunAndReturn(run func() ([]WithdrawalT, error)) *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// NewReadOnlyWithdrawals creates a new instance of ReadOnlyWithdrawals. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewReadOnlyWithdrawals[WithdrawalT any](t interface { + mock.TestingT + Cleanup(func()) +}) *ReadOnlyWithdrawals[WithdrawalT] { + mock := &ReadOnlyWithdrawals[WithdrawalT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/validator.mock.go b/mod/state-transition/pkg/core/mocks/validator.mock.go new file mode 100644 index 0000000000..9245a3de7a --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/validator.mock.go @@ -0,0 +1,500 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// Validator is an autogenerated mock type for the Validator type +type Validator[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + mock.Mock +} + +type Validator_Expecter[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + mock *mock.Mock +} + +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) EXPECT() *Validator_Expecter[ValidatorT, WithdrawalCredentialsT] { + return &Validator_Expecter[ValidatorT, WithdrawalCredentialsT]{mock: &_m.Mock} +} + +// GetEffectiveBalance provides a mock function with given fields: +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) GetEffectiveBalance() math.Gwei { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetEffectiveBalance") + } + + var r0 math.Gwei + if rf, ok := ret.Get(0).(func() math.Gwei); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Gwei) + } + + return r0 +} + +// Validator_GetEffectiveBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEffectiveBalance' +type Validator_GetEffectiveBalance_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// GetEffectiveBalance is a helper method to define mock.On call +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) GetEffectiveBalance() *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("GetEffectiveBalance")} +} + +func (_c *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 math.Gwei) *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() math.Gwei) *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// GetPubkey provides a mock function with given fields: +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) GetPubkey() crypto.BLSPubkey { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetPubkey") + } + + var r0 crypto.BLSPubkey + if rf, ok := ret.Get(0).(func() crypto.BLSPubkey); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(crypto.BLSPubkey) + } + } + + return r0 +} + +// Validator_GetPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPubkey' +type Validator_GetPubkey_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// GetPubkey is a helper method to define mock.On call +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) GetPubkey() *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("GetPubkey")} +} + +func (_c *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 crypto.BLSPubkey) *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() crypto.BLSPubkey) *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// GetWithdrawableEpoch provides a mock function with given fields: +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) GetWithdrawableEpoch() math.Epoch { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetWithdrawableEpoch") + } + + var r0 math.Epoch + if rf, ok := ret.Get(0).(func() math.Epoch); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Epoch) + } + + return r0 +} + +// Validator_GetWithdrawableEpoch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWithdrawableEpoch' +type Validator_GetWithdrawableEpoch_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// GetWithdrawableEpoch is a helper method to define mock.On call +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) GetWithdrawableEpoch() *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("GetWithdrawableEpoch")} +} + +func (_c *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 math.Epoch) *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() math.Epoch) *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// HashTreeRoot provides a mock function with given fields: +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) HashTreeRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HashTreeRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// Validator_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' +type Validator_HashTreeRoot_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// HashTreeRoot is a helper method to define mock.On call +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) HashTreeRoot() *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("HashTreeRoot")} +} + +func (_c *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 common.Root) *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() common.Root) *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// IsSlashed provides a mock function with given fields: +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) IsSlashed() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsSlashed") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Validator_IsSlashed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSlashed' +type Validator_IsSlashed_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// IsSlashed is a helper method to define mock.On call +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) IsSlashed() *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("IsSlashed")} +} + +func (_c *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 bool) *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() bool) *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// MarshalSSZ provides a mock function with given fields: +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) MarshalSSZ() ([]byte, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for MarshalSSZ") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []byte); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Validator_MarshalSSZ_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarshalSSZ' +type Validator_MarshalSSZ_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// MarshalSSZ is a helper method to define mock.On call +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) MarshalSSZ() *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("MarshalSSZ")} +} + +func (_c *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 []byte, _a1 error) *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() ([]byte, error)) *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// New provides a mock function with given fields: pubkey, withdrawalCredentials, amount, effectiveBalanceIncrement, maxEffectiveBalance +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) New(pubkey crypto.BLSPubkey, withdrawalCredentials WithdrawalCredentialsT, amount math.Gwei, effectiveBalanceIncrement math.Gwei, maxEffectiveBalance math.Gwei) ValidatorT { + ret := _m.Called(pubkey, withdrawalCredentials, amount, effectiveBalanceIncrement, maxEffectiveBalance) + + if len(ret) == 0 { + panic("no return value specified for New") + } + + var r0 ValidatorT + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey, WithdrawalCredentialsT, math.Gwei, math.Gwei, math.Gwei) ValidatorT); ok { + r0 = rf(pubkey, withdrawalCredentials, amount, effectiveBalanceIncrement, maxEffectiveBalance) + } else { + r0 = ret.Get(0).(ValidatorT) + } + + return r0 +} + +// Validator_New_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'New' +type Validator_New_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// New is a helper method to define mock.On call +// - pubkey crypto.BLSPubkey +// - withdrawalCredentials WithdrawalCredentialsT +// - amount math.Gwei +// - effectiveBalanceIncrement math.Gwei +// - maxEffectiveBalance math.Gwei +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) New(pubkey interface{}, withdrawalCredentials interface{}, amount interface{}, effectiveBalanceIncrement interface{}, maxEffectiveBalance interface{}) *Validator_New_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_New_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("New", pubkey, withdrawalCredentials, amount, effectiveBalanceIncrement, maxEffectiveBalance)} +} + +func (_c *Validator_New_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func(pubkey crypto.BLSPubkey, withdrawalCredentials WithdrawalCredentialsT, amount math.Gwei, effectiveBalanceIncrement math.Gwei, maxEffectiveBalance math.Gwei)) *Validator_New_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(crypto.BLSPubkey), args[1].(WithdrawalCredentialsT), args[2].(math.Gwei), args[3].(math.Gwei), args[4].(math.Gwei)) + }) + return _c +} + +func (_c *Validator_New_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 ValidatorT) *Validator_New_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Validator_New_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func(crypto.BLSPubkey, WithdrawalCredentialsT, math.Gwei, math.Gwei, math.Gwei) ValidatorT) *Validator_New_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// SetEffectiveBalance provides a mock function with given fields: _a0 +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) SetEffectiveBalance(_a0 math.Gwei) { + _m.Called(_a0) +} + +// Validator_SetEffectiveBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEffectiveBalance' +type Validator_SetEffectiveBalance_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// SetEffectiveBalance is a helper method to define mock.On call +// - _a0 math.Gwei +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) SetEffectiveBalance(_a0 interface{}) *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("SetEffectiveBalance", _a0)} +} + +func (_c *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func(_a0 math.Gwei)) *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.Gwei)) + }) + return _c +} + +func (_c *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) Return() *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return() + return _c +} + +func (_c *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func(math.Gwei)) *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// SizeSSZ provides a mock function with given fields: +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) SizeSSZ() uint32 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for SizeSSZ") + } + + var r0 uint32 + if rf, ok := ret.Get(0).(func() uint32); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(uint32) + } + + return r0 +} + +// Validator_SizeSSZ_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SizeSSZ' +type Validator_SizeSSZ_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// SizeSSZ is a helper method to define mock.On call +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) SizeSSZ() *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("SizeSSZ")} +} + +func (_c *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 uint32) *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() uint32) *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// UnmarshalSSZ provides a mock function with given fields: _a0 +func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) UnmarshalSSZ(_a0 []byte) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for UnmarshalSSZ") + } + + var r0 error + if rf, ok := ret.Get(0).(func([]byte) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Validator_UnmarshalSSZ_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnmarshalSSZ' +type Validator_UnmarshalSSZ_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { + *mock.Call +} + +// UnmarshalSSZ is a helper method to define mock.On call +// - _a0 []byte +func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) UnmarshalSSZ(_a0 interface{}) *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + return &Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("UnmarshalSSZ", _a0)} +} + +func (_c *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func(_a0 []byte)) *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 error) *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func([]byte) error) *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { + _c.Call.Return(run) + return _c +} + +// NewValidator creates a new instance of Validator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewValidator[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }](t interface { + mock.TestingT + Cleanup(func()) +}) *Validator[ValidatorT, WithdrawalCredentialsT] { + mock := &Validator[ValidatorT, WithdrawalCredentialsT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/validators.mock.go b/mod/state-transition/pkg/core/mocks/validators.mock.go new file mode 100644 index 0000000000..15a4fb46bc --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/validators.mock.go @@ -0,0 +1,83 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + mock "github.com/stretchr/testify/mock" +) + +// Validators is an autogenerated mock type for the Validators type +type Validators struct { + mock.Mock +} + +type Validators_Expecter struct { + mock *mock.Mock +} + +func (_m *Validators) EXPECT() *Validators_Expecter { + return &Validators_Expecter{mock: &_m.Mock} +} + +// HashTreeRoot provides a mock function with given fields: +func (_m *Validators) HashTreeRoot() common.Root { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HashTreeRoot") + } + + var r0 common.Root + if rf, ok := ret.Get(0).(func() common.Root); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.Root) + } + } + + return r0 +} + +// Validators_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' +type Validators_HashTreeRoot_Call struct { + *mock.Call +} + +// HashTreeRoot is a helper method to define mock.On call +func (_e *Validators_Expecter) HashTreeRoot() *Validators_HashTreeRoot_Call { + return &Validators_HashTreeRoot_Call{Call: _e.mock.On("HashTreeRoot")} +} + +func (_c *Validators_HashTreeRoot_Call) Run(run func()) *Validators_HashTreeRoot_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Validators_HashTreeRoot_Call) Return(_a0 common.Root) *Validators_HashTreeRoot_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Validators_HashTreeRoot_Call) RunAndReturn(run func() common.Root) *Validators_HashTreeRoot_Call { + _c.Call.Return(run) + return _c +} + +// NewValidators creates a new instance of Validators. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewValidators(t interface { + mock.TestingT + Cleanup(func()) +}) *Validators { + mock := &Validators{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/withdrawal.mock.go b/mod/state-transition/pkg/core/mocks/withdrawal.mock.go new file mode 100644 index 0000000000..e76e91136f --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/withdrawal.mock.go @@ -0,0 +1,266 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// Withdrawal is an autogenerated mock type for the Withdrawal type +type Withdrawal[WithdrawalT any] struct { + mock.Mock +} + +type Withdrawal_Expecter[WithdrawalT any] struct { + mock *mock.Mock +} + +func (_m *Withdrawal[WithdrawalT]) EXPECT() *Withdrawal_Expecter[WithdrawalT] { + return &Withdrawal_Expecter[WithdrawalT]{mock: &_m.Mock} +} + +// Equals provides a mock function with given fields: _a0 +func (_m *Withdrawal[WithdrawalT]) Equals(_a0 WithdrawalT) bool { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for Equals") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(WithdrawalT) bool); ok { + r0 = rf(_a0) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Withdrawal_Equals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Equals' +type Withdrawal_Equals_Call[WithdrawalT any] struct { + *mock.Call +} + +// Equals is a helper method to define mock.On call +// - _a0 WithdrawalT +func (_e *Withdrawal_Expecter[WithdrawalT]) Equals(_a0 interface{}) *Withdrawal_Equals_Call[WithdrawalT] { + return &Withdrawal_Equals_Call[WithdrawalT]{Call: _e.mock.On("Equals", _a0)} +} + +func (_c *Withdrawal_Equals_Call[WithdrawalT]) Run(run func(_a0 WithdrawalT)) *Withdrawal_Equals_Call[WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(WithdrawalT)) + }) + return _c +} + +func (_c *Withdrawal_Equals_Call[WithdrawalT]) Return(_a0 bool) *Withdrawal_Equals_Call[WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Withdrawal_Equals_Call[WithdrawalT]) RunAndReturn(run func(WithdrawalT) bool) *Withdrawal_Equals_Call[WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetAddress provides a mock function with given fields: +func (_m *Withdrawal[WithdrawalT]) GetAddress() common.ExecutionAddress { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAddress") + } + + var r0 common.ExecutionAddress + if rf, ok := ret.Get(0).(func() common.ExecutionAddress); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(common.ExecutionAddress) + } + } + + return r0 +} + +// Withdrawal_GetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAddress' +type Withdrawal_GetAddress_Call[WithdrawalT any] struct { + *mock.Call +} + +// GetAddress is a helper method to define mock.On call +func (_e *Withdrawal_Expecter[WithdrawalT]) GetAddress() *Withdrawal_GetAddress_Call[WithdrawalT] { + return &Withdrawal_GetAddress_Call[WithdrawalT]{Call: _e.mock.On("GetAddress")} +} + +func (_c *Withdrawal_GetAddress_Call[WithdrawalT]) Run(run func()) *Withdrawal_GetAddress_Call[WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Withdrawal_GetAddress_Call[WithdrawalT]) Return(_a0 common.ExecutionAddress) *Withdrawal_GetAddress_Call[WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Withdrawal_GetAddress_Call[WithdrawalT]) RunAndReturn(run func() common.ExecutionAddress) *Withdrawal_GetAddress_Call[WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetAmount provides a mock function with given fields: +func (_m *Withdrawal[WithdrawalT]) GetAmount() math.Gwei { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAmount") + } + + var r0 math.Gwei + if rf, ok := ret.Get(0).(func() math.Gwei); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.Gwei) + } + + return r0 +} + +// Withdrawal_GetAmount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAmount' +type Withdrawal_GetAmount_Call[WithdrawalT any] struct { + *mock.Call +} + +// GetAmount is a helper method to define mock.On call +func (_e *Withdrawal_Expecter[WithdrawalT]) GetAmount() *Withdrawal_GetAmount_Call[WithdrawalT] { + return &Withdrawal_GetAmount_Call[WithdrawalT]{Call: _e.mock.On("GetAmount")} +} + +func (_c *Withdrawal_GetAmount_Call[WithdrawalT]) Run(run func()) *Withdrawal_GetAmount_Call[WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Withdrawal_GetAmount_Call[WithdrawalT]) Return(_a0 math.Gwei) *Withdrawal_GetAmount_Call[WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Withdrawal_GetAmount_Call[WithdrawalT]) RunAndReturn(run func() math.Gwei) *Withdrawal_GetAmount_Call[WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetIndex provides a mock function with given fields: +func (_m *Withdrawal[WithdrawalT]) GetIndex() math.U64 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetIndex") + } + + var r0 math.U64 + if rf, ok := ret.Get(0).(func() math.U64); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.U64) + } + + return r0 +} + +// Withdrawal_GetIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIndex' +type Withdrawal_GetIndex_Call[WithdrawalT any] struct { + *mock.Call +} + +// GetIndex is a helper method to define mock.On call +func (_e *Withdrawal_Expecter[WithdrawalT]) GetIndex() *Withdrawal_GetIndex_Call[WithdrawalT] { + return &Withdrawal_GetIndex_Call[WithdrawalT]{Call: _e.mock.On("GetIndex")} +} + +func (_c *Withdrawal_GetIndex_Call[WithdrawalT]) Run(run func()) *Withdrawal_GetIndex_Call[WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Withdrawal_GetIndex_Call[WithdrawalT]) Return(_a0 math.U64) *Withdrawal_GetIndex_Call[WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Withdrawal_GetIndex_Call[WithdrawalT]) RunAndReturn(run func() math.U64) *Withdrawal_GetIndex_Call[WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// GetValidatorIndex provides a mock function with given fields: +func (_m *Withdrawal[WithdrawalT]) GetValidatorIndex() math.ValidatorIndex { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetValidatorIndex") + } + + var r0 math.ValidatorIndex + if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(math.ValidatorIndex) + } + + return r0 +} + +// Withdrawal_GetValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidatorIndex' +type Withdrawal_GetValidatorIndex_Call[WithdrawalT any] struct { + *mock.Call +} + +// GetValidatorIndex is a helper method to define mock.On call +func (_e *Withdrawal_Expecter[WithdrawalT]) GetValidatorIndex() *Withdrawal_GetValidatorIndex_Call[WithdrawalT] { + return &Withdrawal_GetValidatorIndex_Call[WithdrawalT]{Call: _e.mock.On("GetValidatorIndex")} +} + +func (_c *Withdrawal_GetValidatorIndex_Call[WithdrawalT]) Run(run func()) *Withdrawal_GetValidatorIndex_Call[WithdrawalT] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Withdrawal_GetValidatorIndex_Call[WithdrawalT]) Return(_a0 math.ValidatorIndex) *Withdrawal_GetValidatorIndex_Call[WithdrawalT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Withdrawal_GetValidatorIndex_Call[WithdrawalT]) RunAndReturn(run func() math.ValidatorIndex) *Withdrawal_GetValidatorIndex_Call[WithdrawalT] { + _c.Call.Return(run) + return _c +} + +// NewWithdrawal creates a new instance of Withdrawal. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWithdrawal[WithdrawalT any](t interface { + mock.TestingT + Cleanup(func()) +}) *Withdrawal[WithdrawalT] { + mock := &Withdrawal[WithdrawalT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/withdrawals_constraint.mock.go b/mod/state-transition/pkg/core/mocks/withdrawals_constraint.mock.go new file mode 100644 index 0000000000..291d70a837 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/withdrawals_constraint.mock.go @@ -0,0 +1,115 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + bytes "bytes" + + mock "github.com/stretchr/testify/mock" +) + +// WithdrawalsConstraint is an autogenerated mock type for the WithdrawalsConstraint type +type WithdrawalsConstraint struct { + mock.Mock +} + +type WithdrawalsConstraint_Expecter struct { + mock *mock.Mock +} + +func (_m *WithdrawalsConstraint) EXPECT() *WithdrawalsConstraint_Expecter { + return &WithdrawalsConstraint_Expecter{mock: &_m.Mock} +} + +// EncodeIndex provides a mock function with given fields: _a0, _a1 +func (_m *WithdrawalsConstraint) EncodeIndex(_a0 int, _a1 *bytes.Buffer) { + _m.Called(_a0, _a1) +} + +// WithdrawalsConstraint_EncodeIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EncodeIndex' +type WithdrawalsConstraint_EncodeIndex_Call struct { + *mock.Call +} + +// EncodeIndex is a helper method to define mock.On call +// - _a0 int +// - _a1 *bytes.Buffer +func (_e *WithdrawalsConstraint_Expecter) EncodeIndex(_a0 interface{}, _a1 interface{}) *WithdrawalsConstraint_EncodeIndex_Call { + return &WithdrawalsConstraint_EncodeIndex_Call{Call: _e.mock.On("EncodeIndex", _a0, _a1)} +} + +func (_c *WithdrawalsConstraint_EncodeIndex_Call) Run(run func(_a0 int, _a1 *bytes.Buffer)) *WithdrawalsConstraint_EncodeIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int), args[1].(*bytes.Buffer)) + }) + return _c +} + +func (_c *WithdrawalsConstraint_EncodeIndex_Call) Return() *WithdrawalsConstraint_EncodeIndex_Call { + _c.Call.Return() + return _c +} + +func (_c *WithdrawalsConstraint_EncodeIndex_Call) RunAndReturn(run func(int, *bytes.Buffer)) *WithdrawalsConstraint_EncodeIndex_Call { + _c.Call.Return(run) + return _c +} + +// Len provides a mock function with given fields: +func (_m *WithdrawalsConstraint) Len() int { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Len") + } + + var r0 int + if rf, ok := ret.Get(0).(func() int); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int) + } + + return r0 +} + +// WithdrawalsConstraint_Len_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Len' +type WithdrawalsConstraint_Len_Call struct { + *mock.Call +} + +// Len is a helper method to define mock.On call +func (_e *WithdrawalsConstraint_Expecter) Len() *WithdrawalsConstraint_Len_Call { + return &WithdrawalsConstraint_Len_Call{Call: _e.mock.On("Len")} +} + +func (_c *WithdrawalsConstraint_Len_Call) Run(run func()) *WithdrawalsConstraint_Len_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *WithdrawalsConstraint_Len_Call) Return(_a0 int) *WithdrawalsConstraint_Len_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *WithdrawalsConstraint_Len_Call) RunAndReturn(run func() int) *WithdrawalsConstraint_Len_Call { + _c.Call.Return(run) + return _c +} + +// NewWithdrawalsConstraint creates a new instance of WithdrawalsConstraint. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWithdrawalsConstraint(t interface { + mock.TestingT + Cleanup(func()) +}) *WithdrawalsConstraint { + mock := &WithdrawalsConstraint{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/write_only_beacon_state.mock.go b/mod/state-transition/pkg/core/mocks/write_only_beacon_state.mock.go new file mode 100644 index 0000000000..677433b90c --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/write_only_beacon_state.mock.go @@ -0,0 +1,919 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + mock "github.com/stretchr/testify/mock" +) + +// WriteOnlyBeaconState is an autogenerated mock type for the WriteOnlyBeaconState type +type WriteOnlyBeaconState[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + mock.Mock +} + +type WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + mock *mock.Mock +} + +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) EXPECT() *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{mock: &_m.Mock} +} + +// AddValidator provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) AddValidator(_a0 ValidatorT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for AddValidator") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_AddValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidator' +type WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// AddValidator is a helper method to define mock.On call +// - _a0 ValidatorT +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) AddValidator(_a0 interface{}) *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("AddValidator", _a0)} +} + +func (_c *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 ValidatorT)) *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ValidatorT)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(ValidatorT) error) *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// AddValidatorBartio provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) AddValidatorBartio(_a0 ValidatorT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for AddValidatorBartio") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_AddValidatorBartio_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidatorBartio' +type WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// AddValidatorBartio is a helper method to define mock.On call +// - _a0 ValidatorT +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) AddValidatorBartio(_a0 interface{}) *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("AddValidatorBartio", _a0)} +} + +func (_c *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 ValidatorT)) *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ValidatorT)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(ValidatorT) error) *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// DecreaseBalance provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) DecreaseBalance(_a0 math.ValidatorIndex, _a1 math.Gwei) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for DecreaseBalance") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex, math.Gwei) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_DecreaseBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DecreaseBalance' +type WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// DecreaseBalance is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +// - _a1 math.Gwei +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) DecreaseBalance(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("DecreaseBalance", _a0, _a1)} +} + +func (_c *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.ValidatorIndex, _a1 math.Gwei)) *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex), args[1].(math.Gwei)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.ValidatorIndex, math.Gwei) error) *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// IncreaseBalance provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) IncreaseBalance(_a0 math.ValidatorIndex, _a1 math.Gwei) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for IncreaseBalance") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex, math.Gwei) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_IncreaseBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncreaseBalance' +type WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// IncreaseBalance is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +// - _a1 math.Gwei +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) IncreaseBalance(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("IncreaseBalance", _a0, _a1)} +} + +func (_c *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.ValidatorIndex, _a1 math.Gwei)) *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex), args[1].(math.Gwei)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.ValidatorIndex, math.Gwei) error) *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetEth1Data provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetEth1Data(_a0 Eth1DataT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetEth1Data") + } + + var r0 error + if rf, ok := ret.Get(0).(func(Eth1DataT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1Data' +type WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetEth1Data is a helper method to define mock.On call +// - _a0 Eth1DataT +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetEth1Data(_a0 interface{}) *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetEth1Data", _a0)} +} + +func (_c *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 Eth1DataT)) *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Eth1DataT)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(Eth1DataT) error) *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetEth1DepositIndex provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetEth1DepositIndex(_a0 uint64) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetEth1DepositIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1DepositIndex' +type WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetEth1DepositIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetEth1DepositIndex(_a0 interface{}) *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetEth1DepositIndex", _a0)} +} + +func (_c *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64)) *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64) error) *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetFork provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetFork(_a0 ForkT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetFork") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ForkT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetFork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFork' +type WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetFork is a helper method to define mock.On call +// - _a0 ForkT +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetFork(_a0 interface{}) *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetFork", _a0)} +} + +func (_c *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 ForkT)) *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ForkT)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(ForkT) error) *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetGenesisValidatorsRoot provides a mock function with given fields: root +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetGenesisValidatorsRoot(root common.Root) error { + ret := _m.Called(root) + + if len(ret) == 0 { + panic("no return value specified for SetGenesisValidatorsRoot") + } + + var r0 error + if rf, ok := ret.Get(0).(func(common.Root) error); ok { + r0 = rf(root) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetGenesisValidatorsRoot' +type WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetGenesisValidatorsRoot is a helper method to define mock.On call +// - root common.Root +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetGenesisValidatorsRoot(root interface{}) *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetGenesisValidatorsRoot", root)} +} + +func (_c *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(root common.Root)) *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Root)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(common.Root) error) *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetLatestBlockHeader provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetLatestBlockHeader(_a0 BeaconBlockHeaderT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetLatestBlockHeader") + } + + var r0 error + if rf, ok := ret.Get(0).(func(BeaconBlockHeaderT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestBlockHeader' +type WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetLatestBlockHeader is a helper method to define mock.On call +// - _a0 BeaconBlockHeaderT +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetLatestBlockHeader(_a0 interface{}) *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetLatestBlockHeader", _a0)} +} + +func (_c *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 BeaconBlockHeaderT)) *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(BeaconBlockHeaderT)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(BeaconBlockHeaderT) error) *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetLatestExecutionPayloadHeader provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetLatestExecutionPayloadHeader(_a0 ExecutionPayloadHeaderT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetLatestExecutionPayloadHeader") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ExecutionPayloadHeaderT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestExecutionPayloadHeader' +type WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetLatestExecutionPayloadHeader is a helper method to define mock.On call +// - _a0 ExecutionPayloadHeaderT +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetLatestExecutionPayloadHeader(_a0 interface{}) *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetLatestExecutionPayloadHeader", _a0)} +} + +func (_c *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 ExecutionPayloadHeaderT)) *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ExecutionPayloadHeaderT)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(ExecutionPayloadHeaderT) error) *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetNextWithdrawalIndex provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetNextWithdrawalIndex(_a0 uint64) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetNextWithdrawalIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetNextWithdrawalIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNextWithdrawalIndex' +type WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetNextWithdrawalIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetNextWithdrawalIndex(_a0 interface{}) *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetNextWithdrawalIndex", _a0)} +} + +func (_c *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64)) *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64) error) *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetNextWithdrawalValidatorIndex provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetNextWithdrawalValidatorIndex(_a0 math.ValidatorIndex) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetNextWithdrawalValidatorIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNextWithdrawalValidatorIndex' +type WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetNextWithdrawalValidatorIndex is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetNextWithdrawalValidatorIndex(_a0 interface{}) *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetNextWithdrawalValidatorIndex", _a0)} +} + +func (_c *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.ValidatorIndex)) *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.ValidatorIndex) error) *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetSlot provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetSlot(_a0 math.Slot) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetSlot") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.Slot) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSlot' +type WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetSlot is a helper method to define mock.On call +// - _a0 math.Slot +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetSlot(_a0 interface{}) *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetSlot", _a0)} +} + +func (_c *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.Slot)) *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.Slot)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.Slot) error) *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// SetTotalSlashing provides a mock function with given fields: _a0 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetTotalSlashing(_a0 math.Gwei) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetTotalSlashing") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.Gwei) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_SetTotalSlashing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTotalSlashing' +type WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// SetTotalSlashing is a helper method to define mock.On call +// - _a0 math.Gwei +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetTotalSlashing(_a0 interface{}) *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetTotalSlashing", _a0)} +} + +func (_c *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.Gwei)) *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.Gwei)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.Gwei) error) *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// UpdateBlockRootAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateBlockRootAtIndex(_a0 uint64, _a1 common.Root) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateBlockRootAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBlockRootAtIndex' +type WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// UpdateBlockRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 common.Root +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateBlockRootAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateBlockRootAtIndex", _a0, _a1)} +} + +func (_c *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64, _a1 common.Root)) *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(common.Root)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64, common.Root) error) *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// UpdateRandaoMixAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateRandaoMixAtIndex(_a0 uint64, _a1 common.Bytes32) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateRandaoMixAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, common.Bytes32) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRandaoMixAtIndex' +type WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// UpdateRandaoMixAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 common.Bytes32 +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateRandaoMixAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateRandaoMixAtIndex", _a0, _a1)} +} + +func (_c *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64, _a1 common.Bytes32)) *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(common.Bytes32)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64, common.Bytes32) error) *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// UpdateSlashingAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateSlashingAtIndex(_a0 uint64, _a1 math.Gwei) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateSlashingAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, math.Gwei) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_UpdateSlashingAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSlashingAtIndex' +type WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// UpdateSlashingAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 math.Gwei +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateSlashingAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateSlashingAtIndex", _a0, _a1)} +} + +func (_c *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64, _a1 math.Gwei)) *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(math.Gwei)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64, math.Gwei) error) *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// UpdateStateRootAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateStateRootAtIndex(_a0 uint64, _a1 common.Root) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateStateRootAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_UpdateStateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateRootAtIndex' +type WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// UpdateStateRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 common.Root +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateStateRootAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateStateRootAtIndex", _a0, _a1)} +} + +func (_c *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64, _a1 common.Root)) *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(common.Root)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64, common.Root) error) *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// UpdateValidatorAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateValidatorAtIndex(_a0 math.ValidatorIndex, _a1 ValidatorT) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateValidatorAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex, ValidatorT) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyBeaconState_UpdateValidatorAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateValidatorAtIndex' +type WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { + *mock.Call +} + +// UpdateValidatorAtIndex is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +// - _a1 ValidatorT +func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateValidatorAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + return &WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateValidatorAtIndex", _a0, _a1)} +} + +func (_c *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.ValidatorIndex, _a1 ValidatorT)) *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex), args[1].(ValidatorT)) + }) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.ValidatorIndex, ValidatorT) error) *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + _c.Call.Return(run) + return _c +} + +// NewWriteOnlyBeaconState creates a new instance of WriteOnlyBeaconState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWriteOnlyBeaconState[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any](t interface { + mock.TestingT + Cleanup(func()) +}) *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { + mock := &WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/write_only_eth_1_data.mock.go b/mod/state-transition/pkg/core/mocks/write_only_eth_1_data.mock.go new file mode 100644 index 0000000000..a6020ec38b --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/write_only_eth_1_data.mock.go @@ -0,0 +1,170 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// WriteOnlyEth1Data is an autogenerated mock type for the WriteOnlyEth1Data type +type WriteOnlyEth1Data[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + mock.Mock +} + +type WriteOnlyEth1Data_Expecter[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + mock *mock.Mock +} + +func (_m *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) EXPECT() *WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT] { + return &WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]{mock: &_m.Mock} +} + +// SetEth1Data provides a mock function with given fields: _a0 +func (_m *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) SetEth1Data(_a0 Eth1DataT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetEth1Data") + } + + var r0 error + if rf, ok := ret.Get(0).(func(Eth1DataT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyEth1Data_SetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1Data' +type WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + *mock.Call +} + +// SetEth1Data is a helper method to define mock.On call +// - _a0 Eth1DataT +func (_e *WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) SetEth1Data(_a0 interface{}) *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { + return &WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("SetEth1Data", _a0)} +} + +func (_c *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func(_a0 Eth1DataT)) *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(Eth1DataT)) + }) + return _c +} + +func (_c *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 error) *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func(Eth1DataT) error) *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(run) + return _c +} + +// SetEth1DepositIndex provides a mock function with given fields: _a0 +func (_m *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) SetEth1DepositIndex(_a0 uint64) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetEth1DepositIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyEth1Data_SetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1DepositIndex' +type WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + *mock.Call +} + +// SetEth1DepositIndex is a helper method to define mock.On call +// - _a0 uint64 +func (_e *WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) SetEth1DepositIndex(_a0 interface{}) *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { + return &WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("SetEth1DepositIndex", _a0)} +} + +func (_c *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func(_a0 uint64)) *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 error) *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func(uint64) error) *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(run) + return _c +} + +// SetLatestExecutionPayloadHeader provides a mock function with given fields: _a0 +func (_m *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) SetLatestExecutionPayloadHeader(_a0 ExecutionPayloadHeaderT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for SetLatestExecutionPayloadHeader") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ExecutionPayloadHeaderT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestExecutionPayloadHeader' +type WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { + *mock.Call +} + +// SetLatestExecutionPayloadHeader is a helper method to define mock.On call +// - _a0 ExecutionPayloadHeaderT +func (_e *WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) SetLatestExecutionPayloadHeader(_a0 interface{}) *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { + return &WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("SetLatestExecutionPayloadHeader", _a0)} +} + +func (_c *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func(_a0 ExecutionPayloadHeaderT)) *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ExecutionPayloadHeaderT)) + }) + return _c +} + +func (_c *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 error) *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func(ExecutionPayloadHeaderT) error) *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { + _c.Call.Return(run) + return _c +} + +// NewWriteOnlyEth1Data creates a new instance of WriteOnlyEth1Data. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWriteOnlyEth1Data[Eth1DataT any, ExecutionPayloadHeaderT any](t interface { + mock.TestingT + Cleanup(func()) +}) *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT] { + mock := &WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/write_only_randao_mixes.mock.go b/mod/state-transition/pkg/core/mocks/write_only_randao_mixes.mock.go new file mode 100644 index 0000000000..6cd16f7b52 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/write_only_randao_mixes.mock.go @@ -0,0 +1,83 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + mock "github.com/stretchr/testify/mock" +) + +// WriteOnlyRandaoMixes is an autogenerated mock type for the WriteOnlyRandaoMixes type +type WriteOnlyRandaoMixes struct { + mock.Mock +} + +type WriteOnlyRandaoMixes_Expecter struct { + mock *mock.Mock +} + +func (_m *WriteOnlyRandaoMixes) EXPECT() *WriteOnlyRandaoMixes_Expecter { + return &WriteOnlyRandaoMixes_Expecter{mock: &_m.Mock} +} + +// UpdateRandaoMixAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyRandaoMixes) UpdateRandaoMixAtIndex(_a0 uint64, _a1 common.Bytes32) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateRandaoMixAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, common.Bytes32) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRandaoMixAtIndex' +type WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call struct { + *mock.Call +} + +// UpdateRandaoMixAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 common.Bytes32 +func (_e *WriteOnlyRandaoMixes_Expecter) UpdateRandaoMixAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call { + return &WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call{Call: _e.mock.On("UpdateRandaoMixAtIndex", _a0, _a1)} +} + +func (_c *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call) Run(run func(_a0 uint64, _a1 common.Bytes32)) *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(common.Bytes32)) + }) + return _c +} + +func (_c *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call) Return(_a0 error) *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call) RunAndReturn(run func(uint64, common.Bytes32) error) *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call { + _c.Call.Return(run) + return _c +} + +// NewWriteOnlyRandaoMixes creates a new instance of WriteOnlyRandaoMixes. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWriteOnlyRandaoMixes(t interface { + mock.TestingT + Cleanup(func()) +}) *WriteOnlyRandaoMixes { + mock := &WriteOnlyRandaoMixes{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/write_only_state_roots.mock.go b/mod/state-transition/pkg/core/mocks/write_only_state_roots.mock.go new file mode 100644 index 0000000000..7349015317 --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/write_only_state_roots.mock.go @@ -0,0 +1,83 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + + mock "github.com/stretchr/testify/mock" +) + +// WriteOnlyStateRoots is an autogenerated mock type for the WriteOnlyStateRoots type +type WriteOnlyStateRoots struct { + mock.Mock +} + +type WriteOnlyStateRoots_Expecter struct { + mock *mock.Mock +} + +func (_m *WriteOnlyStateRoots) EXPECT() *WriteOnlyStateRoots_Expecter { + return &WriteOnlyStateRoots_Expecter{mock: &_m.Mock} +} + +// UpdateStateRootAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyStateRoots) UpdateStateRootAtIndex(_a0 uint64, _a1 common.Root) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateStateRootAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyStateRoots_UpdateStateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateRootAtIndex' +type WriteOnlyStateRoots_UpdateStateRootAtIndex_Call struct { + *mock.Call +} + +// UpdateStateRootAtIndex is a helper method to define mock.On call +// - _a0 uint64 +// - _a1 common.Root +func (_e *WriteOnlyStateRoots_Expecter) UpdateStateRootAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call { + return &WriteOnlyStateRoots_UpdateStateRootAtIndex_Call{Call: _e.mock.On("UpdateStateRootAtIndex", _a0, _a1)} +} + +func (_c *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call) Run(run func(_a0 uint64, _a1 common.Root)) *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(common.Root)) + }) + return _c +} + +func (_c *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call) Return(_a0 error) *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call) RunAndReturn(run func(uint64, common.Root) error) *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call { + _c.Call.Return(run) + return _c +} + +// NewWriteOnlyStateRoots creates a new instance of WriteOnlyStateRoots. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWriteOnlyStateRoots(t interface { + mock.TestingT + Cleanup(func()) +}) *WriteOnlyStateRoots { + mock := &WriteOnlyStateRoots{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/mocks/write_only_validators.mock.go b/mod/state-transition/pkg/core/mocks/write_only_validators.mock.go new file mode 100644 index 0000000000..3f4d7bfcac --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/write_only_validators.mock.go @@ -0,0 +1,174 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + mock "github.com/stretchr/testify/mock" +) + +// WriteOnlyValidators is an autogenerated mock type for the WriteOnlyValidators type +type WriteOnlyValidators[ValidatorT any] struct { + mock.Mock +} + +type WriteOnlyValidators_Expecter[ValidatorT any] struct { + mock *mock.Mock +} + +func (_m *WriteOnlyValidators[ValidatorT]) EXPECT() *WriteOnlyValidators_Expecter[ValidatorT] { + return &WriteOnlyValidators_Expecter[ValidatorT]{mock: &_m.Mock} +} + +// AddValidator provides a mock function with given fields: _a0 +func (_m *WriteOnlyValidators[ValidatorT]) AddValidator(_a0 ValidatorT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for AddValidator") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyValidators_AddValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidator' +type WriteOnlyValidators_AddValidator_Call[ValidatorT any] struct { + *mock.Call +} + +// AddValidator is a helper method to define mock.On call +// - _a0 ValidatorT +func (_e *WriteOnlyValidators_Expecter[ValidatorT]) AddValidator(_a0 interface{}) *WriteOnlyValidators_AddValidator_Call[ValidatorT] { + return &WriteOnlyValidators_AddValidator_Call[ValidatorT]{Call: _e.mock.On("AddValidator", _a0)} +} + +func (_c *WriteOnlyValidators_AddValidator_Call[ValidatorT]) Run(run func(_a0 ValidatorT)) *WriteOnlyValidators_AddValidator_Call[ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ValidatorT)) + }) + return _c +} + +func (_c *WriteOnlyValidators_AddValidator_Call[ValidatorT]) Return(_a0 error) *WriteOnlyValidators_AddValidator_Call[ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyValidators_AddValidator_Call[ValidatorT]) RunAndReturn(run func(ValidatorT) error) *WriteOnlyValidators_AddValidator_Call[ValidatorT] { + _c.Call.Return(run) + return _c +} + +// AddValidatorBartio provides a mock function with given fields: _a0 +func (_m *WriteOnlyValidators[ValidatorT]) AddValidatorBartio(_a0 ValidatorT) error { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for AddValidatorBartio") + } + + var r0 error + if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyValidators_AddValidatorBartio_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidatorBartio' +type WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT any] struct { + *mock.Call +} + +// AddValidatorBartio is a helper method to define mock.On call +// - _a0 ValidatorT +func (_e *WriteOnlyValidators_Expecter[ValidatorT]) AddValidatorBartio(_a0 interface{}) *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT] { + return &WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT]{Call: _e.mock.On("AddValidatorBartio", _a0)} +} + +func (_c *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT]) Run(run func(_a0 ValidatorT)) *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ValidatorT)) + }) + return _c +} + +func (_c *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT]) Return(_a0 error) *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT]) RunAndReturn(run func(ValidatorT) error) *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT] { + _c.Call.Return(run) + return _c +} + +// UpdateValidatorAtIndex provides a mock function with given fields: _a0, _a1 +func (_m *WriteOnlyValidators[ValidatorT]) UpdateValidatorAtIndex(_a0 math.ValidatorIndex, _a1 ValidatorT) error { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for UpdateValidatorAtIndex") + } + + var r0 error + if rf, ok := ret.Get(0).(func(math.ValidatorIndex, ValidatorT) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteOnlyValidators_UpdateValidatorAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateValidatorAtIndex' +type WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT any] struct { + *mock.Call +} + +// UpdateValidatorAtIndex is a helper method to define mock.On call +// - _a0 math.ValidatorIndex +// - _a1 ValidatorT +func (_e *WriteOnlyValidators_Expecter[ValidatorT]) UpdateValidatorAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT] { + return &WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT]{Call: _e.mock.On("UpdateValidatorAtIndex", _a0, _a1)} +} + +func (_c *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT]) Run(run func(_a0 math.ValidatorIndex, _a1 ValidatorT)) *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(math.ValidatorIndex), args[1].(ValidatorT)) + }) + return _c +} + +func (_c *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT]) Return(_a0 error) *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT]) RunAndReturn(run func(math.ValidatorIndex, ValidatorT) error) *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT] { + _c.Call.Return(run) + return _c +} + +// NewWriteOnlyValidators creates a new instance of WriteOnlyValidators. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewWriteOnlyValidators[ValidatorT any](t interface { + mock.TestingT + Cleanup(func()) +}) *WriteOnlyValidators[ValidatorT] { + mock := &WriteOnlyValidators[ValidatorT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index a37cca2a1e..354f0c723a 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -28,11 +28,12 @@ import ( engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" "github.com/berachain/beacon-kit/mod/primitives/pkg/common" "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" + cryptomocks "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" "github.com/berachain/beacon-kit/mod/primitives/pkg/math" "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" "github.com/berachain/beacon-kit/mod/primitives/pkg/version" "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" "github.com/stretchr/testify/mock" @@ -79,8 +80,13 @@ type ( func TestInitialize(t *testing.T) { // Create state processor to test cs := spec.TestnetChainSpec() - execEngine := &testExecutionEngine{} - mocksSigner := &mocks.BLSSigner{} + execEngine := mocks.NewExecutionEngine[ + *types.ExecutionPayload, + *types.ExecutionPayloadHeader, + engineprimitives.Withdrawals, + ](t) + + mocksSigner := &cryptomocks.Blssigner{} sp := core.NewStateProcessor[ *types.BeaconBlock, diff --git a/mod/state-transition/pkg/core/types.go b/mod/state-transition/pkg/core/types.go index 5a359344d3..6edcb5a71b 100644 --- a/mod/state-transition/pkg/core/types.go +++ b/mod/state-transition/pkg/core/types.go @@ -173,15 +173,18 @@ type ExecutionPayloadHeader interface { GetBlockHash() common.ExecutionHash } +// WithdrawalsConstraint is the interface for withdrawals constraint. +type WithdrawalsConstraint interface { + Len() int + EncodeIndex(int, *stdbytes.Buffer) +} + // ExecutionEngine is the interface for the execution engine. type ExecutionEngine[ ExecutionPayloadT ExecutionPayload[ ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, - WithdrawalsT interface { - Len() int - EncodeIndex(int, *stdbytes.Buffer) - }, + WithdrawalsT WithdrawalsConstraint, ] interface { // VerifyAndNotifyNewPayload verifies the new payload and notifies the // execution client. diff --git a/mod/storage/pkg/filedb/range_db_test.go b/mod/storage/pkg/filedb/range_db_test.go index 51334ce806..b0e33eddf2 100644 --- a/mod/storage/pkg/filedb/range_db_test.go +++ b/mod/storage/pkg/filedb/range_db_test.go @@ -197,11 +197,11 @@ func TestExtractIndex(t *testing.T) { func TestRangeDB_DeleteRange_NotSupported(t *testing.T) { tests := []struct { name string - db *mocks.DB + db *mocks.Db }{ { name: "DeleteRangeNotSupported", - db: new(mocks.DB), + db: new(mocks.Db), }, } diff --git a/mod/storage/pkg/interfaces/mocks/db.mock.go b/mod/storage/pkg/interfaces/mocks/db.mock.go index 97c0431b20..e076d6ed35 100644 --- a/mod/storage/pkg/interfaces/mocks/db.mock.go +++ b/mod/storage/pkg/interfaces/mocks/db.mock.go @@ -4,21 +4,21 @@ package mocks import mock "github.com/stretchr/testify/mock" -// DB is an autogenerated mock type for the DB type -type DB struct { +// Db is an autogenerated mock type for the DB type +type Db struct { mock.Mock } -type DB_Expecter struct { +type Db_Expecter struct { mock *mock.Mock } -func (_m *DB) EXPECT() *DB_Expecter { - return &DB_Expecter{mock: &_m.Mock} +func (_m *Db) EXPECT() *Db_Expecter { + return &Db_Expecter{mock: &_m.Mock} } // Delete provides a mock function with given fields: key -func (_m *DB) Delete(key []byte) error { +func (_m *Db) Delete(key []byte) error { ret := _m.Called(key) if len(ret) == 0 { @@ -35,36 +35,36 @@ func (_m *DB) Delete(key []byte) error { return r0 } -// DB_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type DB_Delete_Call struct { +// Db_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Db_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - key []byte -func (_e *DB_Expecter) Delete(key interface{}) *DB_Delete_Call { - return &DB_Delete_Call{Call: _e.mock.On("Delete", key)} +func (_e *Db_Expecter) Delete(key interface{}) *Db_Delete_Call { + return &Db_Delete_Call{Call: _e.mock.On("Delete", key)} } -func (_c *DB_Delete_Call) Run(run func(key []byte)) *DB_Delete_Call { +func (_c *Db_Delete_Call) Run(run func(key []byte)) *Db_Delete_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte)) }) return _c } -func (_c *DB_Delete_Call) Return(_a0 error) *DB_Delete_Call { +func (_c *Db_Delete_Call) Return(_a0 error) *Db_Delete_Call { _c.Call.Return(_a0) return _c } -func (_c *DB_Delete_Call) RunAndReturn(run func([]byte) error) *DB_Delete_Call { +func (_c *Db_Delete_Call) RunAndReturn(run func([]byte) error) *Db_Delete_Call { _c.Call.Return(run) return _c } // Get provides a mock function with given fields: key -func (_m *DB) Get(key []byte) ([]byte, error) { +func (_m *Db) Get(key []byte) ([]byte, error) { ret := _m.Called(key) if len(ret) == 0 { @@ -93,36 +93,36 @@ func (_m *DB) Get(key []byte) ([]byte, error) { return r0, r1 } -// DB_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type DB_Get_Call struct { +// Db_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type Db_Get_Call struct { *mock.Call } // Get is a helper method to define mock.On call // - key []byte -func (_e *DB_Expecter) Get(key interface{}) *DB_Get_Call { - return &DB_Get_Call{Call: _e.mock.On("Get", key)} +func (_e *Db_Expecter) Get(key interface{}) *Db_Get_Call { + return &Db_Get_Call{Call: _e.mock.On("Get", key)} } -func (_c *DB_Get_Call) Run(run func(key []byte)) *DB_Get_Call { +func (_c *Db_Get_Call) Run(run func(key []byte)) *Db_Get_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte)) }) return _c } -func (_c *DB_Get_Call) Return(_a0 []byte, _a1 error) *DB_Get_Call { +func (_c *Db_Get_Call) Return(_a0 []byte, _a1 error) *Db_Get_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *DB_Get_Call) RunAndReturn(run func([]byte) ([]byte, error)) *DB_Get_Call { +func (_c *Db_Get_Call) RunAndReturn(run func([]byte) ([]byte, error)) *Db_Get_Call { _c.Call.Return(run) return _c } // Has provides a mock function with given fields: key -func (_m *DB) Has(key []byte) (bool, error) { +func (_m *Db) Has(key []byte) (bool, error) { ret := _m.Called(key) if len(ret) == 0 { @@ -149,36 +149,36 @@ func (_m *DB) Has(key []byte) (bool, error) { return r0, r1 } -// DB_Has_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Has' -type DB_Has_Call struct { +// Db_Has_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Has' +type Db_Has_Call struct { *mock.Call } // Has is a helper method to define mock.On call // - key []byte -func (_e *DB_Expecter) Has(key interface{}) *DB_Has_Call { - return &DB_Has_Call{Call: _e.mock.On("Has", key)} +func (_e *Db_Expecter) Has(key interface{}) *Db_Has_Call { + return &Db_Has_Call{Call: _e.mock.On("Has", key)} } -func (_c *DB_Has_Call) Run(run func(key []byte)) *DB_Has_Call { +func (_c *Db_Has_Call) Run(run func(key []byte)) *Db_Has_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte)) }) return _c } -func (_c *DB_Has_Call) Return(_a0 bool, _a1 error) *DB_Has_Call { +func (_c *Db_Has_Call) Return(_a0 bool, _a1 error) *Db_Has_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *DB_Has_Call) RunAndReturn(run func([]byte) (bool, error)) *DB_Has_Call { +func (_c *Db_Has_Call) RunAndReturn(run func([]byte) (bool, error)) *Db_Has_Call { _c.Call.Return(run) return _c } // Set provides a mock function with given fields: key, value -func (_m *DB) Set(key []byte, value []byte) error { +func (_m *Db) Set(key []byte, value []byte) error { ret := _m.Called(key, value) if len(ret) == 0 { @@ -195,42 +195,42 @@ func (_m *DB) Set(key []byte, value []byte) error { return r0 } -// DB_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' -type DB_Set_Call struct { +// Db_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' +type Db_Set_Call struct { *mock.Call } // Set is a helper method to define mock.On call // - key []byte // - value []byte -func (_e *DB_Expecter) Set(key interface{}, value interface{}) *DB_Set_Call { - return &DB_Set_Call{Call: _e.mock.On("Set", key, value)} +func (_e *Db_Expecter) Set(key interface{}, value interface{}) *Db_Set_Call { + return &Db_Set_Call{Call: _e.mock.On("Set", key, value)} } -func (_c *DB_Set_Call) Run(run func(key []byte, value []byte)) *DB_Set_Call { +func (_c *Db_Set_Call) Run(run func(key []byte, value []byte)) *Db_Set_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte), args[1].([]byte)) }) return _c } -func (_c *DB_Set_Call) Return(_a0 error) *DB_Set_Call { +func (_c *Db_Set_Call) Return(_a0 error) *Db_Set_Call { _c.Call.Return(_a0) return _c } -func (_c *DB_Set_Call) RunAndReturn(run func([]byte, []byte) error) *DB_Set_Call { +func (_c *Db_Set_Call) RunAndReturn(run func([]byte, []byte) error) *Db_Set_Call { _c.Call.Return(run) return _c } -// NewDB creates a new instance of DB. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// NewDb creates a new instance of Db. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. -func NewDB(t interface { +func NewDb(t interface { mock.TestingT Cleanup(func()) -}) *DB { - mock := &DB{} +}) *Db { + mock := &Db{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) From 151a53399057b7146a64c11c8709a199c04ee87e Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Wed, 30 Oct 2024 13:21:08 +0530 Subject: [PATCH 09/24] Revert "tests for helpers in state transition using mock" This reverts commit 099716dbbf3b190b5622493a85a3279fd3b27821. --- .mockery.yaml | 5 - .../pkg/types/deposit_message_test.go | 2 +- .../mocks/blobs_bundle.mock.go | 13 +- .../mocks/built_execution_payload_env.mock.go | 16 +- .../backend/mocks/availability_store.mock.go | 24 +- .../backend/mocks/beacon_block_header.mock.go | 38 +- .../backend/mocks/beacon_state.mock.go | 164 +- .../backend/mocks/block_store.mock.go | 42 +- .../backend/mocks/state_processor.mock.go | 16 +- mod/node-api/backend/mocks/validator.mock.go | 28 +- mod/node-api/backend/mocks/withdrawal.mock.go | 14 +- .../pkg/crypto/mocks/bls_signer.mock.go | 66 +- mod/state-transition/pkg/core/helpers_test.go | 43 +- .../pkg/core/mocks/beacon_block.mock.go | 313 --- .../pkg/core/mocks/beacon_block_body.mock.go | 320 --- .../core/mocks/beacon_block_header.mock.go | 399 --- .../pkg/core/mocks/beacon_state.mock.go | 2395 ----------------- .../pkg/core/mocks/context.mock.go | 411 --- .../pkg/core/mocks/deposit.mock.go | 225 -- .../pkg/core/mocks/execution_engine.mock.go | 86 - .../pkg/core/mocks/execution_payload.mock.go | 1122 -------- .../mocks/execution_payload_header.mock.go | 83 - .../pkg/core/mocks/fork_data.mock.go | 134 - .../core/mocks/read_only_beacon_state.mock.go | 1326 --------- .../core/mocks/read_only_eth_1_data.mock.go | 197 -- .../core/mocks/read_only_randao_mixes.mock.go | 94 - .../core/mocks/read_only_state_roots.mock.go | 94 - .../core/mocks/read_only_validators.mock.go | 149 - .../core/mocks/read_only_withdrawals.mock.go | 89 - .../pkg/core/mocks/validator.mock.go | 500 ---- .../pkg/core/mocks/validators.mock.go | 83 - .../pkg/core/mocks/withdrawal.mock.go | 266 -- .../core/mocks/withdrawals_constraint.mock.go | 115 - .../mocks/write_only_beacon_state.mock.go | 919 ------- .../core/mocks/write_only_eth_1_data.mock.go | 170 -- .../mocks/write_only_randao_mixes.mock.go | 83 - .../core/mocks/write_only_state_roots.mock.go | 83 - .../core/mocks/write_only_validators.mock.go | 174 -- .../pkg/core/state_processor_genesis_test.go | 12 +- mod/state-transition/pkg/core/types.go | 11 +- mod/storage/pkg/filedb/range_db_test.go | 4 +- mod/storage/pkg/interfaces/mocks/db.mock.go | 82 +- 42 files changed, 272 insertions(+), 10138 deletions(-) delete mode 100644 mod/state-transition/pkg/core/mocks/beacon_block.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/beacon_block_body.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/beacon_block_header.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/beacon_state.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/context.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/deposit.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/execution_engine.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/execution_payload.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/execution_payload_header.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/fork_data.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/read_only_beacon_state.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/read_only_eth_1_data.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/read_only_randao_mixes.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/read_only_state_roots.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/read_only_validators.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/read_only_withdrawals.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/validator.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/validators.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/withdrawal.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/withdrawals_constraint.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/write_only_beacon_state.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/write_only_eth_1_data.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/write_only_randao_mixes.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/write_only_state_roots.mock.go delete mode 100644 mod/state-transition/pkg/core/mocks/write_only_validators.mock.go diff --git a/.mockery.yaml b/.mockery.yaml index dbbc916112..6062236306 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -68,8 +68,3 @@ packages: recursive: False with-expecter: true all: True - github.com/berachain/beacon-kit/mod/state-transition/pkg/core: - config: - recursive: False - with-expecter: true - all: True diff --git a/mod/consensus-types/pkg/types/deposit_message_test.go b/mod/consensus-types/pkg/types/deposit_message_test.go index 02cd17ab7b..66e4f89a3d 100644 --- a/mod/consensus-types/pkg/types/deposit_message_test.go +++ b/mod/consensus-types/pkg/types/deposit_message_test.go @@ -44,7 +44,7 @@ func TestCreateAndSignDepositMessage(t *testing.T) { 0x01, 0x00, 0x00, 0x00, } - mocksSigner := &mocks.Blssigner{} + mocksSigner := &mocks.BLSSigner{} mocksSigner.On("PublicKey").Return(crypto.BLSPubkey{}) mocksSigner.On("Sign", mock.Anything).Return(crypto.BLSSignature{}, nil) diff --git a/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go b/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go index 688aad3a39..94ad0fad6e 100644 --- a/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go +++ b/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go @@ -3,6 +3,7 @@ package mocks import ( + bytes "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" eip4844 "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" mock "github.com/stretchr/testify/mock" @@ -116,19 +117,19 @@ func (_c *BlobsBundle_GetCommitments_Call) RunAndReturn(run func() []eip4844.KZG } // GetProofs provides a mock function with given fields: -func (_m *BlobsBundle) GetProofs() []eip4844.KZGProof { +func (_m *BlobsBundle) GetProofs() []bytes.B48 { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetProofs") } - var r0 []eip4844.KZGProof - if rf, ok := ret.Get(0).(func() []eip4844.KZGProof); ok { + var r0 []bytes.B48 + if rf, ok := ret.Get(0).(func() []bytes.B48); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]eip4844.KZGProof) + r0 = ret.Get(0).([]bytes.B48) } } @@ -152,12 +153,12 @@ func (_c *BlobsBundle_GetProofs_Call) Run(run func()) *BlobsBundle_GetProofs_Cal return _c } -func (_c *BlobsBundle_GetProofs_Call) Return(_a0 []eip4844.KZGProof) *BlobsBundle_GetProofs_Call { +func (_c *BlobsBundle_GetProofs_Call) Return(_a0 []bytes.B48) *BlobsBundle_GetProofs_Call { _c.Call.Return(_a0) return _c } -func (_c *BlobsBundle_GetProofs_Call) RunAndReturn(run func() []eip4844.KZGProof) *BlobsBundle_GetProofs_Call { +func (_c *BlobsBundle_GetProofs_Call) RunAndReturn(run func() []bytes.B48) *BlobsBundle_GetProofs_Call { _c.Call.Return(run) return _c } diff --git a/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go b/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go index 01235c4ba2..0ec103484e 100644 --- a/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go +++ b/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go @@ -4,9 +4,9 @@ package mocks import ( engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - mock "github.com/stretchr/testify/mock" + + uint256 "github.com/holiman/uint256" ) // BuiltExecutionPayloadEnv is an autogenerated mock type for the BuiltExecutionPayloadEnv type @@ -115,19 +115,19 @@ func (_c *BuiltExecutionPayloadEnv_GetExecutionPayload_Call[ExecutionPayloadT]) } // GetValue provides a mock function with given fields: -func (_m *BuiltExecutionPayloadEnv[ExecutionPayloadT]) GetValue() *math.U256 { +func (_m *BuiltExecutionPayloadEnv[ExecutionPayloadT]) GetValue() *uint256.Int { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetValue") } - var r0 *math.U256 - if rf, ok := ret.Get(0).(func() *math.U256); ok { + var r0 *uint256.Int + if rf, ok := ret.Get(0).(func() *uint256.Int); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*math.U256) + r0 = ret.Get(0).(*uint256.Int) } } @@ -151,12 +151,12 @@ func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) Run(run fun return _c } -func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) Return(_a0 *math.U256) *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT] { +func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) Return(_a0 *uint256.Int) *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT] { _c.Call.Return(_a0) return _c } -func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) RunAndReturn(run func() *math.U256) *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT] { +func (_c *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT]) RunAndReturn(run func() *uint256.Int) *BuiltExecutionPayloadEnv_GetValue_Call[ExecutionPayloadT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/availability_store.mock.go b/mod/node-api/backend/mocks/availability_store.mock.go index 784cdda804..17d2d80e87 100644 --- a/mod/node-api/backend/mocks/availability_store.mock.go +++ b/mod/node-api/backend/mocks/availability_store.mock.go @@ -23,7 +23,7 @@ func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) EXPECT() *Availabi } // IsDataAvailable provides a mock function with given fields: _a0, _a1, _a2 -func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) IsDataAvailable(_a0 context.Context, _a1 math.Slot, _a2 BeaconBlockBodyT) bool { +func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) IsDataAvailable(_a0 context.Context, _a1 math.U64, _a2 BeaconBlockBodyT) bool { ret := _m.Called(_a0, _a1, _a2) if len(ret) == 0 { @@ -31,7 +31,7 @@ func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) IsDataAvailable(_a } var r0 bool - if rf, ok := ret.Get(0).(func(context.Context, math.Slot, BeaconBlockBodyT) bool); ok { + if rf, ok := ret.Get(0).(func(context.Context, math.U64, BeaconBlockBodyT) bool); ok { r0 = rf(_a0, _a1, _a2) } else { r0 = ret.Get(0).(bool) @@ -47,15 +47,15 @@ type AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT any, BlobSidecarsT // IsDataAvailable is a helper method to define mock.On call // - _a0 context.Context -// - _a1 math.Slot +// - _a1 math.U64 // - _a2 BeaconBlockBodyT func (_e *AvailabilityStore_Expecter[BeaconBlockBodyT, BlobSidecarsT]) IsDataAvailable(_a0 interface{}, _a1 interface{}, _a2 interface{}) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { return &AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]{Call: _e.mock.On("IsDataAvailable", _a0, _a1, _a2)} } -func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]) Run(run func(_a0 context.Context, _a1 math.Slot, _a2 BeaconBlockBodyT)) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { +func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]) Run(run func(_a0 context.Context, _a1 math.U64, _a2 BeaconBlockBodyT)) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(math.Slot), args[2].(BeaconBlockBodyT)) + run(args[0].(context.Context), args[1].(math.U64), args[2].(BeaconBlockBodyT)) }) return _c } @@ -65,13 +65,13 @@ func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT return _c } -func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]) RunAndReturn(run func(context.Context, math.Slot, BeaconBlockBodyT) bool) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { +func (_c *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT]) RunAndReturn(run func(context.Context, math.U64, BeaconBlockBodyT) bool) *AvailabilityStore_IsDataAvailable_Call[BeaconBlockBodyT, BlobSidecarsT] { _c.Call.Return(run) return _c } // Persist provides a mock function with given fields: _a0, _a1 -func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) Persist(_a0 math.Slot, _a1 BlobSidecarsT) error { +func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) Persist(_a0 math.U64, _a1 BlobSidecarsT) error { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -79,7 +79,7 @@ func (_m *AvailabilityStore[BeaconBlockBodyT, BlobSidecarsT]) Persist(_a0 math.S } var r0 error - if rf, ok := ret.Get(0).(func(math.Slot, BlobSidecarsT) error); ok { + if rf, ok := ret.Get(0).(func(math.U64, BlobSidecarsT) error); ok { r0 = rf(_a0, _a1) } else { r0 = ret.Error(0) @@ -94,15 +94,15 @@ type AvailabilityStore_Persist_Call[BeaconBlockBodyT any, BlobSidecarsT any] str } // Persist is a helper method to define mock.On call -// - _a0 math.Slot +// - _a0 math.U64 // - _a1 BlobSidecarsT func (_e *AvailabilityStore_Expecter[BeaconBlockBodyT, BlobSidecarsT]) Persist(_a0 interface{}, _a1 interface{}) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { return &AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]{Call: _e.mock.On("Persist", _a0, _a1)} } -func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) Run(run func(_a0 math.Slot, _a1 BlobSidecarsT)) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { +func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) Run(run func(_a0 math.U64, _a1 BlobSidecarsT)) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Slot), args[1].(BlobSidecarsT)) + run(args[0].(math.U64), args[1].(BlobSidecarsT)) }) return _c } @@ -112,7 +112,7 @@ func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) Retur return _c } -func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) RunAndReturn(run func(math.Slot, BlobSidecarsT) error) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { +func (_c *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT]) RunAndReturn(run func(math.U64, BlobSidecarsT) error) *AvailabilityStore_Persist_Call[BeaconBlockBodyT, BlobSidecarsT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/beacon_block_header.mock.go b/mod/node-api/backend/mocks/beacon_block_header.mock.go index 5e019b5821..c9d0cd0b6d 100644 --- a/mod/node-api/backend/mocks/beacon_block_header.mock.go +++ b/mod/node-api/backend/mocks/beacon_block_header.mock.go @@ -117,18 +117,18 @@ func (_c *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]) RunAndR } // GetProposerIndex provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetProposerIndex() math.ValidatorIndex { +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetProposerIndex() math.U64 { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetProposerIndex") } - var r0 math.ValidatorIndex - if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { + var r0 math.U64 + if rf, ok := ret.Get(0).(func() math.U64); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.ValidatorIndex) + r0 = ret.Get(0).(math.U64) } return r0 @@ -151,29 +151,29 @@ func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Run(run f return _c } -func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Return(_a0 math.ValidatorIndex) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Return(_a0 math.U64) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { _c.Call.Return(_a0) return _c } -func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.ValidatorIndex) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.U64) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { _c.Call.Return(run) return _c } // GetSlot provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetSlot() math.Slot { +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetSlot() math.U64 { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetSlot") } - var r0 math.Slot - if rf, ok := ret.Get(0).(func() math.Slot); ok { + var r0 math.U64 + if rf, ok := ret.Get(0).(func() math.U64); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.Slot) + r0 = ret.Get(0).(math.U64) } return r0 @@ -196,12 +196,12 @@ func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Run(run func()) *B return _c } -func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Return(_a0 math.Slot) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Return(_a0 math.U64) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { _c.Call.Return(_a0) return _c } -func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.Slot) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.U64) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { _c.Call.Return(run) return _c } @@ -358,7 +358,7 @@ func (_c *BeaconBlockHeader_MarshalSSZ_Call[BeaconBlockHeaderT]) RunAndReturn(ru } // New provides a mock function with given fields: slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) New(slot math.Slot, proposerIndex math.ValidatorIndex, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root) BeaconBlockHeaderT { +func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) New(slot math.U64, proposerIndex math.U64, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root) BeaconBlockHeaderT { ret := _m.Called(slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot) if len(ret) == 0 { @@ -366,7 +366,7 @@ func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) New(slot math.Slot, proposerInd } var r0 BeaconBlockHeaderT - if rf, ok := ret.Get(0).(func(math.Slot, math.ValidatorIndex, common.Root, common.Root, common.Root) BeaconBlockHeaderT); ok { + if rf, ok := ret.Get(0).(func(math.U64, math.U64, common.Root, common.Root, common.Root) BeaconBlockHeaderT); ok { r0 = rf(slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot) } else { r0 = ret.Get(0).(BeaconBlockHeaderT) @@ -381,8 +381,8 @@ type BeaconBlockHeader_New_Call[BeaconBlockHeaderT any] struct { } // New is a helper method to define mock.On call -// - slot math.Slot -// - proposerIndex math.ValidatorIndex +// - slot math.U64 +// - proposerIndex math.U64 // - parentBlockRoot common.Root // - stateRoot common.Root // - bodyRoot common.Root @@ -390,9 +390,9 @@ func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) New(slot interface{}, return &BeaconBlockHeader_New_Call[BeaconBlockHeaderT]{Call: _e.mock.On("New", slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot)} } -func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Run(run func(slot math.Slot, proposerIndex math.ValidatorIndex, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root)) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Run(run func(slot math.U64, proposerIndex math.U64, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root)) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Slot), args[1].(math.ValidatorIndex), args[2].(common.Root), args[3].(common.Root), args[4].(common.Root)) + run(args[0].(math.U64), args[1].(math.U64), args[2].(common.Root), args[3].(common.Root), args[4].(common.Root)) }) return _c } @@ -402,7 +402,7 @@ func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Return(_a0 BeaconBlock return _c } -func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) RunAndReturn(run func(math.Slot, math.ValidatorIndex, common.Root, common.Root, common.Root) BeaconBlockHeaderT) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { +func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) RunAndReturn(run func(math.U64, math.U64, common.Root, common.Root, common.Root) BeaconBlockHeaderT) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/beacon_state.mock.go b/mod/node-api/backend/mocks/beacon_state.mock.go index 1f9fdf1302..184d2d7024 100644 --- a/mod/node-api/backend/mocks/beacon_state.mock.go +++ b/mod/node-api/backend/mocks/beacon_state.mock.go @@ -3,7 +3,9 @@ package mocks import ( + bytes "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" @@ -82,25 +84,25 @@ func (_c *BeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, Ex } // GetBalance provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 math.ValidatorIndex) (math.Gwei, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 math.U64) (math.U64, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetBalance") } - var r0 math.Gwei + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (math.Gwei, error)); ok { + if rf, ok := ret.Get(0).(func(math.U64) (math.U64, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) math.Gwei); ok { + if rf, ok := ret.Get(0).(func(math.U64) math.U64); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(math.Gwei) + r0 = ret.Get(0).(math.U64) } - if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { + if rf, ok := ret.Get(1).(func(math.U64) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) @@ -115,24 +117,24 @@ type BeaconState_GetBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, Executio } // GetBalance is a helper method to define mock.On call -// - _a0 math.ValidatorIndex +// - _a0 math.U64 func (_e *BeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 interface{}) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { return &BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBalance", _a0)} } -func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.U64)) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex)) + run(args[0].(math.U64)) }) return _c } -func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (math.Gwei, error)) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.U64) (math.U64, error)) *BeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } @@ -583,22 +585,22 @@ func (_c *BeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, } // GetNextWithdrawalValidatorIndex provides a mock function with given fields: -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() (math.ValidatorIndex, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() (math.U64, error) { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetNextWithdrawalValidatorIndex") } - var r0 math.ValidatorIndex + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func() (math.ValidatorIndex, error)); ok { + if rf, ok := ret.Get(0).(func() (math.U64, error)); ok { return rf() } - if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { + if rf, ok := ret.Get(0).(func() math.U64); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.ValidatorIndex) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func() error); ok { @@ -627,34 +629,34 @@ func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, E return _c } -func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.ValidatorIndex, error)) *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.U64, error)) *BeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetRandaoMixAtIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 uint64) (common.Bytes32, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 uint64) (bytes.B32, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetRandaoMixAtIndex") } - var r0 common.Bytes32 + var r0 bytes.B32 var r1 error - if rf, ok := ret.Get(0).(func(uint64) (common.Bytes32, error)); ok { + if rf, ok := ret.Get(0).(func(uint64) (bytes.B32, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(uint64) common.Bytes32); ok { + if rf, ok := ret.Get(0).(func(uint64) bytes.B32); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Bytes32) + r0 = ret.Get(0).(bytes.B32) } } @@ -685,33 +687,33 @@ func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, Ex return _c } -func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Bytes32, _a1 error) *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 bytes.B32, _a1 error) *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Bytes32, error)) *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (bytes.B32, error)) *BeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetSlashingAtIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 uint64) (math.Gwei, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 uint64) (math.U64, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetSlashingAtIndex") } - var r0 math.Gwei + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { + if rf, ok := ret.Get(0).(func(uint64) (math.U64, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { + if rf, ok := ret.Get(0).(func(uint64) math.U64); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(math.Gwei) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func(uint64) error); ok { @@ -741,33 +743,33 @@ func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, Exe return _c } -func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.U64, error)) *BeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetSlot provides a mock function with given fields: -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() (math.Slot, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() (math.U64, error) { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetSlot") } - var r0 math.Slot + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func() (math.Slot, error)); ok { + if rf, ok := ret.Get(0).(func() (math.U64, error)); ok { return rf() } - if rf, ok := ret.Get(0).(func() math.Slot); ok { + if rf, ok := ret.Get(0).(func() math.U64); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.Slot) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func() error); ok { @@ -796,33 +798,33 @@ func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPaylo return _c } -func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Slot, _a1 error) *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Slot, error)) *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.U64, error)) *BeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetTotalActiveBalances provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 uint64) (math.Gwei, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 uint64) (math.U64, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for GetTotalActiveBalances") } - var r0 math.Gwei + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { + if rf, ok := ret.Get(0).(func(uint64) (math.U64, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { + if rf, ok := ret.Get(0).(func(uint64) math.U64); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(math.Gwei) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func(uint64) error); ok { @@ -852,33 +854,33 @@ func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, return _c } -func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.U64, error)) *BeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // GetTotalSlashing provides a mock function with given fields: -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() (math.Gwei, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() (math.U64, error) { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetTotalSlashing") } - var r0 math.Gwei + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func() (math.Gwei, error)); ok { + if rf, ok := ret.Get(0).(func() (math.U64, error)); ok { return rf() } - if rf, ok := ret.Get(0).(func() math.Gwei); ok { + if rf, ok := ret.Get(0).(func() math.U64); ok { r0 = rf() } else { - r0 = ret.Get(0).(math.Gwei) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func() error); ok { @@ -907,12 +909,12 @@ func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, Execu return _c } -func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Gwei, error)) *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.U64, error)) *BeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } @@ -1085,7 +1087,7 @@ func (_c *BeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, E } // SetSlot provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 math.Slot) error { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 math.U64) error { ret := _m.Called(_a0) if len(ret) == 0 { @@ -1093,7 +1095,7 @@ func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, Fo } var r0 error - if rf, ok := ret.Get(0).(func(math.Slot) error); ok { + if rf, ok := ret.Get(0).(func(math.U64) error); ok { r0 = rf(_a0) } else { r0 = ret.Error(0) @@ -1108,14 +1110,14 @@ type BeaconState_SetSlot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPa } // SetSlot is a helper method to define mock.On call -// - _a0 math.Slot +// - _a0 math.U64 func (_e *BeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 interface{}) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { return &BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetSlot", _a0)} } -func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.Slot)) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.U64)) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Slot)) + run(args[0].(math.U64)) }) return _c } @@ -1125,7 +1127,7 @@ func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPaylo return _c } -func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.Slot) error) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.U64) error) *BeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } @@ -1189,7 +1191,7 @@ func (_c *BeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, Execu } // ValidatorByIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 math.ValidatorIndex) (ValidatorT, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 math.U64) (ValidatorT, error) { ret := _m.Called(_a0) if len(ret) == 0 { @@ -1198,16 +1200,16 @@ func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, Fo var r0 ValidatorT var r1 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (ValidatorT, error)); ok { + if rf, ok := ret.Get(0).(func(math.U64) (ValidatorT, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) ValidatorT); ok { + if rf, ok := ret.Get(0).(func(math.U64) ValidatorT); ok { r0 = rf(_a0) } else { r0 = ret.Get(0).(ValidatorT) } - if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { + if rf, ok := ret.Get(1).(func(math.U64) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) @@ -1222,14 +1224,14 @@ type BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, Ex } // ValidatorByIndex is a helper method to define mock.On call -// - _a0 math.ValidatorIndex +// - _a0 math.U64 func (_e *BeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 interface{}) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { return &BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorByIndex", _a0)} } -func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.U64)) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex)) + run(args[0].(math.U64)) }) return _c } @@ -1239,28 +1241,28 @@ func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, Execu return _c } -func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (ValidatorT, error)) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.U64) (ValidatorT, error)) *BeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // ValidatorIndexByCometBFTAddress provides a mock function with given fields: cometBFTAddress -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress []byte) (math.ValidatorIndex, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress []byte) (math.U64, error) { ret := _m.Called(cometBFTAddress) if len(ret) == 0 { panic("no return value specified for ValidatorIndexByCometBFTAddress") } - var r0 math.ValidatorIndex + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func([]byte) (math.ValidatorIndex, error)); ok { + if rf, ok := ret.Get(0).(func([]byte) (math.U64, error)); ok { return rf(cometBFTAddress) } - if rf, ok := ret.Get(0).(func([]byte) math.ValidatorIndex); ok { + if rf, ok := ret.Get(0).(func([]byte) math.U64); ok { r0 = rf(cometBFTAddress) } else { - r0 = ret.Get(0).(math.ValidatorIndex) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func([]byte) error); ok { @@ -1290,33 +1292,33 @@ func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, E return _c } -func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func([]byte) (math.ValidatorIndex, error)) *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func([]byte) (math.U64, error)) *BeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } // ValidatorIndexByPubkey provides a mock function with given fields: _a0 -func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.ValidatorIndex, error) { +func (_m *BeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.U64, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for ValidatorIndexByPubkey") } - var r0 math.ValidatorIndex + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.ValidatorIndex, error)); ok { + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.U64, error)); ok { return rf(_a0) } - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.ValidatorIndex); ok { + if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.U64); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(math.ValidatorIndex) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func(crypto.BLSPubkey) error); ok { @@ -1346,12 +1348,12 @@ func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, return _c } -func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.U64, _a1 error) *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(crypto.BLSPubkey) (math.ValidatorIndex, error)) *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { +func (_c *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(crypto.BLSPubkey) (math.U64, error)) *BeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/block_store.mock.go b/mod/node-api/backend/mocks/block_store.mock.go index 74f3b716a2..4e532a619f 100644 --- a/mod/node-api/backend/mocks/block_store.mock.go +++ b/mod/node-api/backend/mocks/block_store.mock.go @@ -23,22 +23,22 @@ func (_m *BlockStore[BeaconBlockT]) EXPECT() *BlockStore_Expecter[BeaconBlockT] } // GetParentSlotByTimestamp provides a mock function with given fields: timestamp -func (_m *BlockStore[BeaconBlockT]) GetParentSlotByTimestamp(timestamp math.U64) (math.Slot, error) { +func (_m *BlockStore[BeaconBlockT]) GetParentSlotByTimestamp(timestamp math.U64) (math.U64, error) { ret := _m.Called(timestamp) if len(ret) == 0 { panic("no return value specified for GetParentSlotByTimestamp") } - var r0 math.Slot + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func(math.U64) (math.Slot, error)); ok { + if rf, ok := ret.Get(0).(func(math.U64) (math.U64, error)); ok { return rf(timestamp) } - if rf, ok := ret.Get(0).(func(math.U64) math.Slot); ok { + if rf, ok := ret.Get(0).(func(math.U64) math.U64); ok { r0 = rf(timestamp) } else { - r0 = ret.Get(0).(math.Slot) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func(math.U64) error); ok { @@ -68,33 +68,33 @@ func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) Run(run func(t return _c } -func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) Return(_a0 math.Slot, _a1 error) *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT] { +func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) RunAndReturn(run func(math.U64) (math.Slot, error)) *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT] { +func (_c *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT]) RunAndReturn(run func(math.U64) (math.U64, error)) *BlockStore_GetParentSlotByTimestamp_Call[BeaconBlockT] { _c.Call.Return(run) return _c } // GetSlotByBlockRoot provides a mock function with given fields: root -func (_m *BlockStore[BeaconBlockT]) GetSlotByBlockRoot(root common.Root) (math.Slot, error) { +func (_m *BlockStore[BeaconBlockT]) GetSlotByBlockRoot(root common.Root) (math.U64, error) { ret := _m.Called(root) if len(ret) == 0 { panic("no return value specified for GetSlotByBlockRoot") } - var r0 math.Slot + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func(common.Root) (math.Slot, error)); ok { + if rf, ok := ret.Get(0).(func(common.Root) (math.U64, error)); ok { return rf(root) } - if rf, ok := ret.Get(0).(func(common.Root) math.Slot); ok { + if rf, ok := ret.Get(0).(func(common.Root) math.U64); ok { r0 = rf(root) } else { - r0 = ret.Get(0).(math.Slot) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func(common.Root) error); ok { @@ -124,33 +124,33 @@ func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) Run(run func(root co return _c } -func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) Return(_a0 math.Slot, _a1 error) *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.Slot, error)) *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.U64, error)) *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT] { _c.Call.Return(run) return _c } // GetSlotByStateRoot provides a mock function with given fields: root -func (_m *BlockStore[BeaconBlockT]) GetSlotByStateRoot(root common.Root) (math.Slot, error) { +func (_m *BlockStore[BeaconBlockT]) GetSlotByStateRoot(root common.Root) (math.U64, error) { ret := _m.Called(root) if len(ret) == 0 { panic("no return value specified for GetSlotByStateRoot") } - var r0 math.Slot + var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func(common.Root) (math.Slot, error)); ok { + if rf, ok := ret.Get(0).(func(common.Root) (math.U64, error)); ok { return rf(root) } - if rf, ok := ret.Get(0).(func(common.Root) math.Slot); ok { + if rf, ok := ret.Get(0).(func(common.Root) math.U64); ok { r0 = rf(root) } else { - r0 = ret.Get(0).(math.Slot) + r0 = ret.Get(0).(math.U64) } if rf, ok := ret.Get(1).(func(common.Root) error); ok { @@ -180,12 +180,12 @@ func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Run(run func(root co return _c } -func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Return(_a0 math.Slot, _a1 error) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.Slot, error)) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.U64, error)) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/state_processor.mock.go b/mod/node-api/backend/mocks/state_processor.mock.go index 7dcf5f3002..a7103536ed 100644 --- a/mod/node-api/backend/mocks/state_processor.mock.go +++ b/mod/node-api/backend/mocks/state_processor.mock.go @@ -23,7 +23,7 @@ func (_m *StateProcessor[BeaconStateT]) EXPECT() *StateProcessor_Expecter[Beacon } // ProcessSlots provides a mock function with given fields: _a0, _a1 -func (_m *StateProcessor[BeaconStateT]) ProcessSlots(_a0 BeaconStateT, _a1 math.Slot) (transition.ValidatorUpdates, error) { +func (_m *StateProcessor[BeaconStateT]) ProcessSlots(_a0 BeaconStateT, _a1 math.U64) (transition.ValidatorUpdates, error) { ret := _m.Called(_a0, _a1) if len(ret) == 0 { @@ -32,10 +32,10 @@ func (_m *StateProcessor[BeaconStateT]) ProcessSlots(_a0 BeaconStateT, _a1 math. var r0 transition.ValidatorUpdates var r1 error - if rf, ok := ret.Get(0).(func(BeaconStateT, math.Slot) (transition.ValidatorUpdates, error)); ok { + if rf, ok := ret.Get(0).(func(BeaconStateT, math.U64) (transition.ValidatorUpdates, error)); ok { return rf(_a0, _a1) } - if rf, ok := ret.Get(0).(func(BeaconStateT, math.Slot) transition.ValidatorUpdates); ok { + if rf, ok := ret.Get(0).(func(BeaconStateT, math.U64) transition.ValidatorUpdates); ok { r0 = rf(_a0, _a1) } else { if ret.Get(0) != nil { @@ -43,7 +43,7 @@ func (_m *StateProcessor[BeaconStateT]) ProcessSlots(_a0 BeaconStateT, _a1 math. } } - if rf, ok := ret.Get(1).(func(BeaconStateT, math.Slot) error); ok { + if rf, ok := ret.Get(1).(func(BeaconStateT, math.U64) error); ok { r1 = rf(_a0, _a1) } else { r1 = ret.Error(1) @@ -59,14 +59,14 @@ type StateProcessor_ProcessSlots_Call[BeaconStateT any] struct { // ProcessSlots is a helper method to define mock.On call // - _a0 BeaconStateT -// - _a1 math.Slot +// - _a1 math.U64 func (_e *StateProcessor_Expecter[BeaconStateT]) ProcessSlots(_a0 interface{}, _a1 interface{}) *StateProcessor_ProcessSlots_Call[BeaconStateT] { return &StateProcessor_ProcessSlots_Call[BeaconStateT]{Call: _e.mock.On("ProcessSlots", _a0, _a1)} } -func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) Run(run func(_a0 BeaconStateT, _a1 math.Slot)) *StateProcessor_ProcessSlots_Call[BeaconStateT] { +func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) Run(run func(_a0 BeaconStateT, _a1 math.U64)) *StateProcessor_ProcessSlots_Call[BeaconStateT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(BeaconStateT), args[1].(math.Slot)) + run(args[0].(BeaconStateT), args[1].(math.U64)) }) return _c } @@ -76,7 +76,7 @@ func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) Return(_a0 transition. return _c } -func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) RunAndReturn(run func(BeaconStateT, math.Slot) (transition.ValidatorUpdates, error)) *StateProcessor_ProcessSlots_Call[BeaconStateT] { +func (_c *StateProcessor_ProcessSlots_Call[BeaconStateT]) RunAndReturn(run func(BeaconStateT, math.U64) (transition.ValidatorUpdates, error)) *StateProcessor_ProcessSlots_Call[BeaconStateT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/validator.mock.go b/mod/node-api/backend/mocks/validator.mock.go index 655e2123b2..73404aa0d7 100644 --- a/mod/node-api/backend/mocks/validator.mock.go +++ b/mod/node-api/backend/mocks/validator.mock.go @@ -68,7 +68,7 @@ func (_c *Validator_GetWithdrawalCredentials_Call[WithdrawalCredentialsT]) RunAn } // IsFullyWithdrawable provides a mock function with given fields: amount, epoch -func (_m *Validator[WithdrawalCredentialsT]) IsFullyWithdrawable(amount math.Gwei, epoch math.Epoch) bool { +func (_m *Validator[WithdrawalCredentialsT]) IsFullyWithdrawable(amount math.U64, epoch math.U64) bool { ret := _m.Called(amount, epoch) if len(ret) == 0 { @@ -76,7 +76,7 @@ func (_m *Validator[WithdrawalCredentialsT]) IsFullyWithdrawable(amount math.Gwe } var r0 bool - if rf, ok := ret.Get(0).(func(math.Gwei, math.Epoch) bool); ok { + if rf, ok := ret.Get(0).(func(math.U64, math.U64) bool); ok { r0 = rf(amount, epoch) } else { r0 = ret.Get(0).(bool) @@ -91,15 +91,15 @@ type Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT backend.Withdrawa } // IsFullyWithdrawable is a helper method to define mock.On call -// - amount math.Gwei -// - epoch math.Epoch +// - amount math.U64 +// - epoch math.U64 func (_e *Validator_Expecter[WithdrawalCredentialsT]) IsFullyWithdrawable(amount interface{}, epoch interface{}) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { return &Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]{Call: _e.mock.On("IsFullyWithdrawable", amount, epoch)} } -func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) Run(run func(amount math.Gwei, epoch math.Epoch)) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { +func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) Run(run func(amount math.U64, epoch math.U64)) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Gwei), args[1].(math.Epoch)) + run(args[0].(math.U64), args[1].(math.U64)) }) return _c } @@ -109,13 +109,13 @@ func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) Return(_a0 return _c } -func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) RunAndReturn(run func(math.Gwei, math.Epoch) bool) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { +func (_c *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT]) RunAndReturn(run func(math.U64, math.U64) bool) *Validator_IsFullyWithdrawable_Call[WithdrawalCredentialsT] { _c.Call.Return(run) return _c } // IsPartiallyWithdrawable provides a mock function with given fields: amount1, amount2 -func (_m *Validator[WithdrawalCredentialsT]) IsPartiallyWithdrawable(amount1 math.Gwei, amount2 math.Gwei) bool { +func (_m *Validator[WithdrawalCredentialsT]) IsPartiallyWithdrawable(amount1 math.U64, amount2 math.U64) bool { ret := _m.Called(amount1, amount2) if len(ret) == 0 { @@ -123,7 +123,7 @@ func (_m *Validator[WithdrawalCredentialsT]) IsPartiallyWithdrawable(amount1 mat } var r0 bool - if rf, ok := ret.Get(0).(func(math.Gwei, math.Gwei) bool); ok { + if rf, ok := ret.Get(0).(func(math.U64, math.U64) bool); ok { r0 = rf(amount1, amount2) } else { r0 = ret.Get(0).(bool) @@ -138,15 +138,15 @@ type Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT backend.Withd } // IsPartiallyWithdrawable is a helper method to define mock.On call -// - amount1 math.Gwei -// - amount2 math.Gwei +// - amount1 math.U64 +// - amount2 math.U64 func (_e *Validator_Expecter[WithdrawalCredentialsT]) IsPartiallyWithdrawable(amount1 interface{}, amount2 interface{}) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { return &Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]{Call: _e.mock.On("IsPartiallyWithdrawable", amount1, amount2)} } -func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) Run(run func(amount1 math.Gwei, amount2 math.Gwei)) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { +func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) Run(run func(amount1 math.U64, amount2 math.U64)) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Gwei), args[1].(math.Gwei)) + run(args[0].(math.U64), args[1].(math.U64)) }) return _c } @@ -156,7 +156,7 @@ func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) Return return _c } -func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) RunAndReturn(run func(math.Gwei, math.Gwei) bool) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { +func (_c *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT]) RunAndReturn(run func(math.U64, math.U64) bool) *Validator_IsPartiallyWithdrawable_Call[WithdrawalCredentialsT] { _c.Call.Return(run) return _c } diff --git a/mod/node-api/backend/mocks/withdrawal.mock.go b/mod/node-api/backend/mocks/withdrawal.mock.go index 72fd41fa44..d7dbcb6747 100644 --- a/mod/node-api/backend/mocks/withdrawal.mock.go +++ b/mod/node-api/backend/mocks/withdrawal.mock.go @@ -23,7 +23,7 @@ func (_m *Withdrawal[T]) EXPECT() *Withdrawal_Expecter[T] { } // New provides a mock function with given fields: index, validator, address, amount -func (_m *Withdrawal[T]) New(index math.U64, validator math.ValidatorIndex, address common.ExecutionAddress, amount math.Gwei) T { +func (_m *Withdrawal[T]) New(index math.U64, validator math.U64, address common.ExecutionAddress, amount math.U64) T { ret := _m.Called(index, validator, address, amount) if len(ret) == 0 { @@ -31,7 +31,7 @@ func (_m *Withdrawal[T]) New(index math.U64, validator math.ValidatorIndex, addr } var r0 T - if rf, ok := ret.Get(0).(func(math.U64, math.ValidatorIndex, common.ExecutionAddress, math.Gwei) T); ok { + if rf, ok := ret.Get(0).(func(math.U64, math.U64, common.ExecutionAddress, math.U64) T); ok { r0 = rf(index, validator, address, amount) } else { r0 = ret.Get(0).(T) @@ -47,16 +47,16 @@ type Withdrawal_New_Call[T any] struct { // New is a helper method to define mock.On call // - index math.U64 -// - validator math.ValidatorIndex +// - validator math.U64 // - address common.ExecutionAddress -// - amount math.Gwei +// - amount math.U64 func (_e *Withdrawal_Expecter[T]) New(index interface{}, validator interface{}, address interface{}, amount interface{}) *Withdrawal_New_Call[T] { return &Withdrawal_New_Call[T]{Call: _e.mock.On("New", index, validator, address, amount)} } -func (_c *Withdrawal_New_Call[T]) Run(run func(index math.U64, validator math.ValidatorIndex, address common.ExecutionAddress, amount math.Gwei)) *Withdrawal_New_Call[T] { +func (_c *Withdrawal_New_Call[T]) Run(run func(index math.U64, validator math.U64, address common.ExecutionAddress, amount math.U64)) *Withdrawal_New_Call[T] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64), args[1].(math.ValidatorIndex), args[2].(common.ExecutionAddress), args[3].(math.Gwei)) + run(args[0].(math.U64), args[1].(math.U64), args[2].(common.ExecutionAddress), args[3].(math.U64)) }) return _c } @@ -66,7 +66,7 @@ func (_c *Withdrawal_New_Call[T]) Return(_a0 T) *Withdrawal_New_Call[T] { return _c } -func (_c *Withdrawal_New_Call[T]) RunAndReturn(run func(math.U64, math.ValidatorIndex, common.ExecutionAddress, math.Gwei) T) *Withdrawal_New_Call[T] { +func (_c *Withdrawal_New_Call[T]) RunAndReturn(run func(math.U64, math.U64, common.ExecutionAddress, math.U64) T) *Withdrawal_New_Call[T] { _c.Call.Return(run) return _c } diff --git a/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go b/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go index a9e52cb133..4ea1d83c10 100644 --- a/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go +++ b/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go @@ -7,21 +7,21 @@ import ( mock "github.com/stretchr/testify/mock" ) -// Blssigner is an autogenerated mock type for the BLSSigner type -type Blssigner struct { +// BLSSigner is an autogenerated mock type for the BLSSigner type +type BLSSigner struct { mock.Mock } -type Blssigner_Expecter struct { +type BLSSigner_Expecter struct { mock *mock.Mock } -func (_m *Blssigner) EXPECT() *Blssigner_Expecter { - return &Blssigner_Expecter{mock: &_m.Mock} +func (_m *BLSSigner) EXPECT() *BLSSigner_Expecter { + return &BLSSigner_Expecter{mock: &_m.Mock} } // PublicKey provides a mock function with given fields: -func (_m *Blssigner) PublicKey() crypto.BLSPubkey { +func (_m *BLSSigner) PublicKey() crypto.BLSPubkey { ret := _m.Called() if len(ret) == 0 { @@ -40,35 +40,35 @@ func (_m *Blssigner) PublicKey() crypto.BLSPubkey { return r0 } -// Blssigner_PublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublicKey' -type Blssigner_PublicKey_Call struct { +// BLSSigner_PublicKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublicKey' +type BLSSigner_PublicKey_Call struct { *mock.Call } // PublicKey is a helper method to define mock.On call -func (_e *Blssigner_Expecter) PublicKey() *Blssigner_PublicKey_Call { - return &Blssigner_PublicKey_Call{Call: _e.mock.On("PublicKey")} +func (_e *BLSSigner_Expecter) PublicKey() *BLSSigner_PublicKey_Call { + return &BLSSigner_PublicKey_Call{Call: _e.mock.On("PublicKey")} } -func (_c *Blssigner_PublicKey_Call) Run(run func()) *Blssigner_PublicKey_Call { +func (_c *BLSSigner_PublicKey_Call) Run(run func()) *BLSSigner_PublicKey_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } -func (_c *Blssigner_PublicKey_Call) Return(_a0 crypto.BLSPubkey) *Blssigner_PublicKey_Call { +func (_c *BLSSigner_PublicKey_Call) Return(_a0 crypto.BLSPubkey) *BLSSigner_PublicKey_Call { _c.Call.Return(_a0) return _c } -func (_c *Blssigner_PublicKey_Call) RunAndReturn(run func() crypto.BLSPubkey) *Blssigner_PublicKey_Call { +func (_c *BLSSigner_PublicKey_Call) RunAndReturn(run func() crypto.BLSPubkey) *BLSSigner_PublicKey_Call { _c.Call.Return(run) return _c } // Sign provides a mock function with given fields: _a0 -func (_m *Blssigner) Sign(_a0 []byte) (crypto.BLSSignature, error) { +func (_m *BLSSigner) Sign(_a0 []byte) (crypto.BLSSignature, error) { ret := _m.Called(_a0) if len(ret) == 0 { @@ -97,36 +97,36 @@ func (_m *Blssigner) Sign(_a0 []byte) (crypto.BLSSignature, error) { return r0, r1 } -// Blssigner_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' -type Blssigner_Sign_Call struct { +// BLSSigner_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' +type BLSSigner_Sign_Call struct { *mock.Call } // Sign is a helper method to define mock.On call // - _a0 []byte -func (_e *Blssigner_Expecter) Sign(_a0 interface{}) *Blssigner_Sign_Call { - return &Blssigner_Sign_Call{Call: _e.mock.On("Sign", _a0)} +func (_e *BLSSigner_Expecter) Sign(_a0 interface{}) *BLSSigner_Sign_Call { + return &BLSSigner_Sign_Call{Call: _e.mock.On("Sign", _a0)} } -func (_c *Blssigner_Sign_Call) Run(run func(_a0 []byte)) *Blssigner_Sign_Call { +func (_c *BLSSigner_Sign_Call) Run(run func(_a0 []byte)) *BLSSigner_Sign_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte)) }) return _c } -func (_c *Blssigner_Sign_Call) Return(_a0 crypto.BLSSignature, _a1 error) *Blssigner_Sign_Call { +func (_c *BLSSigner_Sign_Call) Return(_a0 crypto.BLSSignature, _a1 error) *BLSSigner_Sign_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *Blssigner_Sign_Call) RunAndReturn(run func([]byte) (crypto.BLSSignature, error)) *Blssigner_Sign_Call { +func (_c *BLSSigner_Sign_Call) RunAndReturn(run func([]byte) (crypto.BLSSignature, error)) *BLSSigner_Sign_Call { _c.Call.Return(run) return _c } // VerifySignature provides a mock function with given fields: pubKey, msg, signature -func (_m *Blssigner) VerifySignature(pubKey crypto.BLSPubkey, msg []byte, signature crypto.BLSSignature) error { +func (_m *BLSSigner) VerifySignature(pubKey crypto.BLSPubkey, msg []byte, signature crypto.BLSSignature) error { ret := _m.Called(pubKey, msg, signature) if len(ret) == 0 { @@ -143,8 +143,8 @@ func (_m *Blssigner) VerifySignature(pubKey crypto.BLSPubkey, msg []byte, signat return r0 } -// Blssigner_VerifySignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifySignature' -type Blssigner_VerifySignature_Call struct { +// BLSSigner_VerifySignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifySignature' +type BLSSigner_VerifySignature_Call struct { *mock.Call } @@ -152,34 +152,34 @@ type Blssigner_VerifySignature_Call struct { // - pubKey crypto.BLSPubkey // - msg []byte // - signature crypto.BLSSignature -func (_e *Blssigner_Expecter) VerifySignature(pubKey interface{}, msg interface{}, signature interface{}) *Blssigner_VerifySignature_Call { - return &Blssigner_VerifySignature_Call{Call: _e.mock.On("VerifySignature", pubKey, msg, signature)} +func (_e *BLSSigner_Expecter) VerifySignature(pubKey interface{}, msg interface{}, signature interface{}) *BLSSigner_VerifySignature_Call { + return &BLSSigner_VerifySignature_Call{Call: _e.mock.On("VerifySignature", pubKey, msg, signature)} } -func (_c *Blssigner_VerifySignature_Call) Run(run func(pubKey crypto.BLSPubkey, msg []byte, signature crypto.BLSSignature)) *Blssigner_VerifySignature_Call { +func (_c *BLSSigner_VerifySignature_Call) Run(run func(pubKey crypto.BLSPubkey, msg []byte, signature crypto.BLSSignature)) *BLSSigner_VerifySignature_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(crypto.BLSPubkey), args[1].([]byte), args[2].(crypto.BLSSignature)) }) return _c } -func (_c *Blssigner_VerifySignature_Call) Return(_a0 error) *Blssigner_VerifySignature_Call { +func (_c *BLSSigner_VerifySignature_Call) Return(_a0 error) *BLSSigner_VerifySignature_Call { _c.Call.Return(_a0) return _c } -func (_c *Blssigner_VerifySignature_Call) RunAndReturn(run func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) *Blssigner_VerifySignature_Call { +func (_c *BLSSigner_VerifySignature_Call) RunAndReturn(run func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) *BLSSigner_VerifySignature_Call { _c.Call.Return(run) return _c } -// NewBlssigner creates a new instance of Blssigner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// NewBLSSigner creates a new instance of BLSSigner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. -func NewBlssigner(t interface { +func NewBLSSigner(t interface { mock.TestingT Cleanup(func()) -}) *Blssigner { - mock := &Blssigner{} +}) *BLSSigner { + mock := &BLSSigner{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/mod/state-transition/pkg/core/helpers_test.go b/mod/state-transition/pkg/core/helpers_test.go index b982800a67..1631830784 100644 --- a/mod/state-transition/pkg/core/helpers_test.go +++ b/mod/state-transition/pkg/core/helpers_test.go @@ -23,7 +23,6 @@ package core_test import ( "context" "fmt" - "testing" corestore "cosmossdk.io/core/store" "cosmossdk.io/log" @@ -33,48 +32,24 @@ import ( "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" "github.com/berachain/beacon-kit/mod/storage/pkg/db" "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" ) -func TestExecutionEngine_VerifyAndNotifyNewPayload(t *testing.T) { - mockEngine := mocks.NewExecutionEngine[ +// TODO: replace with proper mock +type testExecutionEngine struct{} + +func (tee *testExecutionEngine) VerifyAndNotifyNewPayload( + _ context.Context, + _ *engineprimitives.NewPayloadRequest[ *types.ExecutionPayload, - *types.ExecutionPayloadHeader, engineprimitives.Withdrawals, - ](t) - - t.Run("successful verification with complete payload", func(t *testing.T) { - req := &engineprimitives.NewPayloadRequest[ - *types.ExecutionPayload, - engineprimitives.Withdrawals, - ]{ - ExecutionPayload: &types.ExecutionPayload{}, - VersionedHashes: []common.ExecutionHash{ - {0x1}, - {0x2}, - }, - ParentBeaconBlockRoot: &common.Root{0x3}, - Optimistic: false, - } - - // Set up expectation for successful verification - mockEngine.EXPECT(). - VerifyAndNotifyNewPayload( - context.Background(), - req, - ). - Return(nil) - - err := mockEngine.VerifyAndNotifyNewPayload(context.Background(), req) - require.NoError(t, err) - }) + ], +) error { + return nil } type testKVStoreService struct { diff --git a/mod/state-transition/pkg/core/mocks/beacon_block.mock.go b/mod/state-transition/pkg/core/mocks/beacon_block.mock.go deleted file mode 100644 index 9b7182a9b9..0000000000 --- a/mod/state-transition/pkg/core/mocks/beacon_block.mock.go +++ /dev/null @@ -1,313 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - core "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// BeaconBlock is an autogenerated mock type for the BeaconBlock type -type BeaconBlock[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - mock.Mock -} - -type BeaconBlock_Expecter[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - mock *mock.Mock -} - -func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) EXPECT() *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{mock: &_m.Mock} -} - -// GetBody provides a mock function with given fields: -func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBody() BeaconBlockBodyT { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBody") - } - - var r0 BeaconBlockBodyT - if rf, ok := ret.Get(0).(func() BeaconBlockBodyT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(BeaconBlockBodyT) - } - - return r0 -} - -// BeaconBlock_GetBody_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBody' -type BeaconBlock_GetBody_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// GetBody is a helper method to define mock.On call -func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBody() *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBody")} -} - -func (_c *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 BeaconBlockBodyT) *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() BeaconBlockBodyT) *BeaconBlock_GetBody_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetParentBlockRoot provides a mock function with given fields: -func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetParentBlockRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetParentBlockRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// BeaconBlock_GetParentBlockRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParentBlockRoot' -type BeaconBlock_GetParentBlockRoot_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// GetParentBlockRoot is a helper method to define mock.On call -func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetParentBlockRoot() *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetParentBlockRoot")} -} - -func (_c *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Root) *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Root) *BeaconBlock_GetParentBlockRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetProposerIndex provides a mock function with given fields: -func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetProposerIndex() math.ValidatorIndex { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetProposerIndex") - } - - var r0 math.ValidatorIndex - if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - return r0 -} - -// BeaconBlock_GetProposerIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProposerIndex' -type BeaconBlock_GetProposerIndex_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// GetProposerIndex is a helper method to define mock.On call -func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetProposerIndex() *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetProposerIndex")} -} - -func (_c *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.ValidatorIndex) *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.ValidatorIndex) *BeaconBlock_GetProposerIndex_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetSlot provides a mock function with given fields: -func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetSlot() math.Slot { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSlot") - } - - var r0 math.Slot - if rf, ok := ret.Get(0).(func() math.Slot); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Slot) - } - - return r0 -} - -// BeaconBlock_GetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlot' -type BeaconBlock_GetSlot_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// GetSlot is a helper method to define mock.On call -func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetSlot() *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetSlot")} -} - -func (_c *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.Slot) *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.Slot) *BeaconBlock_GetSlot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetStateRoot provides a mock function with given fields: -func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetStateRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetStateRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// BeaconBlock_GetStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStateRoot' -type BeaconBlock_GetStateRoot_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// GetStateRoot is a helper method to define mock.On call -func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetStateRoot() *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetStateRoot")} -} - -func (_c *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Root) *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Root) *BeaconBlock_GetStateRoot_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// IsNil provides a mock function with given fields: -func (_m *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) IsNil() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsNil") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// BeaconBlock_IsNil_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNil' -type BeaconBlock_IsNil_Call[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// IsNil is a helper method to define mock.On call -func (_e *BeaconBlock_Expecter[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) IsNil() *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("IsNil")} -} - -func (_c *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 bool) *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() bool) *BeaconBlock_IsNil_Call[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// NewBeaconBlock creates a new instance of BeaconBlock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBeaconBlock[DepositT any, BeaconBlockBodyT core.BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any](t interface { - mock.TestingT - Cleanup(func()) -}) *BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - mock := &BeaconBlock[DepositT, BeaconBlockBodyT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/beacon_block_body.mock.go b/mod/state-transition/pkg/core/mocks/beacon_block_body.mock.go deleted file mode 100644 index cc750bf211..0000000000 --- a/mod/state-transition/pkg/core/mocks/beacon_block_body.mock.go +++ /dev/null @@ -1,320 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - core "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" - - crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - - eip4844 "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - - mock "github.com/stretchr/testify/mock" -) - -// BeaconBlockBody is an autogenerated mock type for the BeaconBlockBody type -type BeaconBlockBody[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - mock.Mock -} - -type BeaconBlockBody_Expecter[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - mock *mock.Mock -} - -func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) EXPECT() *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{mock: &_m.Mock} -} - -// Empty provides a mock function with given fields: _a0 -func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Empty(_a0 uint32) BeaconBlockBodyT { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Empty") - } - - var r0 BeaconBlockBodyT - if rf, ok := ret.Get(0).(func(uint32) BeaconBlockBodyT); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(BeaconBlockBodyT) - } - - return r0 -} - -// BeaconBlockBody_Empty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Empty' -type BeaconBlockBody_Empty_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// Empty is a helper method to define mock.On call -// - _a0 uint32 -func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Empty(_a0 interface{}) *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("Empty", _a0)} -} - -func (_c *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(_a0 uint32)) *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) - }) - return _c -} - -func (_c *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 BeaconBlockBodyT) *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func(uint32) BeaconBlockBodyT) *BeaconBlockBody_Empty_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetBlobKzgCommitments provides a mock function with given fields: -func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlobKzgCommitments() eip4844.KZGCommitments[common.ExecutionHash] { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBlobKzgCommitments") - } - - var r0 eip4844.KZGCommitments[common.ExecutionHash] - if rf, ok := ret.Get(0).(func() eip4844.KZGCommitments[common.ExecutionHash]); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(eip4844.KZGCommitments[common.ExecutionHash]) - } - } - - return r0 -} - -// BeaconBlockBody_GetBlobKzgCommitments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlobKzgCommitments' -type BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// GetBlobKzgCommitments is a helper method to define mock.On call -func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlobKzgCommitments() *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBlobKzgCommitments")} -} - -func (_c *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 eip4844.KZGCommitments[common.ExecutionHash]) *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() eip4844.KZGCommitments[common.ExecutionHash]) *BeaconBlockBody_GetBlobKzgCommitments_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetDeposits provides a mock function with given fields: -func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetDeposits() []DepositT { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDeposits") - } - - var r0 []DepositT - if rf, ok := ret.Get(0).(func() []DepositT); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]DepositT) - } - } - - return r0 -} - -// BeaconBlockBody_GetDeposits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDeposits' -type BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// GetDeposits is a helper method to define mock.On call -func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetDeposits() *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetDeposits")} -} - -func (_c *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 []DepositT) *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() []DepositT) *BeaconBlockBody_GetDeposits_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetExecutionPayload provides a mock function with given fields: -func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExecutionPayload() ExecutionPayloadT { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExecutionPayload") - } - - var r0 ExecutionPayloadT - if rf, ok := ret.Get(0).(func() ExecutionPayloadT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(ExecutionPayloadT) - } - - return r0 -} - -// BeaconBlockBody_GetExecutionPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExecutionPayload' -type BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// GetExecutionPayload is a helper method to define mock.On call -func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExecutionPayload() *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetExecutionPayload")} -} - -func (_c *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 ExecutionPayloadT) *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() ExecutionPayloadT) *BeaconBlockBody_GetExecutionPayload_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetRandaoReveal provides a mock function with given fields: -func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetRandaoReveal() crypto.BLSSignature { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetRandaoReveal") - } - - var r0 crypto.BLSSignature - if rf, ok := ret.Get(0).(func() crypto.BLSSignature); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.BLSSignature) - } - } - - return r0 -} - -// BeaconBlockBody_GetRandaoReveal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRandaoReveal' -type BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// GetRandaoReveal is a helper method to define mock.On call -func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetRandaoReveal() *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetRandaoReveal")} -} - -func (_c *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 crypto.BLSSignature) *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() crypto.BLSSignature) *BeaconBlockBody_GetRandaoReveal_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// HashTreeRoot provides a mock function with given fields: -func (_m *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) HashTreeRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for HashTreeRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// BeaconBlockBody_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' -type BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any] struct { - *mock.Call -} - -// HashTreeRoot is a helper method to define mock.On call -func (_e *BeaconBlockBody_Expecter[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) HashTreeRoot() *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("HashTreeRoot")} -} - -func (_c *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Root) *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Root) *BeaconBlockBody_HashTreeRoot_Call[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// NewBeaconBlockBody creates a new instance of BeaconBlockBody. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBeaconBlockBody[BeaconBlockBodyT any, DepositT any, ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT core.ExecutionPayloadHeader, WithdrawalsT any](t interface { - mock.TestingT - Cleanup(func()) -}) *BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - mock := &BeaconBlockBody[BeaconBlockBodyT, DepositT, ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/beacon_block_header.mock.go b/mod/state-transition/pkg/core/mocks/beacon_block_header.mock.go deleted file mode 100644 index e8353c6e6d..0000000000 --- a/mod/state-transition/pkg/core/mocks/beacon_block_header.mock.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// BeaconBlockHeader is an autogenerated mock type for the BeaconBlockHeader type -type BeaconBlockHeader[BeaconBlockHeaderT any] struct { - mock.Mock -} - -type BeaconBlockHeader_Expecter[BeaconBlockHeaderT any] struct { - mock *mock.Mock -} - -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) EXPECT() *BeaconBlockHeader_Expecter[BeaconBlockHeaderT] { - return &BeaconBlockHeader_Expecter[BeaconBlockHeaderT]{mock: &_m.Mock} -} - -// GetBodyRoot provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetBodyRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBodyRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// BeaconBlockHeader_GetBodyRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBodyRoot' -type BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT any] struct { - *mock.Call -} - -// GetBodyRoot is a helper method to define mock.On call -func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetBodyRoot() *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT] { - return &BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetBodyRoot")} -} - -func (_c *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT]) Return(_a0 common.Root) *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() common.Root) *BeaconBlockHeader_GetBodyRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return(run) - return _c -} - -// GetParentBlockRoot provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetParentBlockRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetParentBlockRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// BeaconBlockHeader_GetParentBlockRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParentBlockRoot' -type BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT any] struct { - *mock.Call -} - -// GetParentBlockRoot is a helper method to define mock.On call -func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetParentBlockRoot() *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT] { - return &BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetParentBlockRoot")} -} - -func (_c *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]) Return(_a0 common.Root) *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() common.Root) *BeaconBlockHeader_GetParentBlockRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return(run) - return _c -} - -// GetProposerIndex provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetProposerIndex() math.ValidatorIndex { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetProposerIndex") - } - - var r0 math.ValidatorIndex - if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - return r0 -} - -// BeaconBlockHeader_GetProposerIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProposerIndex' -type BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT any] struct { - *mock.Call -} - -// GetProposerIndex is a helper method to define mock.On call -func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetProposerIndex() *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { - return &BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetProposerIndex")} -} - -func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) Return(_a0 math.ValidatorIndex) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.ValidatorIndex) *BeaconBlockHeader_GetProposerIndex_Call[BeaconBlockHeaderT] { - _c.Call.Return(run) - return _c -} - -// GetSlot provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetSlot() math.Slot { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSlot") - } - - var r0 math.Slot - if rf, ok := ret.Get(0).(func() math.Slot); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Slot) - } - - return r0 -} - -// BeaconBlockHeader_GetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlot' -type BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT any] struct { - *mock.Call -} - -// GetSlot is a helper method to define mock.On call -func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetSlot() *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { - return &BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetSlot")} -} - -func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) Return(_a0 math.Slot) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() math.Slot) *BeaconBlockHeader_GetSlot_Call[BeaconBlockHeaderT] { - _c.Call.Return(run) - return _c -} - -// GetStateRoot provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) GetStateRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetStateRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// BeaconBlockHeader_GetStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStateRoot' -type BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT any] struct { - *mock.Call -} - -// GetStateRoot is a helper method to define mock.On call -func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) GetStateRoot() *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT] { - return &BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("GetStateRoot")} -} - -func (_c *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT]) Return(_a0 common.Root) *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() common.Root) *BeaconBlockHeader_GetStateRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return(run) - return _c -} - -// HashTreeRoot provides a mock function with given fields: -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) HashTreeRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for HashTreeRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// BeaconBlockHeader_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' -type BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT any] struct { - *mock.Call -} - -// HashTreeRoot is a helper method to define mock.On call -func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) HashTreeRoot() *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT] { - return &BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("HashTreeRoot")} -} - -func (_c *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT]) Run(run func()) *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT]) Return(_a0 common.Root) *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func() common.Root) *BeaconBlockHeader_HashTreeRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return(run) - return _c -} - -// New provides a mock function with given fields: slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) New(slot math.Slot, proposerIndex math.ValidatorIndex, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root) BeaconBlockHeaderT { - ret := _m.Called(slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot) - - if len(ret) == 0 { - panic("no return value specified for New") - } - - var r0 BeaconBlockHeaderT - if rf, ok := ret.Get(0).(func(math.Slot, math.ValidatorIndex, common.Root, common.Root, common.Root) BeaconBlockHeaderT); ok { - r0 = rf(slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot) - } else { - r0 = ret.Get(0).(BeaconBlockHeaderT) - } - - return r0 -} - -// BeaconBlockHeader_New_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'New' -type BeaconBlockHeader_New_Call[BeaconBlockHeaderT any] struct { - *mock.Call -} - -// New is a helper method to define mock.On call -// - slot math.Slot -// - proposerIndex math.ValidatorIndex -// - parentBlockRoot common.Root -// - stateRoot common.Root -// - bodyRoot common.Root -func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) New(slot interface{}, proposerIndex interface{}, parentBlockRoot interface{}, stateRoot interface{}, bodyRoot interface{}) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { - return &BeaconBlockHeader_New_Call[BeaconBlockHeaderT]{Call: _e.mock.On("New", slot, proposerIndex, parentBlockRoot, stateRoot, bodyRoot)} -} - -func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Run(run func(slot math.Slot, proposerIndex math.ValidatorIndex, parentBlockRoot common.Root, stateRoot common.Root, bodyRoot common.Root)) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Slot), args[1].(math.ValidatorIndex), args[2].(common.Root), args[3].(common.Root), args[4].(common.Root)) - }) - return _c -} - -func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) Return(_a0 BeaconBlockHeaderT) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconBlockHeader_New_Call[BeaconBlockHeaderT]) RunAndReturn(run func(math.Slot, math.ValidatorIndex, common.Root, common.Root, common.Root) BeaconBlockHeaderT) *BeaconBlockHeader_New_Call[BeaconBlockHeaderT] { - _c.Call.Return(run) - return _c -} - -// SetStateRoot provides a mock function with given fields: _a0 -func (_m *BeaconBlockHeader[BeaconBlockHeaderT]) SetStateRoot(_a0 common.Root) { - _m.Called(_a0) -} - -// BeaconBlockHeader_SetStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStateRoot' -type BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT any] struct { - *mock.Call -} - -// SetStateRoot is a helper method to define mock.On call -// - _a0 common.Root -func (_e *BeaconBlockHeader_Expecter[BeaconBlockHeaderT]) SetStateRoot(_a0 interface{}) *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT] { - return &BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT]{Call: _e.mock.On("SetStateRoot", _a0)} -} - -func (_c *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT]) Run(run func(_a0 common.Root)) *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(common.Root)) - }) - return _c -} - -func (_c *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT]) Return() *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return() - return _c -} - -func (_c *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT]) RunAndReturn(run func(common.Root)) *BeaconBlockHeader_SetStateRoot_Call[BeaconBlockHeaderT] { - _c.Call.Return(run) - return _c -} - -// NewBeaconBlockHeader creates a new instance of BeaconBlockHeader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBeaconBlockHeader[BeaconBlockHeaderT any](t interface { - mock.TestingT - Cleanup(func()) -}) *BeaconBlockHeader[BeaconBlockHeaderT] { - mock := &BeaconBlockHeader[BeaconBlockHeaderT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/beacon_state.mock.go b/mod/state-transition/pkg/core/mocks/beacon_state.mock.go deleted file mode 100644 index c857192228..0000000000 --- a/mod/state-transition/pkg/core/mocks/beacon_state.mock.go +++ /dev/null @@ -1,2395 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - context "context" - - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// BeaconState is an autogenerated mock type for the BeaconState type -type BeaconState[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - mock.Mock -} - -type BeaconState_Expecter[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - mock *mock.Mock -} - -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) EXPECT() *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{mock: &_m.Mock} -} - -// AddValidator provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) AddValidator(_a0 ValidatorT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for AddValidator") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_AddValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidator' -type BeaconState_AddValidator_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// AddValidator is a helper method to define mock.On call -// - _a0 ValidatorT -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) AddValidator(_a0 interface{}) *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("AddValidator", _a0)} -} - -func (_c *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 ValidatorT)) *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ValidatorT)) - }) - return _c -} - -func (_c *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(ValidatorT) error) *BeaconState_AddValidator_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// AddValidatorBartio provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) AddValidatorBartio(_a0 ValidatorT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for AddValidatorBartio") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_AddValidatorBartio_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidatorBartio' -type BeaconState_AddValidatorBartio_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// AddValidatorBartio is a helper method to define mock.On call -// - _a0 ValidatorT -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) AddValidatorBartio(_a0 interface{}) *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("AddValidatorBartio", _a0)} -} - -func (_c *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 ValidatorT)) *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ValidatorT)) - }) - return _c -} - -func (_c *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(ValidatorT) error) *BeaconState_AddValidatorBartio_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// Context provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Context() context.Context { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Context") - } - - var r0 context.Context - if rf, ok := ret.Get(0).(func() context.Context); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(context.Context) - } - } - - return r0 -} - -// BeaconState_Context_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Context' -type BeaconState_Context_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// Context is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Context() *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("Context")} -} - -func (_c *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 context.Context) *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() context.Context) *BeaconState_Context_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// Copy provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Copy() T { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Copy") - } - - var r0 T - if rf, ok := ret.Get(0).(func() T); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(T) - } - - return r0 -} - -// BeaconState_Copy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Copy' -type BeaconState_Copy_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// Copy is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Copy() *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("Copy")} -} - -func (_c *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 T) *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() T) *BeaconState_Copy_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// DecreaseBalance provides a mock function with given fields: _a0, _a1 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) DecreaseBalance(_a0 math.ValidatorIndex, _a1 math.Gwei) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for DecreaseBalance") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex, math.Gwei) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_DecreaseBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DecreaseBalance' -type BeaconState_DecreaseBalance_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// DecreaseBalance is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -// - _a1 math.Gwei -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) DecreaseBalance(_a0 interface{}, _a1 interface{}) *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("DecreaseBalance", _a0, _a1)} -} - -func (_c *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex, _a1 math.Gwei)) *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex), args[1].(math.Gwei)) - }) - return _c -} - -func (_c *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex, math.Gwei) error) *BeaconState_DecreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// ExpectedWithdrawals provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ExpectedWithdrawals() ([]WithdrawalT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ExpectedWithdrawals") - } - - var r0 []WithdrawalT - var r1 error - if rf, ok := ret.Get(0).(func() ([]WithdrawalT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []WithdrawalT); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]WithdrawalT) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_ExpectedWithdrawals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExpectedWithdrawals' -type BeaconState_ExpectedWithdrawals_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// ExpectedWithdrawals is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ExpectedWithdrawals() *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ExpectedWithdrawals")} -} - -func (_c *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 []WithdrawalT, _a1 error) *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() ([]WithdrawalT, error)) *BeaconState_ExpectedWithdrawals_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetBalance provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 math.ValidatorIndex) (math.Gwei, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetBalance") - } - - var r0 math.Gwei - var r1 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (math.Gwei, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) math.Gwei); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(math.Gwei) - } - - if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBalance' -type BeaconState_GetBalance_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetBalance is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 interface{}) *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBalance", _a0)} -} - -func (_c *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex)) - }) - return _c -} - -func (_c *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (math.Gwei, error)) *BeaconState_GetBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetBlockRootAtIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetBlockRootAtIndex(_a0 uint64) (common.Root, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetBlockRootAtIndex") - } - - var r0 common.Root - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetBlockRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockRootAtIndex' -type BeaconState_GetBlockRootAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetBlockRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetBlockRootAtIndex(_a0 interface{}) *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBlockRootAtIndex", _a0)} -} - -func (_c *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Root, error)) *BeaconState_GetBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetEth1Data provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1Data() (Eth1DataT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetEth1Data") - } - - var r0 Eth1DataT - var r1 error - if rf, ok := ret.Get(0).(func() (Eth1DataT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() Eth1DataT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(Eth1DataT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1Data' -type BeaconState_GetEth1Data_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetEth1Data is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1Data() *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetEth1Data")} -} - -func (_c *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 Eth1DataT, _a1 error) *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (Eth1DataT, error)) *BeaconState_GetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetEth1DepositIndex provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1DepositIndex() (uint64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetEth1DepositIndex") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func() (uint64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1DepositIndex' -type BeaconState_GetEth1DepositIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetEth1DepositIndex is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1DepositIndex() *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetEth1DepositIndex")} -} - -func (_c *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *BeaconState_GetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetFork provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetFork() (ForkT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetFork") - } - - var r0 ForkT - var r1 error - if rf, ok := ret.Get(0).(func() (ForkT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() ForkT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(ForkT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetFork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFork' -type BeaconState_GetFork_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetFork is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetFork() *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetFork")} -} - -func (_c *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ForkT, _a1 error) *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ForkT, error)) *BeaconState_GetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetGenesisValidatorsRoot provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetGenesisValidatorsRoot() (common.Root, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetGenesisValidatorsRoot") - } - - var r0 common.Root - var r1 error - if rf, ok := ret.Get(0).(func() (common.Root, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetGenesisValidatorsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGenesisValidatorsRoot' -type BeaconState_GetGenesisValidatorsRoot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetGenesisValidatorsRoot is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetGenesisValidatorsRoot() *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetGenesisValidatorsRoot")} -} - -func (_c *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (common.Root, error)) *BeaconState_GetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetLatestBlockHeader provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestBlockHeader() (BeaconBlockHeaderT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLatestBlockHeader") - } - - var r0 BeaconBlockHeaderT - var r1 error - if rf, ok := ret.Get(0).(func() (BeaconBlockHeaderT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() BeaconBlockHeaderT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(BeaconBlockHeaderT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestBlockHeader' -type BeaconState_GetLatestBlockHeader_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetLatestBlockHeader is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestBlockHeader() *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetLatestBlockHeader")} -} - -func (_c *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 BeaconBlockHeaderT, _a1 error) *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (BeaconBlockHeaderT, error)) *BeaconState_GetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetLatestExecutionPayloadHeader provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestExecutionPayloadHeader() (ExecutionPayloadHeaderT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLatestExecutionPayloadHeader") - } - - var r0 ExecutionPayloadHeaderT - var r1 error - if rf, ok := ret.Get(0).(func() (ExecutionPayloadHeaderT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() ExecutionPayloadHeaderT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(ExecutionPayloadHeaderT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestExecutionPayloadHeader' -type BeaconState_GetLatestExecutionPayloadHeader_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetLatestExecutionPayloadHeader is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestExecutionPayloadHeader() *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetLatestExecutionPayloadHeader")} -} - -func (_c *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ExecutionPayloadHeaderT, _a1 error) *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ExecutionPayloadHeaderT, error)) *BeaconState_GetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetNextWithdrawalIndex provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalIndex() (uint64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNextWithdrawalIndex") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func() (uint64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetNextWithdrawalIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextWithdrawalIndex' -type BeaconState_GetNextWithdrawalIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetNextWithdrawalIndex is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalIndex() *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetNextWithdrawalIndex")} -} - -func (_c *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *BeaconState_GetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetNextWithdrawalValidatorIndex provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() (math.ValidatorIndex, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNextWithdrawalValidatorIndex") - } - - var r0 math.ValidatorIndex - var r1 error - if rf, ok := ret.Get(0).(func() (math.ValidatorIndex, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetNextWithdrawalValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextWithdrawalValidatorIndex' -type BeaconState_GetNextWithdrawalValidatorIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetNextWithdrawalValidatorIndex is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetNextWithdrawalValidatorIndex")} -} - -func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.ValidatorIndex, error)) *BeaconState_GetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetRandaoMixAtIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 uint64) (common.Bytes32, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetRandaoMixAtIndex") - } - - var r0 common.Bytes32 - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (common.Bytes32, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) common.Bytes32); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Bytes32) - } - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRandaoMixAtIndex' -type BeaconState_GetRandaoMixAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetRandaoMixAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 interface{}) *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetRandaoMixAtIndex", _a0)} -} - -func (_c *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Bytes32, _a1 error) *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Bytes32, error)) *BeaconState_GetRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetSlashingAtIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 uint64) (math.Gwei, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetSlashingAtIndex") - } - - var r0 math.Gwei - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(math.Gwei) - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetSlashingAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlashingAtIndex' -type BeaconState_GetSlashingAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetSlashingAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 interface{}) *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetSlashingAtIndex", _a0)} -} - -func (_c *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *BeaconState_GetSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetSlot provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() (math.Slot, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSlot") - } - - var r0 math.Slot - var r1 error - if rf, ok := ret.Get(0).(func() (math.Slot, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() math.Slot); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Slot) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlot' -type BeaconState_GetSlot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetSlot is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetSlot")} -} - -func (_c *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Slot, _a1 error) *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Slot, error)) *BeaconState_GetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetTotalActiveBalances provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 uint64) (math.Gwei, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetTotalActiveBalances") - } - - var r0 math.Gwei - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(math.Gwei) - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetTotalActiveBalances_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalActiveBalances' -type BeaconState_GetTotalActiveBalances_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetTotalActiveBalances is a helper method to define mock.On call -// - _a0 uint64 -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 interface{}) *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalActiveBalances", _a0)} -} - -func (_c *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *BeaconState_GetTotalActiveBalances_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetTotalSlashing provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() (math.Gwei, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTotalSlashing") - } - - var r0 math.Gwei - var r1 error - if rf, ok := ret.Get(0).(func() (math.Gwei, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() math.Gwei); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Gwei) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetTotalSlashing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalSlashing' -type BeaconState_GetTotalSlashing_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetTotalSlashing is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalSlashing")} -} - -func (_c *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Gwei, error)) *BeaconState_GetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetTotalValidators provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalValidators() (uint64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTotalValidators") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func() (uint64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetTotalValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalValidators' -type BeaconState_GetTotalValidators_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetTotalValidators is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalValidators() *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalValidators")} -} - -func (_c *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *BeaconState_GetTotalValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetValidators provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidators() (ValidatorsT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetValidators") - } - - var r0 ValidatorsT - var r1 error - if rf, ok := ret.Get(0).(func() (ValidatorsT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() ValidatorsT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(ValidatorsT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidators' -type BeaconState_GetValidators_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetValidators is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidators() *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetValidators")} -} - -func (_c *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ValidatorsT, _a1 error) *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ValidatorsT, error)) *BeaconState_GetValidators_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetValidatorsByEffectiveBalance provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidatorsByEffectiveBalance() ([]ValidatorT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetValidatorsByEffectiveBalance") - } - - var r0 []ValidatorT - var r1 error - if rf, ok := ret.Get(0).(func() ([]ValidatorT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []ValidatorT); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ValidatorT) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_GetValidatorsByEffectiveBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidatorsByEffectiveBalance' -type BeaconState_GetValidatorsByEffectiveBalance_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetValidatorsByEffectiveBalance is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidatorsByEffectiveBalance() *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetValidatorsByEffectiveBalance")} -} - -func (_c *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 []ValidatorT, _a1 error) *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() ([]ValidatorT, error)) *BeaconState_GetValidatorsByEffectiveBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// HashTreeRoot provides a mock function with given fields: -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) HashTreeRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for HashTreeRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// BeaconState_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' -type BeaconState_HashTreeRoot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// HashTreeRoot is a helper method to define mock.On call -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) HashTreeRoot() *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("HashTreeRoot")} -} - -func (_c *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root) *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() common.Root) *BeaconState_HashTreeRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// IncreaseBalance provides a mock function with given fields: _a0, _a1 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) IncreaseBalance(_a0 math.ValidatorIndex, _a1 math.Gwei) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for IncreaseBalance") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex, math.Gwei) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_IncreaseBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncreaseBalance' -type BeaconState_IncreaseBalance_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// IncreaseBalance is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -// - _a1 math.Gwei -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) IncreaseBalance(_a0 interface{}, _a1 interface{}) *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("IncreaseBalance", _a0, _a1)} -} - -func (_c *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex, _a1 math.Gwei)) *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex), args[1].(math.Gwei)) - }) - return _c -} - -func (_c *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex, math.Gwei) error) *BeaconState_IncreaseBalance_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// NewFromDB provides a mock function with given fields: bdb, cs -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) NewFromDB(bdb KVStoreT, cs common.ChainSpec) T { - ret := _m.Called(bdb, cs) - - if len(ret) == 0 { - panic("no return value specified for NewFromDB") - } - - var r0 T - if rf, ok := ret.Get(0).(func(KVStoreT, common.ChainSpec) T); ok { - r0 = rf(bdb, cs) - } else { - r0 = ret.Get(0).(T) - } - - return r0 -} - -// BeaconState_NewFromDB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewFromDB' -type BeaconState_NewFromDB_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// NewFromDB is a helper method to define mock.On call -// - bdb KVStoreT -// - cs common.ChainSpec -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) NewFromDB(bdb interface{}, cs interface{}) *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("NewFromDB", bdb, cs)} -} - -func (_c *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(bdb KVStoreT, cs common.ChainSpec)) *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(KVStoreT), args[1].(common.ChainSpec)) - }) - return _c -} - -func (_c *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 T) *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(KVStoreT, common.ChainSpec) T) *BeaconState_NewFromDB_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetEth1Data provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetEth1Data(_a0 Eth1DataT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetEth1Data") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Eth1DataT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1Data' -type BeaconState_SetEth1Data_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetEth1Data is a helper method to define mock.On call -// - _a0 Eth1DataT -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetEth1Data(_a0 interface{}) *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetEth1Data", _a0)} -} - -func (_c *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 Eth1DataT)) *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Eth1DataT)) - }) - return _c -} - -func (_c *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(Eth1DataT) error) *BeaconState_SetEth1Data_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetEth1DepositIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetEth1DepositIndex(_a0 uint64) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetEth1DepositIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1DepositIndex' -type BeaconState_SetEth1DepositIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetEth1DepositIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetEth1DepositIndex(_a0 interface{}) *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetEth1DepositIndex", _a0)} -} - -func (_c *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) error) *BeaconState_SetEth1DepositIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetFork provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetFork(_a0 ForkT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetFork") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ForkT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetFork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFork' -type BeaconState_SetFork_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetFork is a helper method to define mock.On call -// - _a0 ForkT -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetFork(_a0 interface{}) *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetFork", _a0)} -} - -func (_c *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 ForkT)) *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ForkT)) - }) - return _c -} - -func (_c *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(ForkT) error) *BeaconState_SetFork_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetGenesisValidatorsRoot provides a mock function with given fields: root -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetGenesisValidatorsRoot(root common.Root) error { - ret := _m.Called(root) - - if len(ret) == 0 { - panic("no return value specified for SetGenesisValidatorsRoot") - } - - var r0 error - if rf, ok := ret.Get(0).(func(common.Root) error); ok { - r0 = rf(root) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetGenesisValidatorsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetGenesisValidatorsRoot' -type BeaconState_SetGenesisValidatorsRoot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetGenesisValidatorsRoot is a helper method to define mock.On call -// - root common.Root -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetGenesisValidatorsRoot(root interface{}) *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetGenesisValidatorsRoot", root)} -} - -func (_c *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(root common.Root)) *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(common.Root)) - }) - return _c -} - -func (_c *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(common.Root) error) *BeaconState_SetGenesisValidatorsRoot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetLatestBlockHeader provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetLatestBlockHeader(_a0 BeaconBlockHeaderT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetLatestBlockHeader") - } - - var r0 error - if rf, ok := ret.Get(0).(func(BeaconBlockHeaderT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestBlockHeader' -type BeaconState_SetLatestBlockHeader_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetLatestBlockHeader is a helper method to define mock.On call -// - _a0 BeaconBlockHeaderT -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetLatestBlockHeader(_a0 interface{}) *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetLatestBlockHeader", _a0)} -} - -func (_c *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 BeaconBlockHeaderT)) *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(BeaconBlockHeaderT)) - }) - return _c -} - -func (_c *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(BeaconBlockHeaderT) error) *BeaconState_SetLatestBlockHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetLatestExecutionPayloadHeader provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetLatestExecutionPayloadHeader(_a0 ExecutionPayloadHeaderT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetLatestExecutionPayloadHeader") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ExecutionPayloadHeaderT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestExecutionPayloadHeader' -type BeaconState_SetLatestExecutionPayloadHeader_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetLatestExecutionPayloadHeader is a helper method to define mock.On call -// - _a0 ExecutionPayloadHeaderT -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetLatestExecutionPayloadHeader(_a0 interface{}) *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetLatestExecutionPayloadHeader", _a0)} -} - -func (_c *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 ExecutionPayloadHeaderT)) *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ExecutionPayloadHeaderT)) - }) - return _c -} - -func (_c *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(ExecutionPayloadHeaderT) error) *BeaconState_SetLatestExecutionPayloadHeader_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetNextWithdrawalIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetNextWithdrawalIndex(_a0 uint64) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetNextWithdrawalIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetNextWithdrawalIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNextWithdrawalIndex' -type BeaconState_SetNextWithdrawalIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetNextWithdrawalIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetNextWithdrawalIndex(_a0 interface{}) *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetNextWithdrawalIndex", _a0)} -} - -func (_c *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) error) *BeaconState_SetNextWithdrawalIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetNextWithdrawalValidatorIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetNextWithdrawalValidatorIndex(_a0 math.ValidatorIndex) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetNextWithdrawalValidatorIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetNextWithdrawalValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNextWithdrawalValidatorIndex' -type BeaconState_SetNextWithdrawalValidatorIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetNextWithdrawalValidatorIndex is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetNextWithdrawalValidatorIndex(_a0 interface{}) *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetNextWithdrawalValidatorIndex", _a0)} -} - -func (_c *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex)) - }) - return _c -} - -func (_c *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) error) *BeaconState_SetNextWithdrawalValidatorIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetSlot provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 math.Slot) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetSlot") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.Slot) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSlot' -type BeaconState_SetSlot_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetSlot is a helper method to define mock.On call -// - _a0 math.Slot -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetSlot(_a0 interface{}) *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetSlot", _a0)} -} - -func (_c *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.Slot)) *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Slot)) - }) - return _c -} - -func (_c *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.Slot) error) *BeaconState_SetSlot_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// SetTotalSlashing provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetTotalSlashing(_a0 math.Gwei) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetTotalSlashing") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.Gwei) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_SetTotalSlashing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTotalSlashing' -type BeaconState_SetTotalSlashing_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// SetTotalSlashing is a helper method to define mock.On call -// - _a0 math.Gwei -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) SetTotalSlashing(_a0 interface{}) *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("SetTotalSlashing", _a0)} -} - -func (_c *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.Gwei)) *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Gwei)) - }) - return _c -} - -func (_c *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.Gwei) error) *BeaconState_SetTotalSlashing_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// StateRootAtIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) StateRootAtIndex(_a0 uint64) (common.Root, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for StateRootAtIndex") - } - - var r0 common.Root - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_StateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateRootAtIndex' -type BeaconState_StateRootAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// StateRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) StateRootAtIndex(_a0 interface{}) *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("StateRootAtIndex", _a0)} -} - -func (_c *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Root, error)) *BeaconState_StateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// UpdateBlockRootAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateBlockRootAtIndex(_a0 uint64, _a1 common.Root) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateBlockRootAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_UpdateBlockRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBlockRootAtIndex' -type BeaconState_UpdateBlockRootAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// UpdateBlockRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 common.Root -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateBlockRootAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateBlockRootAtIndex", _a0, _a1)} -} - -func (_c *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64, _a1 common.Root)) *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(common.Root)) - }) - return _c -} - -func (_c *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64, common.Root) error) *BeaconState_UpdateBlockRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// UpdateRandaoMixAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateRandaoMixAtIndex(_a0 uint64, _a1 common.Bytes32) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateRandaoMixAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, common.Bytes32) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_UpdateRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRandaoMixAtIndex' -type BeaconState_UpdateRandaoMixAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// UpdateRandaoMixAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 common.Bytes32 -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateRandaoMixAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateRandaoMixAtIndex", _a0, _a1)} -} - -func (_c *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64, _a1 common.Bytes32)) *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(common.Bytes32)) - }) - return _c -} - -func (_c *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64, common.Bytes32) error) *BeaconState_UpdateRandaoMixAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// UpdateSlashingAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateSlashingAtIndex(_a0 uint64, _a1 math.Gwei) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateSlashingAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, math.Gwei) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_UpdateSlashingAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSlashingAtIndex' -type BeaconState_UpdateSlashingAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// UpdateSlashingAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 math.Gwei -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateSlashingAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateSlashingAtIndex", _a0, _a1)} -} - -func (_c *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64, _a1 math.Gwei)) *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(math.Gwei)) - }) - return _c -} - -func (_c *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64, math.Gwei) error) *BeaconState_UpdateSlashingAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// UpdateStateRootAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateStateRootAtIndex(_a0 uint64, _a1 common.Root) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateStateRootAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_UpdateStateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateRootAtIndex' -type BeaconState_UpdateStateRootAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// UpdateStateRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 common.Root -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateStateRootAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateStateRootAtIndex", _a0, _a1)} -} - -func (_c *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64, _a1 common.Root)) *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(common.Root)) - }) - return _c -} - -func (_c *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64, common.Root) error) *BeaconState_UpdateStateRootAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// UpdateValidatorAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateValidatorAtIndex(_a0 math.ValidatorIndex, _a1 ValidatorT) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateValidatorAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex, ValidatorT) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// BeaconState_UpdateValidatorAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateValidatorAtIndex' -type BeaconState_UpdateValidatorAtIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// UpdateValidatorAtIndex is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -// - _a1 ValidatorT -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) UpdateValidatorAtIndex(_a0 interface{}, _a1 interface{}) *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("UpdateValidatorAtIndex", _a0, _a1)} -} - -func (_c *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex, _a1 ValidatorT)) *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex), args[1].(ValidatorT)) - }) - return _c -} - -func (_c *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 error) *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex, ValidatorT) error) *BeaconState_UpdateValidatorAtIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// ValidatorByIndex provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 math.ValidatorIndex) (ValidatorT, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ValidatorByIndex") - } - - var r0 ValidatorT - var r1 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (ValidatorT, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) ValidatorT); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(ValidatorT) - } - - if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_ValidatorByIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorByIndex' -type BeaconState_ValidatorByIndex_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// ValidatorByIndex is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 interface{}) *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorByIndex", _a0)} -} - -func (_c *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex)) - }) - return _c -} - -func (_c *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ValidatorT, _a1 error) *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (ValidatorT, error)) *BeaconState_ValidatorByIndex_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// ValidatorIndexByCometBFTAddress provides a mock function with given fields: cometBFTAddress -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress []byte) (math.ValidatorIndex, error) { - ret := _m.Called(cometBFTAddress) - - if len(ret) == 0 { - panic("no return value specified for ValidatorIndexByCometBFTAddress") - } - - var r0 math.ValidatorIndex - var r1 error - if rf, ok := ret.Get(0).(func([]byte) (math.ValidatorIndex, error)); ok { - return rf(cometBFTAddress) - } - if rf, ok := ret.Get(0).(func([]byte) math.ValidatorIndex); ok { - r0 = rf(cometBFTAddress) - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - if rf, ok := ret.Get(1).(func([]byte) error); ok { - r1 = rf(cometBFTAddress) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_ValidatorIndexByCometBFTAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByCometBFTAddress' -type BeaconState_ValidatorIndexByCometBFTAddress_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// ValidatorIndexByCometBFTAddress is a helper method to define mock.On call -// - cometBFTAddress []byte -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress interface{}) *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorIndexByCometBFTAddress", cometBFTAddress)} -} - -func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(cometBFTAddress []byte)) *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func([]byte) (math.ValidatorIndex, error)) *BeaconState_ValidatorIndexByCometBFTAddress_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// ValidatorIndexByPubkey provides a mock function with given fields: _a0 -func (_m *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.ValidatorIndex, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ValidatorIndexByPubkey") - } - - var r0 math.ValidatorIndex - var r1 error - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.ValidatorIndex, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.ValidatorIndex); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - if rf, ok := ret.Get(1).(func(crypto.BLSPubkey) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BeaconState_ValidatorIndexByPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByPubkey' -type BeaconState_ValidatorIndexByPubkey_Call[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// ValidatorIndexByPubkey is a helper method to define mock.On call -// - _a0 crypto.BLSPubkey -func (_e *BeaconState_Expecter[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 interface{}) *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - return &BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorIndexByPubkey", _a0)} -} - -func (_c *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 crypto.BLSPubkey)) *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(crypto.BLSPubkey)) - }) - return _c -} - -func (_c *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(crypto.BLSPubkey) (math.ValidatorIndex, error)) *BeaconState_ValidatorIndexByPubkey_Call[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// NewBeaconState creates a new instance of BeaconState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBeaconState[T any, BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, KVStoreT any, ValidatorT any, ValidatorsT any, WithdrawalT any](t interface { - mock.TestingT - Cleanup(func()) -}) *BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT] { - mock := &BeaconState[T, BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, KVStoreT, ValidatorT, ValidatorsT, WithdrawalT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/context.mock.go b/mod/state-transition/pkg/core/mocks/context.mock.go deleted file mode 100644 index 580f0c7713..0000000000 --- a/mod/state-transition/pkg/core/mocks/context.mock.go +++ /dev/null @@ -1,411 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - time "time" - - mock "github.com/stretchr/testify/mock" -) - -// Context is an autogenerated mock type for the Context type -type Context struct { - mock.Mock -} - -type Context_Expecter struct { - mock *mock.Mock -} - -func (_m *Context) EXPECT() *Context_Expecter { - return &Context_Expecter{mock: &_m.Mock} -} - -// Deadline provides a mock function with given fields: -func (_m *Context) Deadline() (time.Time, bool) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Deadline") - } - - var r0 time.Time - var r1 bool - if rf, ok := ret.Get(0).(func() (time.Time, bool)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() time.Time); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Time) - } - - if rf, ok := ret.Get(1).(func() bool); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// Context_Deadline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deadline' -type Context_Deadline_Call struct { - *mock.Call -} - -// Deadline is a helper method to define mock.On call -func (_e *Context_Expecter) Deadline() *Context_Deadline_Call { - return &Context_Deadline_Call{Call: _e.mock.On("Deadline")} -} - -func (_c *Context_Deadline_Call) Run(run func()) *Context_Deadline_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Context_Deadline_Call) Return(deadline time.Time, ok bool) *Context_Deadline_Call { - _c.Call.Return(deadline, ok) - return _c -} - -func (_c *Context_Deadline_Call) RunAndReturn(run func() (time.Time, bool)) *Context_Deadline_Call { - _c.Call.Return(run) - return _c -} - -// Done provides a mock function with given fields: -func (_m *Context) Done() <-chan struct{} { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Done") - } - - var r0 <-chan struct{} - if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan struct{}) - } - } - - return r0 -} - -// Context_Done_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Done' -type Context_Done_Call struct { - *mock.Call -} - -// Done is a helper method to define mock.On call -func (_e *Context_Expecter) Done() *Context_Done_Call { - return &Context_Done_Call{Call: _e.mock.On("Done")} -} - -func (_c *Context_Done_Call) Run(run func()) *Context_Done_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Context_Done_Call) Return(_a0 <-chan struct{}) *Context_Done_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Context_Done_Call) RunAndReturn(run func() <-chan struct{}) *Context_Done_Call { - _c.Call.Return(run) - return _c -} - -// Err provides a mock function with given fields: -func (_m *Context) Err() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Err") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Context_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err' -type Context_Err_Call struct { - *mock.Call -} - -// Err is a helper method to define mock.On call -func (_e *Context_Expecter) Err() *Context_Err_Call { - return &Context_Err_Call{Call: _e.mock.On("Err")} -} - -func (_c *Context_Err_Call) Run(run func()) *Context_Err_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Context_Err_Call) Return(_a0 error) *Context_Err_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Context_Err_Call) RunAndReturn(run func() error) *Context_Err_Call { - _c.Call.Return(run) - return _c -} - -// GetOptimisticEngine provides a mock function with given fields: -func (_m *Context) GetOptimisticEngine() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetOptimisticEngine") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Context_GetOptimisticEngine_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOptimisticEngine' -type Context_GetOptimisticEngine_Call struct { - *mock.Call -} - -// GetOptimisticEngine is a helper method to define mock.On call -func (_e *Context_Expecter) GetOptimisticEngine() *Context_GetOptimisticEngine_Call { - return &Context_GetOptimisticEngine_Call{Call: _e.mock.On("GetOptimisticEngine")} -} - -func (_c *Context_GetOptimisticEngine_Call) Run(run func()) *Context_GetOptimisticEngine_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Context_GetOptimisticEngine_Call) Return(_a0 bool) *Context_GetOptimisticEngine_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Context_GetOptimisticEngine_Call) RunAndReturn(run func() bool) *Context_GetOptimisticEngine_Call { - _c.Call.Return(run) - return _c -} - -// GetSkipPayloadVerification provides a mock function with given fields: -func (_m *Context) GetSkipPayloadVerification() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSkipPayloadVerification") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Context_GetSkipPayloadVerification_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSkipPayloadVerification' -type Context_GetSkipPayloadVerification_Call struct { - *mock.Call -} - -// GetSkipPayloadVerification is a helper method to define mock.On call -func (_e *Context_Expecter) GetSkipPayloadVerification() *Context_GetSkipPayloadVerification_Call { - return &Context_GetSkipPayloadVerification_Call{Call: _e.mock.On("GetSkipPayloadVerification")} -} - -func (_c *Context_GetSkipPayloadVerification_Call) Run(run func()) *Context_GetSkipPayloadVerification_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Context_GetSkipPayloadVerification_Call) Return(_a0 bool) *Context_GetSkipPayloadVerification_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Context_GetSkipPayloadVerification_Call) RunAndReturn(run func() bool) *Context_GetSkipPayloadVerification_Call { - _c.Call.Return(run) - return _c -} - -// GetSkipValidateRandao provides a mock function with given fields: -func (_m *Context) GetSkipValidateRandao() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSkipValidateRandao") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Context_GetSkipValidateRandao_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSkipValidateRandao' -type Context_GetSkipValidateRandao_Call struct { - *mock.Call -} - -// GetSkipValidateRandao is a helper method to define mock.On call -func (_e *Context_Expecter) GetSkipValidateRandao() *Context_GetSkipValidateRandao_Call { - return &Context_GetSkipValidateRandao_Call{Call: _e.mock.On("GetSkipValidateRandao")} -} - -func (_c *Context_GetSkipValidateRandao_Call) Run(run func()) *Context_GetSkipValidateRandao_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Context_GetSkipValidateRandao_Call) Return(_a0 bool) *Context_GetSkipValidateRandao_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Context_GetSkipValidateRandao_Call) RunAndReturn(run func() bool) *Context_GetSkipValidateRandao_Call { - _c.Call.Return(run) - return _c -} - -// GetSkipValidateResult provides a mock function with given fields: -func (_m *Context) GetSkipValidateResult() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSkipValidateResult") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Context_GetSkipValidateResult_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSkipValidateResult' -type Context_GetSkipValidateResult_Call struct { - *mock.Call -} - -// GetSkipValidateResult is a helper method to define mock.On call -func (_e *Context_Expecter) GetSkipValidateResult() *Context_GetSkipValidateResult_Call { - return &Context_GetSkipValidateResult_Call{Call: _e.mock.On("GetSkipValidateResult")} -} - -func (_c *Context_GetSkipValidateResult_Call) Run(run func()) *Context_GetSkipValidateResult_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Context_GetSkipValidateResult_Call) Return(_a0 bool) *Context_GetSkipValidateResult_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Context_GetSkipValidateResult_Call) RunAndReturn(run func() bool) *Context_GetSkipValidateResult_Call { - _c.Call.Return(run) - return _c -} - -// Value provides a mock function with given fields: key -func (_m *Context) Value(key any) any { - ret := _m.Called(key) - - if len(ret) == 0 { - panic("no return value specified for Value") - } - - var r0 any - if rf, ok := ret.Get(0).(func(any) any); ok { - r0 = rf(key) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(any) - } - } - - return r0 -} - -// Context_Value_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Value' -type Context_Value_Call struct { - *mock.Call -} - -// Value is a helper method to define mock.On call -// - key any -func (_e *Context_Expecter) Value(key interface{}) *Context_Value_Call { - return &Context_Value_Call{Call: _e.mock.On("Value", key)} -} - -func (_c *Context_Value_Call) Run(run func(key any)) *Context_Value_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(any)) - }) - return _c -} - -func (_c *Context_Value_Call) Return(_a0 any) *Context_Value_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Context_Value_Call) RunAndReturn(run func(any) any) *Context_Value_Call { - _c.Call.Return(run) - return _c -} - -// NewContext creates a new instance of Context. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewContext(t interface { - mock.TestingT - Cleanup(func()) -}) *Context { - mock := &Context{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/deposit.mock.go b/mod/state-transition/pkg/core/mocks/deposit.mock.go deleted file mode 100644 index d424fc8c1d..0000000000 --- a/mod/state-transition/pkg/core/mocks/deposit.mock.go +++ /dev/null @@ -1,225 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// Deposit is an autogenerated mock type for the Deposit type -type Deposit[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { - mock.Mock -} - -type Deposit_Expecter[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { - mock *mock.Mock -} - -func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) EXPECT() *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT] { - return &Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]{mock: &_m.Mock} -} - -// GetAmount provides a mock function with given fields: -func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) GetAmount() math.Gwei { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAmount") - } - - var r0 math.Gwei - if rf, ok := ret.Get(0).(func() math.Gwei); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Gwei) - } - - return r0 -} - -// Deposit_GetAmount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAmount' -type Deposit_GetAmount_Call[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// GetAmount is a helper method to define mock.On call -func (_e *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]) GetAmount() *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT] { - return &Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT]{Call: _e.mock.On("GetAmount")} -} - -func (_c *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT]) Run(run func()) *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT]) Return(_a0 math.Gwei) *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT]) RunAndReturn(run func() math.Gwei) *Deposit_GetAmount_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Return(run) - return _c -} - -// GetPubkey provides a mock function with given fields: -func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) GetPubkey() crypto.BLSPubkey { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPubkey") - } - - var r0 crypto.BLSPubkey - if rf, ok := ret.Get(0).(func() crypto.BLSPubkey); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.BLSPubkey) - } - } - - return r0 -} - -// Deposit_GetPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPubkey' -type Deposit_GetPubkey_Call[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// GetPubkey is a helper method to define mock.On call -func (_e *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]) GetPubkey() *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT] { - return &Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT]{Call: _e.mock.On("GetPubkey")} -} - -func (_c *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT]) Run(run func()) *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT]) Return(_a0 crypto.BLSPubkey) *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT]) RunAndReturn(run func() crypto.BLSPubkey) *Deposit_GetPubkey_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Return(run) - return _c -} - -// GetWithdrawalCredentials provides a mock function with given fields: -func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) GetWithdrawalCredentials() WithdrawlCredentialsT { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetWithdrawalCredentials") - } - - var r0 WithdrawlCredentialsT - if rf, ok := ret.Get(0).(func() WithdrawlCredentialsT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(WithdrawlCredentialsT) - } - - return r0 -} - -// Deposit_GetWithdrawalCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWithdrawalCredentials' -type Deposit_GetWithdrawalCredentials_Call[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// GetWithdrawalCredentials is a helper method to define mock.On call -func (_e *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]) GetWithdrawalCredentials() *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT] { - return &Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT]{Call: _e.mock.On("GetWithdrawalCredentials")} -} - -func (_c *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT]) Run(run func()) *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT]) Return(_a0 WithdrawlCredentialsT) *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT]) RunAndReturn(run func() WithdrawlCredentialsT) *Deposit_GetWithdrawalCredentials_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Return(run) - return _c -} - -// VerifySignature provides a mock function with given fields: forkData, domainType, signatureVerificationFn -func (_m *Deposit[ForkDataT, WithdrawlCredentialsT]) VerifySignature(forkData ForkDataT, domainType common.DomainType, signatureVerificationFn func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) error { - ret := _m.Called(forkData, domainType, signatureVerificationFn) - - if len(ret) == 0 { - panic("no return value specified for VerifySignature") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ForkDataT, common.DomainType, func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) error); ok { - r0 = rf(forkData, domainType, signatureVerificationFn) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Deposit_VerifySignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifySignature' -type Deposit_VerifySignature_Call[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// VerifySignature is a helper method to define mock.On call -// - forkData ForkDataT -// - domainType common.DomainType -// - signatureVerificationFn func(crypto.BLSPubkey , []byte , crypto.BLSSignature) error -func (_e *Deposit_Expecter[ForkDataT, WithdrawlCredentialsT]) VerifySignature(forkData interface{}, domainType interface{}, signatureVerificationFn interface{}) *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT] { - return &Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT]{Call: _e.mock.On("VerifySignature", forkData, domainType, signatureVerificationFn)} -} - -func (_c *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT]) Run(run func(forkData ForkDataT, domainType common.DomainType, signatureVerificationFn func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error)) *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ForkDataT), args[1].(common.DomainType), args[2].(func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error)) - }) - return _c -} - -func (_c *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT]) Return(_a0 error) *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT]) RunAndReturn(run func(ForkDataT, common.DomainType, func(crypto.BLSPubkey, []byte, crypto.BLSSignature) error) error) *Deposit_VerifySignature_Call[ForkDataT, WithdrawlCredentialsT] { - _c.Call.Return(run) - return _c -} - -// NewDeposit creates a new instance of Deposit. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDeposit[ForkDataT any, WithdrawlCredentialsT interface{ ~[32]byte }](t interface { - mock.TestingT - Cleanup(func()) -}) *Deposit[ForkDataT, WithdrawlCredentialsT] { - mock := &Deposit[ForkDataT, WithdrawlCredentialsT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/execution_engine.mock.go b/mod/state-transition/pkg/core/mocks/execution_engine.mock.go deleted file mode 100644 index 77baa04080..0000000000 --- a/mod/state-transition/pkg/core/mocks/execution_engine.mock.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - context "context" - - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - core "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" - - mock "github.com/stretchr/testify/mock" -) - -// ExecutionEngine is an autogenerated mock type for the ExecutionEngine type -type ExecutionEngine[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.WithdrawalsConstraint] struct { - mock.Mock -} - -type ExecutionEngine_Expecter[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.WithdrawalsConstraint] struct { - mock *mock.Mock -} - -func (_m *ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) EXPECT() *ExecutionEngine_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionEngine_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{mock: &_m.Mock} -} - -// VerifyAndNotifyNewPayload provides a mock function with given fields: ctx, req -func (_m *ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) VerifyAndNotifyNewPayload(ctx context.Context, req *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT]) error { - ret := _m.Called(ctx, req) - - if len(ret) == 0 { - panic("no return value specified for VerifyAndNotifyNewPayload") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT]) error); ok { - r0 = rf(ctx, req) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ExecutionEngine_VerifyAndNotifyNewPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyAndNotifyNewPayload' -type ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.WithdrawalsConstraint] struct { - *mock.Call -} - -// VerifyAndNotifyNewPayload is a helper method to define mock.On call -// - ctx context.Context -// - req *engineprimitives.NewPayloadRequest[ExecutionPayloadT,WithdrawalsT] -func (_e *ExecutionEngine_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) VerifyAndNotifyNewPayload(ctx interface{}, req interface{}) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("VerifyAndNotifyNewPayload", ctx, req)} -} - -func (_c *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(ctx context.Context, req *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT])) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT])) - }) - return _c -} - -func (_c *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 error) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func(context.Context, *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT]) error) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// NewExecutionEngine creates a new instance of ExecutionEngine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewExecutionEngine[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.WithdrawalsConstraint](t interface { - mock.TestingT - Cleanup(func()) -}) *ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - mock := &ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/execution_payload.mock.go b/mod/state-transition/pkg/core/mocks/execution_payload.mock.go deleted file mode 100644 index 9f22de5ead..0000000000 --- a/mod/state-transition/pkg/core/mocks/execution_payload.mock.go +++ /dev/null @@ -1,1122 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - bytes "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// ExecutionPayload is an autogenerated mock type for the ExecutionPayload type -type ExecutionPayload[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - mock.Mock -} - -type ExecutionPayload_Expecter[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - mock *mock.Mock -} - -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) EXPECT() *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{mock: &_m.Mock} -} - -// Empty provides a mock function with given fields: _a0 -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Empty(_a0 uint32) ExecutionPayloadT { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Empty") - } - - var r0 ExecutionPayloadT - if rf, ok := ret.Get(0).(func(uint32) ExecutionPayloadT); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(ExecutionPayloadT) - } - - return r0 -} - -// ExecutionPayload_Empty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Empty' -type ExecutionPayload_Empty_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// Empty is a helper method to define mock.On call -// - _a0 uint32 -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Empty(_a0 interface{}) *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("Empty", _a0)} -} - -func (_c *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(_a0 uint32)) *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint32)) - }) - return _c -} - -func (_c *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 ExecutionPayloadT) *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func(uint32) ExecutionPayloadT) *ExecutionPayload_Empty_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetBaseFeePerGas provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBaseFeePerGas() *math.U256 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBaseFeePerGas") - } - - var r0 *math.U256 - if rf, ok := ret.Get(0).(func() *math.U256); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*math.U256) - } - } - - return r0 -} - -// ExecutionPayload_GetBaseFeePerGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBaseFeePerGas' -type ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetBaseFeePerGas is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBaseFeePerGas() *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBaseFeePerGas")} -} - -func (_c *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 *math.U256) *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() *math.U256) *ExecutionPayload_GetBaseFeePerGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetBlobGasUsed provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlobGasUsed() math.U64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBlobGasUsed") - } - - var r0 math.U64 - if rf, ok := ret.Get(0).(func() math.U64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.U64) - } - - return r0 -} - -// ExecutionPayload_GetBlobGasUsed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlobGasUsed' -type ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetBlobGasUsed is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlobGasUsed() *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBlobGasUsed")} -} - -func (_c *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetBlobGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetBlockHash provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlockHash() common.ExecutionHash { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBlockHash") - } - - var r0 common.ExecutionHash - if rf, ok := ret.Get(0).(func() common.ExecutionHash); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.ExecutionHash) - } - } - - return r0 -} - -// ExecutionPayload_GetBlockHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockHash' -type ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetBlockHash is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetBlockHash() *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetBlockHash")} -} - -func (_c *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.ExecutionHash) *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.ExecutionHash) *ExecutionPayload_GetBlockHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetExcessBlobGas provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExcessBlobGas() math.U64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExcessBlobGas") - } - - var r0 math.U64 - if rf, ok := ret.Get(0).(func() math.U64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.U64) - } - - return r0 -} - -// ExecutionPayload_GetExcessBlobGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExcessBlobGas' -type ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetExcessBlobGas is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExcessBlobGas() *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetExcessBlobGas")} -} - -func (_c *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetExcessBlobGas_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetExtraData provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExtraData() []byte { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetExtraData") - } - - var r0 []byte - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - return r0 -} - -// ExecutionPayload_GetExtraData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExtraData' -type ExecutionPayload_GetExtraData_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetExtraData is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetExtraData() *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetExtraData")} -} - -func (_c *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 []byte) *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() []byte) *ExecutionPayload_GetExtraData_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetFeeRecipient provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetFeeRecipient() common.ExecutionAddress { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetFeeRecipient") - } - - var r0 common.ExecutionAddress - if rf, ok := ret.Get(0).(func() common.ExecutionAddress); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.ExecutionAddress) - } - } - - return r0 -} - -// ExecutionPayload_GetFeeRecipient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFeeRecipient' -type ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetFeeRecipient is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetFeeRecipient() *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetFeeRecipient")} -} - -func (_c *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.ExecutionAddress) *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.ExecutionAddress) *ExecutionPayload_GetFeeRecipient_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetGasLimit provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetGasLimit() math.U64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetGasLimit") - } - - var r0 math.U64 - if rf, ok := ret.Get(0).(func() math.U64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.U64) - } - - return r0 -} - -// ExecutionPayload_GetGasLimit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGasLimit' -type ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetGasLimit is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetGasLimit() *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetGasLimit")} -} - -func (_c *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetGasLimit_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetGasUsed provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetGasUsed() math.U64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetGasUsed") - } - - var r0 math.U64 - if rf, ok := ret.Get(0).(func() math.U64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.U64) - } - - return r0 -} - -// ExecutionPayload_GetGasUsed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGasUsed' -type ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetGasUsed is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetGasUsed() *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetGasUsed")} -} - -func (_c *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetGasUsed_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetLogsBloom provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetLogsBloom() bytes.B256 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLogsBloom") - } - - var r0 bytes.B256 - if rf, ok := ret.Get(0).(func() bytes.B256); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(bytes.B256) - } - } - - return r0 -} - -// ExecutionPayload_GetLogsBloom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogsBloom' -type ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetLogsBloom is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetLogsBloom() *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetLogsBloom")} -} - -func (_c *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 bytes.B256) *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() bytes.B256) *ExecutionPayload_GetLogsBloom_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetNumber provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetNumber() math.U64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNumber") - } - - var r0 math.U64 - if rf, ok := ret.Get(0).(func() math.U64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.U64) - } - - return r0 -} - -// ExecutionPayload_GetNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNumber' -type ExecutionPayload_GetNumber_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetNumber is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetNumber() *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetNumber")} -} - -func (_c *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetNumber_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetParentHash provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetParentHash() common.ExecutionHash { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetParentHash") - } - - var r0 common.ExecutionHash - if rf, ok := ret.Get(0).(func() common.ExecutionHash); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.ExecutionHash) - } - } - - return r0 -} - -// ExecutionPayload_GetParentHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParentHash' -type ExecutionPayload_GetParentHash_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetParentHash is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetParentHash() *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetParentHash")} -} - -func (_c *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.ExecutionHash) *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.ExecutionHash) *ExecutionPayload_GetParentHash_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetPrevRandao provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetPrevRandao() common.Bytes32 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPrevRandao") - } - - var r0 common.Bytes32 - if rf, ok := ret.Get(0).(func() common.Bytes32); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Bytes32) - } - } - - return r0 -} - -// ExecutionPayload_GetPrevRandao_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPrevRandao' -type ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetPrevRandao is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetPrevRandao() *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetPrevRandao")} -} - -func (_c *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Bytes32) *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Bytes32) *ExecutionPayload_GetPrevRandao_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetReceiptsRoot provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetReceiptsRoot() common.Bytes32 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetReceiptsRoot") - } - - var r0 common.Bytes32 - if rf, ok := ret.Get(0).(func() common.Bytes32); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Bytes32) - } - } - - return r0 -} - -// ExecutionPayload_GetReceiptsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReceiptsRoot' -type ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetReceiptsRoot is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetReceiptsRoot() *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetReceiptsRoot")} -} - -func (_c *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Bytes32) *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Bytes32) *ExecutionPayload_GetReceiptsRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetStateRoot provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetStateRoot() common.Bytes32 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetStateRoot") - } - - var r0 common.Bytes32 - if rf, ok := ret.Get(0).(func() common.Bytes32); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Bytes32) - } - } - - return r0 -} - -// ExecutionPayload_GetStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStateRoot' -type ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetStateRoot is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetStateRoot() *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetStateRoot")} -} - -func (_c *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 common.Bytes32) *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() common.Bytes32) *ExecutionPayload_GetStateRoot_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetTimestamp provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetTimestamp() math.U64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTimestamp") - } - - var r0 math.U64 - if rf, ok := ret.Get(0).(func() math.U64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.U64) - } - - return r0 -} - -// ExecutionPayload_GetTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimestamp' -type ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetTimestamp is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetTimestamp() *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetTimestamp")} -} - -func (_c *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 math.U64) *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() math.U64) *ExecutionPayload_GetTimestamp_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetTransactions provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetTransactions() engineprimitives.Transactions { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTransactions") - } - - var r0 engineprimitives.Transactions - if rf, ok := ret.Get(0).(func() engineprimitives.Transactions); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(engineprimitives.Transactions) - } - } - - return r0 -} - -// ExecutionPayload_GetTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactions' -type ExecutionPayload_GetTransactions_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetTransactions is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetTransactions() *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetTransactions")} -} - -func (_c *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 engineprimitives.Transactions) *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() engineprimitives.Transactions) *ExecutionPayload_GetTransactions_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// GetWithdrawals provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetWithdrawals() WithdrawalsT { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetWithdrawals") - } - - var r0 WithdrawalsT - if rf, ok := ret.Get(0).(func() WithdrawalsT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(WithdrawalsT) - } - - return r0 -} - -// ExecutionPayload_GetWithdrawals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWithdrawals' -type ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// GetWithdrawals is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) GetWithdrawals() *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("GetWithdrawals")} -} - -func (_c *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 WithdrawalsT) *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() WithdrawalsT) *ExecutionPayload_GetWithdrawals_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// IsNil provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) IsNil() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsNil") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// ExecutionPayload_IsNil_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNil' -type ExecutionPayload_IsNil_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// IsNil is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) IsNil() *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("IsNil")} -} - -func (_c *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 bool) *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() bool) *ExecutionPayload_IsNil_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// MarshalJSON provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) MarshalJSON() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for MarshalJSON") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ExecutionPayload_MarshalJSON_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarshalJSON' -type ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// MarshalJSON is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) MarshalJSON() *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("MarshalJSON")} -} - -func (_c *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 []byte, _a1 error) *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() ([]byte, error)) *ExecutionPayload_MarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// ToHeader provides a mock function with given fields: maxWithdrawalsPerPayload, eth1ChainID -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) ToHeader(maxWithdrawalsPerPayload uint64, eth1ChainID uint64) (ExecutionPayloadHeaderT, error) { - ret := _m.Called(maxWithdrawalsPerPayload, eth1ChainID) - - if len(ret) == 0 { - panic("no return value specified for ToHeader") - } - - var r0 ExecutionPayloadHeaderT - var r1 error - if rf, ok := ret.Get(0).(func(uint64, uint64) (ExecutionPayloadHeaderT, error)); ok { - return rf(maxWithdrawalsPerPayload, eth1ChainID) - } - if rf, ok := ret.Get(0).(func(uint64, uint64) ExecutionPayloadHeaderT); ok { - r0 = rf(maxWithdrawalsPerPayload, eth1ChainID) - } else { - r0 = ret.Get(0).(ExecutionPayloadHeaderT) - } - - if rf, ok := ret.Get(1).(func(uint64, uint64) error); ok { - r1 = rf(maxWithdrawalsPerPayload, eth1ChainID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ExecutionPayload_ToHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ToHeader' -type ExecutionPayload_ToHeader_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// ToHeader is a helper method to define mock.On call -// - maxWithdrawalsPerPayload uint64 -// - eth1ChainID uint64 -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) ToHeader(maxWithdrawalsPerPayload interface{}, eth1ChainID interface{}) *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("ToHeader", maxWithdrawalsPerPayload, eth1ChainID)} -} - -func (_c *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(maxWithdrawalsPerPayload uint64, eth1ChainID uint64)) *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(uint64)) - }) - return _c -} - -func (_c *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 ExecutionPayloadHeaderT, _a1 error) *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func(uint64, uint64) (ExecutionPayloadHeaderT, error)) *ExecutionPayload_ToHeader_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// UnmarshalJSON provides a mock function with given fields: _a0 -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) UnmarshalJSON(_a0 []byte) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for UnmarshalJSON") - } - - var r0 error - if rf, ok := ret.Get(0).(func([]byte) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ExecutionPayload_UnmarshalJSON_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnmarshalJSON' -type ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// UnmarshalJSON is a helper method to define mock.On call -// - _a0 []byte -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) UnmarshalJSON(_a0 interface{}) *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("UnmarshalJSON", _a0)} -} - -func (_c *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(_a0 []byte)) *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 error) *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func([]byte) error) *ExecutionPayload_UnmarshalJSON_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// Version provides a mock function with given fields: -func (_m *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Version() uint32 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Version") - } - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - return r0 -} - -// ExecutionPayload_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version' -type ExecutionPayload_Version_Call[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any] struct { - *mock.Call -} - -// Version is a helper method to define mock.On call -func (_e *ExecutionPayload_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Version() *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - return &ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("Version")} -} - -func (_c *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func()) *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 uint32) *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func() uint32) *ExecutionPayload_Version_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - _c.Call.Return(run) - return _c -} - -// NewExecutionPayload creates a new instance of ExecutionPayload. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewExecutionPayload[ExecutionPayloadT any, ExecutionPayloadHeaderT any, WithdrawalsT any](t interface { - mock.TestingT - Cleanup(func()) -}) *ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { - mock := &ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/execution_payload_header.mock.go b/mod/state-transition/pkg/core/mocks/execution_payload_header.mock.go deleted file mode 100644 index eda051f23d..0000000000 --- a/mod/state-transition/pkg/core/mocks/execution_payload_header.mock.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - mock "github.com/stretchr/testify/mock" -) - -// ExecutionPayloadHeader is an autogenerated mock type for the ExecutionPayloadHeader type -type ExecutionPayloadHeader struct { - mock.Mock -} - -type ExecutionPayloadHeader_Expecter struct { - mock *mock.Mock -} - -func (_m *ExecutionPayloadHeader) EXPECT() *ExecutionPayloadHeader_Expecter { - return &ExecutionPayloadHeader_Expecter{mock: &_m.Mock} -} - -// GetBlockHash provides a mock function with given fields: -func (_m *ExecutionPayloadHeader) GetBlockHash() common.ExecutionHash { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetBlockHash") - } - - var r0 common.ExecutionHash - if rf, ok := ret.Get(0).(func() common.ExecutionHash); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.ExecutionHash) - } - } - - return r0 -} - -// ExecutionPayloadHeader_GetBlockHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockHash' -type ExecutionPayloadHeader_GetBlockHash_Call struct { - *mock.Call -} - -// GetBlockHash is a helper method to define mock.On call -func (_e *ExecutionPayloadHeader_Expecter) GetBlockHash() *ExecutionPayloadHeader_GetBlockHash_Call { - return &ExecutionPayloadHeader_GetBlockHash_Call{Call: _e.mock.On("GetBlockHash")} -} - -func (_c *ExecutionPayloadHeader_GetBlockHash_Call) Run(run func()) *ExecutionPayloadHeader_GetBlockHash_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ExecutionPayloadHeader_GetBlockHash_Call) Return(_a0 common.ExecutionHash) *ExecutionPayloadHeader_GetBlockHash_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *ExecutionPayloadHeader_GetBlockHash_Call) RunAndReturn(run func() common.ExecutionHash) *ExecutionPayloadHeader_GetBlockHash_Call { - _c.Call.Return(run) - return _c -} - -// NewExecutionPayloadHeader creates a new instance of ExecutionPayloadHeader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewExecutionPayloadHeader(t interface { - mock.TestingT - Cleanup(func()) -}) *ExecutionPayloadHeader { - mock := &ExecutionPayloadHeader{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/fork_data.mock.go b/mod/state-transition/pkg/core/mocks/fork_data.mock.go deleted file mode 100644 index 5b0d48628a..0000000000 --- a/mod/state-transition/pkg/core/mocks/fork_data.mock.go +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// ForkData is an autogenerated mock type for the ForkData type -type ForkData[ForkDataT any] struct { - mock.Mock -} - -type ForkData_Expecter[ForkDataT any] struct { - mock *mock.Mock -} - -func (_m *ForkData[ForkDataT]) EXPECT() *ForkData_Expecter[ForkDataT] { - return &ForkData_Expecter[ForkDataT]{mock: &_m.Mock} -} - -// ComputeRandaoSigningRoot provides a mock function with given fields: domainType, epoch -func (_m *ForkData[ForkDataT]) ComputeRandaoSigningRoot(domainType common.DomainType, epoch math.Epoch) common.Root { - ret := _m.Called(domainType, epoch) - - if len(ret) == 0 { - panic("no return value specified for ComputeRandaoSigningRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func(common.DomainType, math.Epoch) common.Root); ok { - r0 = rf(domainType, epoch) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// ForkData_ComputeRandaoSigningRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ComputeRandaoSigningRoot' -type ForkData_ComputeRandaoSigningRoot_Call[ForkDataT any] struct { - *mock.Call -} - -// ComputeRandaoSigningRoot is a helper method to define mock.On call -// - domainType common.DomainType -// - epoch math.Epoch -func (_e *ForkData_Expecter[ForkDataT]) ComputeRandaoSigningRoot(domainType interface{}, epoch interface{}) *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT] { - return &ForkData_ComputeRandaoSigningRoot_Call[ForkDataT]{Call: _e.mock.On("ComputeRandaoSigningRoot", domainType, epoch)} -} - -func (_c *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT]) Run(run func(domainType common.DomainType, epoch math.Epoch)) *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(common.DomainType), args[1].(math.Epoch)) - }) - return _c -} - -func (_c *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT]) Return(_a0 common.Root) *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT]) RunAndReturn(run func(common.DomainType, math.Epoch) common.Root) *ForkData_ComputeRandaoSigningRoot_Call[ForkDataT] { - _c.Call.Return(run) - return _c -} - -// New provides a mock function with given fields: _a0, _a1 -func (_m *ForkData[ForkDataT]) New(_a0 common.Version, _a1 common.Root) ForkDataT { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for New") - } - - var r0 ForkDataT - if rf, ok := ret.Get(0).(func(common.Version, common.Root) ForkDataT); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Get(0).(ForkDataT) - } - - return r0 -} - -// ForkData_New_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'New' -type ForkData_New_Call[ForkDataT any] struct { - *mock.Call -} - -// New is a helper method to define mock.On call -// - _a0 common.Version -// - _a1 common.Root -func (_e *ForkData_Expecter[ForkDataT]) New(_a0 interface{}, _a1 interface{}) *ForkData_New_Call[ForkDataT] { - return &ForkData_New_Call[ForkDataT]{Call: _e.mock.On("New", _a0, _a1)} -} - -func (_c *ForkData_New_Call[ForkDataT]) Run(run func(_a0 common.Version, _a1 common.Root)) *ForkData_New_Call[ForkDataT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(common.Version), args[1].(common.Root)) - }) - return _c -} - -func (_c *ForkData_New_Call[ForkDataT]) Return(_a0 ForkDataT) *ForkData_New_Call[ForkDataT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *ForkData_New_Call[ForkDataT]) RunAndReturn(run func(common.Version, common.Root) ForkDataT) *ForkData_New_Call[ForkDataT] { - _c.Call.Return(run) - return _c -} - -// NewForkData creates a new instance of ForkData. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewForkData[ForkDataT any](t interface { - mock.TestingT - Cleanup(func()) -}) *ForkData[ForkDataT] { - mock := &ForkData[ForkDataT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/read_only_beacon_state.mock.go b/mod/state-transition/pkg/core/mocks/read_only_beacon_state.mock.go deleted file mode 100644 index d008b496f2..0000000000 --- a/mod/state-transition/pkg/core/mocks/read_only_beacon_state.mock.go +++ /dev/null @@ -1,1326 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// ReadOnlyBeaconState is an autogenerated mock type for the ReadOnlyBeaconState type -type ReadOnlyBeaconState[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - mock.Mock -} - -type ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - mock *mock.Mock -} - -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) EXPECT() *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{mock: &_m.Mock} -} - -// ExpectedWithdrawals provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ExpectedWithdrawals() ([]WithdrawalT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ExpectedWithdrawals") - } - - var r0 []WithdrawalT - var r1 error - if rf, ok := ret.Get(0).(func() ([]WithdrawalT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []WithdrawalT); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]WithdrawalT) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_ExpectedWithdrawals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExpectedWithdrawals' -type ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// ExpectedWithdrawals is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ExpectedWithdrawals() *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ExpectedWithdrawals")} -} - -func (_c *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 []WithdrawalT, _a1 error) *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() ([]WithdrawalT, error)) *ReadOnlyBeaconState_ExpectedWithdrawals_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetBalance provides a mock function with given fields: _a0 -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 math.ValidatorIndex) (math.Gwei, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetBalance") - } - - var r0 math.Gwei - var r1 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (math.Gwei, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) math.Gwei); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(math.Gwei) - } - - if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBalance' -type ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetBalance is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBalance(_a0 interface{}) *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBalance", _a0)} -} - -func (_c *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex)) - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (math.Gwei, error)) *ReadOnlyBeaconState_GetBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetBlockRootAtIndex provides a mock function with given fields: _a0 -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBlockRootAtIndex(_a0 uint64) (common.Root, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetBlockRootAtIndex") - } - - var r0 common.Root - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetBlockRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockRootAtIndex' -type ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetBlockRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetBlockRootAtIndex(_a0 interface{}) *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetBlockRootAtIndex", _a0)} -} - -func (_c *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Root, error)) *ReadOnlyBeaconState_GetBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetEth1Data provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1Data() (Eth1DataT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetEth1Data") - } - - var r0 Eth1DataT - var r1 error - if rf, ok := ret.Get(0).(func() (Eth1DataT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() Eth1DataT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(Eth1DataT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1Data' -type ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetEth1Data is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1Data() *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetEth1Data")} -} - -func (_c *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 Eth1DataT, _a1 error) *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (Eth1DataT, error)) *ReadOnlyBeaconState_GetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetEth1DepositIndex provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1DepositIndex() (uint64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetEth1DepositIndex") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func() (uint64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1DepositIndex' -type ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetEth1DepositIndex is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetEth1DepositIndex() *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetEth1DepositIndex")} -} - -func (_c *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *ReadOnlyBeaconState_GetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetFork provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetFork() (ForkT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetFork") - } - - var r0 ForkT - var r1 error - if rf, ok := ret.Get(0).(func() (ForkT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() ForkT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(ForkT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetFork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFork' -type ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetFork is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetFork() *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetFork")} -} - -func (_c *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ForkT, _a1 error) *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ForkT, error)) *ReadOnlyBeaconState_GetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetGenesisValidatorsRoot provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetGenesisValidatorsRoot() (common.Root, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetGenesisValidatorsRoot") - } - - var r0 common.Root - var r1 error - if rf, ok := ret.Get(0).(func() (common.Root, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGenesisValidatorsRoot' -type ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetGenesisValidatorsRoot is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetGenesisValidatorsRoot() *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetGenesisValidatorsRoot")} -} - -func (_c *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (common.Root, error)) *ReadOnlyBeaconState_GetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetLatestBlockHeader provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestBlockHeader() (BeaconBlockHeaderT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLatestBlockHeader") - } - - var r0 BeaconBlockHeaderT - var r1 error - if rf, ok := ret.Get(0).(func() (BeaconBlockHeaderT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() BeaconBlockHeaderT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(BeaconBlockHeaderT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestBlockHeader' -type ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetLatestBlockHeader is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestBlockHeader() *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetLatestBlockHeader")} -} - -func (_c *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 BeaconBlockHeaderT, _a1 error) *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (BeaconBlockHeaderT, error)) *ReadOnlyBeaconState_GetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetLatestExecutionPayloadHeader provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestExecutionPayloadHeader() (ExecutionPayloadHeaderT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLatestExecutionPayloadHeader") - } - - var r0 ExecutionPayloadHeaderT - var r1 error - if rf, ok := ret.Get(0).(func() (ExecutionPayloadHeaderT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() ExecutionPayloadHeaderT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(ExecutionPayloadHeaderT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestExecutionPayloadHeader' -type ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetLatestExecutionPayloadHeader is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetLatestExecutionPayloadHeader() *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetLatestExecutionPayloadHeader")} -} - -func (_c *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ExecutionPayloadHeaderT, _a1 error) *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ExecutionPayloadHeaderT, error)) *ReadOnlyBeaconState_GetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetNextWithdrawalIndex provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalIndex() (uint64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNextWithdrawalIndex") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func() (uint64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetNextWithdrawalIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextWithdrawalIndex' -type ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetNextWithdrawalIndex is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalIndex() *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetNextWithdrawalIndex")} -} - -func (_c *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *ReadOnlyBeaconState_GetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetNextWithdrawalValidatorIndex provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() (math.ValidatorIndex, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNextWithdrawalValidatorIndex") - } - - var r0 math.ValidatorIndex - var r1 error - if rf, ok := ret.Get(0).(func() (math.ValidatorIndex, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNextWithdrawalValidatorIndex' -type ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetNextWithdrawalValidatorIndex is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetNextWithdrawalValidatorIndex() *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetNextWithdrawalValidatorIndex")} -} - -func (_c *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.ValidatorIndex, error)) *ReadOnlyBeaconState_GetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetRandaoMixAtIndex provides a mock function with given fields: _a0 -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 uint64) (common.Bytes32, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetRandaoMixAtIndex") - } - - var r0 common.Bytes32 - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (common.Bytes32, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) common.Bytes32); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Bytes32) - } - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRandaoMixAtIndex' -type ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetRandaoMixAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetRandaoMixAtIndex(_a0 interface{}) *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetRandaoMixAtIndex", _a0)} -} - -func (_c *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Bytes32, _a1 error) *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Bytes32, error)) *ReadOnlyBeaconState_GetRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetSlashingAtIndex provides a mock function with given fields: _a0 -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 uint64) (math.Gwei, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetSlashingAtIndex") - } - - var r0 math.Gwei - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(math.Gwei) - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetSlashingAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlashingAtIndex' -type ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetSlashingAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlashingAtIndex(_a0 interface{}) *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetSlashingAtIndex", _a0)} -} - -func (_c *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *ReadOnlyBeaconState_GetSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetSlot provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() (math.Slot, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSlot") - } - - var r0 math.Slot - var r1 error - if rf, ok := ret.Get(0).(func() (math.Slot, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() math.Slot); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Slot) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlot' -type ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetSlot is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetSlot() *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetSlot")} -} - -func (_c *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Slot, _a1 error) *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Slot, error)) *ReadOnlyBeaconState_GetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetTotalActiveBalances provides a mock function with given fields: _a0 -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 uint64) (math.Gwei, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetTotalActiveBalances") - } - - var r0 math.Gwei - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (math.Gwei, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) math.Gwei); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(math.Gwei) - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetTotalActiveBalances_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalActiveBalances' -type ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetTotalActiveBalances is a helper method to define mock.On call -// - _a0 uint64 -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalActiveBalances(_a0 interface{}) *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalActiveBalances", _a0)} -} - -func (_c *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (math.Gwei, error)) *ReadOnlyBeaconState_GetTotalActiveBalances_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetTotalSlashing provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() (math.Gwei, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTotalSlashing") - } - - var r0 math.Gwei - var r1 error - if rf, ok := ret.Get(0).(func() (math.Gwei, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() math.Gwei); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Gwei) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetTotalSlashing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalSlashing' -type ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetTotalSlashing is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalSlashing() *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalSlashing")} -} - -func (_c *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.Gwei, _a1 error) *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (math.Gwei, error)) *ReadOnlyBeaconState_GetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetTotalValidators provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalValidators() (uint64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTotalValidators") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func() (uint64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetTotalValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalValidators' -type ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetTotalValidators is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetTotalValidators() *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetTotalValidators")} -} - -func (_c *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 uint64, _a1 error) *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (uint64, error)) *ReadOnlyBeaconState_GetTotalValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetValidators provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidators() (ValidatorsT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetValidators") - } - - var r0 ValidatorsT - var r1 error - if rf, ok := ret.Get(0).(func() (ValidatorsT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() ValidatorsT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(ValidatorsT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetValidators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidators' -type ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetValidators is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidators() *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetValidators")} -} - -func (_c *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ValidatorsT, _a1 error) *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() (ValidatorsT, error)) *ReadOnlyBeaconState_GetValidators_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetValidatorsByEffectiveBalance provides a mock function with given fields: -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidatorsByEffectiveBalance() ([]ValidatorT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetValidatorsByEffectiveBalance") - } - - var r0 []ValidatorT - var r1 error - if rf, ok := ret.Get(0).(func() ([]ValidatorT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []ValidatorT); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ValidatorT) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidatorsByEffectiveBalance' -type ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// GetValidatorsByEffectiveBalance is a helper method to define mock.On call -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) GetValidatorsByEffectiveBalance() *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("GetValidatorsByEffectiveBalance")} -} - -func (_c *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func()) *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 []ValidatorT, _a1 error) *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func() ([]ValidatorT, error)) *ReadOnlyBeaconState_GetValidatorsByEffectiveBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// StateRootAtIndex provides a mock function with given fields: _a0 -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) StateRootAtIndex(_a0 uint64) (common.Root, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for StateRootAtIndex") - } - - var r0 common.Root - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_StateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateRootAtIndex' -type ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// StateRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) StateRootAtIndex(_a0 interface{}) *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("StateRootAtIndex", _a0)} -} - -func (_c *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 uint64)) *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 common.Root, _a1 error) *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(uint64) (common.Root, error)) *ReadOnlyBeaconState_StateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// ValidatorByIndex provides a mock function with given fields: _a0 -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 math.ValidatorIndex) (ValidatorT, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ValidatorByIndex") - } - - var r0 ValidatorT - var r1 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (ValidatorT, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) ValidatorT); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(ValidatorT) - } - - if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_ValidatorByIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorByIndex' -type ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// ValidatorByIndex is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorByIndex(_a0 interface{}) *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorByIndex", _a0)} -} - -func (_c *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 math.ValidatorIndex)) *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex)) - }) - return _c -} - -func (_c *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 ValidatorT, _a1 error) *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(math.ValidatorIndex) (ValidatorT, error)) *ReadOnlyBeaconState_ValidatorByIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// ValidatorIndexByCometBFTAddress provides a mock function with given fields: cometBFTAddress -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress []byte) (math.ValidatorIndex, error) { - ret := _m.Called(cometBFTAddress) - - if len(ret) == 0 { - panic("no return value specified for ValidatorIndexByCometBFTAddress") - } - - var r0 math.ValidatorIndex - var r1 error - if rf, ok := ret.Get(0).(func([]byte) (math.ValidatorIndex, error)); ok { - return rf(cometBFTAddress) - } - if rf, ok := ret.Get(0).(func([]byte) math.ValidatorIndex); ok { - r0 = rf(cometBFTAddress) - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - if rf, ok := ret.Get(1).(func([]byte) error); ok { - r1 = rf(cometBFTAddress) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByCometBFTAddress' -type ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// ValidatorIndexByCometBFTAddress is a helper method to define mock.On call -// - cometBFTAddress []byte -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByCometBFTAddress(cometBFTAddress interface{}) *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorIndexByCometBFTAddress", cometBFTAddress)} -} - -func (_c *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(cometBFTAddress []byte)) *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func([]byte) (math.ValidatorIndex, error)) *ReadOnlyBeaconState_ValidatorIndexByCometBFTAddress_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// ValidatorIndexByPubkey provides a mock function with given fields: _a0 -func (_m *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.ValidatorIndex, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ValidatorIndexByPubkey") - } - - var r0 math.ValidatorIndex - var r1 error - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.ValidatorIndex, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.ValidatorIndex); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - if rf, ok := ret.Get(1).(func(crypto.BLSPubkey) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyBeaconState_ValidatorIndexByPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByPubkey' -type ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any] struct { - *mock.Call -} - -// ValidatorIndexByPubkey is a helper method to define mock.On call -// - _a0 crypto.BLSPubkey -func (_e *ReadOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) ValidatorIndexByPubkey(_a0 interface{}) *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - return &ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{Call: _e.mock.On("ValidatorIndexByPubkey", _a0)} -} - -func (_c *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Run(run func(_a0 crypto.BLSPubkey)) *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(crypto.BLSPubkey)) - }) - return _c -} - -func (_c *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) Return(_a0 math.ValidatorIndex, _a1 error) *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]) RunAndReturn(run func(crypto.BLSPubkey) (math.ValidatorIndex, error)) *ReadOnlyBeaconState_ValidatorIndexByPubkey_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// NewReadOnlyBeaconState creates a new instance of ReadOnlyBeaconState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewReadOnlyBeaconState[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any, ValidatorsT any, WithdrawalT any](t interface { - mock.TestingT - Cleanup(func()) -}) *ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT] { - mock := &ReadOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT, ValidatorsT, WithdrawalT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/read_only_eth_1_data.mock.go b/mod/state-transition/pkg/core/mocks/read_only_eth_1_data.mock.go deleted file mode 100644 index 1956f9c88f..0000000000 --- a/mod/state-transition/pkg/core/mocks/read_only_eth_1_data.mock.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" - -// ReadOnlyEth1Data is an autogenerated mock type for the ReadOnlyEth1Data type -type ReadOnlyEth1Data[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - mock.Mock -} - -type ReadOnlyEth1Data_Expecter[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - mock *mock.Mock -} - -func (_m *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) EXPECT() *ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT] { - return &ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]{mock: &_m.Mock} -} - -// GetEth1Data provides a mock function with given fields: -func (_m *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) GetEth1Data() (Eth1DataT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetEth1Data") - } - - var r0 Eth1DataT - var r1 error - if rf, ok := ret.Get(0).(func() (Eth1DataT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() Eth1DataT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(Eth1DataT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyEth1Data_GetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1Data' -type ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - *mock.Call -} - -// GetEth1Data is a helper method to define mock.On call -func (_e *ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) GetEth1Data() *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { - return &ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("GetEth1Data")} -} - -func (_c *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func()) *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 Eth1DataT, _a1 error) *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func() (Eth1DataT, error)) *ReadOnlyEth1Data_GetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(run) - return _c -} - -// GetEth1DepositIndex provides a mock function with given fields: -func (_m *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) GetEth1DepositIndex() (uint64, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetEth1DepositIndex") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func() (uint64, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() uint64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyEth1Data_GetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEth1DepositIndex' -type ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - *mock.Call -} - -// GetEth1DepositIndex is a helper method to define mock.On call -func (_e *ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) GetEth1DepositIndex() *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { - return &ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("GetEth1DepositIndex")} -} - -func (_c *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func()) *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 uint64, _a1 error) *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func() (uint64, error)) *ReadOnlyEth1Data_GetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(run) - return _c -} - -// GetLatestExecutionPayloadHeader provides a mock function with given fields: -func (_m *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) GetLatestExecutionPayloadHeader() (ExecutionPayloadHeaderT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLatestExecutionPayloadHeader") - } - - var r0 ExecutionPayloadHeaderT - var r1 error - if rf, ok := ret.Get(0).(func() (ExecutionPayloadHeaderT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() ExecutionPayloadHeaderT); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(ExecutionPayloadHeaderT) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestExecutionPayloadHeader' -type ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - *mock.Call -} - -// GetLatestExecutionPayloadHeader is a helper method to define mock.On call -func (_e *ReadOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) GetLatestExecutionPayloadHeader() *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { - return &ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("GetLatestExecutionPayloadHeader")} -} - -func (_c *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func()) *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 ExecutionPayloadHeaderT, _a1 error) *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func() (ExecutionPayloadHeaderT, error)) *ReadOnlyEth1Data_GetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(run) - return _c -} - -// NewReadOnlyEth1Data creates a new instance of ReadOnlyEth1Data. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewReadOnlyEth1Data[Eth1DataT any, ExecutionPayloadHeaderT any](t interface { - mock.TestingT - Cleanup(func()) -}) *ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT] { - mock := &ReadOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/read_only_randao_mixes.mock.go b/mod/state-transition/pkg/core/mocks/read_only_randao_mixes.mock.go deleted file mode 100644 index 099e28e5d2..0000000000 --- a/mod/state-transition/pkg/core/mocks/read_only_randao_mixes.mock.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - mock "github.com/stretchr/testify/mock" -) - -// ReadOnlyRandaoMixes is an autogenerated mock type for the ReadOnlyRandaoMixes type -type ReadOnlyRandaoMixes struct { - mock.Mock -} - -type ReadOnlyRandaoMixes_Expecter struct { - mock *mock.Mock -} - -func (_m *ReadOnlyRandaoMixes) EXPECT() *ReadOnlyRandaoMixes_Expecter { - return &ReadOnlyRandaoMixes_Expecter{mock: &_m.Mock} -} - -// GetRandaoMixAtIndex provides a mock function with given fields: _a0 -func (_m *ReadOnlyRandaoMixes) GetRandaoMixAtIndex(_a0 uint64) (common.Bytes32, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetRandaoMixAtIndex") - } - - var r0 common.Bytes32 - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (common.Bytes32, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) common.Bytes32); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Bytes32) - } - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRandaoMixAtIndex' -type ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call struct { - *mock.Call -} - -// GetRandaoMixAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *ReadOnlyRandaoMixes_Expecter) GetRandaoMixAtIndex(_a0 interface{}) *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call { - return &ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call{Call: _e.mock.On("GetRandaoMixAtIndex", _a0)} -} - -func (_c *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call) Run(run func(_a0 uint64)) *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call) Return(_a0 common.Bytes32, _a1 error) *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call) RunAndReturn(run func(uint64) (common.Bytes32, error)) *ReadOnlyRandaoMixes_GetRandaoMixAtIndex_Call { - _c.Call.Return(run) - return _c -} - -// NewReadOnlyRandaoMixes creates a new instance of ReadOnlyRandaoMixes. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewReadOnlyRandaoMixes(t interface { - mock.TestingT - Cleanup(func()) -}) *ReadOnlyRandaoMixes { - mock := &ReadOnlyRandaoMixes{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/read_only_state_roots.mock.go b/mod/state-transition/pkg/core/mocks/read_only_state_roots.mock.go deleted file mode 100644 index be45aad8a2..0000000000 --- a/mod/state-transition/pkg/core/mocks/read_only_state_roots.mock.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - mock "github.com/stretchr/testify/mock" -) - -// ReadOnlyStateRoots is an autogenerated mock type for the ReadOnlyStateRoots type -type ReadOnlyStateRoots struct { - mock.Mock -} - -type ReadOnlyStateRoots_Expecter struct { - mock *mock.Mock -} - -func (_m *ReadOnlyStateRoots) EXPECT() *ReadOnlyStateRoots_Expecter { - return &ReadOnlyStateRoots_Expecter{mock: &_m.Mock} -} - -// StateRootAtIndex provides a mock function with given fields: _a0 -func (_m *ReadOnlyStateRoots) StateRootAtIndex(_a0 uint64) (common.Root, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for StateRootAtIndex") - } - - var r0 common.Root - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (common.Root, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) common.Root); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyStateRoots_StateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateRootAtIndex' -type ReadOnlyStateRoots_StateRootAtIndex_Call struct { - *mock.Call -} - -// StateRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *ReadOnlyStateRoots_Expecter) StateRootAtIndex(_a0 interface{}) *ReadOnlyStateRoots_StateRootAtIndex_Call { - return &ReadOnlyStateRoots_StateRootAtIndex_Call{Call: _e.mock.On("StateRootAtIndex", _a0)} -} - -func (_c *ReadOnlyStateRoots_StateRootAtIndex_Call) Run(run func(_a0 uint64)) *ReadOnlyStateRoots_StateRootAtIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *ReadOnlyStateRoots_StateRootAtIndex_Call) Return(_a0 common.Root, _a1 error) *ReadOnlyStateRoots_StateRootAtIndex_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyStateRoots_StateRootAtIndex_Call) RunAndReturn(run func(uint64) (common.Root, error)) *ReadOnlyStateRoots_StateRootAtIndex_Call { - _c.Call.Return(run) - return _c -} - -// NewReadOnlyStateRoots creates a new instance of ReadOnlyStateRoots. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewReadOnlyStateRoots(t interface { - mock.TestingT - Cleanup(func()) -}) *ReadOnlyStateRoots { - mock := &ReadOnlyStateRoots{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/read_only_validators.mock.go b/mod/state-transition/pkg/core/mocks/read_only_validators.mock.go deleted file mode 100644 index 935e713699..0000000000 --- a/mod/state-transition/pkg/core/mocks/read_only_validators.mock.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// ReadOnlyValidators is an autogenerated mock type for the ReadOnlyValidators type -type ReadOnlyValidators[ValidatorT any] struct { - mock.Mock -} - -type ReadOnlyValidators_Expecter[ValidatorT any] struct { - mock *mock.Mock -} - -func (_m *ReadOnlyValidators[ValidatorT]) EXPECT() *ReadOnlyValidators_Expecter[ValidatorT] { - return &ReadOnlyValidators_Expecter[ValidatorT]{mock: &_m.Mock} -} - -// ValidatorByIndex provides a mock function with given fields: _a0 -func (_m *ReadOnlyValidators[ValidatorT]) ValidatorByIndex(_a0 math.ValidatorIndex) (ValidatorT, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ValidatorByIndex") - } - - var r0 ValidatorT - var r1 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) (ValidatorT, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) ValidatorT); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(ValidatorT) - } - - if rf, ok := ret.Get(1).(func(math.ValidatorIndex) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyValidators_ValidatorByIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorByIndex' -type ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT any] struct { - *mock.Call -} - -// ValidatorByIndex is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -func (_e *ReadOnlyValidators_Expecter[ValidatorT]) ValidatorByIndex(_a0 interface{}) *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT] { - return &ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT]{Call: _e.mock.On("ValidatorByIndex", _a0)} -} - -func (_c *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT]) Run(run func(_a0 math.ValidatorIndex)) *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex)) - }) - return _c -} - -func (_c *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT]) Return(_a0 ValidatorT, _a1 error) *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT]) RunAndReturn(run func(math.ValidatorIndex) (ValidatorT, error)) *ReadOnlyValidators_ValidatorByIndex_Call[ValidatorT] { - _c.Call.Return(run) - return _c -} - -// ValidatorIndexByPubkey provides a mock function with given fields: _a0 -func (_m *ReadOnlyValidators[ValidatorT]) ValidatorIndexByPubkey(_a0 crypto.BLSPubkey) (math.ValidatorIndex, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ValidatorIndexByPubkey") - } - - var r0 math.ValidatorIndex - var r1 error - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) (math.ValidatorIndex, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey) math.ValidatorIndex); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - if rf, ok := ret.Get(1).(func(crypto.BLSPubkey) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyValidators_ValidatorIndexByPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatorIndexByPubkey' -type ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT any] struct { - *mock.Call -} - -// ValidatorIndexByPubkey is a helper method to define mock.On call -// - _a0 crypto.BLSPubkey -func (_e *ReadOnlyValidators_Expecter[ValidatorT]) ValidatorIndexByPubkey(_a0 interface{}) *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT] { - return &ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT]{Call: _e.mock.On("ValidatorIndexByPubkey", _a0)} -} - -func (_c *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT]) Run(run func(_a0 crypto.BLSPubkey)) *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(crypto.BLSPubkey)) - }) - return _c -} - -func (_c *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT]) Return(_a0 math.ValidatorIndex, _a1 error) *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT]) RunAndReturn(run func(crypto.BLSPubkey) (math.ValidatorIndex, error)) *ReadOnlyValidators_ValidatorIndexByPubkey_Call[ValidatorT] { - _c.Call.Return(run) - return _c -} - -// NewReadOnlyValidators creates a new instance of ReadOnlyValidators. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewReadOnlyValidators[ValidatorT any](t interface { - mock.TestingT - Cleanup(func()) -}) *ReadOnlyValidators[ValidatorT] { - mock := &ReadOnlyValidators[ValidatorT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/read_only_withdrawals.mock.go b/mod/state-transition/pkg/core/mocks/read_only_withdrawals.mock.go deleted file mode 100644 index 82b8b930d6..0000000000 --- a/mod/state-transition/pkg/core/mocks/read_only_withdrawals.mock.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" - -// ReadOnlyWithdrawals is an autogenerated mock type for the ReadOnlyWithdrawals type -type ReadOnlyWithdrawals[WithdrawalT any] struct { - mock.Mock -} - -type ReadOnlyWithdrawals_Expecter[WithdrawalT any] struct { - mock *mock.Mock -} - -func (_m *ReadOnlyWithdrawals[WithdrawalT]) EXPECT() *ReadOnlyWithdrawals_Expecter[WithdrawalT] { - return &ReadOnlyWithdrawals_Expecter[WithdrawalT]{mock: &_m.Mock} -} - -// ExpectedWithdrawals provides a mock function with given fields: -func (_m *ReadOnlyWithdrawals[WithdrawalT]) ExpectedWithdrawals() ([]WithdrawalT, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ExpectedWithdrawals") - } - - var r0 []WithdrawalT - var r1 error - if rf, ok := ret.Get(0).(func() ([]WithdrawalT, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []WithdrawalT); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]WithdrawalT) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ReadOnlyWithdrawals_ExpectedWithdrawals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExpectedWithdrawals' -type ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT any] struct { - *mock.Call -} - -// ExpectedWithdrawals is a helper method to define mock.On call -func (_e *ReadOnlyWithdrawals_Expecter[WithdrawalT]) ExpectedWithdrawals() *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT] { - return &ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT]{Call: _e.mock.On("ExpectedWithdrawals")} -} - -func (_c *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT]) Run(run func()) *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT]) Return(_a0 []WithdrawalT, _a1 error) *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT]) RunAndReturn(run func() ([]WithdrawalT, error)) *ReadOnlyWithdrawals_ExpectedWithdrawals_Call[WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// NewReadOnlyWithdrawals creates a new instance of ReadOnlyWithdrawals. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewReadOnlyWithdrawals[WithdrawalT any](t interface { - mock.TestingT - Cleanup(func()) -}) *ReadOnlyWithdrawals[WithdrawalT] { - mock := &ReadOnlyWithdrawals[WithdrawalT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/validator.mock.go b/mod/state-transition/pkg/core/mocks/validator.mock.go deleted file mode 100644 index 9245a3de7a..0000000000 --- a/mod/state-transition/pkg/core/mocks/validator.mock.go +++ /dev/null @@ -1,500 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// Validator is an autogenerated mock type for the Validator type -type Validator[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - mock.Mock -} - -type Validator_Expecter[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - mock *mock.Mock -} - -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) EXPECT() *Validator_Expecter[ValidatorT, WithdrawalCredentialsT] { - return &Validator_Expecter[ValidatorT, WithdrawalCredentialsT]{mock: &_m.Mock} -} - -// GetEffectiveBalance provides a mock function with given fields: -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) GetEffectiveBalance() math.Gwei { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetEffectiveBalance") - } - - var r0 math.Gwei - if rf, ok := ret.Get(0).(func() math.Gwei); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Gwei) - } - - return r0 -} - -// Validator_GetEffectiveBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEffectiveBalance' -type Validator_GetEffectiveBalance_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// GetEffectiveBalance is a helper method to define mock.On call -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) GetEffectiveBalance() *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("GetEffectiveBalance")} -} - -func (_c *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 math.Gwei) *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() math.Gwei) *Validator_GetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// GetPubkey provides a mock function with given fields: -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) GetPubkey() crypto.BLSPubkey { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetPubkey") - } - - var r0 crypto.BLSPubkey - if rf, ok := ret.Get(0).(func() crypto.BLSPubkey); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.BLSPubkey) - } - } - - return r0 -} - -// Validator_GetPubkey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPubkey' -type Validator_GetPubkey_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// GetPubkey is a helper method to define mock.On call -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) GetPubkey() *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("GetPubkey")} -} - -func (_c *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 crypto.BLSPubkey) *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() crypto.BLSPubkey) *Validator_GetPubkey_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// GetWithdrawableEpoch provides a mock function with given fields: -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) GetWithdrawableEpoch() math.Epoch { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetWithdrawableEpoch") - } - - var r0 math.Epoch - if rf, ok := ret.Get(0).(func() math.Epoch); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Epoch) - } - - return r0 -} - -// Validator_GetWithdrawableEpoch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWithdrawableEpoch' -type Validator_GetWithdrawableEpoch_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// GetWithdrawableEpoch is a helper method to define mock.On call -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) GetWithdrawableEpoch() *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("GetWithdrawableEpoch")} -} - -func (_c *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 math.Epoch) *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() math.Epoch) *Validator_GetWithdrawableEpoch_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// HashTreeRoot provides a mock function with given fields: -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) HashTreeRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for HashTreeRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// Validator_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' -type Validator_HashTreeRoot_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// HashTreeRoot is a helper method to define mock.On call -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) HashTreeRoot() *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("HashTreeRoot")} -} - -func (_c *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 common.Root) *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() common.Root) *Validator_HashTreeRoot_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// IsSlashed provides a mock function with given fields: -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) IsSlashed() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsSlashed") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Validator_IsSlashed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSlashed' -type Validator_IsSlashed_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// IsSlashed is a helper method to define mock.On call -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) IsSlashed() *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("IsSlashed")} -} - -func (_c *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 bool) *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() bool) *Validator_IsSlashed_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// MarshalSSZ provides a mock function with given fields: -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) MarshalSSZ() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for MarshalSSZ") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Validator_MarshalSSZ_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarshalSSZ' -type Validator_MarshalSSZ_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// MarshalSSZ is a helper method to define mock.On call -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) MarshalSSZ() *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("MarshalSSZ")} -} - -func (_c *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 []byte, _a1 error) *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() ([]byte, error)) *Validator_MarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// New provides a mock function with given fields: pubkey, withdrawalCredentials, amount, effectiveBalanceIncrement, maxEffectiveBalance -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) New(pubkey crypto.BLSPubkey, withdrawalCredentials WithdrawalCredentialsT, amount math.Gwei, effectiveBalanceIncrement math.Gwei, maxEffectiveBalance math.Gwei) ValidatorT { - ret := _m.Called(pubkey, withdrawalCredentials, amount, effectiveBalanceIncrement, maxEffectiveBalance) - - if len(ret) == 0 { - panic("no return value specified for New") - } - - var r0 ValidatorT - if rf, ok := ret.Get(0).(func(crypto.BLSPubkey, WithdrawalCredentialsT, math.Gwei, math.Gwei, math.Gwei) ValidatorT); ok { - r0 = rf(pubkey, withdrawalCredentials, amount, effectiveBalanceIncrement, maxEffectiveBalance) - } else { - r0 = ret.Get(0).(ValidatorT) - } - - return r0 -} - -// Validator_New_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'New' -type Validator_New_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// New is a helper method to define mock.On call -// - pubkey crypto.BLSPubkey -// - withdrawalCredentials WithdrawalCredentialsT -// - amount math.Gwei -// - effectiveBalanceIncrement math.Gwei -// - maxEffectiveBalance math.Gwei -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) New(pubkey interface{}, withdrawalCredentials interface{}, amount interface{}, effectiveBalanceIncrement interface{}, maxEffectiveBalance interface{}) *Validator_New_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_New_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("New", pubkey, withdrawalCredentials, amount, effectiveBalanceIncrement, maxEffectiveBalance)} -} - -func (_c *Validator_New_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func(pubkey crypto.BLSPubkey, withdrawalCredentials WithdrawalCredentialsT, amount math.Gwei, effectiveBalanceIncrement math.Gwei, maxEffectiveBalance math.Gwei)) *Validator_New_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(crypto.BLSPubkey), args[1].(WithdrawalCredentialsT), args[2].(math.Gwei), args[3].(math.Gwei), args[4].(math.Gwei)) - }) - return _c -} - -func (_c *Validator_New_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 ValidatorT) *Validator_New_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Validator_New_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func(crypto.BLSPubkey, WithdrawalCredentialsT, math.Gwei, math.Gwei, math.Gwei) ValidatorT) *Validator_New_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// SetEffectiveBalance provides a mock function with given fields: _a0 -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) SetEffectiveBalance(_a0 math.Gwei) { - _m.Called(_a0) -} - -// Validator_SetEffectiveBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEffectiveBalance' -type Validator_SetEffectiveBalance_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// SetEffectiveBalance is a helper method to define mock.On call -// - _a0 math.Gwei -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) SetEffectiveBalance(_a0 interface{}) *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("SetEffectiveBalance", _a0)} -} - -func (_c *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func(_a0 math.Gwei)) *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Gwei)) - }) - return _c -} - -func (_c *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) Return() *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return() - return _c -} - -func (_c *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func(math.Gwei)) *Validator_SetEffectiveBalance_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// SizeSSZ provides a mock function with given fields: -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) SizeSSZ() uint32 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for SizeSSZ") - } - - var r0 uint32 - if rf, ok := ret.Get(0).(func() uint32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(uint32) - } - - return r0 -} - -// Validator_SizeSSZ_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SizeSSZ' -type Validator_SizeSSZ_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// SizeSSZ is a helper method to define mock.On call -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) SizeSSZ() *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("SizeSSZ")} -} - -func (_c *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func()) *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 uint32) *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func() uint32) *Validator_SizeSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// UnmarshalSSZ provides a mock function with given fields: _a0 -func (_m *Validator[ValidatorT, WithdrawalCredentialsT]) UnmarshalSSZ(_a0 []byte) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for UnmarshalSSZ") - } - - var r0 error - if rf, ok := ret.Get(0).(func([]byte) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Validator_UnmarshalSSZ_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnmarshalSSZ' -type Validator_UnmarshalSSZ_Call[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }] struct { - *mock.Call -} - -// UnmarshalSSZ is a helper method to define mock.On call -// - _a0 []byte -func (_e *Validator_Expecter[ValidatorT, WithdrawalCredentialsT]) UnmarshalSSZ(_a0 interface{}) *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - return &Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]{Call: _e.mock.On("UnmarshalSSZ", _a0)} -} - -func (_c *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Run(run func(_a0 []byte)) *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) Return(_a0 error) *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT]) RunAndReturn(run func([]byte) error) *Validator_UnmarshalSSZ_Call[ValidatorT, WithdrawalCredentialsT] { - _c.Call.Return(run) - return _c -} - -// NewValidator creates a new instance of Validator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewValidator[ValidatorT any, WithdrawalCredentialsT interface{ ~[32]byte }](t interface { - mock.TestingT - Cleanup(func()) -}) *Validator[ValidatorT, WithdrawalCredentialsT] { - mock := &Validator[ValidatorT, WithdrawalCredentialsT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/validators.mock.go b/mod/state-transition/pkg/core/mocks/validators.mock.go deleted file mode 100644 index 15a4fb46bc..0000000000 --- a/mod/state-transition/pkg/core/mocks/validators.mock.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - mock "github.com/stretchr/testify/mock" -) - -// Validators is an autogenerated mock type for the Validators type -type Validators struct { - mock.Mock -} - -type Validators_Expecter struct { - mock *mock.Mock -} - -func (_m *Validators) EXPECT() *Validators_Expecter { - return &Validators_Expecter{mock: &_m.Mock} -} - -// HashTreeRoot provides a mock function with given fields: -func (_m *Validators) HashTreeRoot() common.Root { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for HashTreeRoot") - } - - var r0 common.Root - if rf, ok := ret.Get(0).(func() common.Root); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Root) - } - } - - return r0 -} - -// Validators_HashTreeRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashTreeRoot' -type Validators_HashTreeRoot_Call struct { - *mock.Call -} - -// HashTreeRoot is a helper method to define mock.On call -func (_e *Validators_Expecter) HashTreeRoot() *Validators_HashTreeRoot_Call { - return &Validators_HashTreeRoot_Call{Call: _e.mock.On("HashTreeRoot")} -} - -func (_c *Validators_HashTreeRoot_Call) Run(run func()) *Validators_HashTreeRoot_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Validators_HashTreeRoot_Call) Return(_a0 common.Root) *Validators_HashTreeRoot_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Validators_HashTreeRoot_Call) RunAndReturn(run func() common.Root) *Validators_HashTreeRoot_Call { - _c.Call.Return(run) - return _c -} - -// NewValidators creates a new instance of Validators. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewValidators(t interface { - mock.TestingT - Cleanup(func()) -}) *Validators { - mock := &Validators{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/withdrawal.mock.go b/mod/state-transition/pkg/core/mocks/withdrawal.mock.go deleted file mode 100644 index e76e91136f..0000000000 --- a/mod/state-transition/pkg/core/mocks/withdrawal.mock.go +++ /dev/null @@ -1,266 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// Withdrawal is an autogenerated mock type for the Withdrawal type -type Withdrawal[WithdrawalT any] struct { - mock.Mock -} - -type Withdrawal_Expecter[WithdrawalT any] struct { - mock *mock.Mock -} - -func (_m *Withdrawal[WithdrawalT]) EXPECT() *Withdrawal_Expecter[WithdrawalT] { - return &Withdrawal_Expecter[WithdrawalT]{mock: &_m.Mock} -} - -// Equals provides a mock function with given fields: _a0 -func (_m *Withdrawal[WithdrawalT]) Equals(_a0 WithdrawalT) bool { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for Equals") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(WithdrawalT) bool); ok { - r0 = rf(_a0) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Withdrawal_Equals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Equals' -type Withdrawal_Equals_Call[WithdrawalT any] struct { - *mock.Call -} - -// Equals is a helper method to define mock.On call -// - _a0 WithdrawalT -func (_e *Withdrawal_Expecter[WithdrawalT]) Equals(_a0 interface{}) *Withdrawal_Equals_Call[WithdrawalT] { - return &Withdrawal_Equals_Call[WithdrawalT]{Call: _e.mock.On("Equals", _a0)} -} - -func (_c *Withdrawal_Equals_Call[WithdrawalT]) Run(run func(_a0 WithdrawalT)) *Withdrawal_Equals_Call[WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(WithdrawalT)) - }) - return _c -} - -func (_c *Withdrawal_Equals_Call[WithdrawalT]) Return(_a0 bool) *Withdrawal_Equals_Call[WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Withdrawal_Equals_Call[WithdrawalT]) RunAndReturn(run func(WithdrawalT) bool) *Withdrawal_Equals_Call[WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetAddress provides a mock function with given fields: -func (_m *Withdrawal[WithdrawalT]) GetAddress() common.ExecutionAddress { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAddress") - } - - var r0 common.ExecutionAddress - if rf, ok := ret.Get(0).(func() common.ExecutionAddress); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.ExecutionAddress) - } - } - - return r0 -} - -// Withdrawal_GetAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAddress' -type Withdrawal_GetAddress_Call[WithdrawalT any] struct { - *mock.Call -} - -// GetAddress is a helper method to define mock.On call -func (_e *Withdrawal_Expecter[WithdrawalT]) GetAddress() *Withdrawal_GetAddress_Call[WithdrawalT] { - return &Withdrawal_GetAddress_Call[WithdrawalT]{Call: _e.mock.On("GetAddress")} -} - -func (_c *Withdrawal_GetAddress_Call[WithdrawalT]) Run(run func()) *Withdrawal_GetAddress_Call[WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Withdrawal_GetAddress_Call[WithdrawalT]) Return(_a0 common.ExecutionAddress) *Withdrawal_GetAddress_Call[WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Withdrawal_GetAddress_Call[WithdrawalT]) RunAndReturn(run func() common.ExecutionAddress) *Withdrawal_GetAddress_Call[WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetAmount provides a mock function with given fields: -func (_m *Withdrawal[WithdrawalT]) GetAmount() math.Gwei { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAmount") - } - - var r0 math.Gwei - if rf, ok := ret.Get(0).(func() math.Gwei); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.Gwei) - } - - return r0 -} - -// Withdrawal_GetAmount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAmount' -type Withdrawal_GetAmount_Call[WithdrawalT any] struct { - *mock.Call -} - -// GetAmount is a helper method to define mock.On call -func (_e *Withdrawal_Expecter[WithdrawalT]) GetAmount() *Withdrawal_GetAmount_Call[WithdrawalT] { - return &Withdrawal_GetAmount_Call[WithdrawalT]{Call: _e.mock.On("GetAmount")} -} - -func (_c *Withdrawal_GetAmount_Call[WithdrawalT]) Run(run func()) *Withdrawal_GetAmount_Call[WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Withdrawal_GetAmount_Call[WithdrawalT]) Return(_a0 math.Gwei) *Withdrawal_GetAmount_Call[WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Withdrawal_GetAmount_Call[WithdrawalT]) RunAndReturn(run func() math.Gwei) *Withdrawal_GetAmount_Call[WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetIndex provides a mock function with given fields: -func (_m *Withdrawal[WithdrawalT]) GetIndex() math.U64 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetIndex") - } - - var r0 math.U64 - if rf, ok := ret.Get(0).(func() math.U64); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.U64) - } - - return r0 -} - -// Withdrawal_GetIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIndex' -type Withdrawal_GetIndex_Call[WithdrawalT any] struct { - *mock.Call -} - -// GetIndex is a helper method to define mock.On call -func (_e *Withdrawal_Expecter[WithdrawalT]) GetIndex() *Withdrawal_GetIndex_Call[WithdrawalT] { - return &Withdrawal_GetIndex_Call[WithdrawalT]{Call: _e.mock.On("GetIndex")} -} - -func (_c *Withdrawal_GetIndex_Call[WithdrawalT]) Run(run func()) *Withdrawal_GetIndex_Call[WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Withdrawal_GetIndex_Call[WithdrawalT]) Return(_a0 math.U64) *Withdrawal_GetIndex_Call[WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Withdrawal_GetIndex_Call[WithdrawalT]) RunAndReturn(run func() math.U64) *Withdrawal_GetIndex_Call[WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// GetValidatorIndex provides a mock function with given fields: -func (_m *Withdrawal[WithdrawalT]) GetValidatorIndex() math.ValidatorIndex { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetValidatorIndex") - } - - var r0 math.ValidatorIndex - if rf, ok := ret.Get(0).(func() math.ValidatorIndex); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(math.ValidatorIndex) - } - - return r0 -} - -// Withdrawal_GetValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetValidatorIndex' -type Withdrawal_GetValidatorIndex_Call[WithdrawalT any] struct { - *mock.Call -} - -// GetValidatorIndex is a helper method to define mock.On call -func (_e *Withdrawal_Expecter[WithdrawalT]) GetValidatorIndex() *Withdrawal_GetValidatorIndex_Call[WithdrawalT] { - return &Withdrawal_GetValidatorIndex_Call[WithdrawalT]{Call: _e.mock.On("GetValidatorIndex")} -} - -func (_c *Withdrawal_GetValidatorIndex_Call[WithdrawalT]) Run(run func()) *Withdrawal_GetValidatorIndex_Call[WithdrawalT] { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Withdrawal_GetValidatorIndex_Call[WithdrawalT]) Return(_a0 math.ValidatorIndex) *Withdrawal_GetValidatorIndex_Call[WithdrawalT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *Withdrawal_GetValidatorIndex_Call[WithdrawalT]) RunAndReturn(run func() math.ValidatorIndex) *Withdrawal_GetValidatorIndex_Call[WithdrawalT] { - _c.Call.Return(run) - return _c -} - -// NewWithdrawal creates a new instance of Withdrawal. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewWithdrawal[WithdrawalT any](t interface { - mock.TestingT - Cleanup(func()) -}) *Withdrawal[WithdrawalT] { - mock := &Withdrawal[WithdrawalT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/withdrawals_constraint.mock.go b/mod/state-transition/pkg/core/mocks/withdrawals_constraint.mock.go deleted file mode 100644 index 291d70a837..0000000000 --- a/mod/state-transition/pkg/core/mocks/withdrawals_constraint.mock.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - bytes "bytes" - - mock "github.com/stretchr/testify/mock" -) - -// WithdrawalsConstraint is an autogenerated mock type for the WithdrawalsConstraint type -type WithdrawalsConstraint struct { - mock.Mock -} - -type WithdrawalsConstraint_Expecter struct { - mock *mock.Mock -} - -func (_m *WithdrawalsConstraint) EXPECT() *WithdrawalsConstraint_Expecter { - return &WithdrawalsConstraint_Expecter{mock: &_m.Mock} -} - -// EncodeIndex provides a mock function with given fields: _a0, _a1 -func (_m *WithdrawalsConstraint) EncodeIndex(_a0 int, _a1 *bytes.Buffer) { - _m.Called(_a0, _a1) -} - -// WithdrawalsConstraint_EncodeIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EncodeIndex' -type WithdrawalsConstraint_EncodeIndex_Call struct { - *mock.Call -} - -// EncodeIndex is a helper method to define mock.On call -// - _a0 int -// - _a1 *bytes.Buffer -func (_e *WithdrawalsConstraint_Expecter) EncodeIndex(_a0 interface{}, _a1 interface{}) *WithdrawalsConstraint_EncodeIndex_Call { - return &WithdrawalsConstraint_EncodeIndex_Call{Call: _e.mock.On("EncodeIndex", _a0, _a1)} -} - -func (_c *WithdrawalsConstraint_EncodeIndex_Call) Run(run func(_a0 int, _a1 *bytes.Buffer)) *WithdrawalsConstraint_EncodeIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(int), args[1].(*bytes.Buffer)) - }) - return _c -} - -func (_c *WithdrawalsConstraint_EncodeIndex_Call) Return() *WithdrawalsConstraint_EncodeIndex_Call { - _c.Call.Return() - return _c -} - -func (_c *WithdrawalsConstraint_EncodeIndex_Call) RunAndReturn(run func(int, *bytes.Buffer)) *WithdrawalsConstraint_EncodeIndex_Call { - _c.Call.Return(run) - return _c -} - -// Len provides a mock function with given fields: -func (_m *WithdrawalsConstraint) Len() int { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Len") - } - - var r0 int - if rf, ok := ret.Get(0).(func() int); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(int) - } - - return r0 -} - -// WithdrawalsConstraint_Len_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Len' -type WithdrawalsConstraint_Len_Call struct { - *mock.Call -} - -// Len is a helper method to define mock.On call -func (_e *WithdrawalsConstraint_Expecter) Len() *WithdrawalsConstraint_Len_Call { - return &WithdrawalsConstraint_Len_Call{Call: _e.mock.On("Len")} -} - -func (_c *WithdrawalsConstraint_Len_Call) Run(run func()) *WithdrawalsConstraint_Len_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *WithdrawalsConstraint_Len_Call) Return(_a0 int) *WithdrawalsConstraint_Len_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *WithdrawalsConstraint_Len_Call) RunAndReturn(run func() int) *WithdrawalsConstraint_Len_Call { - _c.Call.Return(run) - return _c -} - -// NewWithdrawalsConstraint creates a new instance of WithdrawalsConstraint. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewWithdrawalsConstraint(t interface { - mock.TestingT - Cleanup(func()) -}) *WithdrawalsConstraint { - mock := &WithdrawalsConstraint{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/write_only_beacon_state.mock.go b/mod/state-transition/pkg/core/mocks/write_only_beacon_state.mock.go deleted file mode 100644 index 677433b90c..0000000000 --- a/mod/state-transition/pkg/core/mocks/write_only_beacon_state.mock.go +++ /dev/null @@ -1,919 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - - mock "github.com/stretchr/testify/mock" -) - -// WriteOnlyBeaconState is an autogenerated mock type for the WriteOnlyBeaconState type -type WriteOnlyBeaconState[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - mock.Mock -} - -type WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - mock *mock.Mock -} - -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) EXPECT() *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{mock: &_m.Mock} -} - -// AddValidator provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) AddValidator(_a0 ValidatorT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for AddValidator") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_AddValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidator' -type WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// AddValidator is a helper method to define mock.On call -// - _a0 ValidatorT -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) AddValidator(_a0 interface{}) *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("AddValidator", _a0)} -} - -func (_c *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 ValidatorT)) *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ValidatorT)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(ValidatorT) error) *WriteOnlyBeaconState_AddValidator_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// AddValidatorBartio provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) AddValidatorBartio(_a0 ValidatorT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for AddValidatorBartio") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_AddValidatorBartio_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidatorBartio' -type WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// AddValidatorBartio is a helper method to define mock.On call -// - _a0 ValidatorT -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) AddValidatorBartio(_a0 interface{}) *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("AddValidatorBartio", _a0)} -} - -func (_c *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 ValidatorT)) *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ValidatorT)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(ValidatorT) error) *WriteOnlyBeaconState_AddValidatorBartio_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// DecreaseBalance provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) DecreaseBalance(_a0 math.ValidatorIndex, _a1 math.Gwei) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for DecreaseBalance") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex, math.Gwei) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_DecreaseBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DecreaseBalance' -type WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// DecreaseBalance is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -// - _a1 math.Gwei -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) DecreaseBalance(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("DecreaseBalance", _a0, _a1)} -} - -func (_c *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.ValidatorIndex, _a1 math.Gwei)) *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex), args[1].(math.Gwei)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.ValidatorIndex, math.Gwei) error) *WriteOnlyBeaconState_DecreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// IncreaseBalance provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) IncreaseBalance(_a0 math.ValidatorIndex, _a1 math.Gwei) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for IncreaseBalance") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex, math.Gwei) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_IncreaseBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncreaseBalance' -type WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// IncreaseBalance is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -// - _a1 math.Gwei -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) IncreaseBalance(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("IncreaseBalance", _a0, _a1)} -} - -func (_c *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.ValidatorIndex, _a1 math.Gwei)) *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex), args[1].(math.Gwei)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.ValidatorIndex, math.Gwei) error) *WriteOnlyBeaconState_IncreaseBalance_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetEth1Data provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetEth1Data(_a0 Eth1DataT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetEth1Data") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Eth1DataT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1Data' -type WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetEth1Data is a helper method to define mock.On call -// - _a0 Eth1DataT -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetEth1Data(_a0 interface{}) *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetEth1Data", _a0)} -} - -func (_c *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 Eth1DataT)) *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Eth1DataT)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(Eth1DataT) error) *WriteOnlyBeaconState_SetEth1Data_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetEth1DepositIndex provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetEth1DepositIndex(_a0 uint64) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetEth1DepositIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1DepositIndex' -type WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetEth1DepositIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetEth1DepositIndex(_a0 interface{}) *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetEth1DepositIndex", _a0)} -} - -func (_c *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64)) *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64) error) *WriteOnlyBeaconState_SetEth1DepositIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetFork provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetFork(_a0 ForkT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetFork") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ForkT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetFork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFork' -type WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetFork is a helper method to define mock.On call -// - _a0 ForkT -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetFork(_a0 interface{}) *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetFork", _a0)} -} - -func (_c *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 ForkT)) *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ForkT)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(ForkT) error) *WriteOnlyBeaconState_SetFork_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetGenesisValidatorsRoot provides a mock function with given fields: root -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetGenesisValidatorsRoot(root common.Root) error { - ret := _m.Called(root) - - if len(ret) == 0 { - panic("no return value specified for SetGenesisValidatorsRoot") - } - - var r0 error - if rf, ok := ret.Get(0).(func(common.Root) error); ok { - r0 = rf(root) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetGenesisValidatorsRoot' -type WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetGenesisValidatorsRoot is a helper method to define mock.On call -// - root common.Root -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetGenesisValidatorsRoot(root interface{}) *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetGenesisValidatorsRoot", root)} -} - -func (_c *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(root common.Root)) *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(common.Root)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(common.Root) error) *WriteOnlyBeaconState_SetGenesisValidatorsRoot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetLatestBlockHeader provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetLatestBlockHeader(_a0 BeaconBlockHeaderT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetLatestBlockHeader") - } - - var r0 error - if rf, ok := ret.Get(0).(func(BeaconBlockHeaderT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestBlockHeader' -type WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetLatestBlockHeader is a helper method to define mock.On call -// - _a0 BeaconBlockHeaderT -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetLatestBlockHeader(_a0 interface{}) *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetLatestBlockHeader", _a0)} -} - -func (_c *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 BeaconBlockHeaderT)) *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(BeaconBlockHeaderT)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(BeaconBlockHeaderT) error) *WriteOnlyBeaconState_SetLatestBlockHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetLatestExecutionPayloadHeader provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetLatestExecutionPayloadHeader(_a0 ExecutionPayloadHeaderT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetLatestExecutionPayloadHeader") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ExecutionPayloadHeaderT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestExecutionPayloadHeader' -type WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetLatestExecutionPayloadHeader is a helper method to define mock.On call -// - _a0 ExecutionPayloadHeaderT -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetLatestExecutionPayloadHeader(_a0 interface{}) *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetLatestExecutionPayloadHeader", _a0)} -} - -func (_c *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 ExecutionPayloadHeaderT)) *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ExecutionPayloadHeaderT)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(ExecutionPayloadHeaderT) error) *WriteOnlyBeaconState_SetLatestExecutionPayloadHeader_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetNextWithdrawalIndex provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetNextWithdrawalIndex(_a0 uint64) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetNextWithdrawalIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetNextWithdrawalIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNextWithdrawalIndex' -type WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetNextWithdrawalIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetNextWithdrawalIndex(_a0 interface{}) *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetNextWithdrawalIndex", _a0)} -} - -func (_c *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64)) *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64) error) *WriteOnlyBeaconState_SetNextWithdrawalIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetNextWithdrawalValidatorIndex provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetNextWithdrawalValidatorIndex(_a0 math.ValidatorIndex) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetNextWithdrawalValidatorIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetNextWithdrawalValidatorIndex' -type WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetNextWithdrawalValidatorIndex is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetNextWithdrawalValidatorIndex(_a0 interface{}) *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetNextWithdrawalValidatorIndex", _a0)} -} - -func (_c *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.ValidatorIndex)) *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.ValidatorIndex) error) *WriteOnlyBeaconState_SetNextWithdrawalValidatorIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetSlot provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetSlot(_a0 math.Slot) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetSlot") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.Slot) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetSlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSlot' -type WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetSlot is a helper method to define mock.On call -// - _a0 math.Slot -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetSlot(_a0 interface{}) *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetSlot", _a0)} -} - -func (_c *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.Slot)) *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Slot)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.Slot) error) *WriteOnlyBeaconState_SetSlot_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// SetTotalSlashing provides a mock function with given fields: _a0 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetTotalSlashing(_a0 math.Gwei) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetTotalSlashing") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.Gwei) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_SetTotalSlashing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTotalSlashing' -type WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// SetTotalSlashing is a helper method to define mock.On call -// - _a0 math.Gwei -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) SetTotalSlashing(_a0 interface{}) *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("SetTotalSlashing", _a0)} -} - -func (_c *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.Gwei)) *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.Gwei)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.Gwei) error) *WriteOnlyBeaconState_SetTotalSlashing_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// UpdateBlockRootAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateBlockRootAtIndex(_a0 uint64, _a1 common.Root) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateBlockRootAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBlockRootAtIndex' -type WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// UpdateBlockRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 common.Root -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateBlockRootAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateBlockRootAtIndex", _a0, _a1)} -} - -func (_c *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64, _a1 common.Root)) *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(common.Root)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64, common.Root) error) *WriteOnlyBeaconState_UpdateBlockRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// UpdateRandaoMixAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateRandaoMixAtIndex(_a0 uint64, _a1 common.Bytes32) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateRandaoMixAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, common.Bytes32) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRandaoMixAtIndex' -type WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// UpdateRandaoMixAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 common.Bytes32 -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateRandaoMixAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateRandaoMixAtIndex", _a0, _a1)} -} - -func (_c *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64, _a1 common.Bytes32)) *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(common.Bytes32)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64, common.Bytes32) error) *WriteOnlyBeaconState_UpdateRandaoMixAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// UpdateSlashingAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateSlashingAtIndex(_a0 uint64, _a1 math.Gwei) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateSlashingAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, math.Gwei) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_UpdateSlashingAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSlashingAtIndex' -type WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// UpdateSlashingAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 math.Gwei -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateSlashingAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateSlashingAtIndex", _a0, _a1)} -} - -func (_c *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64, _a1 math.Gwei)) *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(math.Gwei)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64, math.Gwei) error) *WriteOnlyBeaconState_UpdateSlashingAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// UpdateStateRootAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateStateRootAtIndex(_a0 uint64, _a1 common.Root) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateStateRootAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_UpdateStateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateRootAtIndex' -type WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// UpdateStateRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 common.Root -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateStateRootAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateStateRootAtIndex", _a0, _a1)} -} - -func (_c *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 uint64, _a1 common.Root)) *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(common.Root)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(uint64, common.Root) error) *WriteOnlyBeaconState_UpdateStateRootAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// UpdateValidatorAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateValidatorAtIndex(_a0 math.ValidatorIndex, _a1 ValidatorT) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateValidatorAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex, ValidatorT) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyBeaconState_UpdateValidatorAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateValidatorAtIndex' -type WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any] struct { - *mock.Call -} - -// UpdateValidatorAtIndex is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -// - _a1 ValidatorT -func (_e *WriteOnlyBeaconState_Expecter[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) UpdateValidatorAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - return &WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{Call: _e.mock.On("UpdateValidatorAtIndex", _a0, _a1)} -} - -func (_c *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Run(run func(_a0 math.ValidatorIndex, _a1 ValidatorT)) *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex), args[1].(ValidatorT)) - }) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) Return(_a0 error) *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]) RunAndReturn(run func(math.ValidatorIndex, ValidatorT) error) *WriteOnlyBeaconState_UpdateValidatorAtIndex_Call[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - _c.Call.Return(run) - return _c -} - -// NewWriteOnlyBeaconState creates a new instance of WriteOnlyBeaconState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewWriteOnlyBeaconState[BeaconBlockHeaderT any, Eth1DataT any, ExecutionPayloadHeaderT any, ForkT any, ValidatorT any](t interface { - mock.TestingT - Cleanup(func()) -}) *WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT] { - mock := &WriteOnlyBeaconState[BeaconBlockHeaderT, Eth1DataT, ExecutionPayloadHeaderT, ForkT, ValidatorT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/write_only_eth_1_data.mock.go b/mod/state-transition/pkg/core/mocks/write_only_eth_1_data.mock.go deleted file mode 100644 index a6020ec38b..0000000000 --- a/mod/state-transition/pkg/core/mocks/write_only_eth_1_data.mock.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" - -// WriteOnlyEth1Data is an autogenerated mock type for the WriteOnlyEth1Data type -type WriteOnlyEth1Data[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - mock.Mock -} - -type WriteOnlyEth1Data_Expecter[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - mock *mock.Mock -} - -func (_m *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) EXPECT() *WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT] { - return &WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]{mock: &_m.Mock} -} - -// SetEth1Data provides a mock function with given fields: _a0 -func (_m *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) SetEth1Data(_a0 Eth1DataT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetEth1Data") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Eth1DataT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyEth1Data_SetEth1Data_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1Data' -type WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - *mock.Call -} - -// SetEth1Data is a helper method to define mock.On call -// - _a0 Eth1DataT -func (_e *WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) SetEth1Data(_a0 interface{}) *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { - return &WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("SetEth1Data", _a0)} -} - -func (_c *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func(_a0 Eth1DataT)) *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(Eth1DataT)) - }) - return _c -} - -func (_c *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 error) *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func(Eth1DataT) error) *WriteOnlyEth1Data_SetEth1Data_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(run) - return _c -} - -// SetEth1DepositIndex provides a mock function with given fields: _a0 -func (_m *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) SetEth1DepositIndex(_a0 uint64) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetEth1DepositIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyEth1Data_SetEth1DepositIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEth1DepositIndex' -type WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - *mock.Call -} - -// SetEth1DepositIndex is a helper method to define mock.On call -// - _a0 uint64 -func (_e *WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) SetEth1DepositIndex(_a0 interface{}) *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { - return &WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("SetEth1DepositIndex", _a0)} -} - -func (_c *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func(_a0 uint64)) *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64)) - }) - return _c -} - -func (_c *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 error) *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func(uint64) error) *WriteOnlyEth1Data_SetEth1DepositIndex_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(run) - return _c -} - -// SetLatestExecutionPayloadHeader provides a mock function with given fields: _a0 -func (_m *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]) SetLatestExecutionPayloadHeader(_a0 ExecutionPayloadHeaderT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SetLatestExecutionPayloadHeader") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ExecutionPayloadHeaderT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLatestExecutionPayloadHeader' -type WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT any, ExecutionPayloadHeaderT any] struct { - *mock.Call -} - -// SetLatestExecutionPayloadHeader is a helper method to define mock.On call -// - _a0 ExecutionPayloadHeaderT -func (_e *WriteOnlyEth1Data_Expecter[Eth1DataT, ExecutionPayloadHeaderT]) SetLatestExecutionPayloadHeader(_a0 interface{}) *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { - return &WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]{Call: _e.mock.On("SetLatestExecutionPayloadHeader", _a0)} -} - -func (_c *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) Run(run func(_a0 ExecutionPayloadHeaderT)) *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ExecutionPayloadHeaderT)) - }) - return _c -} - -func (_c *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) Return(_a0 error) *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT]) RunAndReturn(run func(ExecutionPayloadHeaderT) error) *WriteOnlyEth1Data_SetLatestExecutionPayloadHeader_Call[Eth1DataT, ExecutionPayloadHeaderT] { - _c.Call.Return(run) - return _c -} - -// NewWriteOnlyEth1Data creates a new instance of WriteOnlyEth1Data. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewWriteOnlyEth1Data[Eth1DataT any, ExecutionPayloadHeaderT any](t interface { - mock.TestingT - Cleanup(func()) -}) *WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT] { - mock := &WriteOnlyEth1Data[Eth1DataT, ExecutionPayloadHeaderT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/write_only_randao_mixes.mock.go b/mod/state-transition/pkg/core/mocks/write_only_randao_mixes.mock.go deleted file mode 100644 index 6cd16f7b52..0000000000 --- a/mod/state-transition/pkg/core/mocks/write_only_randao_mixes.mock.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - mock "github.com/stretchr/testify/mock" -) - -// WriteOnlyRandaoMixes is an autogenerated mock type for the WriteOnlyRandaoMixes type -type WriteOnlyRandaoMixes struct { - mock.Mock -} - -type WriteOnlyRandaoMixes_Expecter struct { - mock *mock.Mock -} - -func (_m *WriteOnlyRandaoMixes) EXPECT() *WriteOnlyRandaoMixes_Expecter { - return &WriteOnlyRandaoMixes_Expecter{mock: &_m.Mock} -} - -// UpdateRandaoMixAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyRandaoMixes) UpdateRandaoMixAtIndex(_a0 uint64, _a1 common.Bytes32) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateRandaoMixAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, common.Bytes32) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRandaoMixAtIndex' -type WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call struct { - *mock.Call -} - -// UpdateRandaoMixAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 common.Bytes32 -func (_e *WriteOnlyRandaoMixes_Expecter) UpdateRandaoMixAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call { - return &WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call{Call: _e.mock.On("UpdateRandaoMixAtIndex", _a0, _a1)} -} - -func (_c *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call) Run(run func(_a0 uint64, _a1 common.Bytes32)) *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(common.Bytes32)) - }) - return _c -} - -func (_c *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call) Return(_a0 error) *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call) RunAndReturn(run func(uint64, common.Bytes32) error) *WriteOnlyRandaoMixes_UpdateRandaoMixAtIndex_Call { - _c.Call.Return(run) - return _c -} - -// NewWriteOnlyRandaoMixes creates a new instance of WriteOnlyRandaoMixes. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewWriteOnlyRandaoMixes(t interface { - mock.TestingT - Cleanup(func()) -}) *WriteOnlyRandaoMixes { - mock := &WriteOnlyRandaoMixes{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/write_only_state_roots.mock.go b/mod/state-transition/pkg/core/mocks/write_only_state_roots.mock.go deleted file mode 100644 index 7349015317..0000000000 --- a/mod/state-transition/pkg/core/mocks/write_only_state_roots.mock.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - - mock "github.com/stretchr/testify/mock" -) - -// WriteOnlyStateRoots is an autogenerated mock type for the WriteOnlyStateRoots type -type WriteOnlyStateRoots struct { - mock.Mock -} - -type WriteOnlyStateRoots_Expecter struct { - mock *mock.Mock -} - -func (_m *WriteOnlyStateRoots) EXPECT() *WriteOnlyStateRoots_Expecter { - return &WriteOnlyStateRoots_Expecter{mock: &_m.Mock} -} - -// UpdateStateRootAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyStateRoots) UpdateStateRootAtIndex(_a0 uint64, _a1 common.Root) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateStateRootAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(uint64, common.Root) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyStateRoots_UpdateStateRootAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateStateRootAtIndex' -type WriteOnlyStateRoots_UpdateStateRootAtIndex_Call struct { - *mock.Call -} - -// UpdateStateRootAtIndex is a helper method to define mock.On call -// - _a0 uint64 -// - _a1 common.Root -func (_e *WriteOnlyStateRoots_Expecter) UpdateStateRootAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call { - return &WriteOnlyStateRoots_UpdateStateRootAtIndex_Call{Call: _e.mock.On("UpdateStateRootAtIndex", _a0, _a1)} -} - -func (_c *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call) Run(run func(_a0 uint64, _a1 common.Root)) *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(uint64), args[1].(common.Root)) - }) - return _c -} - -func (_c *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call) Return(_a0 error) *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call) RunAndReturn(run func(uint64, common.Root) error) *WriteOnlyStateRoots_UpdateStateRootAtIndex_Call { - _c.Call.Return(run) - return _c -} - -// NewWriteOnlyStateRoots creates a new instance of WriteOnlyStateRoots. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewWriteOnlyStateRoots(t interface { - mock.TestingT - Cleanup(func()) -}) *WriteOnlyStateRoots { - mock := &WriteOnlyStateRoots{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/mocks/write_only_validators.mock.go b/mod/state-transition/pkg/core/mocks/write_only_validators.mock.go deleted file mode 100644 index 3f4d7bfcac..0000000000 --- a/mod/state-transition/pkg/core/mocks/write_only_validators.mock.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by mockery v2.46.3. DO NOT EDIT. - -package mocks - -import ( - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - mock "github.com/stretchr/testify/mock" -) - -// WriteOnlyValidators is an autogenerated mock type for the WriteOnlyValidators type -type WriteOnlyValidators[ValidatorT any] struct { - mock.Mock -} - -type WriteOnlyValidators_Expecter[ValidatorT any] struct { - mock *mock.Mock -} - -func (_m *WriteOnlyValidators[ValidatorT]) EXPECT() *WriteOnlyValidators_Expecter[ValidatorT] { - return &WriteOnlyValidators_Expecter[ValidatorT]{mock: &_m.Mock} -} - -// AddValidator provides a mock function with given fields: _a0 -func (_m *WriteOnlyValidators[ValidatorT]) AddValidator(_a0 ValidatorT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for AddValidator") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyValidators_AddValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidator' -type WriteOnlyValidators_AddValidator_Call[ValidatorT any] struct { - *mock.Call -} - -// AddValidator is a helper method to define mock.On call -// - _a0 ValidatorT -func (_e *WriteOnlyValidators_Expecter[ValidatorT]) AddValidator(_a0 interface{}) *WriteOnlyValidators_AddValidator_Call[ValidatorT] { - return &WriteOnlyValidators_AddValidator_Call[ValidatorT]{Call: _e.mock.On("AddValidator", _a0)} -} - -func (_c *WriteOnlyValidators_AddValidator_Call[ValidatorT]) Run(run func(_a0 ValidatorT)) *WriteOnlyValidators_AddValidator_Call[ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ValidatorT)) - }) - return _c -} - -func (_c *WriteOnlyValidators_AddValidator_Call[ValidatorT]) Return(_a0 error) *WriteOnlyValidators_AddValidator_Call[ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyValidators_AddValidator_Call[ValidatorT]) RunAndReturn(run func(ValidatorT) error) *WriteOnlyValidators_AddValidator_Call[ValidatorT] { - _c.Call.Return(run) - return _c -} - -// AddValidatorBartio provides a mock function with given fields: _a0 -func (_m *WriteOnlyValidators[ValidatorT]) AddValidatorBartio(_a0 ValidatorT) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for AddValidatorBartio") - } - - var r0 error - if rf, ok := ret.Get(0).(func(ValidatorT) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyValidators_AddValidatorBartio_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddValidatorBartio' -type WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT any] struct { - *mock.Call -} - -// AddValidatorBartio is a helper method to define mock.On call -// - _a0 ValidatorT -func (_e *WriteOnlyValidators_Expecter[ValidatorT]) AddValidatorBartio(_a0 interface{}) *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT] { - return &WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT]{Call: _e.mock.On("AddValidatorBartio", _a0)} -} - -func (_c *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT]) Run(run func(_a0 ValidatorT)) *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(ValidatorT)) - }) - return _c -} - -func (_c *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT]) Return(_a0 error) *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT]) RunAndReturn(run func(ValidatorT) error) *WriteOnlyValidators_AddValidatorBartio_Call[ValidatorT] { - _c.Call.Return(run) - return _c -} - -// UpdateValidatorAtIndex provides a mock function with given fields: _a0, _a1 -func (_m *WriteOnlyValidators[ValidatorT]) UpdateValidatorAtIndex(_a0 math.ValidatorIndex, _a1 ValidatorT) error { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for UpdateValidatorAtIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(math.ValidatorIndex, ValidatorT) error); ok { - r0 = rf(_a0, _a1) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteOnlyValidators_UpdateValidatorAtIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateValidatorAtIndex' -type WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT any] struct { - *mock.Call -} - -// UpdateValidatorAtIndex is a helper method to define mock.On call -// - _a0 math.ValidatorIndex -// - _a1 ValidatorT -func (_e *WriteOnlyValidators_Expecter[ValidatorT]) UpdateValidatorAtIndex(_a0 interface{}, _a1 interface{}) *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT] { - return &WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT]{Call: _e.mock.On("UpdateValidatorAtIndex", _a0, _a1)} -} - -func (_c *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT]) Run(run func(_a0 math.ValidatorIndex, _a1 ValidatorT)) *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT] { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.ValidatorIndex), args[1].(ValidatorT)) - }) - return _c -} - -func (_c *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT]) Return(_a0 error) *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT] { - _c.Call.Return(_a0) - return _c -} - -func (_c *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT]) RunAndReturn(run func(math.ValidatorIndex, ValidatorT) error) *WriteOnlyValidators_UpdateValidatorAtIndex_Call[ValidatorT] { - _c.Call.Return(run) - return _c -} - -// NewWriteOnlyValidators creates a new instance of WriteOnlyValidators. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewWriteOnlyValidators[ValidatorT any](t interface { - mock.TestingT - Cleanup(func()) -}) *WriteOnlyValidators[ValidatorT] { - mock := &WriteOnlyValidators[ValidatorT]{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index 354f0c723a..a37cca2a1e 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -28,12 +28,11 @@ import ( engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" "github.com/berachain/beacon-kit/mod/primitives/pkg/common" "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - cryptomocks "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" + "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" "github.com/berachain/beacon-kit/mod/primitives/pkg/math" "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" "github.com/berachain/beacon-kit/mod/primitives/pkg/version" "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" - "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" "github.com/stretchr/testify/mock" @@ -80,13 +79,8 @@ type ( func TestInitialize(t *testing.T) { // Create state processor to test cs := spec.TestnetChainSpec() - execEngine := mocks.NewExecutionEngine[ - *types.ExecutionPayload, - *types.ExecutionPayloadHeader, - engineprimitives.Withdrawals, - ](t) - - mocksSigner := &cryptomocks.Blssigner{} + execEngine := &testExecutionEngine{} + mocksSigner := &mocks.BLSSigner{} sp := core.NewStateProcessor[ *types.BeaconBlock, diff --git a/mod/state-transition/pkg/core/types.go b/mod/state-transition/pkg/core/types.go index 6edcb5a71b..5a359344d3 100644 --- a/mod/state-transition/pkg/core/types.go +++ b/mod/state-transition/pkg/core/types.go @@ -173,18 +173,15 @@ type ExecutionPayloadHeader interface { GetBlockHash() common.ExecutionHash } -// WithdrawalsConstraint is the interface for withdrawals constraint. -type WithdrawalsConstraint interface { - Len() int - EncodeIndex(int, *stdbytes.Buffer) -} - // ExecutionEngine is the interface for the execution engine. type ExecutionEngine[ ExecutionPayloadT ExecutionPayload[ ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, - WithdrawalsT WithdrawalsConstraint, + WithdrawalsT interface { + Len() int + EncodeIndex(int, *stdbytes.Buffer) + }, ] interface { // VerifyAndNotifyNewPayload verifies the new payload and notifies the // execution client. diff --git a/mod/storage/pkg/filedb/range_db_test.go b/mod/storage/pkg/filedb/range_db_test.go index b0e33eddf2..51334ce806 100644 --- a/mod/storage/pkg/filedb/range_db_test.go +++ b/mod/storage/pkg/filedb/range_db_test.go @@ -197,11 +197,11 @@ func TestExtractIndex(t *testing.T) { func TestRangeDB_DeleteRange_NotSupported(t *testing.T) { tests := []struct { name string - db *mocks.Db + db *mocks.DB }{ { name: "DeleteRangeNotSupported", - db: new(mocks.Db), + db: new(mocks.DB), }, } diff --git a/mod/storage/pkg/interfaces/mocks/db.mock.go b/mod/storage/pkg/interfaces/mocks/db.mock.go index e076d6ed35..97c0431b20 100644 --- a/mod/storage/pkg/interfaces/mocks/db.mock.go +++ b/mod/storage/pkg/interfaces/mocks/db.mock.go @@ -4,21 +4,21 @@ package mocks import mock "github.com/stretchr/testify/mock" -// Db is an autogenerated mock type for the DB type -type Db struct { +// DB is an autogenerated mock type for the DB type +type DB struct { mock.Mock } -type Db_Expecter struct { +type DB_Expecter struct { mock *mock.Mock } -func (_m *Db) EXPECT() *Db_Expecter { - return &Db_Expecter{mock: &_m.Mock} +func (_m *DB) EXPECT() *DB_Expecter { + return &DB_Expecter{mock: &_m.Mock} } // Delete provides a mock function with given fields: key -func (_m *Db) Delete(key []byte) error { +func (_m *DB) Delete(key []byte) error { ret := _m.Called(key) if len(ret) == 0 { @@ -35,36 +35,36 @@ func (_m *Db) Delete(key []byte) error { return r0 } -// Db_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type Db_Delete_Call struct { +// DB_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type DB_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - key []byte -func (_e *Db_Expecter) Delete(key interface{}) *Db_Delete_Call { - return &Db_Delete_Call{Call: _e.mock.On("Delete", key)} +func (_e *DB_Expecter) Delete(key interface{}) *DB_Delete_Call { + return &DB_Delete_Call{Call: _e.mock.On("Delete", key)} } -func (_c *Db_Delete_Call) Run(run func(key []byte)) *Db_Delete_Call { +func (_c *DB_Delete_Call) Run(run func(key []byte)) *DB_Delete_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte)) }) return _c } -func (_c *Db_Delete_Call) Return(_a0 error) *Db_Delete_Call { +func (_c *DB_Delete_Call) Return(_a0 error) *DB_Delete_Call { _c.Call.Return(_a0) return _c } -func (_c *Db_Delete_Call) RunAndReturn(run func([]byte) error) *Db_Delete_Call { +func (_c *DB_Delete_Call) RunAndReturn(run func([]byte) error) *DB_Delete_Call { _c.Call.Return(run) return _c } // Get provides a mock function with given fields: key -func (_m *Db) Get(key []byte) ([]byte, error) { +func (_m *DB) Get(key []byte) ([]byte, error) { ret := _m.Called(key) if len(ret) == 0 { @@ -93,36 +93,36 @@ func (_m *Db) Get(key []byte) ([]byte, error) { return r0, r1 } -// Db_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type Db_Get_Call struct { +// DB_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type DB_Get_Call struct { *mock.Call } // Get is a helper method to define mock.On call // - key []byte -func (_e *Db_Expecter) Get(key interface{}) *Db_Get_Call { - return &Db_Get_Call{Call: _e.mock.On("Get", key)} +func (_e *DB_Expecter) Get(key interface{}) *DB_Get_Call { + return &DB_Get_Call{Call: _e.mock.On("Get", key)} } -func (_c *Db_Get_Call) Run(run func(key []byte)) *Db_Get_Call { +func (_c *DB_Get_Call) Run(run func(key []byte)) *DB_Get_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte)) }) return _c } -func (_c *Db_Get_Call) Return(_a0 []byte, _a1 error) *Db_Get_Call { +func (_c *DB_Get_Call) Return(_a0 []byte, _a1 error) *DB_Get_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *Db_Get_Call) RunAndReturn(run func([]byte) ([]byte, error)) *Db_Get_Call { +func (_c *DB_Get_Call) RunAndReturn(run func([]byte) ([]byte, error)) *DB_Get_Call { _c.Call.Return(run) return _c } // Has provides a mock function with given fields: key -func (_m *Db) Has(key []byte) (bool, error) { +func (_m *DB) Has(key []byte) (bool, error) { ret := _m.Called(key) if len(ret) == 0 { @@ -149,36 +149,36 @@ func (_m *Db) Has(key []byte) (bool, error) { return r0, r1 } -// Db_Has_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Has' -type Db_Has_Call struct { +// DB_Has_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Has' +type DB_Has_Call struct { *mock.Call } // Has is a helper method to define mock.On call // - key []byte -func (_e *Db_Expecter) Has(key interface{}) *Db_Has_Call { - return &Db_Has_Call{Call: _e.mock.On("Has", key)} +func (_e *DB_Expecter) Has(key interface{}) *DB_Has_Call { + return &DB_Has_Call{Call: _e.mock.On("Has", key)} } -func (_c *Db_Has_Call) Run(run func(key []byte)) *Db_Has_Call { +func (_c *DB_Has_Call) Run(run func(key []byte)) *DB_Has_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte)) }) return _c } -func (_c *Db_Has_Call) Return(_a0 bool, _a1 error) *Db_Has_Call { +func (_c *DB_Has_Call) Return(_a0 bool, _a1 error) *DB_Has_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *Db_Has_Call) RunAndReturn(run func([]byte) (bool, error)) *Db_Has_Call { +func (_c *DB_Has_Call) RunAndReturn(run func([]byte) (bool, error)) *DB_Has_Call { _c.Call.Return(run) return _c } // Set provides a mock function with given fields: key, value -func (_m *Db) Set(key []byte, value []byte) error { +func (_m *DB) Set(key []byte, value []byte) error { ret := _m.Called(key, value) if len(ret) == 0 { @@ -195,42 +195,42 @@ func (_m *Db) Set(key []byte, value []byte) error { return r0 } -// Db_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' -type Db_Set_Call struct { +// DB_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' +type DB_Set_Call struct { *mock.Call } // Set is a helper method to define mock.On call // - key []byte // - value []byte -func (_e *Db_Expecter) Set(key interface{}, value interface{}) *Db_Set_Call { - return &Db_Set_Call{Call: _e.mock.On("Set", key, value)} +func (_e *DB_Expecter) Set(key interface{}, value interface{}) *DB_Set_Call { + return &DB_Set_Call{Call: _e.mock.On("Set", key, value)} } -func (_c *Db_Set_Call) Run(run func(key []byte, value []byte)) *Db_Set_Call { +func (_c *DB_Set_Call) Run(run func(key []byte, value []byte)) *DB_Set_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].([]byte), args[1].([]byte)) }) return _c } -func (_c *Db_Set_Call) Return(_a0 error) *Db_Set_Call { +func (_c *DB_Set_Call) Return(_a0 error) *DB_Set_Call { _c.Call.Return(_a0) return _c } -func (_c *Db_Set_Call) RunAndReturn(run func([]byte, []byte) error) *Db_Set_Call { +func (_c *DB_Set_Call) RunAndReturn(run func([]byte, []byte) error) *DB_Set_Call { _c.Call.Return(run) return _c } -// NewDb creates a new instance of Db. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// NewDB creates a new instance of DB. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. -func NewDb(t interface { +func NewDB(t interface { mock.TestingT Cleanup(func()) -}) *Db { - mock := &Db{} +}) *DB { + mock := &DB{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) From 9818c7e0830cd3685d1a8640bcb7feb8bb9bca9f Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Wed, 30 Oct 2024 13:49:34 +0530 Subject: [PATCH 10/24] tests with only mock for execution engine Signed-off-by: nidhi-singh02 --- .mockery.yaml | 5 ++ mod/state-transition/pkg/core/helpers_test.go | 43 ++++++++-- .../pkg/core/mocks/execution_engine.mock.go | 86 +++++++++++++++++++ .../pkg/core/state_processor_genesis_test.go | 11 ++- mod/state-transition/pkg/core/types.go | 9 +- 5 files changed, 138 insertions(+), 16 deletions(-) create mode 100644 mod/state-transition/pkg/core/mocks/execution_engine.mock.go diff --git a/.mockery.yaml b/.mockery.yaml index 6062236306..d1b168a550 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -68,3 +68,8 @@ packages: recursive: False with-expecter: true all: True + github.com/berachain/beacon-kit/mod/state-transition/pkg/core: + config: + recursive: False + with-expecter: true + include-regex: ExecutionEngine \ No newline at end of file diff --git a/mod/state-transition/pkg/core/helpers_test.go b/mod/state-transition/pkg/core/helpers_test.go index 1631830784..b982800a67 100644 --- a/mod/state-transition/pkg/core/helpers_test.go +++ b/mod/state-transition/pkg/core/helpers_test.go @@ -23,6 +23,7 @@ package core_test import ( "context" "fmt" + "testing" corestore "cosmossdk.io/core/store" "cosmossdk.io/log" @@ -32,24 +33,48 @@ import ( "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" "github.com/berachain/beacon-kit/mod/node-core/pkg/components" + "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" "github.com/berachain/beacon-kit/mod/storage/pkg/db" "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" ) -// TODO: replace with proper mock -type testExecutionEngine struct{} - -func (tee *testExecutionEngine) VerifyAndNotifyNewPayload( - _ context.Context, - _ *engineprimitives.NewPayloadRequest[ +func TestExecutionEngine_VerifyAndNotifyNewPayload(t *testing.T) { + mockEngine := mocks.NewExecutionEngine[ *types.ExecutionPayload, + *types.ExecutionPayloadHeader, engineprimitives.Withdrawals, - ], -) error { - return nil + ](t) + + t.Run("successful verification with complete payload", func(t *testing.T) { + req := &engineprimitives.NewPayloadRequest[ + *types.ExecutionPayload, + engineprimitives.Withdrawals, + ]{ + ExecutionPayload: &types.ExecutionPayload{}, + VersionedHashes: []common.ExecutionHash{ + {0x1}, + {0x2}, + }, + ParentBeaconBlockRoot: &common.Root{0x3}, + Optimistic: false, + } + + // Set up expectation for successful verification + mockEngine.EXPECT(). + VerifyAndNotifyNewPayload( + context.Background(), + req, + ). + Return(nil) + + err := mockEngine.VerifyAndNotifyNewPayload(context.Background(), req) + require.NoError(t, err) + }) } type testKVStoreService struct { diff --git a/mod/state-transition/pkg/core/mocks/execution_engine.mock.go b/mod/state-transition/pkg/core/mocks/execution_engine.mock.go new file mode 100644 index 0000000000..18e35998eb --- /dev/null +++ b/mod/state-transition/pkg/core/mocks/execution_engine.mock.go @@ -0,0 +1,86 @@ +// Code generated by mockery v2.46.3. DO NOT EDIT. + +package mocks + +import ( + context "context" + + engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + core "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + + mock "github.com/stretchr/testify/mock" +) + +// ExecutionEngine is an autogenerated mock type for the ExecutionEngine type +type ExecutionEngine[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.Withdrawals] struct { + mock.Mock +} + +type ExecutionEngine_Expecter[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.Withdrawals] struct { + mock *mock.Mock +} + +func (_m *ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) EXPECT() *ExecutionEngine_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionEngine_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{mock: &_m.Mock} +} + +// VerifyAndNotifyNewPayload provides a mock function with given fields: ctx, req +func (_m *ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) VerifyAndNotifyNewPayload(ctx context.Context, req *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT]) error { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for VerifyAndNotifyNewPayload") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT]) error); ok { + r0 = rf(ctx, req) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ExecutionEngine_VerifyAndNotifyNewPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyAndNotifyNewPayload' +type ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.Withdrawals] struct { + *mock.Call +} + +// VerifyAndNotifyNewPayload is a helper method to define mock.On call +// - ctx context.Context +// - req *engineprimitives.NewPayloadRequest[ExecutionPayloadT,WithdrawalsT] +func (_e *ExecutionEngine_Expecter[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) VerifyAndNotifyNewPayload(ctx interface{}, req interface{}) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + return &ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{Call: _e.mock.On("VerifyAndNotifyNewPayload", ctx, req)} +} + +func (_c *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Run(run func(ctx context.Context, req *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT])) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT])) + }) + return _c +} + +func (_c *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) Return(_a0 error) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]) RunAndReturn(run func(context.Context, *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT]) error) *ExecutionEngine_VerifyAndNotifyNewPayload_Call[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + _c.Call.Return(run) + return _c +} + +// NewExecutionEngine creates a new instance of ExecutionEngine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewExecutionEngine[ExecutionPayloadT core.ExecutionPayload[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, WithdrawalsT core.Withdrawals](t interface { + mock.TestingT + Cleanup(func()) +}) *ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT] { + mock := &ExecutionEngine[ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT]{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index a37cca2a1e..20996901ea 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -28,11 +28,12 @@ import ( engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" "github.com/berachain/beacon-kit/mod/primitives/pkg/common" "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" + cryptomocks "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" "github.com/berachain/beacon-kit/mod/primitives/pkg/math" "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" "github.com/berachain/beacon-kit/mod/primitives/pkg/version" "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" "github.com/stretchr/testify/mock" @@ -79,8 +80,12 @@ type ( func TestInitialize(t *testing.T) { // Create state processor to test cs := spec.TestnetChainSpec() - execEngine := &testExecutionEngine{} - mocksSigner := &mocks.BLSSigner{} + execEngine := mocks.NewExecutionEngine[ + *types.ExecutionPayload, + *types.ExecutionPayloadHeader, + engineprimitives.Withdrawals, + ](t) + mocksSigner := &cryptomocks.BLSSigner{} sp := core.NewStateProcessor[ *types.BeaconBlock, diff --git a/mod/state-transition/pkg/core/types.go b/mod/state-transition/pkg/core/types.go index 5a359344d3..ab05bd3c0c 100644 --- a/mod/state-transition/pkg/core/types.go +++ b/mod/state-transition/pkg/core/types.go @@ -172,16 +172,17 @@ type ExecutionPayload[ type ExecutionPayloadHeader interface { GetBlockHash() common.ExecutionHash } +type Withdrawals interface { + Len() int + EncodeIndex(int, *stdbytes.Buffer) +} // ExecutionEngine is the interface for the execution engine. type ExecutionEngine[ ExecutionPayloadT ExecutionPayload[ ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], ExecutionPayloadHeaderT any, - WithdrawalsT interface { - Len() int - EncodeIndex(int, *stdbytes.Buffer) - }, + WithdrawalsT Withdrawals, ] interface { // VerifyAndNotifyNewPayload verifies the new payload and notifies the // execution client. From 160cc8865cc7be4202713db2ccaafa819137ec36 Mon Sep 17 00:00:00 2001 From: nidhi-singh02 Date: Wed, 30 Oct 2024 14:16:11 +0530 Subject: [PATCH 11/24] removed test for VerifyAndNotifyNewPayload Signed-off-by: nidhi-singh02 --- .mockery.yaml | 2 +- mod/state-transition/pkg/core/helpers_test.go | 39 ------------------- mod/state-transition/pkg/core/types.go | 2 + 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/.mockery.yaml b/.mockery.yaml index d1b168a550..e4efc43af5 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -72,4 +72,4 @@ packages: config: recursive: False with-expecter: true - include-regex: ExecutionEngine \ No newline at end of file + include-regex: ExecutionEngine diff --git a/mod/state-transition/pkg/core/helpers_test.go b/mod/state-transition/pkg/core/helpers_test.go index b982800a67..ceba3b6432 100644 --- a/mod/state-transition/pkg/core/helpers_test.go +++ b/mod/state-transition/pkg/core/helpers_test.go @@ -23,7 +23,6 @@ package core_test import ( "context" "fmt" - "testing" corestore "cosmossdk.io/core/store" "cosmossdk.io/log" @@ -31,52 +30,14 @@ import ( "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" "github.com/berachain/beacon-kit/mod/storage/pkg/db" "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" ) -func TestExecutionEngine_VerifyAndNotifyNewPayload(t *testing.T) { - mockEngine := mocks.NewExecutionEngine[ - *types.ExecutionPayload, - *types.ExecutionPayloadHeader, - engineprimitives.Withdrawals, - ](t) - - t.Run("successful verification with complete payload", func(t *testing.T) { - req := &engineprimitives.NewPayloadRequest[ - *types.ExecutionPayload, - engineprimitives.Withdrawals, - ]{ - ExecutionPayload: &types.ExecutionPayload{}, - VersionedHashes: []common.ExecutionHash{ - {0x1}, - {0x2}, - }, - ParentBeaconBlockRoot: &common.Root{0x3}, - Optimistic: false, - } - - // Set up expectation for successful verification - mockEngine.EXPECT(). - VerifyAndNotifyNewPayload( - context.Background(), - req, - ). - Return(nil) - - err := mockEngine.VerifyAndNotifyNewPayload(context.Background(), req) - require.NoError(t, err) - }) -} - type testKVStoreService struct { ctx sdk.Context } diff --git a/mod/state-transition/pkg/core/types.go b/mod/state-transition/pkg/core/types.go index ab05bd3c0c..26ef877923 100644 --- a/mod/state-transition/pkg/core/types.go +++ b/mod/state-transition/pkg/core/types.go @@ -172,6 +172,8 @@ type ExecutionPayload[ type ExecutionPayloadHeader interface { GetBlockHash() common.ExecutionHash } + +// Withdrawals defines the interface for managing withdrawal operations. type Withdrawals interface { Len() int EncodeIndex(int, *stdbytes.Buffer) From 4a9fe1c8453740555f9b52d310c28f23ac282eb4 Mon Sep 17 00:00:00 2001 From: aBear Date: Thu, 31 Oct 2024 12:36:49 +0100 Subject: [PATCH 12/24] nit --- mod/state-transition/pkg/core/helpers_test.go | 39 +++++++++++++++++++ .../pkg/core/state_processor_genesis_test.go | 39 ------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/mod/state-transition/pkg/core/helpers_test.go b/mod/state-transition/pkg/core/helpers_test.go index ceba3b6432..25b71c2035 100644 --- a/mod/state-transition/pkg/core/helpers_test.go +++ b/mod/state-transition/pkg/core/helpers_test.go @@ -30,7 +30,9 @@ import ( "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" + engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" "github.com/berachain/beacon-kit/mod/node-core/pkg/components" + statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" "github.com/berachain/beacon-kit/mod/storage/pkg/db" "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" @@ -38,6 +40,43 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) +type ( + TestBeaconStateMarshallableT = types.BeaconState[ + *types.BeaconBlockHeader, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.Validator, + types.BeaconBlockHeader, + types.Eth1Data, + types.ExecutionPayloadHeader, + types.Fork, + types.Validator, + ] + + TestKVStoreT = beacondb.KVStore[ + *types.BeaconBlockHeader, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.Validator, + types.Validators, + ] + + TestBeaconStateT = statedb.StateDB[ + *types.BeaconBlockHeader, + *TestBeaconStateMarshallableT, + *types.Eth1Data, + *types.ExecutionPayloadHeader, + *types.Fork, + *TestKVStoreT, + *types.Validator, + types.Validators, + *engineprimitives.Withdrawal, + types.WithdrawalCredentials, + ] +) + type testKVStoreService struct { ctx sdk.Context } diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index 20996901ea..9177f7d300 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -34,49 +34,10 @@ import ( "github.com/berachain/beacon-kit/mod/primitives/pkg/version" "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" - statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" - "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) -type ( - TestBeaconStateMarshallableT = types.BeaconState[ - *types.BeaconBlockHeader, - *types.Eth1Data, - *types.ExecutionPayloadHeader, - *types.Fork, - *types.Validator, - types.BeaconBlockHeader, - types.Eth1Data, - types.ExecutionPayloadHeader, - types.Fork, - types.Validator, - ] - - TestKVStoreT = beacondb.KVStore[ - *types.BeaconBlockHeader, - *types.Eth1Data, - *types.ExecutionPayloadHeader, - *types.Fork, - *types.Validator, - types.Validators, - ] - - TestBeaconStateT = statedb.StateDB[ - *types.BeaconBlockHeader, - *TestBeaconStateMarshallableT, - *types.Eth1Data, - *types.ExecutionPayloadHeader, - *types.Fork, - *TestKVStoreT, - *types.Validator, - types.Validators, - *engineprimitives.Withdrawal, - types.WithdrawalCredentials, - ] -) - func TestInitialize(t *testing.T) { // Create state processor to test cs := spec.TestnetChainSpec() From e048be4dce1b0caa6dbc559e4ad4f134369b2730 Mon Sep 17 00:00:00 2001 From: aBear Date: Thu, 31 Oct 2024 13:49:56 +0100 Subject: [PATCH 13/24] improved unit tests asserts --- .../pkg/core/state_processor_genesis_test.go | 76 ++++++++++++++----- 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index 9177f7d300..d528c849fd 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -23,6 +23,7 @@ package core_test import ( "testing" + "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" "github.com/berachain/beacon-kit/mod/config/pkg/spec" "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" @@ -94,9 +95,23 @@ func TestInitialize(t *testing.T) { Amount: math.Gwei(cs.EffectiveBalanceIncrement()), Index: uint64(2), }, + { + Pubkey: [48]byte{0x04}, + Amount: math.Gwei(2 * cs.MaxEffectiveBalance()), + Index: uint64(3), + }, + { + Pubkey: [48]byte{0x05}, + Amount: math.Gwei(cs.EffectiveBalanceIncrement() * 2 / 3), + Index: uint64(4), + }, } executionPayloadHeader = new(types.ExecutionPayloadHeader).Empty() - genesisVersion = version.FromUint32[common.Version](version.Deneb) + fork = &types.Fork{ + PreviousVersion: version.FromUint32[common.Version](version.Deneb), + CurrentVersion: version.FromUint32[common.Version](version.Deneb), + Epoch: math.Epoch(constants.GenesisEpoch), + } ) // define mocks expectations @@ -110,7 +125,7 @@ func TestInitialize(t *testing.T) { beaconState, deposits, executionPayloadHeader, - genesisVersion, + fork.CurrentVersion, ) // check outputs @@ -124,24 +139,49 @@ func TestInitialize(t *testing.T) { resFork, err := beaconState.GetFork() require.NoError(t, err) - require.Equal(t, - &types.Fork{ - PreviousVersion: genesisVersion, - CurrentVersion: genesisVersion, - Epoch: math.Epoch(constants.GenesisEpoch), - }, - resFork) + require.Equal(t, fork, resFork) for _, dep := range deposits { - var idx math.U64 - idx, err = beaconState.ValidatorIndexByPubkey(dep.Pubkey) - require.NoError(t, err) - require.Equal(t, math.U64(dep.Index), idx) - - var val *types.Validator - val, err = beaconState.ValidatorByIndex(idx) - require.NoError(t, err) - require.Equal(t, dep.Pubkey, val.Pubkey) + checkValidator(t, cs, beaconState, dep) + } +} + +func checkValidator( + t *testing.T, + cs chain.Spec[ + common.DomainType, + math.Epoch, + common.ExecutionAddress, + math.Slot, + any, + ], + bs *TestBeaconStateT, + dep *types.Deposit, +) { + t.Helper() + + idx, err := bs.ValidatorIndexByPubkey(dep.Pubkey) + require.NoError(t, err) + require.Equal(t, math.U64(dep.Index), idx) + + var val *types.Validator + val, err = bs.ValidatorByIndex(idx) + require.NoError(t, err) + require.Equal(t, dep.Pubkey, val.Pubkey) + + var ( + maxBalance = math.Gwei(cs.MaxEffectiveBalance()) + minBalance = math.Gwei(cs.EffectiveBalanceIncrement()) + ) + switch { + case dep.Amount >= maxBalance: + require.Equal(t, maxBalance, val.EffectiveBalance) + case dep.Amount >= minBalance && dep.Amount < maxBalance: require.Equal(t, dep.Amount, val.EffectiveBalance) + + // validator balance must be multiple of EffectiveBalanceIncrement + require.True(t, val.EffectiveBalance%minBalance == 0) + case dep.Amount < minBalance: + require.Equal(t, math.Gwei(0), val.EffectiveBalance) } } From 8bf34dbf6093bbde3a5b9ab82888f51b63557df8 Mon Sep 17 00:00:00 2001 From: aBear Date: Thu, 31 Oct 2024 14:57:30 +0100 Subject: [PATCH 14/24] appease linter --- .../pkg/core/state_processor_genesis_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index d528c849fd..8bc42db628 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -164,8 +164,7 @@ func checkValidator( require.NoError(t, err) require.Equal(t, math.U64(dep.Index), idx) - var val *types.Validator - val, err = bs.ValidatorByIndex(idx) + val, err := bs.ValidatorByIndex(idx) require.NoError(t, err) require.Equal(t, dep.Pubkey, val.Pubkey) @@ -180,7 +179,7 @@ func checkValidator( require.Equal(t, dep.Amount, val.EffectiveBalance) // validator balance must be multiple of EffectiveBalanceIncrement - require.True(t, val.EffectiveBalance%minBalance == 0) + require.Equal(t, math.U64(0), val.EffectiveBalance%minBalance) case dep.Amount < minBalance: require.Equal(t, math.Gwei(0), val.EffectiveBalance) } From d90a95a7fffafdd8bfe28bac7a2acc8e3ee3c48c Mon Sep 17 00:00:00 2001 From: Alberto Benegiamo Date: Thu, 31 Oct 2024 15:48:23 +0100 Subject: [PATCH 15/24] fix(state-transition): fix deposit index upon genesis processing (#2116) --- .../pkg/core/state_processor.go | 4 +++ .../pkg/core/state_processor_genesis.go | 34 ++++++++++++------- .../pkg/core/state_processor_genesis_test.go | 5 +++ .../pkg/core/state_processor_staking.go | 19 +++++++---- 4 files changed, 43 insertions(+), 19 deletions(-) diff --git a/mod/state-transition/pkg/core/state_processor.go b/mod/state-transition/pkg/core/state_processor.go index 439cf3895f..df473e6ebc 100644 --- a/mod/state-transition/pkg/core/state_processor.go +++ b/mod/state-transition/pkg/core/state_processor.go @@ -85,6 +85,10 @@ type StateProcessor[ executionEngine ExecutionEngine[ ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, ] + + // processingGenesis allows initializing correctly + // eth1 deposit index upon genesis + processingGenesis bool } // NewStateProcessor creates a new state processor. diff --git a/mod/state-transition/pkg/core/state_processor_genesis.go b/mod/state-transition/pkg/core/state_processor_genesis.go index a142950598..9e7502b0df 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis.go +++ b/mod/state-transition/pkg/core/state_processor_genesis.go @@ -47,6 +47,11 @@ func (sp *StateProcessor[ executionPayloadHeader ExecutionPayloadHeaderT, genesisVersion common.Version, ) (transition.ValidatorUpdates, error) { + sp.processingGenesis = true + defer func() { + sp.processingGenesis = false + }() + var ( blkHeader BeaconBlockHeaderT blkBody BeaconBlockBodyT @@ -67,25 +72,28 @@ func (sp *StateProcessor[ return nil, err } - if err := st.SetEth1DepositIndex(0); err != nil { - return nil, err - } + // Eth1DepositIndex will be set in processDeposit - if err := st.SetEth1Data(eth1Data.New( - common.Root{}, - 0, - executionPayloadHeader.GetBlockHash(), - )); err != nil { + if err := st.SetEth1Data( + eth1Data.New( + common.Root{}, + 0, + executionPayloadHeader.GetBlockHash(), + )); err != nil { return nil, err } // TODO: we need to handle common.Version vs // uint32 better. - bodyRoot := blkBody.Empty( - version.ToUint32(genesisVersion)).HashTreeRoot() - if err := st.SetLatestBlockHeader(blkHeader.New( - 0, 0, common.Root{}, common.Root{}, bodyRoot, - )); err != nil { + bodyRoot := blkBody.Empty(version.ToUint32(genesisVersion)).HashTreeRoot() + if err := st.SetLatestBlockHeader( + blkHeader.New( + 0, // slot + 0, // proposer index + common.Root{}, // parent block root + common.Root{}, // state root + bodyRoot, + )); err != nil { return nil, err } diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index 8bc42db628..f784add974 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -183,4 +183,9 @@ func checkValidator( case dep.Amount < minBalance: require.Equal(t, math.Gwei(0), val.EffectiveBalance) } + + // check that validator index is duly set + latestValIdx, err := beaconState.GetEth1DepositIndex() + require.NoError(t, err) + require.Equal(t, uint64(len(deposits)-1), latestValIdx) } diff --git a/mod/state-transition/pkg/core/state_processor_staking.go b/mod/state-transition/pkg/core/state_processor_staking.go index fc336908da..a798b1fcfc 100644 --- a/mod/state-transition/pkg/core/state_processor_staking.go +++ b/mod/state-transition/pkg/core/state_processor_staking.go @@ -21,6 +21,8 @@ package core import ( + "fmt" + "github.com/berachain/beacon-kit/mod/errors" "github.com/berachain/beacon-kit/mod/primitives/pkg/common" "github.com/berachain/beacon-kit/mod/primitives/pkg/math" @@ -83,14 +85,19 @@ func (sp *StateProcessor[ st BeaconStateT, dep DepositT, ) error { - depositIndex, err := st.GetEth1DepositIndex() - if err != nil { - return err + var nextDepositIndex uint64 + switch depositIndex, err := st.GetEth1DepositIndex(); { + case err == nil: + nextDepositIndex = depositIndex + 1 + case sp.processingGenesis && err != nil: + // Eth1DepositIndex may have not been set yet + nextDepositIndex = 0 + default: + // Failed retrieving Eth1DepositIndex outside genesis is an error + return fmt.Errorf("failed retrieving eth1 deposit index: %w", err) } - if err = st.SetEth1DepositIndex( - depositIndex + 1, - ); err != nil { + if err := st.SetEth1DepositIndex(nextDepositIndex); err != nil { return err } From e17d29c20402fb9ec127517ba5182b45b65530a9 Mon Sep 17 00:00:00 2001 From: aBear Date: Thu, 31 Oct 2024 17:47:36 +0100 Subject: [PATCH 16/24] fixed bad merge --- .../pkg/core/state_processor_genesis_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index f784add974..1c4994747c 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -144,6 +144,11 @@ func TestInitialize(t *testing.T) { for _, dep := range deposits { checkValidator(t, cs, beaconState, dep) } + + // check that validator index is duly set + latestValIdx, err := beaconState.GetEth1DepositIndex() + require.NoError(t, err) + require.Equal(t, uint64(len(deposits)-1), latestValIdx) } func checkValidator( @@ -183,9 +188,4 @@ func checkValidator( case dep.Amount < minBalance: require.Equal(t, math.Gwei(0), val.EffectiveBalance) } - - // check that validator index is duly set - latestValIdx, err := beaconState.GetEth1DepositIndex() - require.NoError(t, err) - require.Equal(t, uint64(len(deposits)-1), latestValIdx) } From 92d494f4d845251681124028224e369b198078fa Mon Sep 17 00:00:00 2001 From: aBear Date: Fri, 1 Nov 2024 10:09:43 +0100 Subject: [PATCH 17/24] added UTs to show no withdrawals are made when unnecessary --- .../pkg/core/state_processor_staking_test.go | 183 ++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 mod/state-transition/pkg/core/state_processor_staking_test.go diff --git a/mod/state-transition/pkg/core/state_processor_staking_test.go b/mod/state-transition/pkg/core/state_processor_staking_test.go new file mode 100644 index 0000000000..2d20b9f947 --- /dev/null +++ b/mod/state-transition/pkg/core/state_processor_staking_test.go @@ -0,0 +1,183 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2024, Berachain Foundation. All rights reserved. +// Use of this software is governed by the Business Source License included +// in the LICENSE file of this repository and at www.mariadb.com/bsl11. +// +// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY +// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER +// VERSIONS OF THE LICENSED WORK. +// +// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF +// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF +// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). +// +// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON +// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND +// TITLE. + +package core_test + +import ( + "testing" + + "github.com/berachain/beacon-kit/mod/config/pkg/spec" + "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" + engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + cryptomocks "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" + "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" +) + +func TestTransitionUpdateValidators(t *testing.T) { + // Create state processor to test + cs := spec.BetnetChainSpec() + execEngine := mocks.NewExecutionEngine[ + *types.ExecutionPayload, + *types.ExecutionPayloadHeader, + engineprimitives.Withdrawals, + ](t) + mocksSigner := &cryptomocks.BLSSigner{} + + sp := core.NewStateProcessor[ + *types.BeaconBlock, + *types.BeaconBlockBody, + *types.BeaconBlockHeader, + *TestBeaconStateT, + *transition.Context, + *types.Deposit, + *types.Eth1Data, + *types.ExecutionPayload, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.ForkData, + *TestKVStoreT, + *types.Validator, + types.Validators, + *engineprimitives.Withdrawal, + engineprimitives.Withdrawals, + types.WithdrawalCredentials, + ]( + cs, + execEngine, + mocksSigner, + ) + + kvStore, err := initTestStore() + require.NoError(t, err) + beaconState := new(TestBeaconStateT).NewFromDB(kvStore, cs) + + var ( + maxBalance = math.Gwei(cs.MaxEffectiveBalance()) + minBalance = math.Gwei(cs.EffectiveBalanceIncrement()) + emptyAddress = common.ExecutionAddress{} + emptyCredentials = types.NewCredentialsFromExecutionAddress( + emptyAddress, + ) + ) + + // Setup initial state via genesis + // TODO: consider instead setting state artificially + var ( + genDeposits = []*types.Deposit{ + { + Pubkey: [48]byte{0x01}, + Credentials: emptyCredentials, + Amount: maxBalance - 3*minBalance, + Index: uint64(0), + }, + { + Pubkey: [48]byte{0x02}, + Credentials: emptyCredentials, + Amount: maxBalance - 6*minBalance, + Index: uint64(1), + }, + } + genPayloadHeader = new(types.ExecutionPayloadHeader).Empty() + genVersion = version.FromUint32[common.Version](version.Deneb) + ) + + mocksSigner.On( + "VerifySignature", + mock.Anything, mock.Anything, mock.Anything, + ).Return(nil) + + _, err = sp.InitializePreminedBeaconStateFromEth1( + beaconState, + genDeposits, + genPayloadHeader, + genVersion, + ) + require.NoError(t, err) + + // create test inputs + var ( + ctx = &transition.Context{ + SkipPayloadVerification: true, + SkipValidateResult: true, + } + blkDeposits = []*types.Deposit{ + { + Pubkey: genDeposits[0].Pubkey, + Credentials: emptyCredentials, + Amount: minBalance, // avoid breaching maxBalance + Index: genDeposits[0].Index, + }, + } + ) + + // here we duly update state root, similarly to what we do in processSlot + genBlockHeader, err := beaconState.GetLatestBlockHeader() + require.NoError(t, err) + genStateRoot := beaconState.HashTreeRoot() + genBlockHeader.SetStateRoot(genStateRoot) + + blk := &types.BeaconBlock{ + Slot: genBlockHeader.GetSlot() + 1, + ProposerIndex: genBlockHeader.GetProposerIndex(), + ParentRoot: genBlockHeader.HashTreeRoot(), + StateRoot: common.Root{}, + Body: &types.BeaconBlockBody{ + ExecutionPayload: &types.ExecutionPayload{ + Timestamp: 10, + ExtraData: []byte("testing"), + Transactions: [][]byte{}, + Withdrawals: []*engineprimitives.Withdrawal{}, // no withdrawals + BaseFeePerGas: math.NewU256(0), + }, + Eth1Data: &types.Eth1Data{}, + Deposits: blkDeposits, + }, + } + + // run the test + vals, err := sp.Transition(ctx, beaconState, blk) + + // check outputs + require.NoError(t, err) + require.Zero(t, vals) // just update, no new validators + + // check validator is duly updated + expectedValBalance := genDeposits[0].Amount + blkDeposits[0].Amount + idx, err := beaconState.ValidatorIndexByPubkey(genDeposits[0].Pubkey) + require.NoError(t, err) + require.Equal(t, math.U64(genDeposits[0].Index), idx) + + val, err := beaconState.ValidatorByIndex(idx) + require.NoError(t, err) + require.Equal(t, genDeposits[0].Pubkey, val.Pubkey) + require.Equal(t, expectedValBalance, val.EffectiveBalance) + + // check that validator index is duly set (1-indexed here, to be fixed) + latestValIdx, err := beaconState.GetEth1DepositIndex() + require.NoError(t, err) + require.Equal(t, uint64(len(genDeposits)), latestValIdx) +} From 97fba5c10bc789a42659adb1048e509a00f2c862 Mon Sep 17 00:00:00 2001 From: aBear Date: Fri, 1 Nov 2024 14:56:26 +0100 Subject: [PATCH 18/24] fix withdrawal index update --- mod/state-transition/pkg/core/state/statedb.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mod/state-transition/pkg/core/state/statedb.go b/mod/state-transition/pkg/core/state/statedb.go index 9edb37d595..18e4988ed0 100644 --- a/mod/state-transition/pkg/core/state/statedb.go +++ b/mod/state-transition/pkg/core/state/statedb.go @@ -251,6 +251,9 @@ func (s *StateDB[ withdrawalAddress, balance, )) + + // Increment the withdrawal index to process the next withdrawal. + withdrawalIndex++ } else if validator.IsPartiallyWithdrawable( balance, math.Gwei(s.cs.MaxEffectiveBalance()), ) { @@ -260,10 +263,10 @@ func (s *StateDB[ withdrawalAddress, balance-math.Gwei(s.cs.MaxEffectiveBalance()), )) - } - // Increment the withdrawal index to process the next withdrawal. - withdrawalIndex++ + // Increment the withdrawal index to process the next withdrawal. + withdrawalIndex++ + } // Cap the number of withdrawals to the maximum allowed per payload. //#nosec:G701 // won't overflow in practice. From af8c5e0cda68b29d22de20d9a3c26dd692f5b6ab Mon Sep 17 00:00:00 2001 From: gummy Date: Fri, 1 Nov 2024 11:16:26 -0400 Subject: [PATCH 19/24] fix(build): erigon repo --- build/scripts/testing.mk | 4 ++-- kurtosis/beaconkit-all.yaml | 2 +- kurtosis/beaconkit-base-gcp.yaml | 2 +- kurtosis/src/nodes/nodes.star | 2 +- testing/e2e/config/config.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/scripts/testing.mk b/build/scripts/testing.mk index 4606bcb27e..63aa559979 100644 --- a/build/scripts/testing.mk +++ b/build/scripts/testing.mk @@ -202,7 +202,7 @@ start-erigon: ## start an ephemeral `erigon` node docker run \ --rm -v $(PWD)/${TESTAPP_FILES_DIR}:/${TESTAPP_FILES_DIR} \ -v $(PWD)/.tmp:/.tmp \ - thorax/erigon:latest init \ + erigontech/erigon:latest init \ --datadir .tmp/erigon \ ${ETH_GENESIS_PATH} @@ -212,7 +212,7 @@ start-erigon: ## start an ephemeral `erigon` node -p 8551:8551 \ --rm -v $(PWD)/${TESTAPP_FILES_DIR}:/${TESTAPP_FILES_DIR} \ -v $(PWD)/.tmp:/.tmp \ - thorax/erigon:latest \ + erigontech/erigon:latest \ --http \ --http.addr 0.0.0.0 \ --http.api eth,net \ diff --git a/kurtosis/beaconkit-all.yaml b/kurtosis/beaconkit-all.yaml index 51ec2c25b8..ca38639165 100644 --- a/kurtosis/beaconkit-all.yaml +++ b/kurtosis/beaconkit-all.yaml @@ -93,7 +93,7 @@ node_settings: max_memory: 2048 images: besu: hyperledger/besu:24.5.4 - erigon: thorax/erigon:v2.60.1 + erigon: erigontech/erigon:v2.60.1 ethereumjs: ethpandaops/ethereumjs:stable geth: ethereum/client-go:latest nethermind: nethermind/nethermind:latest diff --git a/kurtosis/beaconkit-base-gcp.yaml b/kurtosis/beaconkit-base-gcp.yaml index 8fe056d0ee..a2229d4971 100644 --- a/kurtosis/beaconkit-base-gcp.yaml +++ b/kurtosis/beaconkit-base-gcp.yaml @@ -88,7 +88,7 @@ node_settings: max_memory: 32768 images: besu: hyperledger/besu:latest - erigon: thorax/erigon:v2.60.1 + erigon: erigontech/erigon:v2.60.1 ethereumjs: ethpandaops/ethereumjs:stable geth: ethereum/client-go:latest nethermind: nethermind/nethermind:latest diff --git a/kurtosis/src/nodes/nodes.star b/kurtosis/src/nodes/nodes.star index 705f0b2339..cae4d7233c 100644 --- a/kurtosis/src/nodes/nodes.star +++ b/kurtosis/src/nodes/nodes.star @@ -33,7 +33,7 @@ EXECUTION_DEFAULT_SETTINGS = { }, "images": { "besu": "hyperledger/besu:latest", - "erigon": "thorax/erigon:v2.60.1", + "erigon": "erigontech/erigon:v2.60.1", "ethereumjs": "ethpandaops/ethereumjs:stable", "geth": "ethereum/client-go:latest", "nethermind": "nethermind/nethermind:latest", diff --git a/testing/e2e/config/config.go b/testing/e2e/config/config.go index ae93473c43..9af5cc858f 100644 --- a/testing/e2e/config/config.go +++ b/testing/e2e/config/config.go @@ -272,7 +272,7 @@ func defaultExecutionSettings() ExecutionSettings { }, Images: map[string]string{ "besu": "hyperledger/besu:24.5.4", - "erigon": "thorax/erigon:v2.60.1", + "erigon": "erigontech/erigon:v2.60.1", "ethereumjs": "ethpandaops/ethereumjs:stable", "geth": "ethereum/client-go:stable", "nethermind": "nethermind/nethermind:latest", From 023ebfdf3f1be0ce53129ed5cc88c66961c20f97 Mon Sep 17 00:00:00 2001 From: gummy Date: Fri, 1 Nov 2024 11:49:56 -0400 Subject: [PATCH 20/24] fix(build): bump erigon to recent version --- kurtosis/beaconkit-all.yaml | 2 +- kurtosis/beaconkit-base-gcp.yaml | 2 +- kurtosis/src/nodes/nodes.star | 2 +- testing/e2e/config/config.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kurtosis/beaconkit-all.yaml b/kurtosis/beaconkit-all.yaml index ca38639165..83ce38a2a4 100644 --- a/kurtosis/beaconkit-all.yaml +++ b/kurtosis/beaconkit-all.yaml @@ -93,7 +93,7 @@ node_settings: max_memory: 2048 images: besu: hyperledger/besu:24.5.4 - erigon: erigontech/erigon:v2.60.1 + erigon: erigontech/erigon:v2.60.9 ethereumjs: ethpandaops/ethereumjs:stable geth: ethereum/client-go:latest nethermind: nethermind/nethermind:latest diff --git a/kurtosis/beaconkit-base-gcp.yaml b/kurtosis/beaconkit-base-gcp.yaml index a2229d4971..5692730acd 100644 --- a/kurtosis/beaconkit-base-gcp.yaml +++ b/kurtosis/beaconkit-base-gcp.yaml @@ -88,7 +88,7 @@ node_settings: max_memory: 32768 images: besu: hyperledger/besu:latest - erigon: erigontech/erigon:v2.60.1 + erigon: erigontech/erigon:v2.60.9 ethereumjs: ethpandaops/ethereumjs:stable geth: ethereum/client-go:latest nethermind: nethermind/nethermind:latest diff --git a/kurtosis/src/nodes/nodes.star b/kurtosis/src/nodes/nodes.star index cae4d7233c..cd2d7a07a3 100644 --- a/kurtosis/src/nodes/nodes.star +++ b/kurtosis/src/nodes/nodes.star @@ -33,7 +33,7 @@ EXECUTION_DEFAULT_SETTINGS = { }, "images": { "besu": "hyperledger/besu:latest", - "erigon": "erigontech/erigon:v2.60.1", + "erigon": "erigontech/erigon:v2.60.9", "ethereumjs": "ethpandaops/ethereumjs:stable", "geth": "ethereum/client-go:latest", "nethermind": "nethermind/nethermind:latest", diff --git a/testing/e2e/config/config.go b/testing/e2e/config/config.go index 9af5cc858f..00b99de235 100644 --- a/testing/e2e/config/config.go +++ b/testing/e2e/config/config.go @@ -272,7 +272,7 @@ func defaultExecutionSettings() ExecutionSettings { }, Images: map[string]string{ "besu": "hyperledger/besu:24.5.4", - "erigon": "erigontech/erigon:v2.60.1", + "erigon": "erigontech/erigon:v2.60.9", "ethereumjs": "ethpandaops/ethereumjs:stable", "geth": "ethereum/client-go:stable", "nethermind": "nethermind/nethermind:latest", From d66b2983bdc6ff91ebe11dabbf74bbc00caab64f Mon Sep 17 00:00:00 2001 From: aBear Date: Fri, 1 Nov 2024 18:32:21 +0100 Subject: [PATCH 21/24] nits from code review --- mod/state-transition/pkg/core/state_processor_staking.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mod/state-transition/pkg/core/state_processor_staking.go b/mod/state-transition/pkg/core/state_processor_staking.go index a798b1fcfc..3f5b044f31 100644 --- a/mod/state-transition/pkg/core/state_processor_staking.go +++ b/mod/state-transition/pkg/core/state_processor_staking.go @@ -88,13 +88,18 @@ func (sp *StateProcessor[ var nextDepositIndex uint64 switch depositIndex, err := st.GetEth1DepositIndex(); { case err == nil: + // just increment the deposit index if no error nextDepositIndex = depositIndex + 1 case sp.processingGenesis && err != nil: - // Eth1DepositIndex may have not been set yet + // If errored and still processing genesis, + // Eth1DepositIndex may have not been set yet. nextDepositIndex = 0 default: // Failed retrieving Eth1DepositIndex outside genesis is an error - return fmt.Errorf("failed retrieving eth1 deposit index: %w", err) + return fmt.Errorf( + "failed retrieving eth1 deposit index outside of processing genesis: %w", + err, + ) } if err := st.SetEth1DepositIndex(nextDepositIndex); err != nil { From d8a267e54deac666c294dfe4d6a56781ca5930ee Mon Sep 17 00:00:00 2001 From: aBear Date: Mon, 4 Nov 2024 15:18:39 +0100 Subject: [PATCH 22/24] hacked fix for withdrawals SSZ serialization --- mod/consensus-types/pkg/types/payload.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod/consensus-types/pkg/types/payload.go b/mod/consensus-types/pkg/types/payload.go index 83cb2a3ec9..b2ba081cbc 100644 --- a/mod/consensus-types/pkg/types/payload.go +++ b/mod/consensus-types/pkg/types/payload.go @@ -128,6 +128,11 @@ func (p *ExecutionPayload) DefineSSZ(codec *ssz.Codec) { constants.MaxBytesPerTx, ) ssz.DefineSliceOfStaticObjectsContent(codec, &p.Withdrawals, 16) + + // TODO: hack to avoid failure of EL checks on withdrawals + if p.Withdrawals == nil { + p.Withdrawals = make([]*engineprimitives.Withdrawal, 0) + } } // MarshalSSZ serializes the ExecutionPayload object into a slice of bytes. From e2d5cc2eaedba7fa183531069b7da38413ea4271 Mon Sep 17 00:00:00 2001 From: aBear Date: Wed, 6 Nov 2024 12:16:01 +0100 Subject: [PATCH 23/24] fixed faulty merge --- .../pkg/core/state_processor_genesis_test.go | 170 +++++++++++++++++- 1 file changed, 168 insertions(+), 2 deletions(-) diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/mod/state-transition/pkg/core/state_processor_genesis_test.go index 1c4994747c..d590ac8552 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/mod/state-transition/pkg/core/state_processor_genesis_test.go @@ -40,6 +40,144 @@ import ( ) func TestInitialize(t *testing.T) { + // Create state processor to test + cs := spec.BetnetChainSpec() + execEngine := mocks.NewExecutionEngine[ + *types.ExecutionPayload, + *types.ExecutionPayloadHeader, + engineprimitives.Withdrawals, + ](t) + mocksSigner := &cryptomocks.BLSSigner{} + + sp := core.NewStateProcessor[ + *types.BeaconBlock, + *types.BeaconBlockBody, + *types.BeaconBlockHeader, + *TestBeaconStateT, + *transition.Context, + *types.Deposit, + *types.Eth1Data, + *types.ExecutionPayload, + *types.ExecutionPayloadHeader, + *types.Fork, + *types.ForkData, + *TestKVStoreT, + *types.Validator, + types.Validators, + *engineprimitives.Withdrawal, + engineprimitives.Withdrawals, + types.WithdrawalCredentials, + ]( + cs, + execEngine, + mocksSigner, + ) + + // create test inputs + kvStore, err := initTestStore() + require.NoError(t, err) + + var ( + beaconState = new(TestBeaconStateT).NewFromDB(kvStore, cs) + deposits = []*types.Deposit{ + { + Pubkey: [48]byte{0x01}, + Amount: math.Gwei(cs.MaxEffectiveBalance()), + Index: uint64(0), + }, + { + Pubkey: [48]byte{0x02}, + Amount: math.Gwei(cs.MaxEffectiveBalance() / 2), + Index: uint64(1), + }, + { + Pubkey: [48]byte{0x03}, + Amount: math.Gwei(cs.EffectiveBalanceIncrement()), + Index: uint64(2), + }, + { + Pubkey: [48]byte{0x04}, + Amount: math.Gwei(2 * cs.MaxEffectiveBalance()), + Index: uint64(3), + }, + { + Pubkey: [48]byte{0x05}, + Amount: math.Gwei(cs.EffectiveBalanceIncrement() * 2 / 3), + Index: uint64(4), + }, + } + executionPayloadHeader = new(types.ExecutionPayloadHeader).Empty() + fork = &types.Fork{ + PreviousVersion: version.FromUint32[common.Version](version.Deneb), + CurrentVersion: version.FromUint32[common.Version](version.Deneb), + Epoch: math.Epoch(constants.GenesisEpoch), + } + ) + + // define mocks expectations + mocksSigner.On( + "VerifySignature", + mock.Anything, mock.Anything, mock.Anything, + ).Return(nil) + + // run test + vals, err := sp.InitializePreminedBeaconStateFromEth1( + beaconState, + deposits, + executionPayloadHeader, + fork.CurrentVersion, + ) + + // check outputs + require.NoError(t, err) + require.Len(t, vals, len(deposits)) + + // check beacon state changes + resSlot, err := beaconState.GetSlot() + require.NoError(t, err) + require.Equal(t, math.Slot(0), resSlot) + + resFork, err := beaconState.GetFork() + require.NoError(t, err) + require.Equal(t, fork, resFork) + + for _, dep := range deposits { + checkValidatorNonBartio(t, cs, beaconState, dep) + } + + // check that validator index is duly set + latestValIdx, err := beaconState.GetEth1DepositIndex() + require.NoError(t, err) + require.Equal(t, uint64(len(deposits)-1), latestValIdx) +} + +func checkValidatorNonBartio( + t *testing.T, + cs chain.Spec[ + common.DomainType, + math.Epoch, + common.ExecutionAddress, + math.Slot, + any, + ], + bs *TestBeaconStateT, + dep *types.Deposit, +) { + t.Helper() + + // checks on validators common to all networks + commonChecksValidators(t, cs, bs, dep) + + // checks on validators for any network but Bartio + idx, err := bs.ValidatorIndexByPubkey(dep.Pubkey) + require.NoError(t, err) + + valBal, err := bs.GetBalance(idx) + require.NoError(t, err) + require.Equal(t, dep.Amount, valBal) +} + +func TestInitializeBartio(t *testing.T) { // Create state processor to test cs := spec.TestnetChainSpec() execEngine := mocks.NewExecutionEngine[ @@ -142,7 +280,7 @@ func TestInitialize(t *testing.T) { require.Equal(t, fork, resFork) for _, dep := range deposits { - checkValidator(t, cs, beaconState, dep) + checkValidatorBartio(t, cs, beaconState, dep) } // check that validator index is duly set @@ -151,7 +289,35 @@ func TestInitialize(t *testing.T) { require.Equal(t, uint64(len(deposits)-1), latestValIdx) } -func checkValidator( +func checkValidatorBartio( + t *testing.T, + cs chain.Spec[ + common.DomainType, + math.Epoch, + common.ExecutionAddress, + math.Slot, + any, + ], + bs *TestBeaconStateT, + dep *types.Deposit, +) { + t.Helper() + + // checks on validators common to all networks + commonChecksValidators(t, cs, bs, dep) + + // Bartio specific checks on validators + idx, err := bs.ValidatorIndexByPubkey(dep.Pubkey) + require.NoError(t, err) + val, err := bs.ValidatorByIndex(idx) + require.NoError(t, err) + + valBal, err := bs.GetBalance(idx) + require.NoError(t, err) + require.Equal(t, val.EffectiveBalance, valBal) +} + +func commonChecksValidators( t *testing.T, cs chain.Spec[ common.DomainType, From 6574f674bf2ae941e1488b193c60ad149a74a0f2 Mon Sep 17 00:00:00 2001 From: aBear Date: Wed, 6 Nov 2024 12:23:51 +0100 Subject: [PATCH 24/24] improved comment --- mod/consensus-types/pkg/types/payload.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod/consensus-types/pkg/types/payload.go b/mod/consensus-types/pkg/types/payload.go index c93f13538f..57e46cceff 100644 --- a/mod/consensus-types/pkg/types/payload.go +++ b/mod/consensus-types/pkg/types/payload.go @@ -129,7 +129,12 @@ func (p *ExecutionPayload) DefineSSZ(codec *ssz.Codec) { ) ssz.DefineSliceOfStaticObjectsContent(codec, &p.Withdrawals, 16) - // TODO: hack to avoid failure of EL checks on withdrawals + // Post Shangai an EL explicitly check that Withdrawals are not nil + // (instead empty slices are fine). Currently BeaconKit duly builds + // a block with Withdrawals set to empty slice (if not withdrawals are available) + // but as soon as the block is returned by CometBFT for verification, + // the SSZ decoding sets the empty slice to nil. + // This code change solves the issue. if p.Withdrawals == nil { p.Withdrawals = make([]*engineprimitives.Withdrawal, 0) }