Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fee estimation parameters #194

Open
LeMarwin opened this issue Oct 11, 2022 · 0 comments
Open

Fee estimation parameters #194

LeMarwin opened this issue Oct 11, 2022 · 0 comments
Assignees
Labels
operator Operator's functionality and UI

Comments

@LeMarwin
Copy link
Contributor

Intro

In i190-units branch we now have fee estimation parameters stored in runtime state.

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FeeEstimates {
    /// Estimate of bytes per tx for BTC
    pub btc_bytes_per_tx: u64,
    /// Gas limit for Ethereum transfer transaction
    pub eth_tx_gas_limit: u64,
    /// Gas limit for ERC20 transfer transaction
    pub erc20_tx_gas_limit: u64
}

I have also added two endpoints for operators:

#[get("/rstate/fees")]
async fn get_fee_estimates(...) -> error::Result<Json<FeeEstimates>>

#[post("/rstate/fees/set", data="<estimates>")]
async fn set_fee_estimates(..., estimates: Json<FeeEstimates>) -> error::Result<()>

Task

Use said endpoints to add UI for operators to review and adjust fee estimations.

Ideally the operator should see estimations and the final fee price in crypto and fiat, but a simple edit is enough for now

@Aminion Aminion self-assigned this Oct 12, 2022
@LeMarwin LeMarwin added the operator Operator's functionality and UI label Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operator Operator's functionality and UI
Projects
None yet
Development

No branches or pull requests

2 participants