forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 101
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
[r2r] tendermint missing implementations #1526
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
3f37204
increase simulated gas to predict better values for real tx operations
onur-ozkan 9b43af6
remove couple TODO notes and impelement `lp_coins::wait_for_confirmat…
onur-ozkan 60b34af
create new fn `tendermint_coin::get_tx_status_code_or_none`
onur-ozkan 9df1043
if no `gui_auth` was given, consider it as `false`
onur-ozkan f0dab01
implement `get_sender_trade_fee`
onur-ozkan 6db1133
implement `trade_fee` functionalities for cosmos
onur-ozkan ddb9eb8
Merge branch 'dev' of github.com:KomodoPlatform/atomicDEX-API into ir…
onur-ozkan 8e856f8
group wasm and native rpcs under the rpc mod
onur-ozkan 4fdda30
Create TendermintResultOrder and impl it's required traits
onur-ozkan 55c2eaf
fix wasm compilation
onur-ozkan 39849af
fix avg_blocktime confusion
onur-ozkan 6159da1
save dev state
onur-ozkan 3e203aa
save dev state
onur-ozkan 88c6dfb
save dev state
onur-ozkan fa2cfe3
Merge branch 'dev' of github.com:KomodoPlatform/atomicDEX-API into ir…
onur-ozkan e389050
add iris mod
onur-ozkan d67d952
fix wasm compilation
onur-ozkan 64b35f4
save dev state
onur-ozkan 69e0760
save dev state
onur-ozkan 272b43f
add TODO notes
onur-ozkan 1629f68
add TODO note
onur-ozkan 7c778c9
avoid memory pressure, skip existed txs in tx_history, add fee_details
onur-ozkan 8569d08
remove no-longer required notes
onur-ozkan ab44185
save dev state
onur-ozkan d1f2013
implement `WaitForHistoryUpdateTrigger` for tendermint tx_history v2
onur-ozkan 5a68ea9
remove not required todo notes
onur-ozkan 676bb42
update `fn process_history_loop`
onur-ozkan 0a9ea7a
update TODO notes of tendermint_token
onur-ozkan b94a4b1
save dev state
onur-ozkan b9d4d02
complete tx_history_v2 functionality for tendermint
onur-ozkan ed6322e
move token insert to right before of result returning
onur-ozkan db25d4a
implement better error handling for tx_history v2 on tendermint
onur-ozkan 0ad2fc4
shorten `fn is_tx_exists`
onur-ozkan e4a527b
Merge branch 'dev' of github.com:KomodoPlatform/atomicDEX-API into ir…
onur-ozkan a1f0f93
rename `iris_swap_poc` into `iris_swap` remove ingored flag from the …
onur-ozkan f3b6ca9
update name of the iris swap test function
onur-ozkan 99eafff
Merge branch 'dev' of github.com:KomodoPlatform/atomicDEX-API into ir…
onur-ozkan 0742161
re-ignore iris swap integration tests because of iris bug
onur-ozkan f010c0e
fix review notes
onur-ozkan 9ca93ef
Merge branch 'dev' of github.com:KomodoPlatform/atomicDEX-API into ir…
onur-ozkan f0049e9
show extra tx for platform fees on token txs
onur-ozkan df6227e
partial fixes for review notes
onur-ozkan 8a7af6f
update expected log for tendermint tx history test
onur-ozkan e4deb1d
read highest height for tendermint history
onur-ozkan eba32b0
remap tx amounts and insert all possible assets for tendermint
onur-ozkan 9a51ac5
fix balance problem
onur-ozkan b4c64ec
skip `uamount` field for `TendermintFeeDetails`
onur-ozkan a808a1a
parse multiple tx events
onur-ozkan 8f9f78e
save dev state
onur-ozkan fd6daba
remove debug lines
onur-ozkan e5308d9
refactor tendermit tx history test
onur-ozkan 9f88a65
fix review notes
onur-ozkan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub(crate) mod htlc; | ||
pub(crate) mod htlc_proto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#[cfg(not(target_arch = "wasm32"))] mod tendermint_native_rpc; | ||
#[cfg(not(target_arch = "wasm32"))] | ||
pub use tendermint_native_rpc::*; | ||
|
||
#[cfg(target_arch = "wasm32")] mod tendermint_wasm_rpc; | ||
#[cfg(target_arch = "wasm32")] pub use tendermint_wasm_rpc::*; | ||
|
||
pub(crate) const TX_SUCCESS_CODE: u32 = 0; | ||
|
||
#[repr(u8)] | ||
pub enum TendermintResultOrder { | ||
Ascending = 1, | ||
Descending, | ||
} | ||
|
||
impl From<TendermintResultOrder> for Order { | ||
fn from(order: TendermintResultOrder) -> Self { | ||
match order { | ||
TendermintResultOrder::Ascending => Self::Ascending, | ||
TendermintResultOrder::Descending => Self::Descending, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of getting the protocol type from config, why not add
fn requires_remapping(&self) -> bool
toCoinWithTxHistoryV2
and return true for Tendermint coin/asset.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There also could be
CoinWithTxHistoryV2::remap_tx_if_required(&self, details: &mut TransactionDetails)
. So this remapping logic is performed on the coin's level.What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, this is better :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually pretty good idea. However, we already have mapping for all v2 history implementations. So I will need to do this change for all. Should I cover it in this PR? I left a
TODO
note herehttps://github.com/KomodoPlatform/atomicDEX-API/blob/452fc50b38ef4b73f6d20c058fb1b637a7885d0d/mm2src/coins/my_tx_history_v2.rs#L439-L443
Please let me know if this change is blocker and if I should cover it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a non-blocker, you can do it in the next PR for sure.