transport

Creates a lightweight TRANSPORT from an RPC endpoint and optional chain ID. Use http_transport when you need timeouts, retries, throttling, TLS settings, or log-pagination controls.

Example

Local

1
-- Compose a transport for a local Anvil node
2
SELECT transport('http://127.0.0.1:8545', 31337) AS transport;
Notebook ready in readonly mode.

API reference

Exact signatures with descriptions, requirements, inputs, returns, and examples.

transport(VARCHAR, UBIGINT) #

Requires an explicit chain identifier to avoid relying on remote defaults.

Inputs

Name Type Use
url VARCHAR

HTTP or HTTPS JSON-RPC endpoint. Bare hosts are normalized to URLs.

required positional
chain_id UBIGINT

Trusted caller-declared EVM chain id carried with the transport.

required positional

Returns

Name Type
transport TRANSPORT

TRANSPORT JSON. Returns a TRANSPORT-typed JSON object with normalized url and chain_id.

Guidance

transport vs http_transport

  • Use http_transport when you need HTTP-specific options like timeout, retry count, rate limits, concurrency, SSL verification, or log pagination limits.
  • Use transport for minimal generic transport construction.

Additional overloads

transport(VARCHAR) #

Infers the protocol and defaults to Ethereum mainnet (chain id 1).

Inputs

Name Type Use
url VARCHAR

HTTP or HTTPS JSON-RPC endpoint. Omitted chain_id defaults to Ethereum mainnet (1).

required positional

Returns

Name Type
transport TRANSPORT

TRANSPORT JSON. Returns a TRANSPORT-typed JSON object with normalized url and chain_id.

Overload examples

Local SQL

1
SELECT transport('https://eth.llamarpc.com') AS transport;

Examples

Local SQL

1
SELECT transport('http://127.0.0.1:8545', 31337) AS transport;
Notebook ready in readonly mode.

Related functions

Category and tags

Tag
Client