TokenService
in package
Table of Contents
- $contractAddress : string|null
- $contract : ERC20Contract
- $contractWeth : WETHContract
- $tokeInfo : Token
- __construct() : mixed
- getAllowance() : string|null
- getBalance() : string
- getContract() : ERC20Contract|ContractService
- getContractAddress() : string|null
- getContractWeth() : WETHContract|ContractService
- getEventsTopics() : array<string|int, mixed>
- getFunctionSelector() : array<string|int, mixed>
- getTokenInfo() : Token
- getTokenInfoJson() : string
- loadTokenInfo() : self
- setContractAddress() : TokenService
Properties
$contractAddress
protected
string|null
$contractAddress
$contract
private
ERC20Contract
$contract
$contractWeth
private
WETHContract
$contractWeth
$tokeInfo
private
Token
$tokeInfo
Methods
__construct()
public
__construct(string|null $contractAddress, ConnectionInterface $credentials) : mixed
Parameters
- $contractAddress : string|null
- $credentials : ConnectionInterface
Return values
mixed —getAllowance()
public
getAllowance(string $owner, string $spender) : string|null
Parameters
- $owner : string
- $spender : string
Return values
string|null —getBalance()
public
getBalance(string $address) : string
Parameters
- $address : string
Return values
string —getContract()
public
getContract() : ERC20Contract|ContractService
Return values
ERC20Contract|ContractService —getContractAddress()
public
getContractAddress() : string|null
Return values
string|null —getContractWeth()
public
getContractWeth() : WETHContract|ContractService
Return values
WETHContract|ContractService —getEventsTopics()
public
getEventsTopics() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFunctionSelector()
public
getFunctionSelector(string $name) : array<string|int, mixed>
Parameters
- $name : string
Return values
array<string|int, mixed> —getTokenInfo()
public
getTokenInfo() : Token
Return values
Token —getTokenInfoJson()
public
getTokenInfoJson() : string
Tags
Return values
string —loadTokenInfo()
public
loadTokenInfo() : self
Return values
self —setContractAddress()
public
setContractAddress(string|null $contractAddress) : TokenService
Parameters
- $contractAddress : string|null