Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
Select version
•
All
Classes
Namespaces
Files
Functions
Variables
Modules
Pages
ethereum-client-workaround-helpers.php
Go to the documentation of this file.
1
<?php
16
function
eth_workaround_eth_coinbase
($val)
17
{
18
// WORKAROUND: Catch a "405 Method Not Allowed'.
19
if
(isset($val[
'error'
]) && $val[
'error'
] && $val[
'code'
] == 405) {
20
return
'0x0000000000000000000000000000000000000000'
;
21
}
else
{
22
return
$val;
23
}
24
}
25
33
function
eth_workaround_net_listening
($val)
34
{
35
// WORKAROUND: eth_protocolVersion is NULL: Probably testrpc.
36
if
($val ==
'true'
) {
37
return
'0x0000000000000000000000000000000000000000000000000000000000000001'
;
38
}
else
{
39
return
$val;
40
}
41
}
42
48
function
eth_workaround_ethereum_datatype_transaction
(array $values)
49
{
50
if
(isset($values[
'to'
]) && $values[
'to'
] ===
'0x0'
) {
51
$values[
'to'
] = null;
52
}
53
return
$values;
54
}
55
61
function
eth_workaround_ethereum_datatype_filterchange
(array $values)
62
{
63
if
(isset($values[
'data'
]) && $values[
'data'
] ===
'0x'
) {
64
$values[
'data'
] = null;
65
}
66
return
$values;
67
}
eth_workaround_net_listening
eth_workaround_net_listening($val)
Definition:
ethereum-client-workaround-helpers.php:33
eth_workaround_eth_coinbase
eth_workaround_eth_coinbase($val)
Definition:
ethereum-client-workaround-helpers.php:16
eth_workaround_ethereum_datatype_transaction
eth_workaround_ethereum_datatype_transaction(array $values)
Definition:
ethereum-client-workaround-helpers.php:48
eth_workaround_ethereum_datatype_filterchange
eth_workaround_ethereum_datatype_filterchange(array $values)
Definition:
ethereum-client-workaround-helpers.php:61
src
helpers
ethereum-client-workaround-helpers.php
Generated by
1.8.13