From e085ca6f42ab30ddac56e306b6c47c363b190883 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 14 Feb 2024 09:40:40 -0800 Subject: [PATCH] fix: put the errors in the template --- chain/actors/builtin/evm/actor.go.template | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/chain/actors/builtin/evm/actor.go.template b/chain/actors/builtin/evm/actor.go.template index 62da0686796..2090c7bc926 100644 --- a/chain/actors/builtin/evm/actor.go.template +++ b/chain/actors/builtin/evm/actor.go.template @@ -10,6 +10,8 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" + + "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/manifest" builtin{{.latestVersion}} "github.com/filecoin-project/go-state-types/builtin" @@ -17,6 +19,17 @@ import ( var Methods = builtin{{.latestVersion}}.MethodsEVM +const ( + ErrReverted exitcode.ExitCode = iota + 33 + ErrInvalidInstruction + ErrUndefinedInstruction + ErrStackUnderflow + ErrStackOverflow + ErrIllegalMemoryAccess + ErrBadJumpdest + ErrSelfdestructFailed +) + func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { if name != manifest.EvmKey {