Published 15 February 2019

SmartContractAddressesListGetResult SmartContractAddressesListGet(1:Address deployer)

Description

Description

Reception a list of smart contracts addresses from the address from which smart contracts are placed

The deployer field is transcoding: if the length of the address string is 64 characters, then will transcode from the 16th representation to the string, otherwise we calculate the public key hash by blake2 algorithm.

Update the caches of smart contract: Get the hash of the last block. Set the current hash variable to the hash of the last block. While the current hash variable is not equal to the hash value of the last block scanned by the smart contract: Block is loaded into the pool with the current hash.

Extract smart contract for all transactions. Fill class structures from the smart contract. If the current transaction is deploying a smart contract, then we save the transaction ID, the sender, the recipient in the cache, otherwise we save the address and the ID of the smart contract.

Move the current hash variable to the previous block.

Set the hash value of the last block scanned by the smart contract to the hash of the last block. By the array of transaction identifiers placed from the addresses, we extract the addresses of the smart contracts and put them into the result structure. Set the result status of the SUCCESS.

Parameters

Parameters

// Wallet or smart contract address

typedef binary Address

Return

Return

struct SmartContractAddressesListGetResult

{

   1: general.APIResponse status

   2: list<Address> addressesList

}

Description of the returned structures and typedefs

Description of the returned structures and typedefs

struct APIResponse

{

// 0 for success, 1 for failure, 2 for not being implemented (currently unused)

   1: i8 code

// Explanation

   2: string message

}

Votes 0, average rating 0

Contents