PHP code example of gri3li / ethereum-smart-contract
1. Go to this page and download the library: Download gri3li/ethereum-smart-contract library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gri3li / ethereum-smart-contract example snippets
use gri3li\EthereumSmartContract;
$instance = EthereumSmartContract::createByHost(
'http://localhost:8545',
'1', // mainnet
'0xB8c77482e45F1F44dE1745F52C74426C631bDD52', // contract address
file_get_contents('path_to_contract_abi_file.json') // abi string
);