getDataCount(contract, deleted?)

Feature

Get the number of data (not deleted). If deleted is true, the number including deleted data.

Parameters

string contract address, true | undefined deleted // (Optional) Whether to include deleted data.

data of SuccessResponse

object[] include data_count

example

const contractAddress = "0xb2310381f7E51a69d0C4cCdbE7a6DCB3B7353192fca";

// Note: an asynchronous request.
const dataCountInfo = async () => {
  const info = await mitum.storage.getDataCount(contract, true)
  console.log(info.data);
};
dataCountInfo();

// output
{
  contract: '0xb2310381f7E51a69d0C4cCdbE7a6DCB3B7353192fca',
  data_count: 106
}

Last updated