Skip to content

swaps broken #39

@flipchan

Description

@flipchan

getHydraDx Initializing PoolService...
getHydraDx Initializing TradeRouter...
getHydraDx TradeRouter: Qe {
routeSuggester: Ye {},
routerOptions: { includeOnly: [ 'Omnipool' ] },
poolService: Pt {
api: ApiPromise {
__internal__eventemitter: [EventEmitter],
__internal__runtimeLog: [Object],
__internal__storageGetQ: [],
__internal__storageSubQ: [],
__phantom: <BN: 0>,
_call: [Object],
_consts: [Object],
_errors: [Object],
_events: [Object],
_extrinsicType: 4,
_isReady: true,
_query: [Object],
_runtimeMap: [Object],
_rx: [Object],
_rxDecorateMethod: [Function (anonymous)],
__internal__instanceId: '8',
__internal__registry: [TypeRegistry],
_decorateMethod: [Function: toPromiseMethod],
_options: [Object],
_type: 'promise',
_rpcCore: [RpcCore],
_isConnected: [BehaviorSubject],
__internal__atLast: null,
__internal__healthTimer: Timeout {
_idleTimeout: 10000,
_idlePrev: [TimersList],
_idleNext: [Timeout],
_idleStart: 3196516,
_onTimeout: [Function (anonymous)],
_timerArgs: undefined,
_repeat: 10000,
_destroyed: false,
[Symbol(refed)]: true,
[Symbol(kHasPrimitive)]: false,
[Symbol(asyncId)]: 9386,
[Symbol(triggerId)]: 0
},
__internal__registries: [Array],
__internal__updateSub: [SafeSubscriber],
__internal__waitingRegistries: {},
_rpc: [Function],
_queryMulti: [Function (anonymous)],
__internal__isReadyPromise: [Promise],
__internal__isReadyOrErrorPromise: [Promise],
_runtimeChain: [Text],
_runtimeVersion: [Type [Map]],
_genesisHash: [Type [Uint8Array]],
_runtimeMetadata: [Metadata [Map]],
_extrinsics: [Function],
_derive: [Object]
},
assetClient: Le { api: [ApiPromise], SUPPORTED_TYPES: [Array] },
xykClient: ot { api: [ApiPromise], pools: [], subs: [], poolsLoaded: false },
omniClient: nt { api: [ApiPromise], pools: [], subs: [], poolsLoaded: false },
lbpClient: it {
api: [ApiPromise],
pools: [],
subs: [],
poolsLoaded: false,
MAX_FINAL_WEIGHT: 100000000,
poolsData: Map(0) {}
},
stableClient: at {
api: [ApiPromise],
pools: [],
subs: [],
poolsLoaded: false,
stablePools: Map(0) {}
},
onChainAssets: [],
onChainAssetsLoaded: false,
feeCache: He { map: Map(0) {}, items: [Se], opts: [Object], _size: 0 },
disconnectSubscribeNewHeads: null
},
defaultRouterOptions: { includeOnly: [] }
}
getting results..
Omnipool [7L53bUTBbf...] balance subscribed
getHydraDx All assets: [
{
id: '100',
name: 'USDT, DAI, USDC, USDT',
symbol: '4-Pool',
decimals: 18,
icon: 'USDT/DAI/USDC/USDT',
type: 'StableSwap',
isSufficient: true,
existentialDeposit: '1000',
origin: undefined,
meta: { '10': 'USDT', '18': 'DAI', '21': 'USDC', '23': 'USDT' }
},
{
id: '0',
name: 'HDX',
symbol: 'HDX',
decimals: 12,
icon: 'HDX',
type: 'Token',
isSufficient: true,
existentialDeposit: '1000000000000',
origin: undefined,
meta: undefined
},
{
id: '28',
name: 'KILT',
symbol: 'KILT',
decimals: 15,
icon: 'KILT',
type: 'Token',
isSufficient: true,
existentialDeposit: '21358393848783',
origin: 2086,
meta: undefined
},
{
id: '20',
name: 'Ethereum (Moonbeam Wormhole)',
symbol: 'WETH',
decimals: 18,
icon: 'WETH',
type: 'Token',
isSufficient: true,
existentialDeposit: '5390835579515',
origin: 2004,
meta: undefined
},
{
id: '101',
name: 'iBTC, WBTC',
symbol: '2-Pool',
decimals: 18,
icon: 'iBTC/WBTC',
type: 'StableSwap',
isSufficient: true,
existentialDeposit: '1000',
origin: undefined,
meta: { '11': 'iBTC', '19': 'WBTC' }
},
{
id: '16',
name: 'Glimmer',
symbol: 'GLMR',
decimals: 18,
icon: 'GLMR',
type: 'Token',
isSufficient: true,
existentialDeposit: '34854864344868000',
origin: 2004,
meta: undefined
},
{
id: '14',
name: 'Bifrost Native Coin',
symbol: 'BNC',
decimals: 12,
icon: 'BNC',
type: 'Token',
isSufficient: true,
existentialDeposit: '68795189840',
origin: 2030,
meta: undefined
},
{
id: '15',
name: 'Bifrost Voucher DOT',
symbol: 'vDOT',
decimals: 10,
icon: 'vDOT',
type: 'Token',
isSufficient: true,
existentialDeposit: '18761726',
origin: 2030,
meta: undefined
},
{
id: '13',
name: 'Centrifuge',
symbol: 'CFG',
decimals: 18,
icon: 'CFG',
type: 'Token',
isSufficient: true,
existentialDeposit: '32467532467532500',
origin: 2031,
meta: undefined
},
{
id: '27',
name: 'Crust',
symbol: 'CRU',
decimals: 12,
icon: 'CRU',
type: 'Token',
isSufficient: true,
existentialDeposit: '7874015748',
origin: 2008,
meta: undefined
},
{
id: '102',
name: 'USDT, USDC',
symbol: '2-Pool',
decimals: 18,
icon: 'USDT/USDC',
type: 'StableSwap',
isSufficient: true,
existentialDeposit: '1000',
origin: undefined,
meta: { '10': 'USDT', '22': 'USDC' }
},
{
id: '5',
name: 'Polkadot',
symbol: 'DOT',
decimals: 10,
icon: 'DOT',
type: 'Token',
isSufficient: true,
existentialDeposit: '17540000',
origin: undefined,
meta: undefined
},
{
id: '8',
name: 'Phala',
symbol: 'PHA',
decimals: 12,
icon: 'PHA',
type: 'Token',
isSufficient: true,
existentialDeposit: '54945054945',
origin: 2035,
meta: undefined
},
{
id: '12',
name: 'Zeitgeist',
symbol: 'ZTG',
decimals: 10,
icon: 'ZTG',
type: 'Token',
isSufficient: true,
existentialDeposit: '1204151916',
origin: 2092,
meta: undefined
},
{
id: '17',
name: 'Interlay',
symbol: 'INTR',
decimals: 10,
icon: 'INTR',
type: 'Token',
isSufficient: true,
existentialDeposit: '6164274209',
origin: 2032,
meta: undefined
},
{
id: '9',
name: 'Astar',
symbol: 'ASTR',
decimals: 18,
icon: 'ASTR',
type: 'Token',
isSufficient: true,
existentialDeposit: '147058823529412000',
origin: 2006,
meta: undefined
},
{
id: '1',
name: 'Lerna',
symbol: 'LRNA',
decimals: 12,
icon: 'LRNA',
type: 'Token',
isSufficient: true,
existentialDeposit: '400000000',
origin: undefined,
meta: undefined
}
]
getHydraDx Getting selling details...
assetIn, assetOut, amount: 10 0 21
Error: 10 is not supported token
at Qe.validateTokenPair (/tmp/api/node_modules/@galacticcouncil/sdk/build/index.cjs:2:17381)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Qe.getBestSell (/tmp/api/node_modules/@galacticcouncil/sdk/build/index.cjs:2:19086)
Time: 1716161567973
Request Body in app.js: [Object: null prototype] {
'{"assetin": "0", "assetout": "5", "amount": 100 }': ''
}
Time: 1716161574129
Request Body in app.js: [Object: null prototype] {
'{"assetin": "0", "assetout": "5", "amount": 100 }': ''
}
Time: 1716161594511
Request Body in app.js: [Object: null prototype] {
'{"assetin": "0", "assetout": "5", "amount": 100 }': ''
}
create swap called
create swap: [Object: null prototype] {
'{"assetin": "0", "assetout": "5", "amount": 100 }': ''
}
output: undefined undefined undefined
Time: 1716161728427
Request Body in app.js: { assetin: '0', assetout: '5', amount: 100 }
create swap called
create swap: { assetin: '0', assetout: '5', amount: 100 }
output: 0 5 100
pling plong
2024-05-20 01:35:28 REGISTRY: Unknown signed extensions ValidateClaim found, treating them as no-effect
2024-05-20 01:35:29 API/INIT: hydradx/234: Not decorating unknown runtime apis: 0x0bb67a52fcd040ff/1
getHydraDx Getting selling details...
getHydraDx Getting selling details...
assetIn, assetOut, amount: 0 5 100
i got trade details!
getHydraDx trade details: {
type: 'Sell',
amountIn: '100',
amountOut: '0.2106754994',
spotPrice: '0.0021130941',
tradeFee: '0.0006336633',
tradeFeePct: 0.3,
tradeFeeRange: [ 0.3, 5.1 ],
priceImpactPct: -0,
swaps: [
{
poolAddress: '7L53bUTBbfuj14UpdCNPwmgzzHSsrsTWBHX5pys32mVWM3C1',
poolId: undefined,
pool: 'Omnipool',
assetIn: '0',
assetOut: '5',
amountIn: '100',
calculatedOut: '0.2113091627',
amountOut: '0.2106754994',
spotPrice: '0.0021130941',
tradeFeePct: 0.3,
tradeFeeRange: [Array],
priceImpactPct: -0,
errors: []
}
]
}
2024-05-20 01:35:29 REGISTRY: Unknown signed extensions ValidateClaim found, treating them as no-effect
2024-05-20 01:35:29 API/INIT: hydradx/234: Not decorating unknown runtime apis: 0x0bb67a52fcd040ff/1
TypeError: api.query.assetRegistry.assetMetadataMap is not a function
at /tmp/api/dist/src/api/DraftSwap.js:65:53
at Generator.next ()
at fulfilled (/tmp/api/dist/src/api/DraftSwap.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions