Published 15 October 2018

SmartContractAddressesListGet

Getting the list of smart contracts’ addresses based on the source address of smart contracts.

Parameters

Parameters:

1: Address deployer

Type of result: SmartContractAddressesListGetResult

Operation algorithm

Operation algorithm:

The deployer field is re-coded: if the address string length is 64 symbols, then we re-code from 16 representation into string, or else we compute the public key hash in respect of the same based on the blake2 algorithm.

We update the smart contract caches:

We get the last block’s hash value.

We set the current hash's variable equal to the last block’s hash value.

While the current hash's variable is not equal to the hash value of the block last viewed by the smart contract, we:

Download the block containing the current hash to the pool.

Retrieve the smart contract in respect of all transactions.

Complete class structures from the smart contract. If the current transaction unrolls the smart contract, then we cache transaction ID, sender, recipient or else save the smart contract address and ID.

Move the current hash's variable to the previous block.

We set the hash value of the block last viewed by the smart contract equal to the last block’s hash value.

We retrieve smart contracts’ addresses in respect of an array of transaction IDs from source addresses and place them to the result structure.

We set the SUCCESS result status.

Data structure

The following structures are used for marshalling purposes:

SmartContractAddressesListGetResult smart contracts addresses list get result

APIResponse status

status

i8 code //status code

string message //status communication

SmartContractAddressList addressesList

addresses list

15 Useful article

Contents