Published 15 October 2018


Getting a smart contract based on its address.



1:Address address

Type of result: SmartContractGetResult

Operation algorithm

Operation 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 download the smart contract performance transaction and retrieve the smart contract to the result structure.

We set the SUCCESS result status if the smart contract address is empty; if not, FAILURE.

Data structure

The following structures are used for marshalling purposes:

SmartContractGetResult smart contract get result

typedef list<SmartContract> SmartContractsList

APIResponse status


i8 code //status code

string message //status communication

SmartContract smartContract

smart contract

14 Useful article