The retrieveStorageRange method provides information about the storage range of an account, including the nextKey which is a string that can be null, and storage which is an object.
In this example the thorClient connects to the testnet to retrieve the storage range for the coordinates passed as input parameter.
// 1 - Create thor client for testnetconstthorClient=ThorClient.at(TESTNET_URL);// 2 - Retrieve the storage range.constresult=awaitthorClient.debug.retrieveStorageRange({target:{blockId:BlockId.of('0x010e80e3278e234b8a5d1195c376909456b94d1f7cf3cb7bfab1e8998dbcfa8f' ),transaction:0,clauseIndex:0},options:{address:Address.of('0x0000000000000000000000000000456E65726779'),keyStart:BlockId.of('0x0000000000000000000000000000000000000000000000000000000000000000' ),maxResult:10}});// 3 - Print the result.console.log(result);
The result will show the storage.
Trace Contract Call
The traceContractCall traces the contract call execution.
In this example the thorClient connects to the testnet to trace the contract at the coordinates specified in the input parameter.
The result shows the trace, here only the first element is shown.
Trace Transaction Clause
The traceTransactionClause method trace the transactions specified in the clause at the coordinates expressed in the input parameter.
In this example the thorClient connects to the testnet to trace the clause at the coordinates specified in the input parameter.