ToolError

Enum ToolError 

Source
pub enum ToolError {
    Stdio(Error),
    SerdeJson(Error),
    Hyper(Error),
    HyperLegacy(Error),
    Abi(String),
    Proto(ProtobufError),
    Decode(FromHexError),
    Parse(ParseIntError),
    Customize(String),
}
Expand description

Error summary information

Variants§

§

Stdio(Error)

IO error

§

SerdeJson(Error)

Parsing json data error

§

Hyper(Error)

Hyper error

§

HyperLegacy(Error)

Hyper legacy error

§

Abi(String)

ABI error

§

Proto(ProtobufError)

Protobuf error

§

Decode(FromHexError)

Hex decode error

§

Parse(ParseIntError)

Parse error

§

Customize(String)

Customize error

Trait Implementations§

Source§

impl<T> AdminExt<T, JsonRpcResponse, ToolError> for AdminClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn admin(&self, height: Option<&str>) -> Result<R, E>

Get admin address
Source§

fn is_admin(&self, address: &str, height: Option<&str>) -> Result<R, E>

Check if the account is admin
Source§

fn add_admin(&mut self, address: &str, quota: Option<u64>) -> Result<R, E>

Update admin account
Source§

impl<T> AllowanceExt<T, JsonRpcResponse, ToolError> for AllowanceClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn in_allowance(&self, door: &str, height: Option<&str>) -> Result<R, E>

Check resource in the allowance Read more
Source§

fn query_info(&self, height: Option<&str>) -> Result<R, E>

Query the information of the allowance Read more
Source§

fn query_name(&self, height: Option<&str>) -> Result<R, E>

Query the name of the allowance Read more
Source§

fn query_doornum(&self, height: Option<&str>) -> Result<R, E>

Query the doornum of the allowance Read more
Source§

fn query_doornum_length(&self, height: Option<&str>) -> Result<R, E>

Query the doornum length of the allowance Read more
Source§

fn query_doornum_hot(&self, door: &str, height: Option<&str>) -> Result<R, E>

Check how hot about door address Read more
Source§

impl<T> AllowanceManagementExt<T, JsonRpcResponse, ToolError> for AllowanceManageClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn update_allowance_name( &mut self, name: &str, quota: Option<u64>, ) -> Result<R, E>

Update the allowance name Read more
Source§

fn add_doornums( &mut self, doors: &str, nums: &str, quota: Option<u64>, ) -> Result<R, E>

Add the doornums of allowance Read more
Source§

fn update_doornum( &mut self, door: &str, num: &str, quota: Option<u64>, ) -> Result<R, E>

update the doornum of allowance, once update one doornum Read more
Source§

fn delete_doornums(&mut self, doors: &str, quota: Option<u64>) -> Result<R, E>

Delete the resources of permission Read more
Source§

impl AmendExt<JsonRpcResponse, ToolError> for Client

Source§

fn amend_code( &mut self, address: &str, content: &str, quota: Option<u64>, ) -> Result<T, E>

Amend contract code
Source§

fn amend_abi( &mut self, address: &str, content: String, quota: Option<u64>, ) -> Result<T, E>

Amend contract ABI
Source§

fn amend_h256kv( &mut self, address: &str, h256_kv: &str, quota: Option<u64>, ) -> Result<T, E>

Amend H256KV
Source§

fn amend_balance( &mut self, address: &str, balance: U256, quota: Option<u64>, ) -> Result<T, E>

Amend account balance
Source§

impl<T> AuthorizationExt<T, JsonRpcResponse, ToolError> for AuthorizationClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn query_all_permissions(&self, height: Option<&str>) -> Result<R, E>

Query all permission Read more
Source§

fn query_all_permissions_number(&self, height: Option<&str>) -> Result<R, E>

Query all permission Read more
Source§

fn query_permissions(&self, account: &str, height: Option<&str>) -> Result<R, E>

Query the account’s permissions Read more
Source§

fn query_accounts(&self, permission: &str, height: Option<&str>) -> Result<R, E>

Query the permission’s accounts Read more
Source§

fn query_all_accounts(&self, height: Option<&str>) -> Result<R, E>

Query all accounts Read more
Source§

