Documentation

UniswapFactory extends ContractService
in package

Class EthereumService

Table of Contents

ETHEREUM_ADDRESS  = '/^0x[a-fA-F0-9]{40}$/'
Base ethereum regex
RPC_VERSION  = "2.0"
$ABIService  : ABIService
$credentials  : ConnectionInterface
$curl  : CurlHandle|resource
__construct()  : mixed
EthereumRPC constructor.
__get()  : void
__isset()  : mixed
__set()  : mixed
abi()  : array<string|int, mixed>
apiVersion()  : string|null
baseHeaders()  : array<string|int, mixed>
baseUrl()  : string
callContractFunction()  : mixed
clientCallContractFunction()  : string
decodeContractTransactionArgs()  : array<string|int, mixed>
decodeContractTransactionLogs()  : array<string|int, mixed>|null
decodeRespose()  : mixed
encodeSetFeeTo()  : string
encodeSetFeeToSetter()  : mixed
ethCall()  : string
getAllPairsLenght()  : mixed
getBalance()  : string
getBlockTransactions()  : array<string|int, mixed>
getBlockTransactionsCountByNumber()  : int
getCurrentBlockNumber()  : int
getEventsTopics()  : array<string|int, mixed>
getFeeToAddress()  : mixed
getFeeToSetterAddress()  : mixed
getGethGasPrice()  : string
getHost()  : string
getMethodSelector()  : array<string|int, mixed>
getMethodSelectors()  : array<string|int, mixed>
getPairAddress()  : mixed
getPoolAddressByTokensAddresses()  : mixed
getPort()  : int|null
getSsl()  : bool
getTransactionByHash()  : array<string|int, mixed>|null
getTransactionReceipt()  : array<string|int, mixed>|null
getTxCountForAddress()  : string
jsonRPC()  : array<string|int, mixed>
sendNodeRequest()  : array<string|int, mixed>
validateAddress()  : void
url()  : string

Constants

ETHEREUM_ADDRESS

Base ethereum regex

public mixed ETHEREUM_ADDRESS = '/^0x[a-fA-F0-9]{40}$/'

Properties

Methods

__isset()

public __isset(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

__set()

public __set(mixed $name, mixed $value) : mixed
Parameters
$name : mixed
$value : mixed
Return values
mixed

abi()

public abi() : array<string|int, mixed>
Return values
array<string|int, mixed>

apiVersion()

public apiVersion() : string|null
Return values
string|null

baseHeaders()

public baseHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

callContractFunction()

public callContractFunction(string $contractAddress, string $functionName[, array<string|int, mixed> $params = [] ][, mixed $block = "latest" ]) : mixed
Parameters
$contractAddress : string
$functionName : string
$params : array<string|int, mixed> = []
$block : mixed = "latest"
Return values
mixed

clientCallContractFunction()

public clientCallContractFunction(string $contractAddress, string $functionName[, array<string|int, mixed> $params = [] ][, mixed $block = "latest" ]) : string
Parameters
$contractAddress : string
$functionName : string
$params : array<string|int, mixed> = []
$block : mixed = "latest"
Return values
string

decodeContractTransactionArgs()

public decodeContractTransactionArgs(string $function, string $encoded) : array<string|int, mixed>
Parameters
$function : string
$encoded : string
Return values
array<string|int, mixed>

decodeContractTransactionLogs()

public decodeContractTransactionLogs(string $topicId, array<string|int, mixed> $encodedLogs) : array<string|int, mixed>|null
Parameters
$topicId : string
$encodedLogs : array<string|int, mixed>
Return values
array<string|int, mixed>|null

decodeRespose()

public decodeRespose(string $function, mixed $response) : mixed
Parameters
$function : string
$response : mixed
Return values
mixed

encodeSetFeeTo()

public encodeSetFeeTo(string $to) : string
Parameters
$to : string
Return values
string

encodeSetFeeToSetter()

public encodeSetFeeToSetter(string $to) : mixed
Parameters
$to : string
Return values
mixed

ethCall()

public ethCall( $tx[, string|int $block = "latest" ][, mixed $functionName = '' ]) : string
Parameters
$tx :
$block : string|int = "latest"
$functionName : mixed = ''
Tags
throws
GethException
Return values
string

getAllPairsLenght()

public getAllPairsLenght(string $contractAddress) : mixed
Parameters
$contractAddress : string
Return values
mixed

getBalance()

public getBalance(string $address) : string
Parameters
$address : string
Return values
string

getBlockTransactions()

public getBlockTransactions(int $blockNumber[, bool $onlyHashes = false ]) : array<string|int, mixed>
Parameters
$blockNumber : int
$onlyHashes : bool = false
Return values
array<string|int, mixed>

getBlockTransactionsCountByNumber()

public getBlockTransactionsCountByNumber(int $blockNumber) : int
Parameters
$blockNumber : int
Return values
int

getCurrentBlockNumber()

public getCurrentBlockNumber() : int
Return values
int

getEventsTopics()

public getEventsTopics() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFeeToAddress()

public getFeeToAddress(string $contractAddress) : mixed
Parameters
$contractAddress : string
Return values
mixed

getFeeToSetterAddress()

public getFeeToSetterAddress(string $contractAddress) : mixed
Parameters
$contractAddress : string
Return values
mixed

getGethGasPrice()

public getGethGasPrice() : string
Return values
string

getHost()

public getHost() : string
Return values
string

getMethodSelector()

public getMethodSelector(string $functionName) : array<string|int, mixed>
Parameters
$functionName : string
Return values
array<string|int, mixed>

getMethodSelectors()

public getMethodSelectors() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPairAddress()

public getPairAddress(string $contractAddress, int $id) : mixed
Parameters
$contractAddress : string
$id : int
Return values
mixed

getPoolAddressByTokensAddresses()

public getPoolAddressByTokensAddresses(string $contractAddress, string $tokenA, string $tokenB) : mixed
Parameters
$contractAddress : string
$tokenA : string
$tokenB : string
Return values
mixed

getPort()

public getPort() : int|null
Return values
int|null

getSsl()

public getSsl() : bool
Return values
bool

getTransactionByHash()

public getTransactionByHash(string $hash) : array<string|int, mixed>|null
Parameters
$hash : string
Return values
array<string|int, mixed>|null

getTransactionReceipt()

public getTransactionReceipt(string $txHash) : array<string|int, mixed>|null
Parameters
$txHash : string
Return values
array<string|int, mixed>|null

getTxCountForAddress()

public getTxCountForAddress(string $address[, string $quantity = "pending" ]) : string
Parameters
$address : string
$quantity : string = "pending"
Return values
string

jsonRPC()

public jsonRPC(string $command[, string|null $endpoint = null ][, array<string|int, mixed>|null $params = null ][, mixed $functionName = '' ]) : array<string|int, mixed>
Parameters
$command : string
$endpoint : string|null = null
$params : array<string|int, mixed>|null = null
$functionName : mixed = ''
Return values
array<string|int, mixed>

sendNodeRequest()

public sendNodeRequest([null $data = null ][, null $method = null ][, false $need_encode = true ][, false $is_put = false ][, mixed $functionName = '' ]) : array<string|int, mixed>
Parameters
$data : null = null
$method : null = null
$need_encode : false = true
$is_put : false = false
$functionName : mixed = ''
Tags
throws
JsonException
Return values
array<string|int, mixed>

url()

private url([null|string $endPoint = null ]) : string
Parameters
$endPoint : null|string = null
Return values
string

Search results