Browse Source

no message

BF-202210271038\Administrator 2 years ago
parent
commit
3eb3717967

+ 114 - 0
app/Console/Commands/GetCommand.php

@@ -0,0 +1,114 @@
+<?php
+
+namespace App\Console\Commands;
+
+use App\Jobs\BarrageJob;
+use App\Jobs\ShopNoticeJob;
+use App\Jobs\VerifyImg;
+use App\Models\CouponGrantRange;
+use App\Models\ErrorRecord;
+use App\Models\Express;
+use App\Models\Goods;
+use App\Models\GoodsSpec;
+use App\Models\ImGroup;
+use App\Models\ImMyGroup;
+use App\Models\Member;
+use App\Models\MemberOpenId;
+use App\Models\Members;
+use App\Models\Menu;
+use App\Models\Order;
+use App\Models\OrderAccountsSet;
+use App\Models\OrderItem;
+use App\Models\PayOrder;
+use App\Models\RefundOrder;
+use App\Models\Region;
+use App\Models\SeckillGoods;
+use App\Models\Shop;
+use App\Models\ShopOrder;
+use App\Models\ShopSet;
+use App\Models\ShopUser;
+use App\Models\Withdraw;
+use App\Servers\AlbumServer;
+use App\Servers\BarrageServer;
+use App\Servers\BroadcastServer;
+use App\Servers\CommentServer;
+use App\Servers\CommonServer;
+use App\Servers\ContractServer;
+use App\Servers\Coupon\CouponGrantServer;
+use App\Servers\Electricity\JdElectricityServer;
+use App\Servers\Electricity\TbElectricityServer;
+use App\Servers\ExpressServer;
+use App\Servers\GrantPondServer;
+use App\Servers\HxServer;
+use App\Servers\Icon\BanRPC;
+use App\Servers\Icon\TronRPC;
+use App\Servers\ImgServer;
+use App\Servers\ImServer;
+use App\Servers\MemberClanServer;
+use App\Servers\MemberServer;
+use App\Servers\OrderServer;
+use App\Servers\PayServer;
+use App\Servers\RedisDataServer;
+use App\Servers\RefundOrderServer;
+use App\Servers\SeckillServer;
+use App\Servers\SensitiveServer;
+use App\Servers\ShopFileServer;
+use App\Servers\ShopNoticeServer;
+use App\Servers\ShopOrderServer;
+use App\Servers\ShopServer;
+use App\Servers\UsedServer;
+use App\Servers\WeixinServer;
+use App\Servers\WxTemplateServer;
+use App\Servers\ZfbServer;
+use Illuminate\Console\Command;
+use Illuminate\Support\Facades\DB;
+use SimpleSoftwareIO\QrCode\Facades\QrCode;
+use SwooleTW\Http\Websocket\Facades\Websocket;
+use Topsdk\Topapi\TopApiClient;
+
+class GetCommand extends Command
+{
+    /**
+     * The name and signature of the console command.
+     *
+     * @var string
+     */
+    protected $signature = 'broadcast:get';
+
+    /**
+     * The console command description.
+     *
+     * @var string
+     */
+    protected $description = '广播查下';
+
+    /**
+     * Create a new command instance.
+     *
+     * @return void
+     */
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+
+    /**
+     * Execute the console command.
+     *
+     * @return mixed
+     */
+    public function handle()
+    {
+        while (true) {
+            $this->info('---------------开始执行了---------------------:'.date('Y-m-d H:i:s'));
+
+            $num =  BroadcastServer::creatServer()->getBroadcast();
+            if ($num <= 0) {
+                $this->error('---------------执行休眠了---------------------');
+                sleep(3);
+            }
+            $this->info('---------------执行完成了---------------------'.date('Y-m-d H:i:s'));
+        }
+    }
+}

+ 113 - 0
app/Console/Commands/SendCommand.php

