Trait ContractInteractionsApi

Source
pub trait ContractInteractionsApi: Send + Sync {
    // Required methods
    fn get_deployed_contract_abi<'life0, 'async_trait>(
        &'life0 self,
        params: GetDeployedContractAbiParams,
    ) -> Pin<Box<dyn Future<Output = Result<ContractAbiResponseDto, Error<GetDeployedContractAbiError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_transaction_receipt<'life0, 'async_trait>(
        &'life0 self,
        params: GetTransactionReceiptParams,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionReceiptResponse, Error<GetTransactionReceiptError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn read_call_function<'life0, 'async_trait>(
        &'life0 self,
        params: ReadCallFunctionParams,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ParameterWithValue>, Error<ReadCallFunctionError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn write_call_function<'life0, 'async_trait>(
        &'life0 self,
        params: WriteCallFunctionParams,
    ) -> Pin<Box<dyn Future<Output = Result<WriteCallFunctionResponseDto, Error<WriteCallFunctionError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn get_deployed_contract_abi<'life0, 'async_trait>( &'life0 self, params: GetDeployedContractAbiParams, ) -> Pin<Box<dyn Future<Output = Result<ContractAbiResponseDto, Error<GetDeployedContractAbiError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /contract_interactions/base_asset_id/{baseAssetId}/contract_address/ {contractAddress}/functions

Return deployed contract’s ABI by blockchain native asset id and contract address.
Endpoint Permission: Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, and Viewer.

Source

fn get_transaction_receipt<'life0, 'async_trait>( &'life0 self, params: GetTransactionReceiptParams, ) -> Pin<Box<dyn Future<Output = Result<TransactionReceiptResponse, Error<GetTransactionReceiptError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /contract_interactions/base_asset_id/{baseAssetId}/tx_hash/{txHash}/ receipt

Retrieve the transaction receipt by blockchain native asset ID and transaction hash
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, and Viewer.

Source

fn read_call_function<'life0, 'async_trait>( &'life0 self, params: ReadCallFunctionParams, ) -> Pin<Box<dyn Future<Output = Result<Vec<ParameterWithValue>, Error<ReadCallFunctionError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

POST /contract_interactions/base_asset_id/{baseAssetId}/ contract_address/{contractAddress}/functions/read

Call a read function on a deployed contract by blockchain native asset id and contract address.
Endpoint Permission: Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, and Editor.

Source

fn write_call_function<'life0, 'async_trait>( &'life0 self, params: WriteCallFunctionParams, ) -> Pin<Box<dyn Future<Output = Result<WriteCallFunctionResponseDto, Error<WriteCallFunctionError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

POST /contract_interactions/base_asset_id/{baseAssetId}/ contract_address/{contractAddress}/functions/write

Call a write function on a deployed contract by blockchain native asset id and contract address. This creates an onchain transaction, thus it is an async operation. It returns a transaction id that can be polled for status check.
Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, and Editor.

Implementors§