fn query_all_accounts_number(&self, height: Option<&str>) -> Result<R, E>

Query all accounts number Read more
Source§

fn check_resource( &self, account: &str, contract: &str, func: &str, height: Option<&str>, ) -> Result<R, E>

Check Resource Read more
Source§

fn check_permission( &self, account: &str, permission: &str, height: Option<&str>, ) -> Result<R, E>

Check account has a permission Read more
Source§

impl<T> BatchTxExt<T, JsonRpcResponse, ToolError> for BatchTxClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn multi_transactions( &mut self, txs: Vec<&str>, quota: Option<u64>, ) -> Result<R, E>

Multi transactions send once
Source§

impl<T> CertRevokeManagerExt<T, JsonRpcResponse, ToolError> for CertRevokeManagerClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn get_crl(&self, height: Option<&str>) -> Result<R, E>

Get certificate revoke list
Source§

fn query_in_revoke( &self, account_address: &str, height: Option<&str>, ) -> Result<R, E>

query certificate whether in revoke list
Source§

fn query_certificate_hot( &self, account_address: &str, height: Option<&str>, ) -> Result<R, E>

query certificate whether in revoke list
Source§

fn revoke(&mut self, account_address: &str, quota: Option<u64>) -> Result<R, E>

revoke a certificate using its common name. Actually the corresponding node address.
Source§

fn release_revoke( &mut self, account_address: &str, quota: Option<u64>, ) -> Result<R, E>

release a certificate from revoke list using its common name. Actually the corresponding node address.
Source§

fn set_committee( &mut self, committee_address: &str, quota: Option<u64>, ) -> Result<R, E>

set committee contract address, admin & committe both could add or delete certificate
Source§

impl ClientExt<JsonRpcResponse, ToolError> for Client

Source§

fn get_peer_count(&self) -> Result<JsonRpcResponse, ToolError>

peerCount: Get network peer count
Source§

fn get_peers_info(&self, extra: bool) -> Result<JsonRpcResponse, ToolError>

peersInfo: Get all peers information
Source§

fn get_license_info(&self) -> Result<JsonRpcResponse, ToolError>

licenseInfo: Get CITA license information
Source§

fn get_block_number(&self) -> Result<JsonRpcResponse, ToolError>

blockNumber: Get current height
Source§

