Skip to main content
sauce globals lists every name a program compiled for a chain can use without declaring it.

Synopsis

Description

The names come from the SDK’s registries, and they are the names sauce compile resolves for that chain before the compiler runs (Names):
  • Tokens: each token symbol with its address and decimals. A program writes USDC.transfer(…) or uses the symbol as an address; any other token is Token(0x…).
  • Protocols: each protocol namespace with each contract’s address, such as UniswapV3.Factory. With --protocol <name>, each contract’s methods with their parameters, return values and mutability.
  • Interfaces: ABIs the registry knows that have no fixed address, such as a pool. A program binds one to an address it has: UniswapV3.Pool(pool).slot0().
  • Chains: the chain names in the registry.
  • Functions: the @sauce/token functions every program can call without an import.
With no filter, the chain’s tokenized stocks are counted rather than listed; Ethereum and Solana have over a thousand each. --stocks lists them, each with its company name, the underlying’s ticker and its issuer. --search <text> lists the tokens, stocks included, whose symbol, name or ticker contains the text. A stock token is named like any other token in a program: SPCXc.balanceOf(…) on Base, balanceOf(TSLAx, account) on Solana. The command reads no chain and sends nothing. It works on every chain in the registry, preview chains included. Reference: chains and Reference: tokens render the same registry as pages.

Options

Output

The text output starts with the chain’s name, slug, id and kind, then one section per kind of name. With --json: Exit codes: 0 on success; 2 for a usage error, such as an unknown chain.

Examples

List everything on Base

Aave is a family namespace: an alias over the registry’s aave-v2, aave-v3 and aave-v4 contracts on the chain. AaveV3 is one protocol.

One namespace with its methods

Find a tokenized stock

The search matches the company name: the token’s own symbol is SPCXc.

Next steps

  • Names: how a program uses token symbols, namespaces and Token(address).
  • Reference: protocols: every protocol in the registry, with its deployments.
  • sauce pools: a pair’s pools on a chain.
  • sauce compile: compile a program that uses these names.