Table of Contents
-
MINIMUM_LIQUIDITY
= 10 ** 3
-
$contractAddress
: string|null
-
$contract
: UniswapPair
-
$contractWeth
: WETHContract
-
$FEE_DENOMINATOR
: string
-
$math
: MathInterface
-
$pairInfo
: Pair
-
$SLIPPAGE
: string
-
$tokeInfo
: Token
-
$tokenService
: TokenService
-
__construct()
: mixed
-
amountWithSlippage()
: string
-
convertCurrency()
: mixed
-
getAllowance()
: string|null
-
getAmountIn()
: mixed
-
getAmountOut()
: mixed
-
getBalance()
: string
-
getContract()
: UniswapPair
-
getContractAddress()
: string
-
getContractWeth()
: WETHContract|ContractService
-
getEventsTopics()
: array<string|int, mixed>
-
getFeeDenominator()
: string
-
getFunctionSelector()
: array<string|int, mixed>
-
getNonces()
: mixed
-
getPairInfo()
: Pair
-
getPairInfoJson()
: string
-
getReserves()
: array<string|int, mixed>
-
getSlippage()
: string
-
getToken0()
: string
-
getToken0Service()
: TokenService
-
getToken1()
: string
-
getToken1Service()
: TokenService
-
getTokenInfo()
: Token
-
getTokenInfoJson()
: string
-
loadKLast()
: self
-
loadLpInfo()
: self
-
loadPairInfo()
: void
-
loadPriceCumulative()
: self
-
loadReserves()
: self
-
loadToken0Info()
: self
-
loadToken1Info()
: self
-
loadTokenInfo()
: self
-
loadTokens()
: void
-
loadTokensInfo()
: self
-
quote()
: mixed
-
setContractAddress()
: TokenService
-
setFeeDenominator()
: void
-
setSlippage()
: void
-
toDateTimeZone()
: string
-
toFormat()
: string
-
updatePrices()
: self
MINIMUM_LIQUIDITY
public
mixed
MINIMUM_LIQUIDITY
= 10 ** 3
$contractAddress
protected
string|null
$contractAddress
$contract
private
UniswapPair
$contract
$contractWeth
private
WETHContract
$contractWeth
$FEE_DENOMINATOR
private
string
$FEE_DENOMINATOR
= "9998"
$math
private
MathInterface
$math
$pairInfo
private
Pair
$pairInfo
$SLIPPAGE
private
string
$SLIPPAGE
= "10"
$tokeInfo
private
Token
$tokeInfo
$tokenService
private
TokenService
$tokenService
__construct()
public
__construct(string $contractAddress, ConnectionInterface $credentials) : mixed
Parameters
-
$contractAddress
: string
-
-
$credentials
: ConnectionInterface
-
-
throws
-
InvalidContractInstanceKeyException
Return values
mixed
—
amountWithSlippage()
public
amountWithSlippage(string $amount, MathInterface $math) : string
Parameters
-
$amount
: string
-
-
$math
: MathInterface
-
Return values
string
—
convertCurrency()
public
convertCurrency(float $amount[, string $from = 'wei' ][, string $to = 'ether' ]) : mixed
Parameters
-
$amount
: float
-
-
$from
: string
= 'wei'
-
-
$to
: string
= 'ether'
-
Return values
mixed
—
getAllowance()
public
getAllowance(string $owner, string $spender) : string|null
Parameters
-
$owner
: string
-
-
$spender
: string
-
Return values
string|null
—
getAmountIn()
public
getAmountIn(mixed $amountOut, mixed $reserveIn, mixed $reserveOut, MathInterface $math) : mixed
Parameters
-
$amountOut
: mixed
-
-
$reserveIn
: mixed
-
-
$reserveOut
: mixed
-
-
$math
: MathInterface
-
Return values
mixed
—
getAmountOut()
public
getAmountOut(mixed $amountIn, mixed $reserveIn, mixed $reserveOut, MathInterface $math) : mixed
Parameters
-
$amountIn
: mixed
-
-
$reserveIn
: mixed
-
-
$reserveOut
: mixed
-
-
$math
: MathInterface
-
Return values
mixed
—
getBalance()
public
getBalance(string $address) : string
Parameters
-
$address
: string
-
Return values
string
—
getContract()
public
getContract() : UniswapPair
Return values
UniswapPair
—
getContractAddress()
public
getContractAddress() : string
Return values
string
—
getContractWeth()
public
getContractWeth() : WETHContract|ContractService
Return values
WETHContract|ContractService
—
getEventsTopics()
public
getEventsTopics() : array<string|int, mixed>
Return values
array<string|int, mixed>
—
getFeeDenominator()
public
getFeeDenominator() : string
Return values
string
—
getFunctionSelector()
public
getFunctionSelector(string $name) : array<string|int, mixed>
Parameters
-
$name
: string
-
Return values
array<string|int, mixed>
—
getNonces()
public
getNonces(string $address) : mixed
Parameters
-
$address
: string
-
Return values
mixed
—
getPairInfo()
public
getPairInfo() : Pair
Return values
Pair
—
getPairInfoJson()
public
getPairInfoJson() : string
-
throws
-
JsonException
Return values
string
—
getReserves()
public
getReserves() : array<string|int, mixed>
Return values
array<string|int, mixed>
—
getSlippage()
public
getSlippage() : string
Return values
string
—
getToken0()
public
getToken0() : string
Return values
string
—
getToken0Service()
public
getToken0Service() : TokenService
Return values
TokenService
—
getToken1()
public
getToken1() : string
Return values
string
—
getToken1Service()
public
getToken1Service() : TokenService
Return values
TokenService
—
getTokenInfo()
public
getTokenInfo() : Token
Return values
Token
—
getTokenInfoJson()
public
getTokenInfoJson() : string
-
throws
-
JsonException
Return values
string
—
loadKLast()
public
loadKLast() : self
Return values
self
—
loadLpInfo()
public
loadLpInfo() : self
Return values
self
—
loadPairInfo()
public
loadPairInfo() : void
Return values
void
—
loadPriceCumulative()
public
loadPriceCumulative() : self
Return values
self
—
loadReserves()
public
loadReserves() : self
Return values
self
—
loadToken0Info()
public
loadToken0Info() : self
Return values
self
—
loadToken1Info()
public
loadToken1Info() : self
Return values
self
—
loadTokenInfo()
public
loadTokenInfo() : self
Return values
self
—
loadTokens()
public
loadTokens() : void
Return values
void
—
loadTokensInfo()
public
loadTokensInfo() : self
Return values
self
—
quote()
public
quote(mixed $amountA, mixed $reserveA, mixed $reserveB, MathInterface $math) : mixed
Parameters
-
$amountA
: mixed
-
-
$reserveA
: mixed
-
-
$reserveB
: mixed
-
-
$math
: MathInterface
-
Return values
mixed
—
setContractAddress()
public
setContractAddress(string $contractAddress) : TokenService
Parameters
-
$contractAddress
: string
-
Return values
TokenService
—
setFeeDenominator()
public
setFeeDenominator(string $value) : void
Parameters
-
$value
: string
-
Return values
void
—
setSlippage()
public
setSlippage(string $value) : void
Parameters
-
$value
: string
-
Return values
void
—
toDateTimeZone()
public
toDateTimeZone(mixed $timestamp) : string
Parameters
-
$timestamp
: mixed
-
Return values
string
—
public
toFormat(string $amount, string $denominator) : string
Parameters
-
$amount
: string
-
-
$denominator
: string
-
Return values
string
—
updatePrices()
public
updatePrices() : self
Return values
self
—