Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sha256 function #1327

Closed
jacqueswww opened this issue Mar 6, 2019 · 1 comment
Closed

Add sha256 function #1327

jacqueswww opened this issue Mar 6, 2019 · 1 comment

Comments

@jacqueswww
Copy link
Collaborator

@jacqueswww jacqueswww commented Mar 6, 2019

Simple Summary

Currently Vyper doesn't

Abstract

Add sha256 function, which hcalls

Motivation

Currently sha256 precompile isn't exposed as a function, this VIP adds the functionality.

Specification

def sha256(bytelike: string) -> bytes32:
      # bytelike can be one of  byte_literal, str_literal, bytes, string, bytes32
      # ...

This function will make a call to the pre-compile at address 0x000...0002, and return the output as bytes.

Backwards Compatibility

Feature, forwards compatible.

Dependencies

No dependencies.

Copyright

Copyright and related rights waived via CC0

@jacqueswww

This comment has been minimized.

Copy link
Collaborator Author

@jacqueswww jacqueswww commented Mar 6, 2019

There is currently workaround on the deposit contract: ethereum/deposit_contract#14 using raw call, so quite keen on getting this in on b9 or b10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.