Skip to content

Commit

Permalink
fix: put the errors in the template
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Feb 14, 2024
1 parent b5c0de2 commit e085ca6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions chain/actors/builtin/evm/actor.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,26 @@ 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"
)

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 {
Expand Down

0 comments on commit e085ca6

Please sign in to comment.