Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
Select version
•
All
Classes
Namespaces
Files
Functions
Variables
Modules
Pages
FixUnpaddedValuesTest.php
Go to the documentation of this file.
1
<?php
2
namespace
Ethereum
;
3
4
use
Ethereum\DataType\EthD32
;
5
13
class
FixUnpaddedValuesTest
extends
TestEthClient
14
{
15
16
public
function
testMainNetTx
() {
17
$web3 =
new
Ethereum
(
'https://mainnet.infura.io/drupal'
);
18
19
// @see https://etherscan.io/tx/0x527e9b670536c09fe160b0c2e33728eadd7f8affae7803049fa8d8ec2d1c7cfe
20
$mainNetTx =
new
EthD32
(
'0x527e9b670536c09fe160b0c2e33728eadd7f8affae7803049fa8d8ec2d1c7cfe'
);
21
$transaction = $web3->eth_getTransactionByHash($mainNetTx);
22
23
$this->assertSame(1.12208103, EthereumStatic::convertCurrency($transaction->value->val()));
24
}
25
32
public
function
testMainNetTxReceipt
() {
33
$web3 =
new
Ethereum
(
'https://mainnet.infura.io/drupal'
);
34
35
// @see https://etherscan.io/tx/0x527e9b670536c09fe160b0c2e33728eadd7f8affae7803049fa8d8ec2d1c7cfe
36
$mainNetTx =
new
EthD32
(
'0xee04d9e2258909ca642acde0612597732f4ba244952e23eb83ecac3fe8dd5091'
);
37
$transaction = $web3->eth_getTransactionReceipt($mainNetTx);
38
$this->asserttrue(is_null($transaction->logs[0]->data));
39
}
40
}
41
42
43
Ethereum\FixUnpaddedValuesTest\testMainNetTxReceipt
testMainNetTxReceipt()
Definition:
FixUnpaddedValuesTest.php:32
Ethereum\FixUnpaddedValuesTest
Definition:
FixUnpaddedValuesTest.php:13
Ethereum\TestEthClient
Definition:
TestEthClient.php:64
Ethereum\DataType\EthD32
Definition:
EthD32.php:12
Ethereum\FixUnpaddedValuesTest\testMainNetTx
testMainNetTx()
Definition:
FixUnpaddedValuesTest.php:16
EthD32
Ethereum
Definition:
Abi.php:3
tests
EthTest
Unit
FixUnpaddedValuesTest.php
Generated by
1.8.13