core/vm: optimize opAddress using uint256.Int.SetBytes20

This commit is contained in:
cuiweixie 2025-10-19 00:43:01 +08:00
parent 0ec63272bf
commit fe27e102c9
No known key found for this signature in database
GPG key ID: 16DF64EE15E495A3

View file

@ -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
}