// Code generated by the multiversx-sc proxy generator. DO NOT EDIT.

////////////////////////////////////////////////////
////////////////// AUTO-GENERATED //////////////////
////////////////////////////////////////////////////

#![allow(dead_code)]
#![allow(clippy::all)]

use multiversx_sc::proxy_imports::*;

pub struct DigitalCashProxy;

impl<Env, From, To, Gas> TxProxyTrait<Env, From, To, Gas> for DigitalCashProxy
where
    Env: TxEnv,
    From: TxFrom<Env>,
    To: TxTo<Env>,
    Gas: TxGas<Env>,
{
    type TxProxyMethods = DigitalCashProxyMethods<Env, From, To, Gas>;

    fn proxy_methods(self, tx: Tx<Env, From, To, (), Gas, (), ()>) -> Self::TxProxyMethods {
        DigitalCashProxyMethods { wrapped_tx: tx }
    }
}

pub struct DigitalCashProxyMethods<Env, From, To, Gas>
where
    Env: TxEnv,
    From: TxFrom<Env>,
    To: TxTo<Env>,
    Gas: TxGas<Env>,
{
    wrapped_tx: Tx<Env, From, To, (), Gas, (), ()>,
}

#[rustfmt::skip]
impl<Env, From, Gas> DigitalCashProxyMethods<Env, From, (), Gas>
where
    Env: TxEnv,
    Env::Api: VMApi,
    From: TxFrom<Env>,
    Gas: TxGas<Env>,
{
    pub fn init<
        Arg0: ProxyArg<BigUint<Env::Api>>,
        Arg1: ProxyArg<EgldOrEsdtTokenIdentifier<Env::Api>>,
    >(
        self,
        fee: Arg0,
        token: Arg1,
    ) -> TxTypedDeploy<Env, From, NotPayable, Gas, ()> {
        self.wrapped_tx
            .payment(NotPayable)
            .raw_deploy()
            .argument(&fee)
            .argument(&token)
            .original_result()
    }
}

