From fe27e102c9cf27209cb4308f9aa888603ab50d97 Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Sun, 19 Oct 2025 00:43:01 +0800 Subject: [PATCH] core/vm: optimize opAddress using uint256.Int.SetBytes20 --- core/vm/instructions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 44d3e81a9c..9e085d27a6 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -245,7 +245,7 @@ func opKeccak256(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) { } func opAddress(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Address().Bytes())) + scope.Stack.push(new(uint256.Int).SetBytes20(scope.Contract.Address().Bytes())) return nil, nil }