PHP code example of nfthistory / nfthistorylogs

1. Go to this page and download the library: Download nfthistory/nfthistorylogs library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nfthistory / nfthistorylogs example snippets




ft\History\nftHistory;

$contractAddress = "CONTRACT ADDRESS";
$provider = "http://localhost:8545";

$NftHistory  = new nftHistory($contractAddress, $provider);

print_r($NftHistory );
    
// Output:
(
    [contractAddress:protected] => contract address
    [provider] => http://localhost:8545
)

$NftHistory->transferTrxById($tokenId, $fromBlock, $toBlock);

$NftHistory->allTransferTrx($fromBlock, $toBlock);

$nfthistory->allTransferTrxHashAndIds();

 $nfthistory->trxByHash($trxHash);

$NftHistory->allTrx($fromBlock, $toBlock);

$NftHistory->receiptByTrxHash($trxHash);

$NftHistory->topSellNfts($countRank, $fromBlock, $toBlock);

$NftHistory->nftTrxWei($transactionHash, $eventName);

$NftHistory->weiToEther($weiValue);

$NftHistory->eventSig("Transfer");

$NftHistory->fromAddress($trxHash, $eventName);

$NftHistory->toAddress($trxHash, $eventName);

$NftHistory->tokenId($topics);

$NftHistory->genesisBlock();

docker-compose up