You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
32
hyhproject/app/model/Chain3.php
Executable file
32
hyhproject/app/model/Chain3.php
Executable 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));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user