From 2c226864526aa310de1a51316d703f0d85d4d0ec Mon Sep 17 00:00:00 2001 From: jagdeep sidhu Date: Mon, 7 Oct 2024 11:29:05 -0700 Subject: [PATCH] Update evm.go --- core/evm.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/core/evm.go b/core/evm.go index 57dddde0d0..4346f2d091 100644 --- a/core/evm.go +++ b/core/evm.go @@ -132,7 +132,22 @@ func GetHashFn(ref *types.Header, chain ChainContext) func(n uint64) common.Hash return common.Hash{} } } - +// SYSCOIN returns if there is an NEVM mapping from this blockhash for canonical SYS chain detection +func ReadSYSHashFn(chain ChainContext) func(n uint64) []byte { + return func(n uint64) []byte { + return chain.ReadSYSHash(n) + } +} +func ReadDataHashFn(chain ChainContext) func(hash common.Hash) []byte { + return func(hash common.Hash) []byte { + return chain.ReadDataHash(hash) + } +} +func GetNEVMAddressFn(chain ChainContext) func(address common.Address) []byte { + return func(address common.Address) []byte { + return chain.GetNEVMAddress(address) + } +} // CanTransfer checks whether there are enough funds in the address' account to make a transfer. // This does not take the necessary gas in to account to make the transfer valid. func CanTransfer(db vm.StateDB, addr common.Address, amount *uint256.Int) bool {