21 lines
737 B
TypeScript
Vendored
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>;
|
|
}
|