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