Published 15 October 2018


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



1: Address deployer

Type of result: SmartContractsListGetResult

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 in respect of an array of transaction ID’s 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:

SmartContractsListGetResult smart contracts list get result

typedef list<string> SmartContractAddressList

APIResponse status


i8 code //status code

string message //status communication

SmartContractsList smartContractsList

smart contracts list

17 Useful article