Function createEventDatabase

  • Create an event database to store contract events

    const {db, result} = await createEventDatabase(client,
    "my contract event db",
    "0x...",
    ["DepositEvent"],
    "{...}",
    "wss://xxxxx",
    "100000"
    )

    Parameters

    • client: Client

      the client instance

    • desc: string

      the description for the event database

    • contractAddress: string

      the contract address

    • tables: string[]

      the contract event list

    • abi: string

      the json abi of contract

    • evmNodeUrl: string

      the websocket url of evm node

    • startBlock: string

      the start block to subscribe, 0 start from the latest block

    Returns Promise<{
        db: Database;
        result: MutationResult;
    }>

    the CreateDBResult

Generated using TypeDoc