@@ -16,14 +16,15 @@ import (
1616 "github.com/ava-labs/libevm/common"
1717 "github.com/ava-labs/libevm/core/vm"
1818 "github.com/ava-labs/libevm/libevm"
19+ "github.com/ava-labs/libevm/libevm/legacy"
1920 "github.com/holiman/uint256"
2021 "golang.org/x/exp/maps"
2122)
2223
2324type RulesExtra extras.Rules
2425
2526func GetRulesExtra (r Rules ) * extras.Rules {
26- rules := payloads .PointerFromRules (& r )
27+ rules := payloads .Rules . GetPointer (& r )
2728 return (* extras .Rules )(rules )
2829}
2930
@@ -125,7 +126,7 @@ func makePrecompile(contract contract.StatefulPrecompiledContract) libevm.Precom
125126 }
126127 return contract .Run (accessableState , env .Addresses ().Caller , env .Addresses ().Self , input , suppliedGas , env .ReadOnly ())
127128 }
128- return vm .NewStatefulPrecompile (run )
129+ return vm .NewStatefulPrecompile (legacy . PrecompiledStatefulContract ( run ). Upgrade () )
129130}
130131
131132func (r RulesExtra ) PrecompileOverride (addr common.Address ) (libevm.PrecompiledContract , bool ) {
@@ -171,7 +172,7 @@ func (a accessableState) GetSnowContext() *snow.Context {
171172 return GetExtra (a .env .ChainConfig ()).SnowCtx
172173}
173174
174- func (a accessableState ) Call (addr common.Address , input []byte , gas uint64 , value * uint256.Int , opts ... vm.CallOption ) (ret []byte , gasRemaining uint64 , _ error ) {
175+ func (a accessableState ) Call (addr common.Address , input []byte , gas uint64 , value * uint256.Int , opts ... vm.CallOption ) (ret []byte , err error ) {
175176 return a .env .Call (addr , input , gas , value , opts ... )
176177}
177178
0 commit comments