Skip to content

Commit

Permalink
bump zenlink (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
herryho authored Sep 29, 2021
1 parent 2c0665f commit 5948e6b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate",
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9" }

zenlink-protocol = { git = "https://github.com/bifrost-finance/Zenlink-DEX-Module", branch = "polkadot-v0.9.9"}
zenlink-protocol-rpc = { git = "https://github.com/bifrost-finance/Zenlink-DEX-Module", branch = "polkadot-v0.9.9" }
zenlink-protocol-runtime-api = { git = "https://github.com/bifrost-finance/Zenlink-DEX-Module", branch = "polkadot-v0.9.9" }
zenlink-protocol = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "f3896378457a4f7b562d3e0aff26697828c90189"}
zenlink-protocol-rpc = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "f3896378457a4f7b562d3e0aff26697828c90189" }
zenlink-protocol-runtime-api = { git = "https://github.com/zenlinkpro/Zenlink-DEX-Module", rev = "f3896378457a4f7b562d3e0aff26697828c90189" }

orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "8d5432c3458702a7df14b374bddde43a2a20aa43" }
orml-currencies = {git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "8d5432c3458702a7df14b374bddde43a2a20aa43" }
Expand Down
32 changes: 32 additions & 0 deletions runtime/asgard/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,38 @@ impl_runtime_apis! {
) -> Option<PairInfo<AccountId, AssetBalance>> {
ZenlinkProtocol::get_pair_by_asset_id(asset_0, asset_1)
}

fn get_amount_in_price(
supply: AssetBalance,
path: Vec<AssetId>
) -> AssetBalance {
ZenlinkProtocol::desired_in_amount(supply, path)
}

fn get_amount_out_price(
supply: AssetBalance,
path: Vec<AssetId>
) -> AssetBalance {
ZenlinkProtocol::supply_out_amount(supply, path)
}

fn get_estimate_lptoken(
token_0: AssetId,
token_1: AssetId,
amount_0_desired: AssetBalance,
amount_1_desired: AssetBalance,
amount_0_min: AssetBalance,
amount_1_min: AssetBalance,
) -> AssetBalance{
ZenlinkProtocol::get_estimate_lptoken(
token_0,
token_1,
amount_0_desired,
amount_1_desired,
amount_0_min,
amount_1_min
)
}
}

impl bifrost_salp_rpc_runtime_api::SalpRuntimeApi<Block, ParaId, AccountId> for Runtime {
Expand Down

0 comments on commit 5948e6b

Please sign in to comment.