tornado-core/dist/prices.d.ts
2024-10-16 14:19:49 +00:00

21 lines
737 B
TypeScript
Vendored

import { type Provider } from 'ethers';
import { OffchainOracle, Multicall } from './typechain';
import { Call3 } from './multicall';
export declare class TokenPriceOracle {
oracle?: OffchainOracle;
multicall: Multicall;
provider: Provider;
constructor(provider: Provider, multicall: Multicall, oracle?: OffchainOracle);
buildCalls(tokens: {
tokenAddress: string;
decimals: number;
}[]): Call3[];
buildStable(stablecoinAddress: string): Call3[];
fetchPrice(tokenAddress: string, decimals: number): Promise<bigint>;
fetchPrices(tokens: {
tokenAddress: string;
decimals: number;
}[]): Promise<bigint[]>;
fetchEthUSD(stablecoinAddress: string): Promise<number>;
}