Hi, i have problem when try getLogs, it give me error response like below :
cURL error 60: SSL certificate problem: certificate has expired (see libcurl - Error Codes)
can somebody help me with this?
Hey Aditya,
Can you please show us what you’re querying so we can look closer?
-Nick
Hi Nick,
Thank you for the reply.
I want to know when user do deposit to address… so i use this :
$contract = new Contract($web3->provider, $contractABI);
$transferEventSignature = 'Transfer(address,address,uint256)';
$data2 = [
'fromBlock' => 'earliest', // You can specify a different block number here
'toBlock' => 'latest',
'address' => $tokenContractAddress, // The contract address
'topics' => [$transferEventSignature, null, $walletAddress]
];
// Use the filter method to filter Transfer events to your wallet
$logs = $contract->eth->getLogs([
'fromBlock' => '0x0', // You can specify a different block number here
'toBlock' => '0x1',
'address' => $tokenContractAddress, // The contract address
'topics' => [null, $walletAddress]
], function ($err, $result) {
if ($err !== null) {
$errmsg = $err->getMessage();
echo "err: $errmsg";
} else {
// Get the filtered events
$events = $filter->get();
// Loop through the events and handle them
foreach ($result as $event) {
// Process the Transfer event data
$fromAddress = $event['topics'][1];
$toAddress = $event['topics'][2];
$amount = $event['data'];
$txid = $event['transactionHash'];
// You can format and display the data as needed
echo "From: $fromAddress, To: $toAddress, Amount: $amount, TXID: $txid\n";
}
}
});
I’m using laravel with web3p/web3
Thank you
Aditya.
Hey Aditya,
You will need to open a ticket with our team here so we can look at your code more closely. You can do so at the following link - https://support.quicknode.com/hc/en-us/requests/new
-Nick