Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 905 Bytes

get-smart-contract-record.md

File metadata and controls

40 lines (30 loc) · 905 Bytes

Get smart contract record

ContractRecordsQuery() returns all the records for a smart contract instance, for any function call (or the constructor call) during the last 24 hours, for which a record was requested.

Constructor Description
ContractRecordsQuery() Initializes the ContractRecordQuery object
new ContractRecordsQuery()

Basic

Method Type Description
setContractId(<contractId>) ContractId The ID of the contract to retreive the record for

Example

{% tabs %} {% tab title="Java" %}

new ContractRecordsQuery()
    .setContractId(newContractId)
    .execute(client);

{% endtab %}

{% tab title="JavaScript" %}

const record = await new ContractRecordsQuery()
    .setContractId(newContractId)
    .execute(client);
    
console.log(record)

{% endtab %} {% endtabs %}