Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/shielder-relayer/src/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ pub struct FeeDetails {
/// but excluding the commission.
#[schema(value_type = String)]
pub relayer_cost_native: U256,
/// The actual on-chain cost of the relay in fee token, including gas and pocket money,
/// but excluding the commission.
#[schema(value_type = String)]
pub relayer_cost_fee_token: U256,

/// The cost of pocket money in fee token.
#[schema(value_type = String)]
pub pocket_money_fee_token: U256,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's return pocket_money_native as well!


/// Gas cost for relay call (in native token).
#[schema(value_type = String)]
Expand Down Expand Up @@ -85,6 +93,8 @@ pub fn compute_fee(
total_cost_native,
total_cost_fee_token: scale_u256(total_cost_native, native_to_fee_ratio)?,
relayer_cost_native,
relayer_cost_fee_token: scale_u256(relayer_cost_native, native_to_fee_ratio)?,
pocket_money_fee_token: scale_u256(pocket_money, native_to_fee_ratio)?,
gas_cost_native,
gas_cost_fee_token: scale_u256(gas_cost_native, native_to_fee_ratio)?,
commission_native,
Expand Down
Loading