UNPKG

@hikaru-fi/swap-router

Version:

Package for calculating optimal path for executing swaps

505 lines (504 loc) 12.3 kB
/** * @type {import("../poolMath/weightedPool/weightedPool").DBPool[]} */ const testPoolParams = [{ "_id": { "$oid": "62de74cb5520812d1c6474ca" }, "address": "TQyKsMAHNNL4fypUJzc8wy9m5zGk5jxcKA", "vaultAddress": "TUw7TvNHGZJGMFm3RxUtKxYfBKafVHVFBf", "factoryAddress": "TXrsYxtgenb722F8sWJkR8HH3diSBEWtrn", "poolManagerAddress": "TG7g7V5fmeiVpWWsxqnhX8g8S86w3wMtmG", "swapFee": { "exact": "3000000000000000", "approximate": 3000000000000000 }, "name": "WP TRX <-> USDT", "symbol": "WP TRX <-> USDT", "tokens": [ { "address": "TAHLygq9zmpSASCkwvExVgxNfGMwjuqQ1u", "name": "USDT_shasta", "symbol": "USDT_shasta", "exchangeRate": 0.999805, "decimal": 6, "multiplier": { "exact": "1000000000000", "approximate": 1000000000000 }, "weight": { "exact": "500000000000000000", "approximate": 500000000000000000 }, "balance": { "exact": "2100000000", "approximate": 2100000000 }, "_id": { "$oid": "62de74cb5520812d1c6474cb" }, "createdAt": { "$date": { "$numberLong": "1658746059446" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } } }, { "address": "TH9pNgBcqsSV6NNGQr1EHRbnQ29RJQipA1", "name": "WTRX_shasta", "symbol": "WTRX_shasta", "exchangeRate": 0.065367, "decimal": 6, "multiplier": { "exact": "1000000000000", "approximate": 1000000000000 }, "weight": { "exact": "500000000000000000", "approximate": 500000000000000000 }, "balance": { "exact": "30000000000", "approximate": 30000000000 }, "_id": { "$oid": "62de74cb5520812d1c6474cc" }, "createdAt": { "$date": { "$numberLong": "1658746059447" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } } } ], "lpAmount": { "exact": "7937253933193613017142", "approximate": 7.9372539331936e+21 }, "lastModEvent": { "block": 26248658, "timestamp": 1658745192000, "contract": "TUw7TvNHGZJGMFm3RxUtKxYfBKafVHVFBf", "name": "Deposit", "transaction": "8e1bffe10a2d44ba82134640e883936c555444f48663569ab336237aae4faba7", "result": { "pool": "TQyKsMAHNNL4fypUJzc8wy9m5zGk5jxcKA", "lpAmount": { "negative": 0, "words": [ 23068726, 27768683, 1762424 ], "length": 3, "red": null }, "tokensDeposited": [ { "negative": 0, "words": [ 19625216, 31 ], "length": 2, "red": null }, { "negative": 0, "words": [ 2337792, 447 ], "length": 2, "red": null } ], "user": "TG7g7V5fmeiVpWWsxqnhX8g8S86w3wMtmG" }, "resourceNode": "solidityNode", "_id": { "$oid": "62de74cc5520812d1c6474dd" }, "createdAt": { "$date": { "$numberLong": "1658746060754" } }, "updatedAt": { "$date": { "$numberLong": "1658746060754" } } }, "createdAt": { "$date": { "$numberLong": "1658746059447" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } }, "__v": 0 }, { "_id": { "$oid": "62de74cc5520812d1c6474cf" }, "address": "TWYniMuTc11cW9Sk6gY5NAbKoq7Lpmot3T", "vaultAddress": "TUw7TvNHGZJGMFm3RxUtKxYfBKafVHVFBf", "factoryAddress": "TXrsYxtgenb722F8sWJkR8HH3diSBEWtrn", "poolManagerAddress": "TG7g7V5fmeiVpWWsxqnhX8g8S86w3wMtmG", "swapFee": { "exact": "3000000000000000", "approximate": 3000000000000000 }, "name": "WP USDT <-> DAI <-> WETH", "symbol": "WP USDT <-> DAI <-> WETH", "tokens": [ { "address": "TAHLygq9zmpSASCkwvExVgxNfGMwjuqQ1u", "name": "USDT_shasta", "symbol": "USDT_shasta", "exchangeRate": 0.999805, "decimal": 6, "multiplier": { "exact": "1000000000000", "approximate": 1000000000000 }, "weight": { "exact": "500000000000000000", "approximate": 500000000000000000 }, "balance": { "exact": "10000000000", "approximate": 10000000000 }, "_id": { "$oid": "62de74cc5520812d1c6474d0" }, "createdAt": { "$date": { "$numberLong": "1658746060188" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } } }, { "address": "TApJzmfyYrXd6afvfWLKpqqeBxa7hwS9Cw", "name": "DAI_shasta", "symbol": "DAI_shasta", "exchangeRate": 1, "decimal": 18, "multiplier": { "exact": "1", "approximate": 1 }, "weight": { "exact": "250000000000000000", "approximate": 250000000000000000 }, "balance": { "exact": "10000000000000000000000", "approximate": 1e+22 }, "_id": { "$oid": "62de74cc5520812d1c6474d1" }, "createdAt": { "$date": { "$numberLong": "1658746060188" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } } }, { "address": "TSF96eswa74vJPpeUuPt9mGdPhs5Ahooi4", "name": "WETH_shasta", "symbol": "WETH_shasta", "exchangeRate": 1547.88, "decimal": 18, "multiplier": { "exact": "1", "approximate": 1 }, "weight": { "exact": "250000000000000000", "approximate": 250000000000000000 }, "balance": { "exact": "10000000000000000000", "approximate": 10000000000000000000 }, "_id": { "$oid": "62de74cc5520812d1c6474d2" }, "createdAt": { "$date": { "$numberLong": "1658746060188" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } } } ], "lpAmount": { "exact": "1778279410038869448878", "approximate": 1.7782794100389e+21 }, "lastModEvent": { "block": 26248681, "timestamp": 1658745270000, "contract": "TUw7TvNHGZJGMFm3RxUtKxYfBKafVHVFBf", "name": "Deposit", "transaction": "f2c7f5004f66dfe82128850a1b4ae6161c5d5fa4e775154064d4242b4a721de3", "result": { "pool": "TWYniMuTc11cW9Sk6gY5NAbKoq7Lpmot3T", "lpAmount": { "negative": 0, "words": [ 33937582, 23424241, 394857 ], "length": 3, "red": null }, "tokensDeposited": [ { "negative": 0, "words": [ 779264, 149 ], "length": 2, "red": null }, { "negative": 0, "words": [ 37748736, 3305132, 2220446 ], "length": 3, "red": null }, { "negative": 0, "words": [ 31981568, 29933858, 2220 ], "length": 3, "red": null } ], "user": "TG7g7V5fmeiVpWWsxqnhX8g8S86w3wMtmG" }, "resourceNode": "solidityNode", "_id": { "$oid": "62de74cc5520812d1c6474e6" }, "createdAt": { "$date": { "$numberLong": "1658746060807" } }, "updatedAt": { "$date": { "$numberLong": "1658746060807" } } }, "createdAt": { "$date": { "$numberLong": "1658746060188" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } }, "__v": 0 }, { "_id": { "$oid": "62de74cc5520812d1c6474d5" }, "address": "TDe1yuD647gM9bfmwLsZBHS1g1JpWVtJ4V", "vaultAddress": "TUw7TvNHGZJGMFm3RxUtKxYfBKafVHVFBf", "factoryAddress": "TXrsYxtgenb722F8sWJkR8HH3diSBEWtrn", "poolManagerAddress": "TG7g7V5fmeiVpWWsxqnhX8g8S86w3wMtmG", "swapFee": { "exact": "3000000000000000", "approximate": 3000000000000000 }, "name": "WP WTRX <-> WETH", "symbol": "WP WTRX <-> WETH", "tokens": [ { "address": "TH9pNgBcqsSV6NNGQr1EHRbnQ29RJQipA1", "name": "WTRX_shasta", "symbol": "WTRX_shasta", "exchangeRate": 0.065367, "decimal": 6, "multiplier": { "exact": "1000000000000", "approximate": 1000000000000 }, "weight": { "exact": "800000000000000000", "approximate": 800000000000000000 }, "balance": { "exact": "23000000000", "approximate": 23000000000 }, "_id": { "$oid": "62de74cc5520812d1c6474d6" }, "createdAt": { "$date": { "$numberLong": "1658746060697" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } } }, { "address": "TSF96eswa74vJPpeUuPt9mGdPhs5Ahooi4", "name": "WETH_shasta", "symbol": "WETH_shasta", "exchangeRate": 1547.88, "decimal": 18, "multiplier": { "exact": "1", "approximate": 1 }, "weight": { "exact": "200000000000000000", "approximate": 200000000000000000 }, "balance": { "exact": "10000000000000000000", "approximate": 10000000000000000000 }, "_id": { "$oid": "62de74cc5520812d1c6474d7" }, "createdAt": { "$date": { "$numberLong": "1658746060697" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } } } ], "lpAmount": { "exact": "4890826636630102565032", "approximate": 4.8908266366301e+21 }, "lastModEvent": { "block": 26248702, "timestamp": 1658745342000, "contract": "TUw7TvNHGZJGMFm3RxUtKxYfBKafVHVFBf", "name": "Deposit", "transaction": "8a2e4103cadb74c1f1feab9dbbf7ab338c69038995cd0efeb41b37e62673a575", "result": { "pool": "TDe1yuD647gM9bfmwLsZBHS1g1JpWVtJ4V", "lpAmount": { "negative": 0, "words": [ 62841000, 44848004, 1085981 ], "length": 3, "red": null }, "tokensDeposited": [ { "negative": 0, "words": [ 48768512, 342 ], "length": 2, "red": null }, { "negative": 0, "words": [ 31981568, 29933858, 2220 ], "length": 3, "red": null } ], "user": "TG7g7V5fmeiVpWWsxqnhX8g8S86w3wMtmG" }, "resourceNode": "solidityNode", "_id": { "$oid": "62de74cc5520812d1c6474ef" }, "createdAt": { "$date": { "$numberLong": "1658746060870" } }, "updatedAt": { "$date": { "$numberLong": "1658746060870" } } }, "createdAt": { "$date": { "$numberLong": "1658746060698" } }, "updatedAt": { "$date": { "$numberLong": "1658746984963" } }, "__v": 0 } ] module.exports = { testPoolParams }