use crate::serialization::{Serializable, Deserializable};
use crate::cryptography::PublicAddress;
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct TransferInput {
recipient: PublicAddress,
amount: u64
}
impl Serializable for TransferInput {}
impl Deserializable for TransferInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct DeployInput {
contract: Vec<u8>,
cbi_version: u32
}
impl Serializable for DeployInput {}
impl Deserializable for DeployInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct CallInput {
target: PublicAddress,
method: String,
arguments: Option<Vec<Vec<u8>>>,
amount: Option<u64>
}
impl Serializable for CallInput {}
impl Deserializable for CallInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct CreatePoolInput {
commission_rate: u8
}
impl Serializable for CreatePoolInput {}
impl Deserializable for CreatePoolInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct SetPoolSettingsInput {
commission_rate: u8,
}
impl Serializable for SetPoolSettingsInput {}
impl Deserializable for SetPoolSettingsInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct CreateDepositInput {
operator: PublicAddress,
balance: u64,
auto_stake_rewards: bool,
}
impl Serializable for CreateDepositInput {}
impl Deserializable for CreateDepositInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct SetDepositSettingsInput {
operator: PublicAddress,
auto_stake_rewards: bool,
}
impl Serializable for SetDepositSettingsInput {}
impl Deserializable for SetDepositSettingsInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct TopUpDepositInput {
operator: PublicAddress,
amount: u64,
}
impl Serializable for TopUpDepositInput {}
impl Deserializable for TopUpDepositInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct WithdrawDepositInput {
operator: PublicAddress,
max_amount: u64,
}
impl Serializable for WithdrawDepositInput {}
impl Deserializable for WithdrawDepositInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct StakeDepositInput {
operator: PublicAddress,
max_amount: u64,
}
impl Serializable for StakeDepositInput {}
impl Deserializable for StakeDepositInput {}
#[derive(Debug, Clone, PartialEq, Eq, borsh::BorshSerialize, borsh::BorshDeserialize)]
pub struct UnstakeDepositInput {
operator: PublicAddress,
max_amount: u64,
}
impl Serializable for UnstakeDepositInput {}
impl Deserializable for UnstakeDepositInput {}