mirror of
https://github.com/hanzo-fi/numscript.git
synced 2026-10-30 20:54:52 +00:00
* fix: update schemas * fix: update the schema of new specs file generator * fix: update specs $schema field to the new one
85 lines
1.7 KiB
JSON
85 lines
1.7 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/v1.specs.schema.json",
|
|
"featureFlags": [
|
|
"experimental-asset-scaling"
|
|
],
|
|
"testCases": [
|
|
{
|
|
"it": "sends all the available assets that can be cast",
|
|
"balances": [
|
|
{
|
|
"account": "src",
|
|
"asset": "EUR",
|
|
"amount": 2
|
|
},
|
|
{
|
|
"account": "src",
|
|
"asset": "EUR/2",
|
|
"amount": 1
|
|
},
|
|
{
|
|
"account": "src",
|
|
"asset": "EUR/3",
|
|
"amount": 30
|
|
}
|
|
],
|
|
"expect.postings": [
|
|
{
|
|
"source": "src",
|
|
"destination": "swap",
|
|
"amount": 30,
|
|
"asset": "EUR/3"
|
|
},
|
|
{
|
|
"source": "src",
|
|
"destination": "swap",
|
|
"amount": 2,
|
|
"asset": "EUR"
|
|
},
|
|
{
|
|
"source": "swap",
|
|
"destination": "src",
|
|
"amount": 203,
|
|
"asset": "EUR/2"
|
|
},
|
|
{
|
|
"source": "src",
|
|
"destination": "dest",
|
|
"amount": 204,
|
|
"asset": "EUR/2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"it": "avoids casting the remainder",
|
|
"balances": [
|
|
{
|
|
"account": "src",
|
|
"asset": "EUR/3",
|
|
"amount": 21
|
|
}
|
|
],
|
|
"expect.postings": [
|
|
{
|
|
"source": "src",
|
|
"destination": "swap",
|
|
"amount": 20,
|
|
"asset": "EUR/3"
|
|
},
|
|
{
|
|
"source": "swap",
|
|
"destination": "src",
|
|
"amount": 2,
|
|
"asset": "EUR/2"
|
|
},
|
|
{
|
|
"source": "src",
|
|
"destination": "dest",
|
|
"amount": 2,
|
|
"asset": "EUR/2"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|