Published 15 February 2019

SmartContractGetResult SmartContractGet(1:Address address)

Description

Description

 

Get smart contact by its address.

Update the caches of the 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:
Load a block with the current hash into the pool.
For all transactions, extract a smart contract.
Fill class structures from the smart contract. If the current transaction is deploying a smart contract, then save the transaction identifier, the sender, the recipient in the cache, otherwise save the address and the identifier of the smart contract.

Parameters

Parameters

// Wallet or smart contract address

typedef binary Address

Return

Return

struct SmartContractGetResult

{

   1: general.APIResponse status

   2: SmartContract smartContract

}

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