From ae51e8541e814ed1a11744b86f6db3b063066547 Mon Sep 17 00:00:00 2001 From: itsdevbear Date: Wed, 22 Nov 2023 15:24:28 -0500 Subject: [PATCH] chore(mocks): update mockery --- cosmos/config/mocks/app_options.go | 6 +- cosmos/runtime/txpool/mocks/geth_tx_pool.go | 22 ++- cosmos/runtime/txpool/mocks/lifecycle.go | 10 +- cosmos/runtime/txpool/mocks/sdk_tx.go | 10 +- cosmos/runtime/txpool/mocks/subscription.go | 6 +- cosmos/runtime/txpool/mocks/tx_broadcaster.go | 6 +- cosmos/runtime/txpool/mocks/tx_serializer.go | 10 +- .../runtime/txpool/mocks/tx_sub_provider.go | 6 +- eth/core/state/journal/mocks/accesslist.go | 22 ++- eth/core/state/journal/mocks/log.go | 26 +++- eth/core/state/journal/mocks/refund.go | 18 ++- .../mocks/self_destruct_state_plugin.go | 10 +- .../state/journal/mocks/self_destructs.go | 22 ++- .../state/journal/mocks/transient_storage.go | 18 ++- eth/core/state/mocks/plugin.go | 58 +++++++- eth/core/state/mocks/polar_state_db.go | 130 +++++++++++++++++- eth/core/state/mocks/precompile_plugin.go | 18 ++- 17 files changed, 381 insertions(+), 17 deletions(-) diff --git a/cosmos/config/mocks/app_options.go b/cosmos/config/mocks/app_options.go index b86f949fd..2abe5fe8c 100644 --- a/cosmos/config/mocks/app_options.go +++ b/cosmos/config/mocks/app_options.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -21,6 +21,10 @@ func (_m *AppOptions) EXPECT() *AppOptions_Expecter { func (_m *AppOptions) Get(_a0 string) interface{} { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 interface{} if rf, ok := ret.Get(0).(func(string) interface{}); ok { r0 = rf(_a0) diff --git a/cosmos/runtime/txpool/mocks/geth_tx_pool.go b/cosmos/runtime/txpool/mocks/geth_tx_pool.go index 5112b1cc4..3a8b5a2e8 100644 --- a/cosmos/runtime/txpool/mocks/geth_tx_pool.go +++ b/cosmos/runtime/txpool/mocks/geth_tx_pool.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -32,6 +32,10 @@ func (_m *GethTxPool) EXPECT() *GethTxPool_Expecter { func (_m *GethTxPool) Add(_a0 []*types.Transaction, _a1 bool, _a2 bool) []error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for Add") + } + var r0 []error if rf, ok := ret.Get(0).(func([]*types.Transaction, bool, bool) []error); ok { r0 = rf(_a0, _a1, _a2) @@ -78,6 +82,10 @@ func (_c *GethTxPool_Add_Call) RunAndReturn(run func([]*types.Transaction, bool, func (_m *GethTxPool) Has(hash common.Hash) bool { ret := _m.Called(hash) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.Hash) bool); ok { r0 = rf(hash) @@ -120,6 +128,10 @@ func (_c *GethTxPool_Has_Call) RunAndReturn(run func(common.Hash) bool) *GethTxP func (_m *GethTxPool) Stats() (int, int) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Stats") + } + var r0 int var r1 int if rf, ok := ret.Get(0).(func() (int, int)); ok { @@ -171,6 +183,10 @@ func (_c *GethTxPool_Stats_Call) RunAndReturn(run func() (int, int)) *GethTxPool func (_m *GethTxPool) Status(hash common.Hash) coretxpool.TxStatus { ret := _m.Called(hash) + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 coretxpool.TxStatus if rf, ok := ret.Get(0).(func(common.Hash) coretxpool.TxStatus); ok { r0 = rf(hash) @@ -213,6 +229,10 @@ func (_c *GethTxPool_Status_Call) RunAndReturn(run func(common.Hash) coretxpool. func (_m *GethTxPool) SubscribeTransactions(ch chan<- core.NewTxsEvent, reorgs bool) event.Subscription { ret := _m.Called(ch, reorgs) + if len(ret) == 0 { + panic("no return value specified for SubscribeTransactions") + } + var r0 event.Subscription if rf, ok := ret.Get(0).(func(chan<- core.NewTxsEvent, bool) event.Subscription); ok { r0 = rf(ch, reorgs) diff --git a/cosmos/runtime/txpool/mocks/lifecycle.go b/cosmos/runtime/txpool/mocks/lifecycle.go index 2934c5ae0..7ba0a74a5 100644 --- a/cosmos/runtime/txpool/mocks/lifecycle.go +++ b/cosmos/runtime/txpool/mocks/lifecycle.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -21,6 +21,10 @@ func (_m *Lifecycle) EXPECT() *Lifecycle_Expecter { func (_m *Lifecycle) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -62,6 +66,10 @@ func (_c *Lifecycle_Start_Call) RunAndReturn(run func() error) *Lifecycle_Start_ func (_m *Lifecycle) Stop() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Stop") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() diff --git a/cosmos/runtime/txpool/mocks/sdk_tx.go b/cosmos/runtime/txpool/mocks/sdk_tx.go index 08c7226f4..d59152594 100644 --- a/cosmos/runtime/txpool/mocks/sdk_tx.go +++ b/cosmos/runtime/txpool/mocks/sdk_tx.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -26,6 +26,10 @@ func (_m *SdkTx) EXPECT() *SdkTx_Expecter { func (_m *SdkTx) GetMsgs() []proto.Message { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetMsgs") + } + var r0 []proto.Message if rf, ok := ret.Get(0).(func() []proto.Message); ok { r0 = rf() @@ -69,6 +73,10 @@ func (_c *SdkTx_GetMsgs_Call) RunAndReturn(run func() []proto.Message) *SdkTx_Ge func (_m *SdkTx) GetMsgsV2() ([]protoreflect.ProtoMessage, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetMsgsV2") + } + var r0 []protoreflect.ProtoMessage var r1 error if rf, ok := ret.Get(0).(func() ([]protoreflect.ProtoMessage, error)); ok { diff --git a/cosmos/runtime/txpool/mocks/subscription.go b/cosmos/runtime/txpool/mocks/subscription.go index 71c12a473..547f5ca85 100644 --- a/cosmos/runtime/txpool/mocks/subscription.go +++ b/cosmos/runtime/txpool/mocks/subscription.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -21,6 +21,10 @@ func (_m *Subscription) EXPECT() *Subscription_Expecter { func (_m *Subscription) Err() <-chan error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Err") + } + var r0 <-chan error if rf, ok := ret.Get(0).(func() <-chan error); ok { r0 = rf() diff --git a/cosmos/runtime/txpool/mocks/tx_broadcaster.go b/cosmos/runtime/txpool/mocks/tx_broadcaster.go index 02e339974..86769db08 100644 --- a/cosmos/runtime/txpool/mocks/tx_broadcaster.go +++ b/cosmos/runtime/txpool/mocks/tx_broadcaster.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -25,6 +25,10 @@ func (_m *TxBroadcaster) EXPECT() *TxBroadcaster_Expecter { func (_m *TxBroadcaster) BroadcastTxSync(txBytes []byte) (*types.TxResponse, error) { ret := _m.Called(txBytes) + if len(ret) == 0 { + panic("no return value specified for BroadcastTxSync") + } + var r0 *types.TxResponse var r1 error if rf, ok := ret.Get(0).(func([]byte) (*types.TxResponse, error)); ok { diff --git a/cosmos/runtime/txpool/mocks/tx_serializer.go b/cosmos/runtime/txpool/mocks/tx_serializer.go index 5da69d3fa..d36c817ab 100644 --- a/cosmos/runtime/txpool/mocks/tx_serializer.go +++ b/cosmos/runtime/txpool/mocks/tx_serializer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -26,6 +26,10 @@ func (_m *TxSerializer) EXPECT() *TxSerializer_Expecter { func (_m *TxSerializer) ToSdkTx(signedTx *types.Transaction, gasLimit uint64) (cosmos_sdktypes.Tx, error) { ret := _m.Called(signedTx, gasLimit) + if len(ret) == 0 { + panic("no return value specified for ToSdkTx") + } + var r0 cosmos_sdktypes.Tx var r1 error if rf, ok := ret.Get(0).(func(*types.Transaction, uint64) (cosmos_sdktypes.Tx, error)); ok { @@ -81,6 +85,10 @@ func (_c *TxSerializer_ToSdkTx_Call) RunAndReturn(run func(*types.Transaction, u func (_m *TxSerializer) ToSdkTxBytes(signedTx *types.Transaction, gasLimit uint64) ([]byte, error) { ret := _m.Called(signedTx, gasLimit) + if len(ret) == 0 { + panic("no return value specified for ToSdkTxBytes") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(*types.Transaction, uint64) ([]byte, error)); ok { diff --git a/cosmos/runtime/txpool/mocks/tx_sub_provider.go b/cosmos/runtime/txpool/mocks/tx_sub_provider.go index 995cd5a40..65e88781f 100644 --- a/cosmos/runtime/txpool/mocks/tx_sub_provider.go +++ b/cosmos/runtime/txpool/mocks/tx_sub_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -26,6 +26,10 @@ func (_m *TxSubProvider) EXPECT() *TxSubProvider_Expecter { func (_m *TxSubProvider) SubscribeTransactions(ch chan<- core.NewTxsEvent, reorgs bool) event.Subscription { ret := _m.Called(ch, reorgs) + if len(ret) == 0 { + panic("no return value specified for SubscribeTransactions") + } + var r0 event.Subscription if rf, ok := ret.Get(0).(func(chan<- core.NewTxsEvent, bool) event.Subscription); ok { r0 = rf(ch, reorgs) diff --git a/eth/core/state/journal/mocks/accesslist.go b/eth/core/state/journal/mocks/accesslist.go index 60a998237..683654277 100644 --- a/eth/core/state/journal/mocks/accesslist.go +++ b/eth/core/state/journal/mocks/accesslist.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -93,6 +93,10 @@ func (_c *Accesslist_AddSlotToAccessList_Call) RunAndReturn(run func(common.Addr func (_m *Accesslist) AddressInAccessList(_a0 common.Address) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for AddressInAccessList") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.Address) bool); ok { r0 = rf(_a0) @@ -135,6 +139,10 @@ func (_c *Accesslist_AddressInAccessList_Call) RunAndReturn(run func(common.Addr func (_m *Accesslist) Clone() journal.Accesslist { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Clone") + } + var r0 journal.Accesslist if rf, ok := ret.Get(0).(func() journal.Accesslist); ok { r0 = rf() @@ -210,6 +218,10 @@ func (_c *Accesslist_Finalize_Call) RunAndReturn(run func()) *Accesslist_Finaliz func (_m *Accesslist) RegistryKey() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RegistryKey") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -284,6 +296,10 @@ func (_c *Accesslist_RevertToSnapshot_Call) RunAndReturn(run func(int)) *Accessl func (_m *Accesslist) SlotInAccessList(_a0 common.Address, _a1 common.Hash) (bool, bool) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SlotInAccessList") + } + var r0 bool var r1 bool if rf, ok := ret.Get(0).(func(common.Address, common.Hash) (bool, bool)); ok { @@ -337,6 +353,10 @@ func (_c *Accesslist_SlotInAccessList_Call) RunAndReturn(run func(common.Address func (_m *Accesslist) Snapshot() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Snapshot") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() diff --git a/eth/core/state/journal/mocks/log.go b/eth/core/state/journal/mocks/log.go index 8b9b082ec..828c9ee3e 100644 --- a/eth/core/state/journal/mocks/log.go +++ b/eth/core/state/journal/mocks/log.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -61,6 +61,10 @@ func (_c *Log_AddLog_Call) RunAndReturn(run func(*types.Log)) *Log_AddLog_Call { func (_m *Log) Clone() journal.Log { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Clone") + } + var r0 journal.Log if rf, ok := ret.Get(0).(func() journal.Log); ok { r0 = rf() @@ -136,6 +140,10 @@ func (_c *Log_Finalize_Call) RunAndReturn(run func()) *Log_Finalize_Call { func (_m *Log) GetLogs(hash common.Hash, blockNumber uint64, blockHash common.Hash) []*types.Log { ret := _m.Called(hash, blockNumber, blockHash) + if len(ret) == 0 { + panic("no return value specified for GetLogs") + } + var r0 []*types.Log if rf, ok := ret.Get(0).(func(common.Hash, uint64, common.Hash) []*types.Log); ok { r0 = rf(hash, blockNumber, blockHash) @@ -182,6 +190,10 @@ func (_c *Log_GetLogs_Call) RunAndReturn(run func(common.Hash, uint64, common.Ha func (_m *Log) Logs() []*types.Log { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Logs") + } + var r0 []*types.Log if rf, ok := ret.Get(0).(func() []*types.Log); ok { r0 = rf() @@ -225,6 +237,10 @@ func (_c *Log_Logs_Call) RunAndReturn(run func() []*types.Log) *Log_Logs_Call { func (_m *Log) RegistryKey() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RegistryKey") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -333,6 +349,10 @@ func (_c *Log_SetTxContext_Call) RunAndReturn(run func(common.Hash, int)) *Log_S func (_m *Log) Snapshot() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Snapshot") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -374,6 +394,10 @@ func (_c *Log_Snapshot_Call) RunAndReturn(run func() int) *Log_Snapshot_Call { func (_m *Log) TxIndex() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TxIndex") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() diff --git a/eth/core/state/journal/mocks/refund.go b/eth/core/state/journal/mocks/refund.go index 48c543310..8b5698e2e 100644 --- a/eth/core/state/journal/mocks/refund.go +++ b/eth/core/state/journal/mocks/refund.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -57,6 +57,10 @@ func (_c *Refund_AddRefund_Call) RunAndReturn(run func(uint64)) *Refund_AddRefun func (_m *Refund) Clone() journal.Refund { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Clone") + } + var r0 journal.Refund if rf, ok := ret.Get(0).(func() journal.Refund); ok { r0 = rf() @@ -132,6 +136,10 @@ func (_c *Refund_Finalize_Call) RunAndReturn(run func()) *Refund_Finalize_Call { func (_m *Refund) GetRefund() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRefund") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -173,6 +181,10 @@ func (_c *Refund_GetRefund_Call) RunAndReturn(run func() uint64) *Refund_GetRefu func (_m *Refund) RegistryKey() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RegistryKey") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -247,6 +259,10 @@ func (_c *Refund_RevertToSnapshot_Call) RunAndReturn(run func(int)) *Refund_Reve func (_m *Refund) Snapshot() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Snapshot") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() diff --git a/eth/core/state/journal/mocks/self_destruct_state_plugin.go b/eth/core/state/journal/mocks/self_destruct_state_plugin.go index 9a52bdbbc..be4cbd65d 100644 --- a/eth/core/state/journal/mocks/self_destruct_state_plugin.go +++ b/eth/core/state/journal/mocks/self_destruct_state_plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *SelfDestructStatePlugin) EXPECT() *SelfDestructStatePlugin_Expecter { func (_m *SelfDestructStatePlugin) GetBalance(_a0 common.Address) *big.Int { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetBalance") + } + var r0 *big.Int if rf, ok := ret.Get(0).(func(common.Address) *big.Int); ok { r0 = rf(_a0) @@ -71,6 +75,10 @@ func (_c *SelfDestructStatePlugin_GetBalance_Call) RunAndReturn(run func(common. func (_m *SelfDestructStatePlugin) GetCodeHash(_a0 common.Address) common.Hash { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetCodeHash") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address) common.Hash); ok { r0 = rf(_a0) diff --git a/eth/core/state/journal/mocks/self_destructs.go b/eth/core/state/journal/mocks/self_destructs.go index bb60199a0..2504909ef 100644 --- a/eth/core/state/journal/mocks/self_destructs.go +++ b/eth/core/state/journal/mocks/self_destructs.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -26,6 +26,10 @@ func (_m *SelfDestructs) EXPECT() *SelfDestructs_Expecter { func (_m *SelfDestructs) Clone() journal.SelfDestructs { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Clone") + } + var r0 journal.SelfDestructs if rf, ok := ret.Get(0).(func() journal.SelfDestructs); ok { r0 = rf() @@ -101,6 +105,10 @@ func (_c *SelfDestructs_Finalize_Call) RunAndReturn(run func()) *SelfDestructs_F func (_m *SelfDestructs) GetSelfDestructs() []common.Address { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetSelfDestructs") + } + var r0 []common.Address if rf, ok := ret.Get(0).(func() []common.Address); ok { r0 = rf() @@ -144,6 +152,10 @@ func (_c *SelfDestructs_GetSelfDestructs_Call) RunAndReturn(run func() []common. func (_m *SelfDestructs) HasSelfDestructed(_a0 common.Address) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for HasSelfDestructed") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.Address) bool); ok { r0 = rf(_a0) @@ -186,6 +198,10 @@ func (_c *SelfDestructs_HasSelfDestructed_Call) RunAndReturn(run func(common.Add func (_m *SelfDestructs) RegistryKey() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RegistryKey") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -326,6 +342,10 @@ func (_c *SelfDestructs_Selfdestruct6780_Call) RunAndReturn(run func(common.Addr func (_m *SelfDestructs) Snapshot() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Snapshot") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() diff --git a/eth/core/state/journal/mocks/transient_storage.go b/eth/core/state/journal/mocks/transient_storage.go index c2c61edce..98dd62325 100644 --- a/eth/core/state/journal/mocks/transient_storage.go +++ b/eth/core/state/journal/mocks/transient_storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -26,6 +26,10 @@ func (_m *TransientStorage) EXPECT() *TransientStorage_Expecter { func (_m *TransientStorage) Clone() journal.TransientStorage { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Clone") + } + var r0 journal.TransientStorage if rf, ok := ret.Get(0).(func() journal.TransientStorage); ok { r0 = rf() @@ -101,6 +105,10 @@ func (_c *TransientStorage_Finalize_Call) RunAndReturn(run func()) *TransientSto func (_m *TransientStorage) GetTransientState(addr common.Address, key common.Hash) common.Hash { ret := _m.Called(addr, key) + if len(ret) == 0 { + panic("no return value specified for GetTransientState") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address, common.Hash) common.Hash); ok { r0 = rf(addr, key) @@ -146,6 +154,10 @@ func (_c *TransientStorage_GetTransientState_Call) RunAndReturn(run func(common. func (_m *TransientStorage) RegistryKey() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RegistryKey") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -255,6 +267,10 @@ func (_c *TransientStorage_SetTransientState_Call) RunAndReturn(run func(common. func (_m *TransientStorage) Snapshot() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Snapshot") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() diff --git a/eth/core/state/mocks/plugin.go b/eth/core/state/mocks/plugin.go index f2b183535..5f4a4c3a0 100644 --- a/eth/core/state/mocks/plugin.go +++ b/eth/core/state/mocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -64,6 +64,10 @@ func (_c *Plugin_AddBalance_Call) RunAndReturn(run func(common.Address, *big.Int func (_m *Plugin) Clone() state.Plugin { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Clone") + } + var r0 state.Plugin if rf, ok := ret.Get(0).(func() state.Plugin); ok { r0 = rf() @@ -173,6 +177,10 @@ func (_c *Plugin_DeleteAccounts_Call) RunAndReturn(run func([]common.Address)) * func (_m *Plugin) Empty(_a0 common.Address) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Empty") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.Address) bool); ok { r0 = rf(_a0) @@ -215,6 +223,10 @@ func (_c *Plugin_Empty_Call) RunAndReturn(run func(common.Address) bool) *Plugin func (_m *Plugin) Error() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -256,6 +268,10 @@ func (_c *Plugin_Error_Call) RunAndReturn(run func() error) *Plugin_Error_Call { func (_m *Plugin) Exist(_a0 common.Address) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Exist") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.Address) bool); ok { r0 = rf(_a0) @@ -330,6 +346,10 @@ func (_c *Plugin_Finalize_Call) RunAndReturn(run func()) *Plugin_Finalize_Call { func (_m *Plugin) ForEachStorage(_a0 common.Address, _a1 func(common.Hash, common.Hash) bool) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for ForEachStorage") + } + var r0 error if rf, ok := ret.Get(0).(func(common.Address, func(common.Hash, common.Hash) bool) error); ok { r0 = rf(_a0, _a1) @@ -373,6 +393,10 @@ func (_c *Plugin_ForEachStorage_Call) RunAndReturn(run func(common.Address, func func (_m *Plugin) GetBalance(_a0 common.Address) *big.Int { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetBalance") + } + var r0 *big.Int if rf, ok := ret.Get(0).(func(common.Address) *big.Int); ok { r0 = rf(_a0) @@ -417,6 +441,10 @@ func (_c *Plugin_GetBalance_Call) RunAndReturn(run func(common.Address) *big.Int func (_m *Plugin) GetCode(_a0 common.Address) []byte { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetCode") + } + var r0 []byte if rf, ok := ret.Get(0).(func(common.Address) []byte); ok { r0 = rf(_a0) @@ -461,6 +489,10 @@ func (_c *Plugin_GetCode_Call) RunAndReturn(run func(common.Address) []byte) *Pl func (_m *Plugin) GetCodeHash(_a0 common.Address) common.Hash { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetCodeHash") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address) common.Hash); ok { r0 = rf(_a0) @@ -505,6 +537,10 @@ func (_c *Plugin_GetCodeHash_Call) RunAndReturn(run func(common.Address) common. func (_m *Plugin) GetCommittedState(_a0 common.Address, _a1 common.Hash) common.Hash { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetCommittedState") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address, common.Hash) common.Hash); ok { r0 = rf(_a0, _a1) @@ -550,6 +586,10 @@ func (_c *Plugin_GetCommittedState_Call) RunAndReturn(run func(common.Address, c func (_m *Plugin) GetContext() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetContext") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -593,6 +633,10 @@ func (_c *Plugin_GetContext_Call) RunAndReturn(run func() context.Context) *Plug func (_m *Plugin) GetNonce(_a0 common.Address) uint64 { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetNonce") + } + var r0 uint64 if rf, ok := ret.Get(0).(func(common.Address) uint64); ok { r0 = rf(_a0) @@ -635,6 +679,10 @@ func (_c *Plugin_GetNonce_Call) RunAndReturn(run func(common.Address) uint64) *P func (_m *Plugin) GetState(_a0 common.Address, _a1 common.Hash) common.Hash { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetState") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address, common.Hash) common.Hash); ok { r0 = rf(_a0, _a1) @@ -713,6 +761,10 @@ func (_c *Plugin_Prepare_Call) RunAndReturn(run func(context.Context)) *Plugin_P func (_m *Plugin) RegistryKey() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RegistryKey") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -991,6 +1043,10 @@ func (_c *Plugin_SetStorage_Call) RunAndReturn(run func(common.Address, map[comm func (_m *Plugin) Snapshot() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Snapshot") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() diff --git a/eth/core/state/mocks/polar_state_db.go b/eth/core/state/mocks/polar_state_db.go index fe130a3d8..5ac2701c8 100644 --- a/eth/core/state/mocks/polar_state_db.go +++ b/eth/core/state/mocks/polar_state_db.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -235,6 +235,10 @@ func (_c *PolarStateDB_AddSlotToAccessList_Call) RunAndReturn(run func(common.Ad func (_m *PolarStateDB) AddressInAccessList(addr common.Address) bool { ret := _m.Called(addr) + if len(ret) == 0 { + panic("no return value specified for AddressInAccessList") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.Address) bool); ok { r0 = rf(addr) @@ -277,6 +281,10 @@ func (_c *PolarStateDB_AddressInAccessList_Call) RunAndReturn(run func(common.Ad func (_m *PolarStateDB) Commit(_a0 uint64, _a1 bool) (common.Hash, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(uint64, bool) (common.Hash, error)); ok { @@ -332,6 +340,10 @@ func (_c *PolarStateDB_Commit_Call) RunAndReturn(run func(uint64, bool) (common. func (_m *PolarStateDB) Copy() corestate.StateDBI { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Copy") + } + var r0 corestate.StateDBI if rf, ok := ret.Get(0).(func() corestate.StateDBI); ok { r0 = rf() @@ -408,6 +420,10 @@ func (_c *PolarStateDB_CreateAccount_Call) RunAndReturn(run func(common.Address) func (_m *PolarStateDB) Database() corestate.Database { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Database") + } + var r0 corestate.Database if rf, ok := ret.Get(0).(func() corestate.Database); ok { r0 = rf() @@ -451,6 +467,10 @@ func (_c *PolarStateDB_Database_Call) RunAndReturn(run func() corestate.Database func (_m *PolarStateDB) Dump(opts *corestate.DumpConfig) []byte { ret := _m.Called(opts) + if len(ret) == 0 { + panic("no return value specified for Dump") + } + var r0 []byte if rf, ok := ret.Get(0).(func(*corestate.DumpConfig) []byte); ok { r0 = rf(opts) @@ -495,6 +515,10 @@ func (_c *PolarStateDB_Dump_Call) RunAndReturn(run func(*corestate.DumpConfig) [ func (_m *PolarStateDB) DumpToCollector(c corestate.DumpCollector, conf *corestate.DumpConfig) []byte { ret := _m.Called(c, conf) + if len(ret) == 0 { + panic("no return value specified for DumpToCollector") + } + var r0 []byte if rf, ok := ret.Get(0).(func(corestate.DumpCollector, *corestate.DumpConfig) []byte); ok { r0 = rf(c, conf) @@ -540,6 +564,10 @@ func (_c *PolarStateDB_DumpToCollector_Call) RunAndReturn(run func(corestate.Dum func (_m *PolarStateDB) Empty(_a0 common.Address) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Empty") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.Address) bool); ok { r0 = rf(_a0) @@ -582,6 +610,10 @@ func (_c *PolarStateDB_Empty_Call) RunAndReturn(run func(common.Address) bool) * func (_m *PolarStateDB) Error() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Error") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -623,6 +655,10 @@ func (_c *PolarStateDB_Error_Call) RunAndReturn(run func() error) *PolarStateDB_ func (_m *PolarStateDB) Exist(_a0 common.Address) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Exist") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.Address) bool); ok { r0 = rf(_a0) @@ -698,6 +734,10 @@ func (_c *PolarStateDB_Finalise_Call) RunAndReturn(run func(bool)) *PolarStateDB func (_m *PolarStateDB) GetBalance(_a0 common.Address) *big.Int { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetBalance") + } + var r0 *big.Int if rf, ok := ret.Get(0).(func(common.Address) *big.Int); ok { r0 = rf(_a0) @@ -742,6 +782,10 @@ func (_c *PolarStateDB_GetBalance_Call) RunAndReturn(run func(common.Address) *b func (_m *PolarStateDB) GetCode(_a0 common.Address) []byte { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetCode") + } + var r0 []byte if rf, ok := ret.Get(0).(func(common.Address) []byte); ok { r0 = rf(_a0) @@ -786,6 +830,10 @@ func (_c *PolarStateDB_GetCode_Call) RunAndReturn(run func(common.Address) []byt func (_m *PolarStateDB) GetCodeHash(_a0 common.Address) common.Hash { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetCodeHash") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address) common.Hash); ok { r0 = rf(_a0) @@ -830,6 +878,10 @@ func (_c *PolarStateDB_GetCodeHash_Call) RunAndReturn(run func(common.Address) c func (_m *PolarStateDB) GetCodeSize(_a0 common.Address) int { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetCodeSize") + } + var r0 int if rf, ok := ret.Get(0).(func(common.Address) int); ok { r0 = rf(_a0) @@ -872,6 +924,10 @@ func (_c *PolarStateDB_GetCodeSize_Call) RunAndReturn(run func(common.Address) i func (_m *PolarStateDB) GetCommittedState(_a0 common.Address, _a1 common.Hash) common.Hash { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetCommittedState") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address, common.Hash) common.Hash); ok { r0 = rf(_a0, _a1) @@ -917,6 +973,10 @@ func (_c *PolarStateDB_GetCommittedState_Call) RunAndReturn(run func(common.Addr func (_m *PolarStateDB) GetContext() context.Context { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetContext") + } + var r0 context.Context if rf, ok := ret.Get(0).(func() context.Context); ok { r0 = rf() @@ -960,6 +1020,10 @@ func (_c *PolarStateDB_GetContext_Call) RunAndReturn(run func() context.Context) func (_m *PolarStateDB) GetLogs(hash common.Hash, blockNumber uint64, blockHash common.Hash) []*types.Log { ret := _m.Called(hash, blockNumber, blockHash) + if len(ret) == 0 { + panic("no return value specified for GetLogs") + } + var r0 []*types.Log if rf, ok := ret.Get(0).(func(common.Hash, uint64, common.Hash) []*types.Log); ok { r0 = rf(hash, blockNumber, blockHash) @@ -1006,6 +1070,10 @@ func (_c *PolarStateDB_GetLogs_Call) RunAndReturn(run func(common.Hash, uint64, func (_m *PolarStateDB) GetNonce(_a0 common.Address) uint64 { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetNonce") + } + var r0 uint64 if rf, ok := ret.Get(0).(func(common.Address) uint64); ok { r0 = rf(_a0) @@ -1048,6 +1116,10 @@ func (_c *PolarStateDB_GetNonce_Call) RunAndReturn(run func(common.Address) uint func (_m *PolarStateDB) GetOrNewStateObject(addr common.Address) *corestate.StateObject { ret := _m.Called(addr) + if len(ret) == 0 { + panic("no return value specified for GetOrNewStateObject") + } + var r0 *corestate.StateObject if rf, ok := ret.Get(0).(func(common.Address) *corestate.StateObject); ok { r0 = rf(addr) @@ -1092,6 +1164,10 @@ func (_c *PolarStateDB_GetOrNewStateObject_Call) RunAndReturn(run func(common.Ad func (_m *PolarStateDB) GetPrecompileManager() interface{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetPrecompileManager") + } + var r0 interface{} if rf, ok := ret.Get(0).(func() interface{}); ok { r0 = rf() @@ -1135,6 +1211,10 @@ func (_c *PolarStateDB_GetPrecompileManager_Call) RunAndReturn(run func() interf func (_m *PolarStateDB) GetRefund() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetRefund") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -1176,6 +1256,10 @@ func (_c *PolarStateDB_GetRefund_Call) RunAndReturn(run func() uint64) *PolarSta func (_m *PolarStateDB) GetState(_a0 common.Address, _a1 common.Hash) common.Hash { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetState") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address, common.Hash) common.Hash); ok { r0 = rf(_a0, _a1) @@ -1221,6 +1305,10 @@ func (_c *PolarStateDB_GetState_Call) RunAndReturn(run func(common.Address, comm func (_m *PolarStateDB) GetStorageRoot(addr common.Address) common.Hash { ret := _m.Called(addr) + if len(ret) == 0 { + panic("no return value specified for GetStorageRoot") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address) common.Hash); ok { r0 = rf(addr) @@ -1265,6 +1353,10 @@ func (_c *PolarStateDB_GetStorageRoot_Call) RunAndReturn(run func(common.Address func (_m *PolarStateDB) GetTransientState(addr common.Address, key common.Hash) common.Hash { ret := _m.Called(addr, key) + if len(ret) == 0 { + panic("no return value specified for GetTransientState") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(common.Address, common.Hash) common.Hash); ok { r0 = rf(addr, key) @@ -1310,6 +1402,10 @@ func (_c *PolarStateDB_GetTransientState_Call) RunAndReturn(run func(common.Addr func (_m *PolarStateDB) HasSelfDestructed(_a0 common.Address) bool { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for HasSelfDestructed") + } + var r0 bool if rf, ok := ret.Get(0).(func(common.Address) bool); ok { r0 = rf(_a0) @@ -1352,6 +1448,10 @@ func (_c *PolarStateDB_HasSelfDestructed_Call) RunAndReturn(run func(common.Addr func (_m *PolarStateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash { ret := _m.Called(deleteEmptyObjects) + if len(ret) == 0 { + panic("no return value specified for IntermediateRoot") + } + var r0 common.Hash if rf, ok := ret.Get(0).(func(bool) common.Hash); ok { r0 = rf(deleteEmptyObjects) @@ -1396,6 +1496,10 @@ func (_c *PolarStateDB_IntermediateRoot_Call) RunAndReturn(run func(bool) common func (_m *PolarStateDB) IteratorDump(opts *corestate.DumpConfig) corestate.IteratorDump { ret := _m.Called(opts) + if len(ret) == 0 { + panic("no return value specified for IteratorDump") + } + var r0 corestate.IteratorDump if rf, ok := ret.Get(0).(func(*corestate.DumpConfig) corestate.IteratorDump); ok { r0 = rf(opts) @@ -1438,6 +1542,10 @@ func (_c *PolarStateDB_IteratorDump_Call) RunAndReturn(run func(*corestate.DumpC func (_m *PolarStateDB) Logs() []*types.Log { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Logs") + } + var r0 []*types.Log if rf, ok := ret.Get(0).(func() []*types.Log); ok { r0 = rf() @@ -1481,6 +1589,10 @@ func (_c *PolarStateDB_Logs_Call) RunAndReturn(run func() []*types.Log) *PolarSt func (_m *PolarStateDB) Preimages() map[common.Hash][]byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Preimages") + } + var r0 map[common.Hash][]byte if rf, ok := ret.Get(0).(func() map[common.Hash][]byte); ok { r0 = rf() @@ -1562,6 +1674,10 @@ func (_c *PolarStateDB_Prepare_Call) RunAndReturn(run func(params.Rules, common. func (_m *PolarStateDB) RawDump(opts *corestate.DumpConfig) corestate.Dump { ret := _m.Called(opts) + if len(ret) == 0 { + panic("no return value specified for RawDump") + } + var r0 corestate.Dump if rf, ok := ret.Get(0).(func(*corestate.DumpConfig) corestate.Dump); ok { r0 = rf(opts) @@ -1943,6 +2059,10 @@ func (_c *PolarStateDB_SetTxContext_Call) RunAndReturn(run func(common.Hash, int func (_m *PolarStateDB) SlotInAccessList(addr common.Address, slot common.Hash) (bool, bool) { ret := _m.Called(addr, slot) + if len(ret) == 0 { + panic("no return value specified for SlotInAccessList") + } + var r0 bool var r1 bool if rf, ok := ret.Get(0).(func(common.Address, common.Hash) (bool, bool)); ok { @@ -1996,6 +2116,10 @@ func (_c *PolarStateDB_SlotInAccessList_Call) RunAndReturn(run func(common.Addre func (_m *PolarStateDB) Snapshot() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Snapshot") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -2169,6 +2293,10 @@ func (_c *PolarStateDB_SubRefund_Call) RunAndReturn(run func(uint64)) *PolarStat func (_m *PolarStateDB) TxIndex() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for TxIndex") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() diff --git a/eth/core/state/mocks/precompile_plugin.go b/eth/core/state/mocks/precompile_plugin.go index 79db521ac..9dd95479a 100644 --- a/eth/core/state/mocks/precompile_plugin.go +++ b/eth/core/state/mocks/precompile_plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.1. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package mocks @@ -96,6 +96,10 @@ func (_c *PrecompilePlugin_EnableReentrancy_Call) RunAndReturn(run func(vm.Preco func (_m *PrecompilePlugin) Get(addr common.Address, rules *params.Rules) (vm.PrecompiledContract, bool) { ret := _m.Called(addr, rules) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 vm.PrecompiledContract var r1 bool if rf, ok := ret.Get(0).(func(common.Address, *params.Rules) (vm.PrecompiledContract, bool)); ok { @@ -151,6 +155,10 @@ func (_c *PrecompilePlugin_Get_Call) RunAndReturn(run func(common.Address, *para func (_m *PrecompilePlugin) GetActive(_a0 params.Rules) []common.Address { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetActive") + } + var r0 []common.Address if rf, ok := ret.Get(0).(func(params.Rules) []common.Address); ok { r0 = rf(_a0) @@ -195,6 +203,10 @@ func (_c *PrecompilePlugin_GetActive_Call) RunAndReturn(run func(params.Rules) [ func (_m *PrecompilePlugin) Register(_a0 vm.PrecompiledContract) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for Register") + } + var r0 error if rf, ok := ret.Get(0).(func(vm.PrecompiledContract) error); ok { r0 = rf(_a0) @@ -237,6 +249,10 @@ func (_c *PrecompilePlugin_Register_Call) RunAndReturn(run func(vm.PrecompiledCo func (_m *PrecompilePlugin) Run(evm vm.PrecompileEVM, p vm.PrecompiledContract, input []byte, caller common.Address, value *big.Int, suppliedGas uint64, readonly bool) ([]byte, uint64, error) { ret := _m.Called(evm, p, input, caller, value, suppliedGas, readonly) + if len(ret) == 0 { + panic("no return value specified for Run") + } + var r0 []byte var r1 uint64 var r2 error