#[rustfmt::skip]
impl<Env, From, To, Gas> DigitalCashProxyMethods<Env, From, To, Gas>
where
    Env: TxEnv,
    Env::Api: VMApi,
    From: TxFrom<Env>,
    To: TxTo<Env>,
    Gas: TxGas<Env>,
{
    pub fn whitelist_fee_token<
        Arg0: ProxyArg<BigUint<Env::Api>>,
        Arg1: ProxyArg<EgldOrEsdtTokenIdentifier<Env::Api>>,
    >(
        self,
        fee: Arg0,
        token: Arg1,
    ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> {
        self.wrapped_tx
            .payment(NotPayable)
            .raw_call("whitelistFeeToken")
            .argument(&fee)
            .argument(&token)
            .original_result()
    }

    pub fn blacklist_fee_token<
        Arg0: ProxyArg<EgldOrEsdtTokenIdentifier<Env::Api>>,
    >(
        self,
        token: Arg0,
    ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> {
        self.wrapped_tx
            .payment(NotPayable)
            .raw_call("blacklistFeeToken")
            .argument(&token)
            .original_result()
    }

    pub fn claim_fees(
        self,
    ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> {
        self.wrapped_tx
            .payment(NotPayable)
            .raw_call("claimFees")
            .original_result()
    }

    pub fn get_amount<
        Arg0: ProxyArg<ManagedAddress<Env::Api>>,
        Arg1: ProxyArg<EgldOrEsdtTokenIdentifier<Env::Api>>,
        Arg2: ProxyArg<u64>,
    >(
        self,
        address: Arg0,
        token: Arg1,
        nonce: Arg2,
    ) -> TxTypedCall<Env, From, To, NotPayable, Gas, BigUint<Env::Api>> {
        self.wrapped_tx
            .payment(NotPayable)
            .raw_call("getAmount")
            .argument(&address)
            .argument(&token)
            .argument(&nonce)
            .original_result()
    }

    pub fn pay_fee_and_fund_esdt<
        Arg0: ProxyArg<ManagedAddress<Env::Api>>,
        Arg1: ProxyArg<u64>,
    >(
        self,
        address: Arg0,
        valability: Arg1,
    ) -> TxTypedCall<Env, From, To, (), Gas, ()> {
        self.wrapped_tx
            .raw_call("payFeeAndFundESDT")
            .argument(&address)
            .argument(&valability)
            .original_result()
    }

    pub fn pay_fee_and_fund_egld<
        Arg0: ProxyArg<ManagedAddress<Env::Api>>,
        Arg1: ProxyArg<u64>,
    >(
        self,
        address: Arg0,
        valability: Arg1,
    ) -> TxTypedCall<Env, From, To, (), Gas, ()> {
        self.wrapped_tx
            .raw_call("payFeeAndFundEGLD")
            .argument(&address)
            .argument(&valability)
            .original_result()
    }

    pub fn fund<
        Arg0: ProxyArg<ManagedAddress<Env::Api>>,
        Arg1: ProxyArg<u64>,
    >(
        self,
        address: Arg0,
        valability: Arg1,
    ) -> TxTypedCall<Env, From, To, (), Gas, ()> {
        self.wrapped_tx
            .raw_call("fund")
            .argument(&address)
            .argument(&valability)
            .original_result()
    }

    pub fn deposit_fees<
        Arg0: ProxyArg<ManagedAddress<Env::Api>>,
    >(
        self,
        address: Arg0,
    ) -> TxTypedCall<Env, From, To, (), Gas, ()> {
        self.wrapped_tx
            .raw_call("depositFees")
            .argument(&address)
            .original_result()
    }

    pub fn withdraw<
        Arg0: ProxyArg<ManagedAddress<Env::Api>>,
    >(
        self,
        address: Arg0,
    ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> {
        self.wrapped_tx
            .payment(NotPayable)
            .raw_call("withdraw")
            .argument(&address)
            .original_result()
    }

    pub fn claim<
        Arg0: ProxyArg<ManagedAddress<Env::Api>>,
        Arg1: ProxyArg<ManagedByteArray<Env::Api, 64usize>>,
    >(
        self,
        address: Arg0,
        signature: Arg1,
    ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()> {
        self.wrapped_tx
            .payment(NotPayable)
            .raw_call("claim")
            .argument(&address)
            .argument(&signature)
            .original_result()
    }

    pub fn forward<
        Arg0: ProxyArg<ManagedAddress<Env::Api>>,
        Arg1: ProxyArg<ManagedAddress<Env::Api>>,
        Arg2: ProxyArg<ManagedByteArray<Env::Api, 64usize>>,
    >(
        self,
        address: Arg0,
        forward_address: Arg1,
        signature: Arg2,
    ) -> TxTypedCall<Env, From, To, (), Gas, ()> {
        self.wrapped_tx
            .raw_call("forward")
            .argument(&address)
            .argument(&forward_address)
            .argument(&signature)
            .original_result()
    }

    pub fn deposit<
        Arg0: ProxyArg<ManagedAddress<Env::Api>>,
    >(
        self,
        donor: Arg0,
    ) -> TxTypedCall<Env, From, To, NotPayable, Gas, DepositInfo<Env::Api>> {
        self.wrapped_tx
            .payment(NotPayable)
            .raw_call("deposit")
            .argument(&donor)
            .original_result()
    }
}

#[type_abi]
#[derive(NestedEncode, NestedDecode, TopEncode, TopDecode)]
pub struct DepositInfo<Api>
where
    Api: ManagedTypeApi,
{
    pub depositor_address: ManagedAddress<Api>,
    pub esdt_funds: ManagedVec<Api, EsdtTokenPayment<Api>>,
    pub egld_funds: BigUint<Api>,
    pub valability: u64,
    pub expiration_round: u64,
    pub fees: Fee<Api>,
}

#[type_abi]
#[derive(NestedEncode, NestedDecode, TopEncode, TopDecode)]
pub struct Fee<Api>
where
    Api: ManagedTypeApi,
{
    pub num_token_to_transfer: usize,
    pub value: EgldOrEsdtTokenPayment<Api>,
}
