Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method hints #356

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 56 additions & 11 deletions src/Eth.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/**
* This file is part of web3.php package.
*
*
* (c) Kuan-Cheng,Lai <[email protected]>
*
*
* @author Peter Lai <[email protected]>
* @license MIT
*/
Expand All @@ -15,6 +15,51 @@
use Web3\Providers\HttpProvider;
use Web3\Providers\WsProvider;

/**
* @method protocolVersion()
* @method syncing()
* @method coinbase()
* @method mining()
* @method hashrate()
* @method gasPrice()
* @method accounts()
* @method blockNumber()
* @method getBalance()
* @method getStorageAt()
* @method getTransactionCount()
* @method getBlockTransactionCountByHash()
* @method getBlockTransactionCountByNumber()
* @method getUncleCountByBlockHash()
* @method getUncleCountByBlockNumber()
* @method getUncleByBlockHashAndIndex()
* @method getUncleByBlockNumberAndIndex()
* @method getCode()
* @method sign()
* @method sendTransaction()
* @method sendRawTransaction()
* @method call()
* @method estimateGas()
* @method getBlockByHash()
* @method getBlockByNumber()
* @method getTransactionByHash()
* @method getTransactionByBlockHashAndIndex()
* @method getTransactionByBlockNumberAndIndex()
* @method getTransactionReceipt()
* @method compileSolidity()
* @method compileLLL()
* @method compileSerpent()
* @method getWork()
* @method newFilter()
* @method newBlockFilter()
* @method newPendingTransactionFilter()
* @method uninstallFilter()
* @method getFilterChanges()
* @method getFilterLogs()
* @method getLogs()
* @method submitWork()
* @method submitHashrate()
* @method feeHistory()
*/
class Eth
{
/**
Expand All @@ -26,14 +71,14 @@ class Eth

/**
* methods
*
*
* @var array
*/
private $methods = [];

/**
* allowedMethods
*
*
* @var array
*/
private $allowedMethods = [
Expand Down Expand Up @@ -63,7 +108,7 @@ public function __construct($provider, $timeout = 1)

/**
* call
*
*
* @param string $name
* @param array $arguments
* @return void|\React\Promise\PromiseInterface
Expand Down Expand Up @@ -109,7 +154,7 @@ public function __call($name, $arguments)

/**
* get
*
*
* @param string $name
* @return mixed
*/
Expand All @@ -125,7 +170,7 @@ public function __get($name)

/**
* set
*
*
* @param string $name
* @param mixed $value
* @return mixed
Expand All @@ -142,7 +187,7 @@ public function __set($name, $value)

/**
* getProvider
*
*
* @return \Web3\Providers\Provider
*/
public function getProvider()
Expand All @@ -152,7 +197,7 @@ public function getProvider()

/**
* setProvider
*
*
* @param \Web3\Providers\Provider $provider
* @return bool
*/
Expand All @@ -167,7 +212,7 @@ public function setProvider($provider)

/**
* batch
*
*
* @param bool $status
* @return void
*/
Expand All @@ -177,4 +222,4 @@ public function batch($status)

$this->provider->batch($status);
}
}
}
27 changes: 16 additions & 11 deletions src/Net.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/**
* This file is part of web3.php package.
*
*
* (c) Kuan-Cheng,Lai <[email protected]>
*
*
* @author Peter Lai <[email protected]>
* @license MIT
*/
Expand All @@ -15,6 +15,11 @@
use Web3\Providers\HttpProvider;
use Web3\Providers\WsProvider;

/**
* @method version()
* @method peerCount()
* @method listening()
*/
class Net
{
/**
Expand All @@ -26,14 +31,14 @@ class Net

/**
* methods
*
*
* @var array
*/
private $methods = [];

/**
* allowedMethods
*
*
* @var array
*/
private $allowedMethods = [
Expand Down Expand Up @@ -63,7 +68,7 @@ public function __construct($provider, $timeout = 1)

/**
* call
*
*
* @param string $name
* @param array $arguments
* @return void|\React\Promise\PromiseInterface
Expand Down Expand Up @@ -109,7 +114,7 @@ public function __call($name, $arguments)

/**
* get
*
*
* @param string $name
* @return mixed
*/
Expand All @@ -125,7 +130,7 @@ public function __get($name)

/**
* set
*
*
* @param string $name
* @param mixed $value
* @return mixed
Expand All @@ -142,7 +147,7 @@ public function __set($name, $value)

/**
* getProvider
*
*
* @return \Web3\Providers\Provider
*/
public function getProvider()
Expand All @@ -152,7 +157,7 @@ public function getProvider()

/**
* setProvider
*
*
* @param \Web3\Providers\Provider $provider
* @return bool
*/
Expand All @@ -167,7 +172,7 @@ public function setProvider($provider)

/**
* batch
*
*
* @param bool $status
* @return void
*/
Expand All @@ -177,4 +182,4 @@ public function batch($status)

$this->provider->batch($status);
}
}
}
27 changes: 17 additions & 10 deletions src/Personal.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/**
* This file is part of web3.php package.
*
*
* (c) Kuan-Cheng,Lai <[email protected]>
*
*
* @author Peter Lai <[email protected]>
* @license MIT
*/
Expand All @@ -15,6 +15,13 @@
use Web3\Providers\HttpProvider;
use Web3\Providers\WsProvider;

/**
* @method listAccounts()
* @method newAccount()
* @method unlockAccount()
* @method lockAccount()
* @method sendTransaction()
*/
class Personal
{
/**
Expand All @@ -26,14 +33,14 @@ class Personal

/**
* methods
*
*
* @var array
*/
private $methods = [];

/**
* allowedMethods
*
*
* @var array
*/
private $allowedMethods = [
Expand Down Expand Up @@ -63,7 +70,7 @@ public function __construct($provider, $timeout = 1)

/**
* call
*
*
* @param string $name
* @param array $arguments
* @return void|\React\Promise\PromiseInterface
Expand Down Expand Up @@ -109,7 +116,7 @@ public function __call($name, $arguments)

/**
* get
*
*
* @param string $name
* @return mixed
*/
Expand All @@ -125,7 +132,7 @@ public function __get($name)

/**
* set
*
*
* @param string $name
* @param mixed $value
* @return mixed
Expand All @@ -142,7 +149,7 @@ public function __set($name, $value)

/**
* getProvider
*
*
* @return \Web3\Providers\Provider
*/
public function getProvider()
Expand All @@ -152,7 +159,7 @@ public function getProvider()

/**
* setProvider
*
*
* @param \Web3\Providers\Provider $provider
* @return bool
*/
Expand All @@ -167,7 +174,7 @@ public function setProvider($provider)

/**
* batch
*
*
* @param bool $status
* @return void
*/
Expand Down
Loading