Download the PHP package nfthistory/nfthistorylogs without Composer
On this page you can find all versions of the php package nfthistory/nfthistorylogs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nfthistory/nfthistorylogs
More information about nfthistory/nfthistorylogs
Files in nfthistory/nfthistorylogs
Package nfthistorylogs
Short Description Multinetworks Ethereum Interface to manage NFT history transactions logs
License MIT
Informations about the package nfthistorylogs
⚙️ NFT History Logs
NFT History Logs is the Ethereum PHP API which connects to JSON RPC specs to get the desired logs of an nft contract address or specific nft with id on Ethereum Chain.
Supported Chain: just Ethereum Chain for now!
You need to run a local or remote Ethereum node to use this library.
You could also use testnet like Ganache or Cloudflare ETH network.
You could also set any network endpoints like Alchemy or Infura or anything you want.
Installation
Usage
New instance
the contract address and provider must be string type.
transferTrxById
You can get and filter all transfer transactions of an specific nft by using Token ID. The majority of the NFT market provided this token ID, but if they did not, you could still obtain it on Etehscan.io
$tokenId must be string number, $fromBlock and $toBlock must be string of hex type (you could set "0x0" as a first block and "latest" as the final block)
allTransferTrx
you can filter transactions history based on transfer event.
$fromBlock and $toBlock must be string of hex type (you could set "0x0" as a first block and "latest" as the final block)
allTransferTrxHashAndIds
You can get all transfer information arranged and categorized by token ids. It returns an object.
trxByHash
You can get information of an specific transaction by passing transaction hash. it returns an Object. the trxHash variable is necessary.
allTrx
You can get all transaction of an nft contract address without any filter. Be aware that most networks will throw an exception in this situation due to a limitation in log output. You must set a specific block number instead of "latest" for the $toBlock variable.
receiptByTrxHash
You can get the information of receipt transaction by using this function. pass transaction hash to this function. it returns an object of transaction.
topSellNfts
showing the top selling nfts to the lowest prices. be aware of rate limit of the destination server. $countRank is the numbers of the values you want to obtain. it is optional and must not exceed the numbers of tokens of an contract address. it must be in decimal format. $fromBlock and $toBlock are optional.
nftTrxWei
every transaction has a property called "data". this section is a hexadecimal number in Wei format. you must pass transaction hash to return an array of data. you can also filter by using $eventName. $eventName is optional.
weiToEther
convert WEI values of token to Ether format _ if its hex format, will be converted to decimal.
eventSig
You could also get a 256-bit hashed event signature. event signatures supported at this time: "Transfer" , "Approval" and "ApprovalForAll".
event name could be this 3 option as string type: "Transfer" , "Approval" and "ApprovalForAll"
fromAddress
if you get specific nft transaction and you want identify the sender address of the transaction, pass transaction hash. $eventName is optional:
toAddress
If you receive a specific nft transaction and want to identify the recipient address, pass transaction hash. $eventName is optional:
tokenId
I assume you have topics for desired transaction objects and you want to know the tokenid of an nft.
genesisBlock
The Genesis Block is the birth block of an nft. so:
docker-compose
this library is tested on php version 8.1, to test it just try this command:
contribution
If you are interested in contributing to this project, I will be very glad ^__^
My Social Networks
You can get in contact with me by:
Hackernoon
Linkedin
License
MIT