Functions
bag.watch function library
Table functions
- create2_mine Performs a CREATE2 brute-force search across salt ranges, optionally applying byte masks to target vanity patterns or protocol bitfields.
- get_balance Queries eth_getBalance to return the Wei-denominated account balance via the configured transport.
- get_block Retrieves block metadata via eth_getBlockBy* endpoints using the canonical schema.
- get_code Retrieves deployed EVM bytecode through eth_getCode, yielding NULL for EOAs or pre-deploy addresses.
- get_logs Streams contract logs via eth_getLogs, decoding topics with human-readable signatures or ABI.
- read_contract Invokes eth_call with ABI-aware argument encoding and decodes the returned values into structured columns.
Scalar functions
- call Invokes eth_call using the provided transport, target address, and calldata, returning the raw bytes.
- create2_predict Derives the deterministic CREATE2 deployment address from a deployer, 32-byte salt, and init code hash.
- encode_function_data Encodes contract function arguments using ABI definitions, returning selector-prefixed calldata.
- error_selector
- error_selector_json
- event_signature
- event_signature_json
- format_ether Human-readable helper for wei balances. Equivalent to format_units(amount, 18).
- format_units Scales raw EVM integer balances by 10^decimals and returns a DECIMAL(38, decimals) value.
- function_selector
- function_selector_json
- http_transport Creates a TRANSPORT JSON blob backed by the HTTP client, carrying base timeouts and headers.
- keccak256 Computes the Keccak-256 hash used across the EVM toolchain, returning a BYTES32 digest.
- rpc_call Issues a JSON-RPC request using the provided transport configuration and returns the raw result.
- transport Builds a TRANSPORT JSON payload suitable for RPC helpers, normalizing the URL and attaching metadata.