Skip to main content

DusaV0Library

Table of contents​

Constructors​

Methods​

Constructors​

constructor​

• new DusaV0Library(): DusaV0Library

Returns​

DusaV0Library

Methods​

getAmountIn​

▸ getAmountIn(amountOut, reserveIn, reserveOut): u256

Parameters​

NameType
amountOutu256
reserveInu256
reserveOutu256

Returns​

u256

Defined in​

assembly/libraries/DusaV0Library.ts:51


getAmountOut​

▸ getAmountOut(amountIn, reserveIn, reserveOut): u256

Parameters​

NameType
amountInu256
reserveInu256
reserveOutu256

Returns​

u256

Defined in​

assembly/libraries/DusaV0Library.ts:35


getAmountsIn​

▸ getAmountsIn(factory, amountOut, path): u256[]

Parameters​

NameType
factoryIV0Factory
amountOutu256
pathAddress[]

Returns​

u256[]

Defined in​

assembly/libraries/DusaV0Library.ts:90


getAmountsOut​

▸ getAmountsOut(factory, amountIn, path): u256[]

Parameters​

NameType
factoryIV0Factory
amountInu256
pathAddress[]

Returns​

u256[]

Defined in​

assembly/libraries/DusaV0Library.ts:69


getReserves​

▸ getReserves(factory, tokenA, tokenB): Amounts

Parameters​

NameType
factoryIV0Factory
tokenAAddress
tokenBAddress

Returns​

Amounts

Defined in​

assembly/libraries/DusaV0Library.ts:11


quote​

▸ quote(amountA, reserveA, reserveB): u256

Parameters​

NameType
amountAu256
reserveAu256
reserveBu256

Returns​

u256

Defined in​

assembly/libraries/DusaV0Library.ts:25