hexresearch / hexresearch/hexstody

Fee estimation parameters

Open
#194 0 comments 0 reactions 1 assignee Claimed by @Aminion View on GitHub
operator
Dominant language
Rust
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### Intro
In [i190-units](https://github.com/hexresearch/hexstody/tree/i190-units) branch we now have fee estimation parameters stored in runtime state.

``` rust
#[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:

``` rust
#[get("/rstate/fees")]
async fn get_fee_estimates(...) -> error::Result>

#[post("/rstate/fees/set", data="")]
async fn set_fee_estimates(..., estimates: Json) -> 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.