WIN-2308041133\Administrator 6 months ago
parent
commit
28f64fe7fc
1 changed files with 19 additions and 19 deletions
  1. 19 19
      application/api/controller/Pay.php

+ 19 - 19
application/api/controller/Pay.php

@@ -944,25 +944,25 @@ class Pay extends Api
     }
     }
     public function test(){
     public function test(){
         $service = Web3Service::instance('bsc', 'usdt', '');
         $service = Web3Service::instance('bsc', 'usdt', '');
-        $info =$service->getLastTransfer([], ['0x8f5f8daC38461E5b1A6b230D30433f8A593CCD57']);
+        $info =$service->getLastTransfer([], ['0xbfc3b2193653ebf94bfa3fe586627b9c01f26db9'],1748293200);
         var_dump($info);die();
         var_dump($info);die();
-        $info =$service->getLastTransfer(['0x83105BDFAc1a15DF3C22D019Ac2F2937AC1Ef098'], ['0x8f5f8daC38461E5b1A6b230D30433f8A593CCD57'], 1748315888);
-// 1. 确保地址全小写
-        $fromAddress = '0x83105bdfac1a15df3c22d019ac2f2937ac1ef098';
-        $toAddress = '0x8f5f8dac38461e5b1a6b230d30433f8a593ccd57';
-
-// 2. 手动构造最小化的过滤条件
-        $filter = [
-            'fromBlock' => '0x' . dechex(28000000), // 起始区块高度
-            'toBlock' => 'latest',
-            'topics' => [
-                '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', // USDT Transfer事件签名
-                '0x000000000000000000000000' . substr($fromAddress, 2), // 发送方
-                '0x000000000000000000000000' . substr($toAddress, 2)    // 接收方
-            ]
-        ];
-
-// 3. 直接调用底层方法(避免封装方法添加额外参数)
-        $transfers = $service->getEth()->getLogs($filter);
+//        $info =$service->getLastTransfer(['0x83105BDFAc1a15DF3C22D019Ac2F2937AC1Ef098'], ['0x8f5f8daC38461E5b1A6b230D30433f8A593CCD57'], 1748315888);
+//// 1. 确保地址全小写
+//        $fromAddress = '0x83105bdfac1a15df3c22d019ac2f2937ac1ef098';
+//        $toAddress = '0x8f5f8dac38461e5b1a6b230d30433f8a593ccd57';
+//
+//// 2. 手动构造最小化的过滤条件
+//        $filter = [
+//            'fromBlock' => '0x' . dechex(28000000), // 起始区块高度
+//            'toBlock' => 'latest',
+//            'topics' => [
+//                '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', // USDT Transfer事件签名
+//                '0x000000000000000000000000' . substr($fromAddress, 2), // 发送方
+//                '0x000000000000000000000000' . substr($toAddress, 2)    // 接收方
+//            ]
+//        ];
+//
+//// 3. 直接调用底层方法(避免封装方法添加额外参数)
+//        $transfers = $service->getEth()->getLogs($filter);
     }
     }
 }
 }