SyncState starts at a custom height Then load all cosmwasm txs from that custom height to end height Allow loading contracts using custom .wasm for debugging and testing If any contract not found -> load state If found -> apply tx -> much faster

Hierarchy

  • SyncState

Constructors

  • Parameters

    • senderAddress: string

      admin of the contracts when loading contract states

    • chainConfig: ChainConfig

      basic chain info - rpc, chainId, bech32Prefix

    • downloadPath: string

      path to store contract states. A new dir will be created matching the startHeight

    Returns SyncState

Properties

chainConfig: ChainConfig

basic chain info - rpc, chainId, bech32Prefix

downloadPath: string

path to store contract states. A new dir will be created matching the startHeight

senderAddress: string

admin of the contracts when loading contract states

simulateClient: SimulateCosmWasmClient
stargateClient: StargateClient

Methods

  • Parameters

    • startHeight: number
    • endHeight: number
    • totalThreads: number = 4

    Returns Promise<Tx[]>

  • Download contract states from start height, and apply cosmwasm txs from start height to end height

    Parameters

    • startHeight: number

      start height to load contract states

    • endHeight: number

      end height to load txs from start to end

    • customContractsToDownload: string[] = []

      relevant contracts to download states

    • customWasmCodePaths: CustomWasmCodePaths = {}

      wasm code paths that will be applied when executing txs for testing

    Returns Promise<{
        results: ExecuteResult[];
        simulateClient: SimulateCosmWasmClient;
        txs: Tx[];
    }>

©2020 - 2024 Oraichain Foundation