Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

32
hyhproject/app/model/Chain3.php Executable file
View File

@ -0,0 +1,32 @@
<?php
namespace wstmart\app\model;
/**
* ============================================================================
* 基础模型器
*/
class Chain3 extends Chain3base {
protected $tokenabi;
protected $bytecode;
public function __construct(){
parent::__construct();
}
protected function get_Balance(){
$this->wei=8;
$address = trim(input('post.address'));
$this->web3->eth->getBalance($address , function ($err, $balance) {
if ($err !== null) {
exit(jsonReturn($err->getMessage()));
// echo 'Error: ' . $err->getMessage();
//return;
}else{
$my_balance = $balance->toString();
$my_balance = $my_balance/pow(10,$this->wei);
$data['balance'] = $my_balance;
exit(jsonReturn('',1,$data));
}
});
}
}