Source code for genlayer.std._wasi

import typing
import os

if typing.TYPE_CHECKING or os.getenv('GENERATING_DOCS', 'false') == 'true':
	import collections.abc

	type _Fd = int
	type _FdErroring = int

[docs] def rollback(s: str) -> typing.NoReturn: ...
[docs] def contract_return(s: bytes) -> typing.NoReturn: ...
[docs] def run_nondet(leader_data: bytes, validator_data: bytes) -> _Fd: ...
[docs] def sandbox(data: bytes) -> _Fd: ...
[docs] def call_contract(address: bytes, calldata: bytes, data: str) -> _Fd: ...
[docs] def post_message(address: bytes, calldata: bytes, data: str) -> None: ...
[docs] def deploy_contract(calldata: bytes, code: bytes, data: str) -> None: ...
[docs] def eth_send(address: bytes, calldata: bytes, data: str) -> None: ...
[docs] def eth_call(address: bytes, calldata: bytes) -> _Fd: ...
[docs] def get_entrypoint() -> bytes: ...
[docs] def get_message_data() -> str: ...
[docs] def get_webpage(config: str, url: str) -> _FdErroring: ...
[docs] def exec_prompt(config: str, prompt: str) -> _FdErroring: ...
[docs] def exec_prompt_id(id: int, vars: str) -> _FdErroring: ...
[docs] def eq_principle_prompt(id: int, vars: str) -> bool: ...
[docs] def storage_read(slot: bytes, off: int, len: int) -> bytes: ...
[docs] def storage_write(slot: bytes, off: int, what: collections.abc.Buffer) -> bytes: ...
[docs] def get_balance(address: bytes) -> int: ...
[docs] def get_self_balance() -> int: ...
else: from _genlayer_wasi import *