Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
cde2dbd
add simple eip1559 gas price estimator
Dec 29, 2023
85e8fb2
change fn get_eip1559_gas_price to async to use as nested call
Jan 17, 2024
ca60f7d
add rpc to start/stop gas fee estimator loop and get estimated values
Jan 17, 2024
6788529
fix fmt
Jan 17, 2024
976628b
add test calls to infura and blocknative gas price prediction api
Feb 11, 2024
ee85d20
refactor on review notes:
Feb 24, 2024
9e34949
Merge branch 'dev' into eip1559-gas-fee-estimate
Feb 25, 2024
42316c1
fix fmt
Feb 25, 2024
aa8660c
Implement proposal.
Feb 27, 2024
3e69a31
Refactor a bit.
Feb 27, 2024
2031b73
remove unused fee estimator errors
Mar 7, 2024
c87658a
rename get esimated fee rpc
Mar 7, 2024
61a80a9
add doc comments
Mar 8, 2024
46ceacc
rename gas fee estimation fn like in eip1559 terms
Mar 8, 2024
3413447
refactor fee estimator error dsc
Mar 8, 2024
9347f10
Merge branch 'dev' into eip1559-gas-fee-estimate
Mar 13, 2024
1b4180f
remove discontinued gas station call, use join to call alternate gas …
Mar 13, 2024
8750b6b
fix fmt
Mar 13, 2024
504657e
remove gas station remnants
Mar 13, 2024
fc4ca71
refactor to support typed txns (used test eth dependency repo), renam…
Mar 4, 2024
00f7f41
add eip1559 fee support to eth withdraw (still use test eth tx repo)
Mar 7, 2024
65a2174
add swap txfee policy
Mar 12, 2024
a56d2c3
refactor to reuse tx builder code
Mar 13, 2024
8ebb655
add eip1559 fee to swap txns (pre-TPU)
Mar 15, 2024
0743471
add get_swap_transaction_fee_policy rpc for eth coin
Mar 18, 2024
9081aa5
refactor get_estimated_fees rpc to use lp_coinfind_or_err
Mar 18, 2024
acd048b
fix fmt
Mar 19, 2024
d7de499
fix estimated base fee adjustment
Mar 22, 2024
9086052
always use high priority fee for gas estimation
Mar 22, 2024
90e585b
add different eth gas limit consts for swap operations
Mar 22, 2024
61b8fdc
add include_refund_fee param to show only required fee for lock funds…
Mar 22, 2024
220db97
fix get_eip1559_gas_fee after rebase
Mar 22, 2024
24f7644
fix clippy & fmt, fix missed param in get_sender_trade_fee tests
Mar 22, 2024
25d80f4
fix updated fn get_sender_trade_fee() gas limit calc and tests
Mar 23, 2024
431c5ce
fix gas limit consts for watcher; swap_watcher_tests with eth erc20 a…
Mar 23, 2024
67214d2
add eth type1 and type2 support in signed_tx_from_web3_tx fn
Mar 24, 2024
dae6645
fix fmt
Mar 24, 2024
df5daa2
fix parse web3 tx type0
Mar 25, 2024
098eaa2
add tests for type0 and type2 eth swap
Mar 25, 2024
86a8172
fix fmt
Mar 25, 2024
a62d7a4
add handling of errors from updated mm2-parity-ethereum lib
Mar 30, 2024
8230a89
refactor TransactionRequest creation
Mar 30, 2024
90f362a
add eth wasm test to sign priority fee tx
Mar 30, 2024
27a9743
Merge branch 'dev' into eip1559-gas-fee-estimate
Mar 30, 2024
b21a186
fix comment
Mar 30, 2024
bc67d5b
refactor fee per gas determination
Mar 31, 2024
a16f2ae
refactor signed_tx_from_web3_tx fn using tx builder
Mar 31, 2024
66f8ff7
more refactor signed_tx_from_web3_tx fn: use match
Mar 31, 2024
0ec27e9
refactor getting gas price and fee per gas
Apr 1, 2024
e473517
fix comment
Apr 4, 2024
7fa8d1f
fix due to changes in gas api provider response
Apr 4, 2024
a13fbfb
moved FeeEstimatorContext to eth platform coin
Apr 4, 2024
0435273
added comment
Apr 4, 2024
d607ae3
added memo comments
Apr 4, 2024
342d3f4
fix updated eth and web3 lib dependency urls
Apr 8, 2024
531f1af
refactor on review notes
Apr 8, 2024
789ec76
refactor on review notes:
Apr 9, 2024
d59387c
Merge branch 'dev' into eip1559-gas-fee-estimate
Apr 9, 2024
1793bb7
fix fmt
Apr 9, 2024
086a711
fix clippy err
Apr 9, 2024
7229e34
add 'gas_fee_estimator' param to 'coins' conf
Apr 13, 2024
48db16c
add 'max_eth_tx_type' to coins file and check tx type on signing
Apr 13, 2024
f0371e5
refactor estimated gas fee code to use wei internally (to make it lik…
Apr 13, 2024
b2e0677
add eip1559 fee per gas option to sign_raw_transaction rpc
Apr 13, 2024
8cb846c
refactor gas limit constants
Apr 13, 2024
fffe24a
refactor swap code to add named constants indicating when refund fee …
Apr 13, 2024
ebe4cad
fix getting 'max_eth_tx_type' to look for it also in token conf to al…
Apr 13, 2024
54b60a6
add check result for wasm sign raw tx test
Apr 14, 2024
898a89d
Merge branch 'dev' into eip1559-gas-fee-estimate
Apr 16, 2024
9169bcb
Merge branch 'dev' into eip1559-gas-fee-estimate
May 9, 2024
b3a84d6
Merge branch 'dev' into eip1559-gas-fee-estimate
May 9, 2024
7cbe03d
fix build err
May 10, 2024
9de585b
fix eip1559 trezor signature parsing
May 10, 2024
c516fd1
fix fmt
May 10, 2024
902c0e3
refactor init_fee_estimator
May 13, 2024
dbe8de0
Merge branch 'dev' into eip1559-gas-fee-estimate
May 14, 2024
20d16d9
fix review notes
May 17, 2024
a785274
move eip1559 swap policy methods to a trait
May 17, 2024
1cbf2f2
return swap policy docker tests (lost in merge)
May 17, 2024
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
13 changes: 8 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions mm2src/adex_cli/src/rpc_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! *Note: it's expected that the following data types will be moved to mm2_rpc::data when mm2 is refactored to be able to handle them*
//!

use mm2_rpc::data::legacy::{ElectrumProtocol, GasStationPricePolicy, UtxoMergeParams};
use mm2_rpc::data::legacy::{ElectrumProtocol, UtxoMergeParams};
use serde::{Deserialize, Serialize};

#[derive(Debug, Deserialize, Serialize)]
Expand All @@ -23,12 +23,6 @@ pub(crate) struct EnableRequest {
#[serde(skip_serializing_if = "Option::is_none")]
fallback_swap_contract: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
gas_station_url: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
gas_station_decimals: Option<u8>,
#[serde(skip_serializing_if = "Option::is_none")]
gas_station_policy: Option<GasStationPricePolicy>,
#[serde(skip_serializing_if = "Option::is_none")]
mm2: Option<u8>,
#[serde(default)]
tx_history: bool,
Expand Down
6 changes: 3 additions & 3 deletions mm2src/coins/Cargo.toml
Comment thread
laruh marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ derive_more = "0.99"
ed25519-dalek = "1.0.1"
enum_derives = { path = "../derives/enum_derives" }
ethabi = { version = "17.0.0" }
ethcore-transaction = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git" }
ethcore-transaction = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git", rev = "mm2-v2.1.1" }
ethereum-types = { version = "0.13", default-features = false, features = ["std", "serialize"] }
ethkey = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git" }
ethkey = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git", rev = "mm2-v2.1.1" }
# Waiting for https://github.com/rust-lang/rust/issues/54725 to use on Stable.
#enum_dispatch = "0.1"
futures01 = { version = "0.1", package = "futures" }
Expand Down Expand Up @@ -112,7 +112,7 @@ url = { version = "2.2.2", features = ["serde"] }
uuid = { version = "1.2.2", features = ["fast-rng", "serde", "v4"] }
# One of web3 dependencies is the old `tokio-uds 0.1.7` which fails cross-compiling to ARM.
# We don't need the default web3 features at all since we added our own web3 transport using shared HYPER instance.
web3 = { git = "https://github.com/KomodoPlatform/rust-web3", tag = "v0.19.0", default-features = false }
web3 = { git = "https://github.com/KomodoPlatform/rust-web3", tag = "v0.20.0", default-features = false }
zbase32 = "0.1.2"
zcash_client_backend = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.1" }
zcash_extras = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.1" }
Expand Down
7 changes: 4 additions & 3 deletions mm2src/coins/coin_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ impl From<Web3RpcError> for ValidatePaymentError {
match e {
Web3RpcError::Transport(tr) => ValidatePaymentError::Transport(tr),
Web3RpcError::InvalidResponse(resp) => ValidatePaymentError::InvalidRpcResponse(resp),
Web3RpcError::Internal(internal) | Web3RpcError::Timeout(internal) => {
ValidatePaymentError::InternalError(internal)
},
Web3RpcError::Internal(internal)
| Web3RpcError::Timeout(internal)
| Web3RpcError::NumConversError(internal)
| Web3RpcError::InvalidGasApiConfig(internal) => ValidatePaymentError::InternalError(internal),
Web3RpcError::NftProtocolNotSupported => ValidatePaymentError::NftProtocolNotSupported,
}
}
Expand Down
Loading