pub struct ResponseAccount {
pub chain: Chain,
pub address: Bytes,
pub title: String,
pub slots: HashMap<Bytes, Bytes>,
pub native_balance: Bytes,
pub token_balances: HashMap<Bytes, Bytes>,
pub code: Bytes,
pub code_hash: Bytes,
pub balance_modify_tx: Bytes,
pub code_modify_tx: Bytes,
pub creation_tx: Option<Bytes>,
}Expand description
Account struct for the response from Tycho server for a contract state request.
Code is serialized as a hex string instead of a list of bytes.
Fields§
§chain: Chain§address: BytesThe address of the account as hex encoded string
title: StringThe title of the account usualy specifying its function within the protocol
slots: HashMap<Bytes, Bytes>Contract storage map of hex encoded string values
native_balance: BytesThe balance of the account in the native token
token_balances: HashMap<Bytes, Bytes>Balances of this account in other tokens (only tokens balance that are relevant to the protocol are returned here)
code: BytesThe accounts code as hex encoded string
code_hash: BytesThe hash of above code
balance_modify_tx: BytesTransaction hash which last modified native balance
code_modify_tx: BytesTransaction hash which last modified code
creation_tx: Option<Bytes>👎Deprecated: The
creation_tx field is deprecated.Transaction hash which created the account
Implementations§
Trait Implementations§
Source§impl Clone for ResponseAccount
impl Clone for ResponseAccount
Source§fn clone(&self) -> ResponseAccount
fn clone(&self) -> ResponseAccount
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseAccount
Implement Debug for ResponseAccount manually to avoid printing the code field.
impl Debug for ResponseAccount
Implement Debug for ResponseAccount manually to avoid printing the code field.
Source§impl DeepSizeOf for ResponseAccount
impl DeepSizeOf for ResponseAccount
Source§fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of_children(&self, context: &mut Context) -> usize
Returns an estimation of the heap-managed storage of this object.
This does not include the size of the object itself. Read more
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
Returns an estimation of a total size of memory owned by the
object, including heap-managed storage. Read more
Source§impl Default for ResponseAccount
impl Default for ResponseAccount
Source§fn default() -> ResponseAccount
fn default() -> ResponseAccount
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ResponseAccount
impl<'de> Deserialize<'de> for ResponseAccount
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Account> for ResponseAccount
impl From<Account> for ResponseAccount
Source§impl PartialEq for ResponseAccount
impl PartialEq for ResponseAccount
Source§impl Serialize for ResponseAccount
impl Serialize for ResponseAccount
Source§impl<'__s> ToSchema<'__s> for ResponseAccount
impl<'__s> ToSchema<'__s> for ResponseAccount
impl StructuralPartialEq for ResponseAccount
Auto Trait Implementations§
impl !Freeze for ResponseAccount
impl RefUnwindSafe for ResponseAccount
impl Send for ResponseAccount
impl Sync for ResponseAccount
impl Unpin for ResponseAccount
impl UnwindSafe for ResponseAccount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more