FakeCollector for testing smart contracts.
Accepts a Dictionary<bigint, bigint> mapping assetId to price (in ASSET_PRICE_SCALE, i.e. USD price * 1e9) and produces valid ClassicPrices without any network calls.
const prices = Dictionary.empty<bigint, bigint>();prices.set(TON_ASSET_ID, 5_000_000_000n); // $5.00prices.set(USDT_ASSET_ID, 1_000_000_000n); // $1.00const collector = new FakeCollector(prices);const classicPrices = await collector.getPrices(); Copy
const prices = Dictionary.empty<bigint, bigint>();prices.set(TON_ASSET_ID, 5_000_000_000n); // $5.00prices.set(USDT_ASSET_ID, 1_000_000_000n); // $1.00const collector = new FakeCollector(prices);const classicPrices = await collector.getPrices();
Optional
FakeCollector for testing smart contracts.
Accepts a Dictionary<bigint, bigint> mapping assetId to price (in ASSET_PRICE_SCALE, i.e. USD price * 1e9) and produces valid ClassicPrices without any network calls.
Example