Stars: 110
Forks: 36
Pull Requests: 71
Issues: 6
Watchers: 9
Last Updated: 2023-04-10 18:58:04
Laravel SDK wrapper for the Web3 PHP API client that interacts with the Ethereum blockchain.
License: Apache License 2.0
Languages: PHP
Laravel Web3 is a Laravel SDK wrapper for the Web3 PHP API client that interacts with the Ethereum blockchain.
If you are using one or more Renoki Co. open-source packages in your production apps, in presentation demos, hobby projects, school projects or so, sponsor our work with Github Sponsors. 📦
You can install the package via composer:
composer require renoki-co/laravel-web3 --ignore-platform-reqs
Publish the config:
$ php artisan vendor:publish --provider="RenokiCo\LaravelWeb3\LaravelWeb3ServiceProvider" --tag="config"
The client configuration can be found in the config/web3.php
file. Each call will be made from the \Web3\Web3
class:
use RenokiCo\LaravelWeb3\Web3Facade as Web3;
Web3::eth()->hashRate();
The package supports multiple connections configurations. If you wish to select a specific one (not the default one), call connection
before getting the cluster.
use RenokiCo\LaravelWeb3\Web3Facade as Web3;
Web3Facade::connection('http2')->eth()->hashRate();
The following methods are also available to start with:
use RenokiCo\LaravelWeb3\Web3Facade as Web3;
Web3::eth()->coinbase();
Web3::net()->version();
vendor/bin/phpunit
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.