Class FakeCollector

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.00
prices.set(USDT_ASSET_ID, 1_000_000_000n); // $1.00

const collector = new FakeCollector(prices);
const classicPrices = await collector.getPrices();

Hierarchy (View Summary)

Constructors

Methods