pub trait SunriseExt<AccountId, BlockNumber> {
    fn register_exchange_rate(
        prices: Vec<(AssetId, Balance)>
    ) -> Result<(), DispatchError>; fn try_allocate_rewards_for_swap(
        account_id: &AccountId,
        era: EraIndex,
        fee: &Fee,
        currency_id: CurrencyId
    ) -> Result<Option<Balance>, DispatchError>; fn try_refund_gas_for_deposit(
        account_id: &AccountId,
        currency_id: CurrencyId,
        amount: Balance
    ) -> Result<Option<Balance>, DispatchError>; fn try_claim_sunrise_rewards(
        account_id: &AccountId,
        era: EraIndex
    ) -> Result<(), DispatchError>; fn cooldown_blocks_count() -> BlockNumber; fn account_id() -> AccountId; fn try_get_tdfy_value(
        currency_id: CurrencyId,
        amount: Balance
    ) -> Result<Balance, DispatchError>; }

Required Methods§

Register TDFY’s price for sunrise pool

Based ont the fee, try to allocate a new sunrise rewards for the account_id on the specified era.

Try to refunds the amount of currency_id for account_id in TDFY’s.

Try to claim sunrise rewards for the account_id for the specified era.

Number of blocks to wait before allowing users to claim their sunrise rewards, after a specific fee era is completed.

Get the account of the sunrise pool

Based on the AssetExchangeRate provided by Oracle, try to convert the currency_id balance to TDFY’s.

Implementors§