@@ -0,0 +1,113 @@
+<?php
+
+namespace App\Console\Commands;
+
+use App\Jobs\BarrageJob;
+use App\Jobs\ShopNoticeJob;
+use App\Jobs\VerifyImg;
+use App\Models\CouponGrantRange;
+use App\Models\ErrorRecord;
+use App\Models\Express;
+use App\Models\Goods;
+use App\Models\GoodsSpec;
+use App\Models\ImGroup;
+use App\Models\ImMyGroup;
+use App\Models\Member;
+use App\Models\MemberOpenId;
+use App\Models\Members;
+use App\Models\Menu;
+use App\Models\Order;
+use App\Models\OrderAccountsSet;
+use App\Models\OrderItem;
+use App\Models\PayOrder;
+use App\Models\RefundOrder;
+use App\Models\Region;
+use App\Models\SeckillGoods;
+use App\Models\Shop;
+use App\Models\ShopOrder;
+use App\Models\ShopSet;
+use App\Models\ShopUser;
+use App\Models\Withdraw;
+use App\Servers\AlbumServer;
+use App\Servers\BarrageServer;
+use App\Servers\BroadcastServer;
+use App\Servers\CommentServer;
+use App\Servers\CommonServer;
+use App\Servers\ContractServer;
+use App\Servers\Coupon\CouponGrantServer;
+use App\Servers\Electricity\JdElectricityServer;
+use App\Servers\Electricity\TbElectricityServer;
+use App\Servers\ExpressServer;
+use App\Servers\GrantPondServer;
+use App\Servers\HxServer;
+use App\Servers\Icon\BanRPC;
+use App\Servers\Icon\TronRPC;
+use App\Servers\ImgServer;
+use App\Servers\ImServer;
+use App\Servers\MemberClanServer;
+use App\Servers\MemberServer;
+use App\Servers\OrderServer;
+use App\Servers\PayServer;
+use App\Servers\RedisDataServer;
+use App\Servers\RefundOrderServer;
+use App\Servers\SeckillServer;
+use App\Servers\SensitiveServer;
+use App\Servers\ShopFileServer;
+use App\Servers\ShopNoticeServer;
+use App\Servers\ShopOrderServer;
+use App\Servers\ShopServer;
+use App\Servers\UsedServer;
+use App\Servers\WeixinServer;
+use App\Servers\WxTemplateServer;
+use App\Servers\ZfbServer;
+use Illuminate\Console\Command;
+use Illuminate\Support\Facades\DB;
+use SimpleSoftwareIO\QrCode\Facades\QrCode;
+use SwooleTW\Http\Websocket\Facades\Websocket;
+use Topsdk\Topapi\TopApiClient;
+
+class SendCommand extends Command
+{
+    /**
+     * The name and signature of the console command.
+     *
+     * @var string
+     */
+    protected $signature = 'broadcast:send';
+
+    /**
+     * The console command description.
+     *
+     * @var string
+     */
+    protected $description = '广播执行';
+
+    /**
+     * Create a new command instance.
+     *
+     * @return void
+     */
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+
+    /**
+     * Execute the console command.
+     *
+     * @return mixed
+     */
+    public function handle()
+    {
+        while (true) {
+            $this->info('---------------开始执行了---------------------:'.date('Y-m-d H:i:s'));
+            $num =  BroadcastServer::creatServer()->sendBroadcast();
+            if ($num <= 0) {
+                $this->error('---------------执行休眠了---------------------');
+                sleep(3);
+            }
+            $this->info('---------------执行完成了---------------------'.date('Y-m-d H:i:s'));
+        }
+    }
+}

+ 3 - 1
app/Console/Kernel.php

@@ -14,6 +14,7 @@ use App\Console\Commands\OrderRepeal;
 use App\Console\Commands\PlatformGoods;
 use App\Console\Commands\ProvinceCodeCommand;
 use App\Console\Commands\ReturnOrderCommand;
+use App\Console\Commands\SendCommand;
 use App\Console\Commands\ShareShop;
 use App\Console\Commands\ShopPerformance;
 use App\Console\Commands\TestCommand;
