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

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

View file

@ -262,7 +262,7 @@ func opOrigin(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
}
func opCaller(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Caller().Bytes()))
scope.Stack.push(new(uint256.Int).SetBytes20(scope.Contract.Caller().Bytes()))
return nil, nil
}