Class ChainAbstract

Represents a particular chain.

Hierarchy

Constructors

Properties

Agent: AgentClass<Agent> = ...

The Agent subclass to use for interacting with this chain.

defaultDenom: string

The default denomination of the chain's native token.

devnet?: DevnetHandle

If this is a devnet, this contains an interface to the devnet container.

id: string

The unique chain id.

log: Console = ...

Logger.

mode: ChainMode

Whether this is mainnet, public testnet, local devnet, or mocknet.

stopped: boolean = false

Whether this chain is stopped.

url: string = ''

The API URL to use.

The default Agent subclass to use for interacting with this chain.

Mode: typeof ChainMode = ChainMode

Shorthand for the ChainMode enum.

variants: ChainRegistry = ...

Async functions that return Chain instances in different modes. Values for FADROMA_CHAIN environment variable. Populated by @fadroma/connect.

Accessors

  • get height(): Promise<number>
  • Get the current block height.

    Returns Promise<number>

  • get nextBlock(): Promise<number>
  • Wait for the block height to increment.

    Returns Promise<number>

Methods

  • Get the code hash of a smart contract.

    Parameters

    • address: string
    • Optional expectedCodeHash: string

    Returns Promise<string>

  • Get the native balance of an address.

    Parameters

    • denom: string
    • address: string

    Returns Promise<string>

  • Get the code id of a smart contract.

    Parameters

    • address: string

    Returns Promise<string>

  • Get the code hash of a smart contract.

    Parameters

    • address: string | number

    Returns Promise<string>

  • Get the label of a smart contract.

    Parameters

    • address: string

    Returns Promise<string>

Generated using TypeDoc