Merge pull request #100 from soraclub/master
Add method: personal_lockAccount
This commit is contained in:
commit
28627c5ecf
69
src/Methods/Personal/LockAccount.php
Normal file
69
src/Methods/Personal/LockAccount.php
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of web3.php package.
|
||||||
|
*
|
||||||
|
* (c) Kuan-Cheng,Lai <alk03073135@gmail.com>
|
||||||
|
*
|
||||||
|
* @author Peter Lai <alk03073135@gmail.com>
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Web3\Methods\Personal;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
|
use Web3\Methods\EthMethod;
|
||||||
|
use Web3\Validators\AddressValidator;
|
||||||
|
use Web3\Validators\StringValidator;
|
||||||
|
use Web3\Validators\QuantityValidator;
|
||||||
|
use Web3\Formatters\AddressFormatter;
|
||||||
|
use Web3\Formatters\StringFormatter;
|
||||||
|
use Web3\Formatters\NumberFormatter;
|
||||||
|
|
||||||
|
class LockAccount extends EthMethod
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* validators
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $validators = [
|
||||||
|
AddressValidator::class
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* inputFormatters
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $inputFormatters = [
|
||||||
|
AddressFormatter::class
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* outputFormatters
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $outputFormatters = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* defaultValues
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $defaultValues = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* construct
|
||||||
|
*
|
||||||
|
* @param string $method
|
||||||
|
* @param array $arguments
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
// public function __construct($method='', $arguments=[])
|
||||||
|
// {
|
||||||
|
// parent::__construct($method, $arguments);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
@ -38,7 +38,7 @@ class Personal
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $allowedMethods = [
|
private $allowedMethods = [
|
||||||
'personal_listAccounts', 'personal_newAccount', 'personal_unlockAccount', 'personal_sendTransaction'
|
'personal_listAccounts', 'personal_newAccount', 'personal_unlockAccount', 'personal_lockAccount', 'personal_sendTransaction'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,4 +177,4 @@ class Personal
|
|||||||
|
|
||||||
$this->provider->batch($status);
|
$this->provider->batch($status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user