diff --git a/flake.nix b/flake.nix
index 8631d695..4d5dda0f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -449,6 +449,8 @@ runtimeInputs = [
]
++ native-deps;
shellHook = ''
+ RUSTFMT=$(which rustfmt)
+ export RUSTFMT
if [[ -f ./.env ]]; then
source ./.env
fi
diff --git a/mantis/blackbox_rs/src/lib.rs b/mantis/blackbox_rs/src/lib.rs
index 62246077..9ecc6c70 100644
--- a/mantis/blackbox_rs/src/lib.rs
+++ b/mantis/blackbox_rs/src/lib.rs
@@ -40,13 +40,13 @@ pub mod types {
}
}
- ///Exchange
+ ///ExchangeStrStr
///
/// JSON schema
///
/// ```json
///{
- /// "title": "Exchange",
+ /// "title": "Exchange[str, str]",
/// "type": "object",
/// "required": [
/// "in_asset_amount",
@@ -59,28 +59,11 @@ pub mod types {
/// "properties": {
/// "in_asset_amount": {
/// "title": "In Asset Amount",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// },
- /// {
- /// "type": "number"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "in_asset_id": {
/// "title": "In Asset Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "next": {
/// "title": "Next",
@@ -88,66 +71,42 @@ pub mod types {
/// "items": {
/// "anyOf": [
/// {
- /// "$ref": "#/components/schemas/Exchange"
+ /// "$ref": "#/components/schemas/Exchange_str_str_"
/// },
/// {
- /// "$ref": "#/components/schemas/Spawn"
+ /// "$ref": "#/components/schemas/Spawn_str_str_"
/// }
/// ]
/// }
/// },
/// "out_asset_amount": {
/// "title": "Out Asset Amount",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// },
- /// {
- /// "type": "number"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "out_asset_id": {
/// "title": "Out Asset Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "pool_id": {
/// "title": "Pool Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
+ /// "type": "string"
/// }
/// }
///}
/// ```
///
#[derive(Clone, Debug, Deserialize, Serialize)]
- pub struct Exchange {
- pub in_asset_amount: InAssetAmount,
- pub in_asset_id: InAssetId,
+ pub struct ExchangeStrStr {
+ pub in_asset_amount: String,
+ pub in_asset_id: String,
pub next: Vec,
- pub out_asset_amount: OutAssetAmount,
- pub out_asset_id: OutAssetId,
- pub pool_id: PoolId,
+ pub out_asset_amount: String,
+ pub out_asset_id: String,
+ pub pool_id: String,
}
- impl From<&Exchange> for Exchange {
- fn from(value: &Exchange) -> Self {
+ impl From<&ExchangeStrStr> for ExchangeStrStr {
+ fn from(value: &ExchangeStrStr) -> Self {
value.clone()
}
}
@@ -184,179 +143,6 @@ pub mod types {
}
}
- ///InAssetAmount
- ///
- /// JSON schema
- ///
- /// ```json
- ///{
- /// "title": "In Asset Amount",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// },
- /// {
- /// "type": "number"
- /// }
- /// ]
- ///}
- /// ```
- ///
- #[derive(Clone, Debug, Deserialize, Serialize)]
- #[serde(untagged)]
- pub enum InAssetAmount {
- Variant0(i64),
- Variant1(String),
- Variant2(f64),
- }
-
- impl From<&InAssetAmount> for InAssetAmount {
- fn from(value: &InAssetAmount) -> Self {
- value.clone()
- }
- }
-
- impl std::str::FromStr for InAssetAmount {
- type Err = self::error::ConversionError;
- fn from_str(value: &str) -> Result {
- if let Ok(v) = value.parse() {
- Ok(Self::Variant0(v))
- } else if let Ok(v) = value.parse() {
- Ok(Self::Variant1(v))
- } else if let Ok(v) = value.parse() {
- Ok(Self::Variant2(v))
- } else {
- Err("string conversion failed for all variants".into())
- }
- }
- }
-
- impl std::convert::TryFrom<&str> for InAssetAmount {
- type Error = self::error::ConversionError;
- fn try_from(value: &str) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom<&String> for InAssetAmount {
- type Error = self::error::ConversionError;
- fn try_from(value: &String) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom for InAssetAmount {
- type Error = self::error::ConversionError;
- fn try_from(value: String) -> Result {
- value.parse()
- }
- }
-
- impl ToString for InAssetAmount {
- fn to_string(&self) -> String {
- match self {
- Self::Variant0(x) => x.to_string(),
- Self::Variant1(x) => x.to_string(),
- Self::Variant2(x) => x.to_string(),
- }
- }
- }
-
- impl From for InAssetAmount {
- fn from(value: i64) -> Self {
- Self::Variant0(value)
- }
- }
-
- impl From for InAssetAmount {
- fn from(value: f64) -> Self {
- Self::Variant2(value)
- }
- }
-
- ///InAssetId
- ///
- /// JSON schema
- ///
- /// ```json
- ///{
- /// "title": "In Asset Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
- ///}
- /// ```
- ///
- #[derive(Clone, Debug, Deserialize, Serialize)]
- #[serde(untagged)]
- pub enum InAssetId {
- Variant0(i64),
- Variant1(String),
- }
-
- impl From<&InAssetId> for InAssetId {
- fn from(value: &InAssetId) -> Self {
- value.clone()
- }
- }
-
- impl std::str::FromStr for InAssetId {
- type Err = self::error::ConversionError;
- fn from_str(value: &str) -> Result {
- if let Ok(v) = value.parse() {
- Ok(Self::Variant0(v))
- } else if let Ok(v) = value.parse() {
- Ok(Self::Variant1(v))
- } else {
- Err("string conversion failed for all variants".into())
- }
- }
- }
-
- impl std::convert::TryFrom<&str> for InAssetId {
- type Error = self::error::ConversionError;
- fn try_from(value: &str) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom<&String> for InAssetId {
- type Error = self::error::ConversionError;
- fn try_from(value: &String) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom for InAssetId {
- type Error = self::error::ConversionError;
- fn try_from(value: String) -> Result {
- value.parse()
- }
- }
-
- impl ToString for InAssetId {
- fn to_string(&self) -> String {
- match self {
- Self::Variant0(x) => x.to_string(),
- Self::Variant1(x) => x.to_string(),
- }
- }
- }
-
- impl From for InAssetId {
- fn from(value: i64) -> Self {
- Self::Variant0(value)
- }
- }
-
///LocationItem
///
/// JSON schema
@@ -444,10 +230,10 @@ pub mod types {
///{
/// "anyOf": [
/// {
- /// "$ref": "#/components/schemas/Exchange"
+ /// "$ref": "#/components/schemas/Exchange_str_str_"
/// },
/// {
- /// "$ref": "#/components/schemas/Spawn"
+ /// "$ref": "#/components/schemas/Spawn_str_str_"
/// }
/// ]
///}
@@ -456,8 +242,8 @@ pub mod types {
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(untagged)]
pub enum NextItem {
- Exchange(Exchange),
- Spawn(Spawn),
+ ExchangeStrStr(ExchangeStrStr),
+ SpawnStrStr(SpawnStrStr),
}
impl From<&NextItem> for NextItem {
@@ -466,279 +252,25 @@ pub mod types {
}
}
- impl From for NextItem {
- fn from(value: Exchange) -> Self {
- Self::Exchange(value)
+ impl From for NextItem {
+ fn from(value: ExchangeStrStr) -> Self {
+ Self::ExchangeStrStr(value)
}
}
- impl From for NextItem {
- fn from(value: Spawn) -> Self {
- Self::Spawn(value)
+ impl From for NextItem {
+ fn from(value: SpawnStrStr) -> Self {
+ Self::SpawnStrStr(value)
}
}
- ///OutAssetAmount
+ ///SingleInputAssetCvmRouteStrStr
///
/// JSON schema
///
/// ```json
///{
- /// "title": "Out Asset Amount",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// },
- /// {
- /// "type": "number"
- /// }
- /// ]
- ///}
- /// ```
- ///
- #[derive(Clone, Debug, Deserialize, Serialize)]
- #[serde(untagged)]
- pub enum OutAssetAmount {
- Variant0(i64),
- Variant1(String),
- Variant2(f64),
- }
-
- impl From<&OutAssetAmount> for OutAssetAmount {
- fn from(value: &OutAssetAmount) -> Self {
- value.clone()
- }
- }
-
- impl std::str::FromStr for OutAssetAmount {
- type Err = self::error::ConversionError;
- fn from_str(value: &str) -> Result {
- if let Ok(v) = value.parse() {
- Ok(Self::Variant0(v))
- } else if let Ok(v) = value.parse() {
- Ok(Self::Variant1(v))
- } else if let Ok(v) = value.parse() {
- Ok(Self::Variant2(v))
- } else {
- Err("string conversion failed for all variants".into())
- }
- }
- }
-
- impl std::convert::TryFrom<&str> for OutAssetAmount {
- type Error = self::error::ConversionError;
- fn try_from(value: &str) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom<&String> for OutAssetAmount {
- type Error = self::error::ConversionError;
- fn try_from(value: &String) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom for OutAssetAmount {
- type Error = self::error::ConversionError;
- fn try_from(value: String) -> Result {
- value.parse()
- }
- }
-
- impl ToString for OutAssetAmount {
- fn to_string(&self) -> String {
- match self {
- Self::Variant0(x) => x.to_string(),
- Self::Variant1(x) => x.to_string(),
- Self::Variant2(x) => x.to_string(),
- }
- }
- }
-
- impl From for OutAssetAmount {
- fn from(value: i64) -> Self {
- Self::Variant0(value)
- }
- }
-
- impl From for OutAssetAmount {
- fn from(value: f64) -> Self {
- Self::Variant2(value)
- }
- }
-
- ///OutAssetId
- ///
- /// JSON schema
- ///
- /// ```json
- ///{
- /// "title": "Out Asset Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
- ///}
- /// ```
- ///
- #[derive(Clone, Debug, Deserialize, Serialize)]
- #[serde(untagged)]
- pub enum OutAssetId {
- Variant0(i64),
- Variant1(String),
- }
-
- impl From<&OutAssetId> for OutAssetId {
- fn from(value: &OutAssetId) -> Self {
- value.clone()
- }
- }
-
- impl std::str::FromStr for OutAssetId {
- type Err = self::error::ConversionError;
- fn from_str(value: &str) -> Result {
- if let Ok(v) = value.parse() {
- Ok(Self::Variant0(v))
- } else if let Ok(v) = value.parse() {
- Ok(Self::Variant1(v))
- } else {
- Err("string conversion failed for all variants".into())
- }
- }
- }
-
- impl std::convert::TryFrom<&str> for OutAssetId {
- type Error = self::error::ConversionError;
- fn try_from(value: &str) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom<&String> for OutAssetId {
- type Error = self::error::ConversionError;
- fn try_from(value: &String) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom for OutAssetId {
- type Error = self::error::ConversionError;
- fn try_from(value: String) -> Result {
- value.parse()
- }
- }
-
- impl ToString for OutAssetId {
- fn to_string(&self) -> String {
- match self {
- Self::Variant0(x) => x.to_string(),
- Self::Variant1(x) => x.to_string(),
- }
- }
- }
-
- impl From for OutAssetId {
- fn from(value: i64) -> Self {
- Self::Variant0(value)
- }
- }
-
- ///PoolId
- ///
- /// JSON schema
- ///
- /// ```json
- ///{
- /// "title": "Pool Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
- ///}
- /// ```
- ///
- #[derive(Clone, Debug, Deserialize, Serialize)]
- #[serde(untagged)]
- pub enum PoolId {
- Variant0(i64),
- Variant1(String),
- }
-
- impl From<&PoolId> for PoolId {
- fn from(value: &PoolId) -> Self {
- value.clone()
- }
- }
-
- impl std::str::FromStr for PoolId {
- type Err = self::error::ConversionError;
- fn from_str(value: &str) -> Result {
- if let Ok(v) = value.parse() {
- Ok(Self::Variant0(v))
- } else if let Ok(v) = value.parse() {
- Ok(Self::Variant1(v))
- } else {
- Err("string conversion failed for all variants".into())
- }
- }
- }
-
- impl std::convert::TryFrom<&str> for PoolId {
- type Error = self::error::ConversionError;
- fn try_from(value: &str) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom<&String> for PoolId {
- type Error = self::error::ConversionError;
- fn try_from(value: &String) -> Result {
- value.parse()
- }
- }
-
- impl std::convert::TryFrom for PoolId {
- type Error = self::error::ConversionError;
- fn try_from(value: String) -> Result {
- value.parse()
- }
- }
-
- impl ToString for PoolId {
- fn to_string(&self) -> String {
- match self {
- Self::Variant0(x) => x.to_string(),
- Self::Variant1(x) => x.to_string(),
- }
- }
- }
-
- impl From for PoolId {
- fn from(value: i64) -> Self {
- Self::Variant0(value)
- }
- }
-
- ///always starts with Input asset_id
- ///
- /// JSON schema
- ///
- /// ```json
- ///{
- /// "title": "SingleInputAssetCvmRoute",
- /// "description": "always starts with Input asset_id",
+ /// "title": "SingleInputAssetCvmRoute[str, str]",
/// "type": "object",
/// "required": [
/// "in_asset_amount",
@@ -750,28 +282,11 @@ pub mod types {
/// "properties": {
/// "in_asset_amount": {
/// "title": "In Asset Amount",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// },
- /// {
- /// "type": "number"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "in_asset_id": {
/// "title": "In Asset Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "next": {
/// "title": "Next",
@@ -779,68 +294,52 @@ pub mod types {
/// "items": {
/// "anyOf": [
/// {
- /// "$ref": "#/components/schemas/Exchange"
+ /// "$ref": "#/components/schemas/Exchange_str_str_"
/// },
/// {
- /// "$ref": "#/components/schemas/Spawn"
+ /// "$ref": "#/components/schemas/Spawn_str_str_"
/// }
/// ]
/// }
/// },
/// "out_asset_amount": {
/// "title": "Out Asset Amount",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// },
- /// {
- /// "type": "number"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "out_asset_id": {
/// "title": "Out Asset Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
+ /// "type": "string"
/// }
/// }
///}
/// ```
///
#[derive(Clone, Debug, Deserialize, Serialize)]
- pub struct SingleInputAssetCvmRoute {
- pub in_asset_amount: InAssetAmount,
- pub in_asset_id: InAssetId,
+ pub struct SingleInputAssetCvmRouteStrStr {
+ pub in_asset_amount: String,
+ pub in_asset_id: String,
pub next: Vec,
- pub out_asset_amount: OutAssetAmount,
- pub out_asset_id: OutAssetId,
+ pub out_asset_amount: String,
+ pub out_asset_id: String,
}
- impl From<&SingleInputAssetCvmRoute> for SingleInputAssetCvmRoute {
- fn from(value: &SingleInputAssetCvmRoute) -> Self {
+ impl From<&SingleInputAssetCvmRouteStrStr> for SingleInputAssetCvmRouteStrStr {
+ fn from(value: &SingleInputAssetCvmRouteStrStr) -> Self {
value.clone()
}
}
- ///cross chain transfer assets
+ ///SpawnStrStr
///
/// JSON schema
///
/// ```json
///{
- /// "title": "Spawn",
- /// "description": "cross chain transfer assets",
+ /// "title": "Spawn[str, str]",
/// "type": "object",
/// "required": [
+ /// "in_asset_amount",
+ /// "in_asset_id",
/// "next",
/// "out_asset_amount",
/// "out_asset_id"
@@ -848,28 +347,11 @@ pub mod types {
/// "properties": {
/// "in_asset_amount": {
/// "title": "In Asset Amount",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// },
- /// {
- /// "type": "number"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "in_asset_id": {
/// "title": "In Asset Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "next": {
/// "title": "Next",
@@ -877,56 +359,37 @@ pub mod types {
/// "items": {
/// "anyOf": [
/// {
- /// "$ref": "#/components/schemas/Exchange"
+ /// "$ref": "#/components/schemas/Exchange_str_str_"
/// },
/// {
- /// "$ref": "#/components/schemas/Spawn"
+ /// "$ref": "#/components/schemas/Spawn_str_str_"
/// }
/// ]
/// }
/// },
/// "out_asset_amount": {
/// "title": "Out Asset Amount",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// },
- /// {
- /// "type": "number"
- /// }
- /// ]
+ /// "type": "string"
/// },
/// "out_asset_id": {
/// "title": "Out Asset Id",
- /// "anyOf": [
- /// {
- /// "type": "integer"
- /// },
- /// {
- /// "type": "string"
- /// }
- /// ]
+ /// "type": "string"
/// }
/// }
///}
/// ```
///
#[derive(Clone, Debug, Deserialize, Serialize)]
- pub struct Spawn {
- #[serde(default, skip_serializing_if = "Option::is_none")]
- pub in_asset_amount: Option,
- #[serde(default, skip_serializing_if = "Option::is_none")]
- pub in_asset_id: Option,
+ pub struct SpawnStrStr {
+ pub in_asset_amount: String,
+ pub in_asset_id: String,
pub next: Vec,
- pub out_asset_amount: OutAssetAmount,
- pub out_asset_id: OutAssetId,
+ pub out_asset_amount: String,
+ pub out_asset_id: String,
}
- impl From<&Spawn> for Spawn {
- fn from(value: &Spawn) -> Self {
+ impl From<&SpawnStrStr> for SpawnStrStr {
+ fn from(value: &SpawnStrStr) -> Self {
value.clone()
}
}
@@ -1056,22 +519,34 @@ impl Client {
///Sends a `GET` request to `/simulator/router`
pub async fn simulator_router_simulator_router_get<'a>(
&'a self,
- in_asset_amount: &'a types::InAssetAmount,
- in_asset_id: &'a types::InAssetId,
- max: bool,
- out_asset_amount: &'a types::OutAssetAmount,
- out_asset_id: &'a types::OutAssetId,
+ in_asset_amount: Option<&'a str>,
+ in_asset_id: Option<&'a str>,
+ max: Option,
+ out_asset_amount: &'a str,
+ out_asset_id: Option<&'a str>,
) -> Result<
- ResponseValue>,
+ ResponseValue>,
Error,
> {
let url = format!("{}/simulator/router", self.baseurl,);
let mut query = Vec::with_capacity(5usize);
- query.push(("in_asset_amount", in_asset_amount.to_string()));
- query.push(("in_asset_id", in_asset_id.to_string()));
- query.push(("max", max.to_string()));
+ if let Some(v) = &in_asset_amount {
+ query.push(("in_asset_amount", v.to_string()));
+ }
+
+ if let Some(v) = &in_asset_id {
+ query.push(("in_asset_id", v.to_string()));
+ }
+
+ if let Some(v) = &max {
+ query.push(("max", v.to_string()));
+ }
+
query.push(("out_asset_amount", out_asset_amount.to_string()));
- query.push(("out_asset_id", out_asset_id.to_string()));
+ if let Some(v) = &out_asset_id {
+ query.push(("out_asset_id", v.to_string()));
+ }
+
#[allow(unused_mut)]
let mut request = self
.client
diff --git a/mantis/node/gen.sh b/mantis/node/gen.sh
index 2c67031b..89b61c55 100755
--- a/mantis/node/gen.sh
+++ b/mantis/node/gen.sh
@@ -1,4 +1,2 @@
#!/bin/sh
-
-export RUSTFMT=$(which rustfmt)
cargo progenitor --input=../../schema/mantis_solver_blackbox.json --output=blackbox_rs --name=blackbox_rs --version="3.0.3"
\ No newline at end of file
diff --git a/mantis/simulation/routers/data.py b/mantis/simulation/routers/data.py
index daaea439..0b44cfc9 100644
--- a/mantis/simulation/routers/data.py
+++ b/mantis/simulation/routers/data.py
@@ -355,9 +355,9 @@ class Spawn(BaseModel, Trade[TId, TAmount], Generic[TId, TAmount]):
"""
cross chain transfer assets
"""
- in_asset_id: TId | None = None
+ in_asset_id: TId
- in_asset_amount: TAmount | None = None
+ in_asset_amount: TAmount
"""
amount to take with transfer
(delta)
diff --git a/schema/mantis_solver_blackbox.json b/schema/mantis_solver_blackbox.json
index 7d1d889a..cedd1ec1 100644
--- a/schema/mantis_solver_blackbox.json
+++ b/schema/mantis_solver_blackbox.json
@@ -14,51 +14,30 @@
{
"name": "in_asset_id",
"in": "query",
- "required": true,
+ "required": false,
"schema": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- }
- ],
+ "type": "string",
+ "default": "158456325028528675187087900673",
"title": "In Asset Id"
}
},
{
"name": "out_asset_id",
"in": "query",
- "required": true,
+ "required": false,
"schema": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- }
- ],
+ "type": "string",
+ "default": "158456325028528675187087900674",
"title": "Out Asset Id"
}
},
{
"name": "in_asset_amount",
"in": "query",
- "required": true,
+ "required": false,
"schema": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- },
- {
- "type": "number"
- }
- ],
+ "type": "string",
+ "default": "1000000000000",
"title": "In Asset Amount"
}
},
@@ -67,26 +46,17 @@
"in": "query",
"required": true,
"schema": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- },
- {
- "type": "number"
- }
- ],
+ "type": "string",
"title": "Out Asset Amount"
}
},
{
"name": "max",
"in": "query",
- "required": true,
+ "required": false,
"schema": {
"type": "boolean",
+ "default": true,
"title": "Max"
}
}
@@ -99,7 +69,7 @@
"schema": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/SingleInputAssetCvmRoute"
+ "$ref": "#/components/schemas/SingleInputAssetCvmRoute_str_str_"
},
"title": "Response Simulator Router Simulator Router Get"
}
@@ -122,77 +92,36 @@
},
"components": {
"schemas": {
- "Exchange": {
+ "Exchange_str_str_": {
"properties": {
"out_asset_amount": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- },
- {
- "type": "number"
- }
- ],
+ "type": "string",
"title": "Out Asset Amount"
},
"out_asset_id": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- }
- ],
+ "type": "string",
"title": "Out Asset Id"
},
"in_asset_amount": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- },
- {
- "type": "number"
- }
- ],
+ "type": "string",
"title": "In Asset Amount"
},
"in_asset_id": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- }
- ],
+ "type": "string",
"title": "In Asset Id"
},
"pool_id": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- }
- ],
+ "type": "string",
"title": "Pool Id"
},
"next": {
"items": {
"anyOf": [
{
- "$ref": "#/components/schemas/Exchange"
+ "$ref": "#/components/schemas/Exchange_str_str_"
},
{
- "$ref": "#/components/schemas/Spawn"
+ "$ref": "#/components/schemas/Spawn_str_str_"
}
]
},
@@ -209,7 +138,7 @@
"pool_id",
"next"
],
- "title": "Exchange"
+ "title": "Exchange[str, str]"
},
"HTTPValidationError": {
"properties": {
@@ -224,66 +153,32 @@
"type": "object",
"title": "HTTPValidationError"
},
- "SingleInputAssetCvmRoute": {
+ "SingleInputAssetCvmRoute_str_str_": {
"properties": {
"out_asset_amount": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- },
- {
- "type": "number"
- }
- ],
+ "type": "string",
"title": "Out Asset Amount"
},
"out_asset_id": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- }
- ],
+ "type": "string",
"title": "Out Asset Id"
},
"in_asset_amount": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- },
- {
- "type": "number"
- }
- ],
+ "type": "string",
"title": "In Asset Amount"
},
"in_asset_id": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- }
- ],
+ "type": "string",
"title": "In Asset Id"
},
"next": {
"items": {
"anyOf": [
{
- "$ref": "#/components/schemas/Exchange"
+ "$ref": "#/components/schemas/Exchange_str_str_"
},
{
- "$ref": "#/components/schemas/Spawn"
+ "$ref": "#/components/schemas/Spawn_str_str_"
}
]
},
@@ -299,69 +194,34 @@
"in_asset_id",
"next"
],
- "title": "SingleInputAssetCvmRoute",
- "description": "always starts with Input asset_id"
+ "title": "SingleInputAssetCvmRoute[str, str]"
},
- "Spawn": {
+ "Spawn_str_str_": {
"properties": {
"out_asset_amount": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- },
- {
- "type": "number"
- }
- ],
+ "type": "string",
"title": "Out Asset Amount"
},
"out_asset_id": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- }
- ],
+ "type": "string",
"title": "Out Asset Id"
},
"in_asset_amount": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- },
- {
- "type": "number"
- }
- ],
+ "type": "string",
"title": "In Asset Amount"
},
"in_asset_id": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "string"
- }
- ],
+ "type": "string",
"title": "In Asset Id"
},
"next": {
"items": {
"anyOf": [
{
- "$ref": "#/components/schemas/Exchange"
+ "$ref": "#/components/schemas/Exchange_str_str_"
},
{
- "$ref": "#/components/schemas/Spawn"
+ "$ref": "#/components/schemas/Spawn_str_str_"
}
]
},
@@ -373,10 +233,11 @@
"required": [
"out_asset_amount",
"out_asset_id",
+ "in_asset_amount",
+ "in_asset_id",
"next"
],
- "title": "Spawn",
- "description": "cross chain transfer assets"
+ "title": "Spawn[str, str]"
},
"ValidationError": {
"properties": {