@@ -30,7 +31,8 @@ class Kernel extends ConsoleKernel
     protected $commands = [
         //
         TestCommand::class,
-        ContractCommand::class
+        ContractCommand::class,
+        SendCommand::class
     ];
 
     /**

+ 115 - 0
app/Observers/ContractDistributionObserver.php

@@ -0,0 +1,115 @@
+<?php
+
+namespace App\Observers;
+
+
+
+
+
+use App\Models\ContractDistribution;
+use App\Servers\BroadcastServer;
+use App\Servers\CommonServer;
+
+class ContractDistributionObserver
+{
+    /**
+     * 获取到模型实例后触发
+     */
+    public function retrieved()
+    {
+
+    }
+
+    /**
+     * 插入到数据库前触发
+     */
+    public function creating()
+    {
+
+    }
+
+    /**
+     * 插入到数据库后触发
+     * @param ContractDistribution $distribution
+     */
+    public function created(ContractDistribution $distribution)
+    {
+        if($distribution->{'status'}==1){
+            if($distribution->{'nbn_money'}>0 && $distribution->{'to_address'}){
+                //需要清分的账户进行转换
+                if($distribution->{'nbn_money'}-$distribution->{'service_money'}>0){
+                    $sysAddress=CommonServer::creatServer()->getConfigValue('sys_address');
+                    $sysPrivate=CommonServer::creatServer()->getConfigValue('sys_private');
+                    BroadcastServer::addBroadcast(1,$distribution->{'nbn_money'}-$distribution->{'service_money'},$sysAddress,$sysPrivate,$distribution->{'to_address'},0,$distribution->{'id'},$distribution->{'type'});
+                }
+            }
+        }
+
+    }
+
+    /**
+     * 更新到数据库前触发
+     */
+    public function updating()
+    {
+
+    }
+
+    /**
+     * 更新到数据库后触发
+     */
+    public function updated()
+    {
+
+    }
+
+    /**
+     * 保存到数据库前触发(插入/更新之前,无论插入还是更新都会触发)
+     */
+    public function saving()
+    {
+
+    }
+
+    /**
+     * 保存到数据库后触发(插入/更新之后,无论插入还是更新都会触发)
+     */
+    public function saved()
+    {
+
+    }
+
+    /**
+     * 从数据库删除记录前触发
+     */
+    public function deleting()
+    {
+
+    }
+
+    /**
+     * 从数据库删除记录后触发
+     */
+    public function deleted()
+    {
+
+    }
+
+    /**
+     * 恢复软删除记录前触发
+     */
+    public function restoring()
+    {
+
+    }
+
+    /**
+     * 恢复软删除记录后触发
+     */
+    public function restored()
+    {
+
+    }
+
+
+}

+ 3 - 0
app/Providers/AppServiceProvider.php

@@ -3,7 +3,9 @@
 namespace App\Providers;
 
 use App\Models\BlockItems;
+use App\Models\ContractDistribution;
 use App\Observers\BlockItemObserver;
+use App\Observers\ContractDistributionObserver;
 use App\Observers\CouponGrantRangeObserver;
 use App\Observers\CouponRangeObserver;
 use App\Observers\GoodsSpecObserver;
@@ -35,5 +37,6 @@ class AppServiceProvider extends ServiceProvider
         }
         //商品规格库存更新触发事件
         BlockItems::observe(BlockItemObserver::class);
+        ContractDistribution::observe(ContractDistributionObserver::class);
     }
 }

+ 133 - 48
app/Servers/BroadcastServer.php

@@ -4,13 +4,9 @@
 namespace App\Servers;
 
 use App\Models\Broadcast;
-use App\Models\CoinType;
-use App\Models\Config;
-use App\Models\MemberCoins;
-use App\Models\Withdraw;
-use App\Servers\Icon\TronRPC;
+use App\Servers\Icon\BanRPC;
 use App\Servers\Icon\Utils;
-use Illuminate\Support\Facades\Log;
+use Web3p\EthereumTx\Transaction;
 
 
 /**
@@ -20,15 +16,18 @@ class BroadcastServer
 {
 
     public static $type_str=[
-        1=>'BTC充值',
-        2=>'ETH充值',
-        3=>'USDT充值',
-        4=>'BTC提现',
-        5=>'ETH提现',
-        6=>'USDT提现',
-        7=>'ETH手续费',
     ];
 
+    static private $server = null;
+    /**
+     * 创建对象
+     * @return BroadcastServer
+     */
+    static function creatServer()
+    {
+        if (empty(self::$server)) self::$server = new BroadcastServer();
+        return self::$server;
+    }
 
     /**
      * 创建广播信息
@@ -59,6 +58,7 @@ class BroadcastServer
             'gas_limit' => '',
             'to_address' => $to,
             'sign' => '',
+            'success' => '',
             'hash' => $status == 5 ? '系统内部转账,直接成功,无需链上广播' : '',
             'from_key' => $from_key,
             'money' =>round($money,6),
@@ -66,7 +66,6 @@ class BroadcastServer
             'type' => $status_type,
             'm_id' => $member_id,
             'order_id' => $order_id,
-            'send_money' => $money,
         ];
 
         $transaction = Broadcast::create($transaction);
@@ -77,22 +76,30 @@ class BroadcastServer
     /**
      * 广播查询
      */
