Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
|
Classes | |
class | InstanceDescription |
Functions | |
int | get_block_number (Any web3) |
None | install_sol () |
Any | compile_files (List[str] files, **Any kwargs) |
bytes | send_contract_call (Any web3, Any call, str sender_eth_addr, Optional[bytes] sender_eth_private_key=None, Optional[EtherValue] value=None, Optional[int] gas=None) |
Any | local_contract_call (Any call, str sender_eth_addr, Optional[EtherValue] value=None, Optional[int] gas=None) |
Iterator[Any] | get_event_logs (Any web3, Any instance, str event_name, int start_block, int end_block, Optional[int] batch_size) |
Iterator[Any] | get_event_logs_from_tx_receipt (Any instance, str event_name, Any tx_receipt) |
Variables | |
int | SYNC_BLOCKS_PER_BATCH = 1000 |
Interface = Dict[str, Any] | |
Any zeth.core.contracts.compile_files | ( | List[str] | files, |
**Any | kwargs | ||
) |
Wrapper around solcx which ensures the required version of the compiler is used.
Definition at line 122 of file contracts.py.
int zeth.core.contracts.get_block_number | ( | Any | web3 | ) |
Iterator[Any] zeth.core.contracts.get_event_logs | ( | Any | web3, |
Any | instance, | ||
str | event_name, | ||
int | start_block, | ||
int | end_block, | ||
Optional[int] | batch_size | ||
) |
Query the attached node for all events emitted by the given contract instance, with the given name. Yields an iterator of event-specific objects to be decoded by the caller.
Definition at line 179 of file contracts.py.
Iterator[Any] zeth.core.contracts.get_event_logs_from_tx_receipt | ( | Any | instance, |
str | event_name, | ||
Any | tx_receipt | ||
) |
Query a transaction receipt for all events emitted by the given contract instance with a given event name. Yields an iterator of event-specific objects to be decoded by the caller. This function intentionally avoids connecting to a node, or creating host-side filters.
Definition at line 226 of file contracts.py.
None zeth.core.contracts.install_sol | ( | ) |
Definition at line 118 of file contracts.py.
Any zeth.core.contracts.local_contract_call | ( | Any | call, |
str | sender_eth_addr, | ||
Optional[EtherValue] | value = None , |
||
Optional[int] | gas = None |
||
) |
Make a contract call locally on the RPC host and return the result. Does not create a transaction.
Definition at line 162 of file contracts.py.
bytes zeth.core.contracts.send_contract_call | ( | Any | web3, |
Any | call, | ||
str | sender_eth_addr, | ||
Optional[bytes] | sender_eth_private_key = None , |
||
Optional[EtherValue] | value = None , |
||
Optional[int] | gas = None |
||
) |
Broadcast a transaction for a contract call, handling the difference between hosted keys (sender_eth_private_key is None) and local keys (sender_eth_private_key is not None). Returns the hash of the broadcast transaction.
Definition at line 131 of file contracts.py.
zeth.core.contracts.Interface = Dict[str, Any] |
Definition at line 18 of file contracts.py.
int zeth.core.contracts.SYNC_BLOCKS_PER_BATCH = 1000 |
Definition at line 16 of file contracts.py.