This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:elys-network/bindings into DEV-1969…
…-bindings-fixings
- Loading branch information
Showing
34 changed files
with
456 additions
and
96 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use crate::trade_shield::types::PerpetualOrderV2; | ||
use cw_storage_plus::Map; | ||
|
||
pub const PERPETUAL_ORDER_V2: Map<u64, PerpetualOrderV2> = Map::new("perpetual order2_v2"); | ||
|
||
pub const PENDING_PERPETUAL_ORDER_V2: Map<u64, PerpetualOrderV2> = | ||
Map::new("unprocess perpetual order_v2"); |
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,17 @@ | ||
use cosmwasm_schema::cw_serde; | ||
use cosmwasm_std::Coin; | ||
|
||
#[cw_serde] | ||
pub struct Fee { | ||
pub percent: String, | ||
pub amount: Coin, | ||
} | ||
|
||
impl Default for Fee { | ||
fn default() -> Self { | ||
Self { | ||
percent: "".to_string(), | ||
amount: Coin::default(), | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
bindings/src/trade_shield/types/from_perpetual_order_to_v2.rs
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 @@ | ||
use super::{PerpetualOrder, PerpetualOrderV2}; | ||
|
||
impl Into<PerpetualOrderV2> for PerpetualOrder { | ||
fn into(self) -> PerpetualOrderV2 { | ||
PerpetualOrderV2 { | ||
order_id: self.order_id, | ||
owner: self.owner, | ||
order_type: self.order_type, | ||
position: self.position, | ||
trigger_price: self.trigger_price, | ||
collateral: self.collateral, | ||
trading_asset: self.trading_asset, | ||
leverage: self.leverage, | ||
take_profit_price: self.take_profit_price, | ||
position_id: self.position_id, | ||
status: self.status, | ||
size: None, | ||
liquidation: None, | ||
borrow_fee: None, | ||
funding_fee: None, | ||
} | ||
} | ||
} |
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
Oops, something went wrong.