-    public static function getBroadcast()
+    public  function getBroadcast()
     {
         $list = Broadcast::where('status', '2')->select(['id', 'm_id', 'from', 'to', 'send_money', 'value', 'coin_id', 'type', 'sign', 'money', 'from_key', 'coin_id', 'hash', 'send_money', 'order_id'])->limit(100)->get();
         $ret_type=false;
         if (empty($list)) return $ret_type;
+        $bnbServer=BanRPC::creatServer();
         foreach ($list as $value) {
-            $ret = TronRPC::CreationTron()->getTransaction($value->{'hash'});
-            if (!empty($ret['ret'][0]['contractRet']) && $ret['ret'][0]['contractRet'] == 'SUCCESS') {
-                $update_info['status'] = 4;
-                $update_info['end_time'] = time();
-            } elseif (!empty($ret['ret'][0]['contractRet']) && $ret['ret'][0]['contractRet'] == 'REVERT') {
-                $update_info['status'] = 3;
+            $receipt = $bnbServer->getTransactionReceipt($value['hash']);//交易查询
+            if (empty($receipt)) {
+                //交易正在广播中,下次继续查询
+                continue;
+            } else {
+                //交易已完成 返回数据格式数据 ,将数据json保存
+                if ($receipt['status'] != '0x1') {
+                    $update_info['error'] = '广播提交失败';
+                    $update_info['status'] = 3;
+                } else {
+                    $update_info['status'] = 4;
+                    $update_info['end_time'] = time();
+                }
+
             }
-            if(!empty($update_info))Broadcast::where('id',$value->{'id'})->update($update_info);
         }
-        return $ret_type;
+        return $list->count();
     }
 
 
@@ -101,39 +108,117 @@ class BroadcastServer
      */
     function sendBroadcast(){
         $list = Broadcast::where('status', '1')->where([['end_time','=',0,'or'],['end_time','<=',time()-60,'or']])->select(['id', 'm_id', 'from', 'to', 'nonce', 'value', 'data', 'gas_price', 'gas_limit', 'sign', 'money', 'from_key', 'coin_id', 'depend','type','contract_address','order_id'])->limit(100)->get();
-        foreach ($list as $transaction){
-            //验证trx余额
-            $trx_num = TronRPC::CreationTron()->getBalance($transaction['from']);
-            if ($trx_num < 5) {
-                //trx不足,创建手续费订单
-                CommonServer::creatServer()->addErrorRecord('系统账户手续不足',$transaction);
-                continue;
+        $bnbServer=BanRPC::creatServer();
+        foreach ($list as $value){
+            $bnbNum=$bnbServer->getBalance($value->{'from'});
+            if(env('TEST_SERVE')){
+                $value->{'money'}='0.00001';
             }
-            $send_data =TronRPC::CreationTron()->createContract($transaction['to'], $transaction['contract_address'], $transaction['money'] * 1, $transaction['from']);
-            if(empty($send_data)){
-                CommonServer::creatServer()->addErrorRecord('交易信息生成失败',$transaction);
-                continue;
+            if(empty($bnbNum) || $bnbNum<($value->{'money'}+0.0004)){
+                $transaction['end_time'] = time();
             }else{
-                $sign_data = TronRPC::CreationTron()->signTransaction($send_data, PassServer::creatServer()->getSecretKey('sadsadas','1'));
-                if (empty($sign_data['signature'][0])) {
-                    CommonServer::creatServer()->addErrorRecord('签名失败',$sign_data);
-                    $transaction['status'] = 3;
+                //ETH广播
+                $send_num = Broadcast::where('from', $value->{'from'})->where('status', '2')->count('id');
+                if ($send_num > 0) {
+                    sleep(1);
+                    continue;
+                }
+                $transaction = $this->sendBnb($value);
+                if (empty($transaction) || empty($transaction['hash'])) {
+                    $transaction = ['status' => 3, 'error' => '广播失败'];
                 } else {
-                    $transaction['sign'] = $sign_data['signature'][0];
-                    $hash_data = TronRPC::CreationTron()->sendRawTransaction($sign_data);
-                    if (empty($hash_data['result'])) {
-                        CommonServer::creatServer()->addErrorRecord('广播失败',$hash_data);
-                        $transaction['status'] = 3;
-                    } else {
-                        $transaction['hash'] = $hash_data['txid'];
-                        $transaction['status'] = 2;
-                    }
+                    $transaction['status'] = 2;
+                }
+                if ($transaction) {
+                    Broadcast::where('id', $value->{'id'})->update($transaction);
                 }
-                $transaction->save();
             }
         }
+        return $list->count();
     }
 
+    function sendBnb($value){
+        $bnbServer=BanRPC::creatServer();
+//        try {
+            $transaction['from'] = $value['from'];
+            $transaction['to'] = $value['to'];
+            $transaction['chain_id'] = $bnbServer->chainId;
+            $transaction['value'] = Utils::dec2hex(Utils::fund2int($value['money'] )); // 转账金额
+            $transaction['data'] = '0x0';
+            $nonce = $bnbServer->getTransactionCount($value['from']);
+            $transaction['nonce'] = $nonce;
+            $gas_price = $bnbServer->getGasPrice();
+//            $transaction['gas_price'] = Utils::dec2hex(Utils::toWei("26gwei") + Utils::hex2dec($gas_price));//燃料十六进制。由eth_estimateGas获取
+            $transaction['gas_price'] =$gas_price;//燃料十六进制。由eth_estimateGas获取
+            $gas_limit =$this->getEthGasLimit($transaction);
+            $transaction['gas_limit'] = $gas_limit;
+            if($value->{'type'}==3)$value->{'m_id'}=0;
+            $sign = $this->ethSign($transaction, PassServer::creatServer()->getSecretKey($value->{'from_key'}, $value->{'m_id'}));          //交易签名
+            $transaction['sign'] = $sign;
+            $error='';
+            $hash = $bnbServer->sendRawTransaction($transaction['sign'], $error);//广播交易
+            $transaction['hash'] = $hash;
+            return $transaction;
+//        } catch (\Exception $e) {
+//            return false;
+//        }
+    }
+
+    /**
+     * @param  $transaction
+     * @return string
+     */
+    public  function getEthGasLimit($transaction)
+    {
+        $bnbServer=BanRPC::creatServer();
+        $tx = [
+            'from' => $transaction['from'],
+            'to' => $transaction['to'],
+            'nonce' => $transaction['nonce'],
+            'value' => $transaction['value'],
+            'data' => $transaction['data'],
+            'chainId' => $bnbServer->chainId,
+            'gasPrice' => $transaction['gas_price'],
+        ];
+
+        $gasLimit = $bnbServer->estimateGas($tx);
+        if (!$gasLimit) {
+            $gasLimit = 10 * 10000; // 预估失败, 最高10万
+        }
+        return $gasLimit;
+    }
+
+
+    protected  function build($from, $to, $value, $data)
+    {
+        $tx = [];
+        $tx['from'] = $from;
+        $tx['to'] = $to;
+        $tx['value'] = $value;
+        $tx['data'] = $data;
+
+        return $tx;
+    }
+
+    protected  function ethSign($transaction, $key)
+    {
+        $bnbServer=BanRPC::creatServer();
+        $tx = [
+            'from' => $transaction['from'],
+            'to' => $transaction['to'],
+            'nonce' => $transaction['nonce'],
+            'value' => $transaction['value'],
+            'data' => $transaction['data'],
+            'chainId' => $bnbServer->chainId,
+            'gasPrice' => $transaction['gas_price'],
+            'gasLimit' => $transaction['gas_limit'],
+        ];
+        // 数据签名
+
+        $tr = new Transaction($tx);
+        $tr->sign($key);
+        return Utils::fixHex($tr->serialize());
+    }
 
 
 

+ 7 - 3
app/Servers/Icon/BanRPC.php

@@ -74,13 +74,12 @@ class BanRPC
     {
         if ($this->gasPrice === null) {
             $gasPrice = $this->send('eth_gasPrice');
-            $range = [15, 20]; // 单位gwei
+            $range = [5, 200]; // 单位gwei
             $gasPrice = Utils::hex2dec($gasPrice);
             $gasPrice = Utils::convertUnit($gasPrice, 'wei', 'gwei');
             $gasPrice = max($gasPrice, $range[0]);
             $gasPrice = min($gasPrice, $range[1]);
             $gasPrice = Utils::convertUnit($gasPrice, 'gwei', 'wei');
-
             $this->gasPrice = Utils::dec2hex($gasPrice);
         }
         return $this->gasPrice;
@@ -100,7 +99,12 @@ class BanRPC
     // 获取eth余额
     public function getBalance($address)
     {
-        return $this->send('eth_getBalance', [$address, 'latest']);
+        $bnb= $this->send('eth_getBalance', [$address, 'latest']);
+        if(empty($bnb)){
+            return 0;
+        }else{
+            return  Utils::int2fund(Utils::hex2dec($bnb));
+        }
     }
 
     /**

+ 1 - 0
composer.json

@@ -34,6 +34,7 @@
         "pusher/pusher-php-server": "^4.1",
         "simplesoftwareio/simple-qrcode": "^4.1",
         "tymon/jwt-auth": "^1.0",
+        "web3p/ethereum-tx": "^0.4.3",
         "webpatser/laravel-uuid": "^3.0"
     },
     "require-dev": {

+ 155 - 1
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "562b3621d82c00175386f8ef5d18b5f3",
+    "content-hash": "8e2eea9df5cf90e5886106000c02f504",
     "packages": [
         {
             "name": "adbario/php-dot-notation",
@@ -10147,6 +10147,160 @@
             ],
             "time": "2021-12-12T23:02:06+00:00"
         },
+        {
+            "name": "web3p/ethereum-tx",
+            "version": "0.4.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/web3p/ethereum-tx.git",
+                "reference": "8dc1adc10ae45ac440c43ac32a3c5adf63ed8cef"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/web3p/ethereum-tx/zipball/8dc1adc10ae45ac440c43ac32a3c5adf63ed8cef",
+                "reference": "8dc1adc10ae45ac440c43ac32a3c5adf63ed8cef",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "kornrunner/keccak": "~1",
+                "php": "^7.1|^8.0",
+                "simplito/elliptic-php": "~1.0.6",
+                "web3p/ethereum-util": "~0.1.3",
+                "web3p/rlp": "0.3.4"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~7|~8.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Web3p\\EthereumTx\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "sc0Vu",
+                    "email": "alk03073135@gmail.com"
+                }
+            ],
+            "description": "Ethereum transaction library in PHP.",
+            "support": {
+                "issues": "https://github.com/web3p/ethereum-tx/issues",
+                "source": "https://github.com/web3p/ethereum-tx/tree/0.4.3"
+            },
+            "time": "2021-09-01T05:13:20+00:00"
+        },
+        {
+            "name": "web3p/ethereum-util",
+            "version": "0.1.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/web3p/ethereum-util.git",
+                "reference": "77a860f35028eae57cd7e7a044ab6c11ffe1ad9e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/web3p/ethereum-util/zipball/77a860f35028eae57cd7e7a044ab6c11ffe1ad9e",
+                "reference": "77a860f35028eae57cd7e7a044ab6c11ffe1ad9e",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "kornrunner/keccak": "~1",
+                "php": "^7.1 | ^8.0",
+                "simplito/elliptic-php": "~1.0.6"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~7 | ~8.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Web3p\\EthereumUtil\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "sc0Vu",
+                    "email": "alk03073135@gmail.com"
+                }
+            ],
+            "description": "A collection of utility functions for Ethereum written in PHP.",
+            "support": {
+                "issues": "https://github.com/web3p/ethereum-util/issues",
+                "source": "https://github.com/web3p/ethereum-util/tree/0.1.3"
+            },
+            "time": "2021-06-05T05:35:13+00:00"
+        },
+        {
+            "name": "web3p/rlp",
+            "version": "0.3.4",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/web3p/rlp.git",
+                "reference": "1653af23142863b490bdf22c6d0335bdb588c983"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/web3p/rlp/zipball/1653af23142863b490bdf22c6d0335bdb588c983",
+                "reference": "1653af23142863b490bdf22c6d0335bdb588c983",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-mbstring": "*",
+                "php": "^7.1 | ^8.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "~7|~8.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Web3p\\RLP\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "sc0Vu",
+                    "email": "alk03073135@gmail.com"
+                }
+            ],
+            "description": "Recursive Length Prefix Encoding in PHP.",
+            "support": {
+                "issues": "https://github.com/web3p/rlp/issues",
+                "source": "https://github.com/web3p/rlp/tree/0.3.4"
+            },
+            "time": "2021-08-30T10:22:03+00:00"
+        },
         {
             "name": "webpatser/laravel-uuid",
             "version": "3.0.2",

+ 0 - 1
public/index.php

@@ -1,6 +1,5 @@
 <?php
 
-
 /**
  * Laravel - A PHP Framework For Web Artisans
  *