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

docs: custom precompiles #184

Open
charles-cooper opened this issue Mar 14, 2024 · 1 comment
Open

docs: custom precompiles #184

charles-cooper opened this issue Mar 14, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@charles-cooper
Copy link
Member

cf.

# takes a user-provided signature and produces shim code for
# serializing and deserializing
# ex. precompile("def foo() -> uint256")
def precompile(user_signature: str, force: bool = False) -> Any:

@charles-cooper
Copy link
Member Author

charles-cooper commented Mar 14, 2024

usage is like

@precompile("def foo(s: address) -> uint256")
def foo(some_address):
    return int(some_address, 16)  # example

@charles-cooper charles-cooper added documentation Improvements or additions to documentation good first issue Good for newcomers labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant