forked from cerc-io/laconicd-deprecated
evm: PostTxProcessing hook - include the full message data (#1027)
* x/evm - PostTxProcessing use message as callback input * Update CHANGELOG.md * Use core.Message for the PostTxProcessing hook (PR review)
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
|
||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
ethtypes "github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -679,13 +680,13 @@ func (suite *EvmTestSuite) TestContractDeploymentRevert() {
|
||||
// DummyHook implements EvmHooks interface
|
||||
type DummyHook struct{}
|
||||
|
||||
func (dh *DummyHook) PostTxProcessing(ctx sdk.Context, from common.Address, to *common.Address, receipt *ethtypes.Receipt) error {
|
||||
func (dh *DummyHook) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// FailureHook implements EvmHooks interface
|
||||
type FailureHook struct{}
|
||||
|
||||
func (dh *FailureHook) PostTxProcessing(ctx sdk.Context, from common.Address, to *common.Address, receipt *ethtypes.Receipt) error {
|
||||
func (dh *FailureHook) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error {
|
||||
return errors.New("mock error")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user