Dex improvements (#422)

* remove dex traits&balance types

* remove liq tokens pallet in favor of coins-pallet instance

* fix tests & benchmarks

* remove liquidity tokens trait

* fix CI

* fix pr comments

* Slight renamings

* Add burn_with_instruction as a negative to LiquidityTokens CallFilter

* Remove use of One, Zero, Saturating taits in dex pallet

---------

Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
This commit is contained in:
akildemir
2023-11-12 14:37:31 +03:00
committed by GitHub
parent a43815f101
commit d015ee96a3
30 changed files with 1063 additions and 2162 deletions

View File

@@ -275,7 +275,12 @@ async fn sign_test() {
serai
.publish(
&serai
.sign(&serai_pair, &SeraiCoins::burn(out_instruction.clone()), 0, Default::default())
.sign(
&serai_pair,
&SeraiCoins::burn_with_instruction(out_instruction.clone()),
0,
Default::default(),
)
.unwrap(),
)
.await
@@ -293,7 +298,7 @@ async fn sign_test() {
let burn_events = serai
.as_of(serai.block_by_number(last_serai_block).await.unwrap().unwrap().hash())
.coins()
.burn_events()
.burn_with_instruction_events()
.await
.unwrap();
@@ -301,7 +306,10 @@ async fn sign_test() {
assert_eq!(burn_events.len(), 1);
assert_eq!(
burn_events[0],
CoinsEvent::Burn { from: serai_addr.into(), instruction: out_instruction.clone() }
CoinsEvent::BurnWithInstruction {
from: serai_addr.into(),
instruction: out_instruction.clone()
}
);
break 'outer;
}