fn send_raw_transaction( &mut self, transaction_option: TransactionOptions<'_>, ) -> Result<JsonRpcResponse, ToolError>

sendTransaction: Send a transaction and return transaction hash
Source§

fn get_block_by_hash( &self, hash: &str, transaction_info: bool, ) -> Result<JsonRpcResponse, ToolError>

getBlockByHash: Get block by hash
Source§

fn get_block_by_number( &self, height: &str, transaction_info: bool, ) -> Result<JsonRpcResponse, ToolError>

getBlockByNumber: Get block by number
Source§

fn get_transaction_receipt( &self, hash: &str, ) -> Result<JsonRpcResponse, ToolError>

getTransactionReceipt: Get transaction receipt
Source§

fn get_logs( &self, topic: Option<Vec<&str>>, address: Option<Vec<&str>>, from: Option<&str>, to: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

getLogs: Get logs
Source§

fn call( &self, from: Option<&str>, to: &str, data: Option<&str>, height: &str, extra: bool, ) -> Result<JsonRpcResponse, ToolError>

call: (readonly, will not save state change)
Source§

fn get_transaction( &self, hash: &str, in_pool: bool, ) -> Result<JsonRpcResponse, ToolError>

getTransaction: Get transaction by hash
Source§

fn get_transaction_count( &self, address: &str, height: &str, ) -> Result<JsonRpcResponse, ToolError>

getTransactionCount: Get transaction count of an account
Source§

fn get_code( &self, address: &str, height: &str, ) -> Result<JsonRpcResponse, ToolError>

getCode: Get the code of a contract
Source§

fn get_abi( &self, address: &str, height: &str, ) -> Result<JsonRpcResponse, ToolError>

getAbi: Get the ABI of a contract
Source§

fn get_balance( &self, address: &str, height: &str, ) -> Result<JsonRpcResponse, ToolError>

getBalance: Get the balance of a contract (TODO: return U256)
Source§

fn new_filter( &self, topic: Option<Vec<&str>>, address: Option<Vec<&str>>, from: Option<&str>, to: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

newFilter:
Source§

fn new_block_filter(&self) -> Result<JsonRpcResponse, ToolError>

newBlockFilter:
Source§

fn uninstall_filter( &self, filter_id: &str, ) -> Result<JsonRpcResponse, ToolError>

uninstallFilter: Uninstall a filter by its id
Source§

fn get_filter_changes( &self, filter_id: &str, ) -> Result<JsonRpcResponse, ToolError>

getFilterChanges: Get filter changes
Source§

fn get_filter_logs(&self, filter_id: &str) -> Result<JsonRpcResponse, ToolError>

getFilterLogs: Get filter logs
Source§

fn get_transaction_proof( &self, hash: &str, ) -> Result<JsonRpcResponse, ToolError>

getTransactionProof: Get proof of a transaction
Source§

fn get_metadata(&self, height: &str) -> Result<JsonRpcResponse, ToolError>

getMetaData: Get metadata
Source§

fn get_block_header(&self, height: &str) -> Result<JsonRpcResponse, ToolError>

getBlockHeader: Get block headers based on block height
Source§

fn get_state_proof( &self, address: &str, key: &str, height: &str, ) -> Result<JsonRpcResponse, ToolError>

getStateProof: Get the proof of the variable at the specified height
Source§

fn get_storage_at( &self, address: &str, key: &str, height: &str, ) -> Result<JsonRpcResponse, ToolError>

getStorageAt: Get the value of the key at the specified height
Source§

fn get_version(&self) -> Result<JsonRpcResponse, ToolError>

getVersion: Get release version info of all modules
Source§

fn estimate_quota( &self, from: Option<&str>, to: &str, data: Option<&str>, height: &str, ) -> Result<JsonRpcResponse, ToolError>

estimateQuota: Estimate a transaction’s quota used
Source§

fn get_pool_tx_num(&self) -> Result<JsonRpcResponse, ToolError>

get tx number in pool
Source§

fn operate_censored_address( &self, action: CensorAction, censor_addr: &str, ) -> Result<JsonRpcResponse, ToolError>

operate censorship address list
Source§

fn get_censored_addr(&self) -> Result<JsonRpcResponse, ToolError>

get censorship address list
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for AdminClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for AllowanceClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for AllowanceManageClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for AuthorizationClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for BatchTxClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for CertRevokeManagerClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for EmergencyBrakeClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for GroupClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for GroupManageClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for NodeManageClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for PermissionClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for PermissionManageClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for PriceManagerClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for QuotaManageClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for RoleClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for RoleManageClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for SysConfigClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl<T> ContractCall<JsonRpcResponse, ToolError> for VersionManagerClient<T>

Source§

fn prepare_call_args( &self, name: &str, values: &[&str], to_addr: Option<Address>, ) -> Result<(String, String), ToolError>

Prepare contract call arguments
Source§

fn contract_send_tx( &mut self, name: &str, values: &[&str], quota: Option<u64>, to_addr: Option<Address>, ) -> Result<JsonRpcResponse, ToolError>

SendTx a contract method
Source§

fn contract_call( &self, name: &str, values: &[&str], to_addr: Option<Address>, height: Option<&str>, ) -> Result<JsonRpcResponse, ToolError>

Call a contract method
Source§

fn contract_call_to_address( &self, function_name: &str, values: &[&str], address: &str, height: Option<&str>, ) -> Result<R, E>

Call a contract method with a to_address
Source§

impl Debug for ToolError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ToolError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> EmergencyBrakeExt<T, JsonRpcResponse, ToolError> for EmergencyBrakeClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn state(&self, height: Option<&str>) -> Result<R, E>

Get state
Source§

fn set_state(&mut self, state: bool, quota: Option<u64>) -> Result<R, E>

Set state
Source§

impl Fail for ToolError

Source§

fn name(&self) -> Option<&str>

Returns the “name” of the error. Read more
Source§

fn cause(&self) -> Option<&dyn Fail>

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more
Source§

fn context<D>(self, context: D) -> Context<D>
where D: Display + Send + Sync + 'static, Self: Sized,

Provides context for this failure. Read more
Source§

fn compat(self) -> Compat<Self>
where Self: Sized,

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more
Source§

impl<T> GroupExt<T, JsonRpcResponse, ToolError> for GroupClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn query_info(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the information of the group
Source§

fn query_name(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the name of the group
Source§

fn query_accounts(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the accounts of the group
Source§

fn query_accounts_num( &self, address: &str, height: Option<&str>, ) -> Result<R, E>

Query the accounts of the group
Source§

fn query_children(&self, address: &str, height: Option<&str>) -> Result<R, E>

Alias for query_child
Source§

fn query_child(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the children of the group
Source§

fn query_children_length( &self, address: &str, height: Option<&str>, ) -> Result<R, E>

Alias for query_child_length
Source§

fn query_child_length( &self, address: &str, height: Option<&str>, ) -> Result<R, E>

Query the length of children of the group
Source§

fn query_parent(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the parent of the group
Source§

fn in_group( &self, address: &str, account_address: &str, height: Option<&str>, ) -> Result<R, E>

Check the account in the group
Source§

impl<T> GroupManagementExt<T, JsonRpcResponse, ToolError> for GroupManageClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn new_group( &mut self, origin: &str, name: &str, accounts: &str, quota: Option<u64>, ) -> Result<R, E>

Create a new group
Source§

fn delete_group( &mut self, origin: &str, target: &str, quota: Option<u64>, ) -> Result<R, E>

Delete the group
Source§

fn update_group_name( &mut self, origin: &str, target: &str, name: &str, quota: Option<u64>, ) -> Result<R, E>

Update the group name
Source§

fn add_accounts( &mut self, origin: &str, target: &str, accounts: &str, quota: Option<u64>, ) -> Result<R, E>

Add accounts
Source§

fn delete_accounts( &mut self, origin: &str, target: &str, accounts: &str, quota: Option<u64>, ) -> Result<R, E>

Delete accounts
Source§

fn check_scope( &self, origin: &str, target: &str, height: Option<&str>, ) -> Result<R, E>

Check the target group in the scope of the origin group Scope: the origin group is the ancestor of the target group
Source§

fn query_groups(&self, height: Option<&str>) -> Result<R, E>

Query all groups
Source§

fn query_account_groups( &self, account: &str, height: Option<&str>, ) -> Result<R, E>

Query account’s groups
Source§

impl<T> NodeManagementExt<T, JsonRpcResponse, ToolError> for NodeManageClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn downgrade_consensus_node( &mut self, address: &str, quota: Option<u64>, ) -> Result<R, E>

Downgrade consensus node to ordinary node
Source§

fn node_status(&self, address: &str, height: Option<&str>) -> Result<R, E>

Get node status
Source§

fn get_authorities(&self, height: Option<&str>) -> Result<R, E>

Get authorities
Source§

fn approve_node(&mut self, address: &str, quota: Option<u64>) -> Result<R, E>

Approve node upgrades to consensus nodes
Source§

fn list_stake(&self, height: Option<&str>) -> Result<R, E>

Node stake list
Source§

fn set_stake( &mut self, address: &str, stake: U256, quota: Option<u64>, ) -> Result<R, E>

Set node stake
Source§

fn stake_permillage(&self, address: &str, height: Option<&str>) -> Result<R, E>

Stake permillage
Source§

impl<T> PermissionExt<T, JsonRpcResponse, ToolError> for PermissionClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn in_permission( &self, address: &str, contract: &str, func: &str, height: Option<&str>, ) -> Result<R, E>

Check resource in the permission Read more
Source§

fn query_info(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the information of the permission Read more
Source§

fn query_name(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the name of the permission Read more
Source§

fn query_resource(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the resource of the permission Read more
Source§

fn query_resource_num( &self, address: &str, height: Option<&str>, ) -> Result<R, E>

Query the resource number of the permission Read more
Source§

fn query_resource_hot( &self, address: &str, contract: &str, func: &str, height: Option<&str>, ) -> Result<R, E>

Check how hot about resource Read more
Source§

impl<T> PermissionManagementExt<T, JsonRpcResponse, ToolError> for PermissionManageClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn new_permission( &mut self, name: &str, contracts: &str, funcs: &str, quota: Option<u64>, ) -> Result<R, E>

Create a new permission Read more
Source§

fn delete_permission( &mut self, permission: &str, quota: Option<u64>, ) -> Result<R, E>

Delete the permission Read more
Source§

fn update_permission_name( &mut self, permission: &str, name: &str, quota: Option<u64>, ) -> Result<R, E>

Update the permission name Read more
Source§

fn add_resources( &mut self, permission: &str, contracts: &str, funcs: &str, quota: Option<u64>, ) -> Result<R, E>

Add the resources of permission Read more
Source§

fn delete_resources( &mut self, permission: &str, contracts: &str, funcs: &str, quota: Option<u64>, ) -> Result<R, E>

Delete the resources of permission Read more
Source§

fn set_authorization( &mut self, account_address: &str, permission: &str, quota: Option<u64>, ) -> Result<R, E>

Set permission to the account Read more
Source§

fn set_authorizations( &mut self, account_address: &str, permissions: &str, quota: Option<u64>, ) -> Result<R, E>

Set multiple permissions to the account Read more
Source§

fn cancel_authorization( &mut self, account_address: &str, permission: &str, quota: Option<u64>, ) -> Result<R, E>

Cancel the account’s permission Read more
Source§

fn cancel_authorizations( &mut self, account_address: &str, permissions: &str, quota: Option<u64>, ) -> Result<R, E>

Cancel the account’s multiple permission Read more
Source§

fn clear_authorization( &mut self, account_address: &str, quota: Option<u64>, ) -> Result<R, E>

Clear the account’s permissions Read more
Source§

impl<T> PriceManagerExt<T, JsonRpcResponse, ToolError> for PriceManagerClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn price(&self, height: Option<&str>) -> Result<R, E>

Get quota price
Source§

fn set_price(&mut self, price: U256, quota: Option<u64>) -> Result<R, E>

Set quota price
Source§

impl<T> QuotaManagementExt<T, JsonRpcResponse, ToolError> for QuotaManageClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn get_bql(&self, height: Option<&str>) -> Result<R, E>

Get block quota upper limit
Source§

fn get_aql(&self, address: &str, height: Option<&str>) -> Result<R, E>

Get account quota upper limit of the specific account
Source§

fn get_default_aql(&self, height: Option<&str>) -> Result<R, E>

Get default account quota limit
Source§

fn get_accounts(&self, height: Option<&str>) -> Result<R, E>

Get accounts
Source§

fn get_quotas(&self, height: Option<&str>) -> Result<R, E>

Get quotas
Source§

fn set_bql(&mut self, quota_limit: U256, quota: Option<u64>) -> Result<R, E>

Set block quota limit
Source§

fn set_default_aql( &mut self, quota_limit: U256, quota: Option<u64>, ) -> Result<R, E>

Set default account quota limit
Source§

fn set_aql( &mut self, address: &str, quota_limit: U256, quota: Option<u64>, ) -> Result<R, E>

Set account quota upper limit of the specific account
Source§

impl<T> RoleExt<T, JsonRpcResponse, ToolError> for RoleClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn query_role(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the information of the role Read more
Source§

fn query_name(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the name of the role Read more
Source§

fn query_permissions(&self, address: &str, height: Option<&str>) -> Result<R, E>

Query the permissions of the role Read more
Source§

fn length_of_permissions( &self, address: &str, height: Option<&str>, ) -> Result<R, E>

Query the length of the permissions Read more
Source§

fn in_permissions( &self, address: &str, permission: &str, height: Option<&str>, ) -> Result<R, E>

Check the duplicate permission Read more
Source§

impl<T> RoleManagementExt<T, JsonRpcResponse, ToolError> for RoleManageClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn new_role( &mut self, name: &str, permissions: &str, quota: Option<u64>, ) -> Result<R, E>

Create a new role Read more
Source§

fn delete_role(&mut self, role: &str, quota: Option<u64>) -> Result<R, E>

Delete the role Read more
Source§

fn update_role_name( &mut self, role: &str, name: &str, quota: Option<u64>, ) -> Result<R, E>

Update role’s name Read more
Source§

fn add_permissions( &mut self, role: &str, permissions: &str, quota: Option<u64>, ) -> Result<R, E>

Add permissions of role Read more
Source§

fn delete_permissions( &mut self, role: &str, permissions: &str, quota: Option<u64>, ) -> Result<R, E>

Delete permissions of role Read more
Source§

fn set_role( &mut self, account: &str, role: &str, quota: Option<u64>, ) -> Result<R, E>

Set the role to the account Read more
Source§

fn cancel_role( &mut self, account: &str, role: &str, quota: Option<u64>, ) -> Result<R, E>

Cancel the account’s role Read more
Source§

fn clear_role(&mut self, account: &str, quota: Option<u64>) -> Result<R, E>

Clear the account’s role Read more
Source§

fn query_roles(&self, account: &str, height: Option<&str>) -> Result<R, E>

Query the roles of the account Read more
Source§

fn query_accounts(&self, role: &str, height: Option<&str>) -> Result<R, E>

Query the accounts that have the role Read more
Source§

impl StoreExt<JsonRpcResponse, ToolError> for Client

Source§

fn store_data(&mut self, content: &str, quota: Option<u64>) -> Result<T, E>

Store data to chain, data can be get back by getTransaction rpc call
Source§

fn store_abi( &mut self, address: &str, content: String, quota: Option<u64>, ) -> Result<T, E>

Store contract ABI to chain, ABI can be get back by getAbi rpc call
Source§

impl<T> SysConfigExt<T, JsonRpcResponse, ToolError> for SysConfigClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn get_chain_owner(&self, height: Option<&str>) -> Result<R, E>

Get chain owner
Source§

fn get_chain_id(&self, height: Option<&str>) -> Result<R, E>

Get chain id
Source§

fn get_chain_id_v1(&self, height: Option<&str>) -> Result<R, E>

Get chain id v1
Source§

fn get_create_permission_check(&self, height: Option<&str>) -> Result<R, E>

Check sender’s create contract permission
Source§

fn get_send_permission_check(&self, height: Option<&str>) -> Result<R, E>

Check sender’s send transaction permission
Source§

fn get_delay_block_number(&self, height: Option<&str>) -> Result<R, E>

Get delay block number
Source§

fn get_feeback_platform_check(&self, height: Option<&str>) -> Result<R, E>

Whether economic incentives are returned to operators
Source§

fn get_economical_model(&self, height: Option<&str>) -> Result<R, E>

Whether to open the charging mode
Source§

fn get_permission_check(&self, height: Option<&str>) -> Result<R, E>

Whether to open the permission check
Source§

fn get_quota_check(&self, height: Option<&str>) -> Result<R, E>

Whether to open the quota check
Source§

fn get_allowance_check(&self, height: Option<&str>) -> Result<R, E>

Check sender’s send transaction permission
Source§

fn set_chain_name( &mut self, chain_name: &str, quota: Option<u64>, ) -> Result<R, E>

Set chain name
Source§

fn set_operator(&mut self, operator: &str, quota: Option<u64>) -> Result<R, E>

Set operator
Source§

fn set_website(&mut self, website: &str, quota: Option<u64>) -> Result<R, E>

Set website
Source§

fn set_block_interval( &mut self, block_interval: U256, quota: Option<u64>, ) -> Result<R, E>

Set block interval
Source§

impl Transfer<JsonRpcResponse, ToolError> for Client

Source§

fn transfer( &mut self, value: U256, address: &str, quota: Option<u64>, ) -> Result<T, E>

Account transfer, only applies to charge mode
Source§

impl<T> VersionManagerExt<T, JsonRpcResponse, ToolError> for VersionManagerClient<T>

Source§

fn create(client: T) -> Self

Create a ContractClient
Source§

fn get_version(&self, height: Option<&str>) -> Result<R, E>

Get version
Source§

fn set_version(&mut self, version: U256, quota: Option<u64>) -> Result<R, E>

Set version

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsFail for T
where T: Fail,

Source§

fn as_fail(&self) -> &(dyn Fail + 'static)

Converts a reference to Self into a dynamic trait object of Fail.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more