Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
SmartContractTest.php
Go to the documentation of this file.
1 <?php
2 namespace Ethereum;
3 
5 
12 {
13 
25  public function testSimpleContract()
26  {
27  $number = 2;
28  $result = $this->contract->multiplyWithSeven(
29  new EthQ($number, ['abi'=> 'uint256'])
30  );
31  $this->assertEquals($number*7, $result->val());
32  }
33 
34 
35  public function testSimpleContractUsingAlias()
36  {
37  $number = 2;
38  $result = $this->contract->multiplyWithSevenUsingAlias(
39  new EthQ($number, ['abi'=> 'uint256'])
40  );
41  $this->assertEquals($number*7, $result->val());
42  }
43 
44 }
45 
46 
Definition: Abi.php:3