async Events({toBlock, fromBlock, count=10, includeTransaction=false}={}) {
    const latestBlock = await this.BlockNumber();

    if(!toBlock) {
      if(!fromBlock) {
        toBlock = latestBlock;
        fromBlock = toBlock - count + 1;
      } else {
        toBlock = fromBlock + count - 1;
      }
    } else if(!fromBlock) {
      fromBlock = toBlock - count + 1;
    }

    // Ensure block numbers are valid
    if(toBlock > latestBlock) {
      toBlock = latestBlock;
    }

    if(fromBlock < 0) {
      fromBlock = 0;
    }

    if(fromBlock > toBlock) {
      return [];
    }

    return await this.ethClient.Events({
      toBlock,
      fromBlock,
      includeTransaction
    });
  }
/**
   * Get events from the blockchain in reverse chronological order, starting from toBlock. This will also attempt
   * to identify and parse any known Eluvio contract methods. If successful, the method name, signature, and input
   * values will be included in the log entry.
   *
   * @methodGroup Contracts
   * @namedParams
   * @param {number=} toBlock - Limit results to events before the specified block (inclusive) - If not specified, will start from latest block
   * @param {number=} fromBlock - Limit results to events after the specified block (inclusive)
   * @param {number=} count=10 - Max number of events to include (unless both toBlock and fromBlock are unspecified)
   * @param {boolean=} includeTransaction=false - If specified, more detailed transaction info will be included.
   * Note: This requires two extra network calls per transaction, so it should not be used for very large ranges
   * @returns {Promise<Array<Array<Object>>>} - List of blocks, in ascending order by block number, each containing a list of the events in the block.
   */
Get events from the blockchain in reverse chronological order, starting from toBlock. This will also attempt
to identify and parse any known Eluvio contract methods. If successful, the method name, signature, and input
values will be included in the log entry.


Get events from the blockchain in reverse chronological order starting from toBlock . This will also attempt to identify and parse any known Eluvio contract methods . If successful the method name signature and input values will be included in the log entry .
async Events({toBlock, fromBlock, count=10, includeTransaction=false}={}) {
    const latestBlock = await this.BlockNumber();
    if(!toBlock) {
      if(!fromBlock) {
        toBlock = latestBlock;
        fromBlock = toBlock - count + 1;
      } else {
        toBlock = fromBlock + count - 1;
      }
    } else if(!fromBlock) {
      fromBlock = toBlock - count + 1;
    }
    if(toBlock > latestBlock) {
      toBlock = latestBlock;
    }
    if(fromBlock < 0) {
      fromBlock = 0;
    }
    if(fromBlock > toBlock) {
      return [];
    }
    return await this.ethClient.Events({
      toBlock,
      fromBlock,
      includeTransaction
    });
  }
async Events ( { toBlock , fromBlock , count = 10 , includeTransaction = false } = { } ) { const latestBlock = await this . BlockNumber ( ) ; if ( ! toBlock ) { if ( ! fromBlock ) { toBlock = latestBlock ; fromBlock = toBlock - count + 1 ; } else { toBlock = fromBlock + count - 1 ; } } else if ( ! fromBlock ) { fromBlock = toBlock - count + 1 ; } if ( toBlock > latestBlock ) { toBlock = latestBlock ; } if ( fromBlock < 0 ) { fromBlock = 0 ; } if ( fromBlock > toBlock ) { return [ ] ; } return await this . ethClient . Events ( { toBlock , fromBlock , includeTransaction } ) ; }
Get events from the blockchain in reverse chronological order, starting from toBlock.
Get events from the blockchain in reverse chronological order starting from toBlock .
// Ensure block numbers are valid