mollsoft/laravel-ethereum-module
Composer 安装命令:
composer require mollsoft/laravel-ethereum-module
包简介
Laravel Ethereum Module
README 文档
README
Laravel Ethereum Module is a Laravel package for work with cryptocurrency Ethereum, with the support ERC-20 tokens. It allows you to generate HD wallets using mnemonic phrase, validate addresses, get addresses balances and resources, preview and send ETH/ERC-20 tokens. You can automate the acceptance and withdrawal of cryptocurrency in your application.
You can contact me for help in integrating payment acceptance into your project.
Requirements
The following versions of PHP are supported by this version.
- PHP 8.2 and older
- Laravel 10 or older
- PHP Extensions: GMP, BCMath, CType.
Installation
You can install the package via composer:
composer require mollsoft/laravel-ethereum-module
After you can run installer using command:
php artisan ethereum:install
And run migrations:
php artisan migrate
Register Service Provider and Facade in app, edit config/app.php:
'providers' => ServiceProvider::defaultProviders()->merge([ ..., \Mollsoft\LaravelEthereumModule\EthereumServiceProvider::class, ])->toArray(), 'aliases' => Facade::defaultAliases()->merge([ ..., 'Ethereum' => \Mollsoft\LaravelEthereumModule\Facades\Ethereum::class, ])->toArray(),
For Laravel 10 you edit file app/Console/Kernel in method schedule(Schedule $schedule) add:
$schedule->command('ethereum:sync') ->everyMinute() ->runInBackground();
or for Laravel 11+ add this content to routes/console.php:
use Illuminate\Support\Facades\Schedule; ... Schedule::command('ethereum:sync') ->everyMinute() ->runInBackground();
Examples
First you need to add Ethereum Nodes, you can register account in ANKR.COM get take HTTPS Endpoint with API key for Ethereum blockchain:
use \Mollsoft\LaravelEthereumModule\Facades\Ethereum; Ethereum::createNode('My node', 'https://rpc.ankr.com/eth/{API_KEY}');
Second you need add Ethereum Explorer, you can register account in Etherscan.io API and take Endpoint with API key:
use \Mollsoft\LaravelEthereumModule\Facades\Ethereum; Ethereum::createExplorer('My explorer', 'https://api.etherscan.io/api', '{API_KEY}');
You can create ERC-20 Token:
use \Mollsoft\LaravelEthereumModule\Facades\Ethereum; $contractAddress = '0xdac17f958d2ee523a2206206994597c13d831ec7'; Ethereum::createToken($contractAddress);
Now you can create new Wallet:
use \Mollsoft\LaravelEthereumModule\Facades\Ethereum; $wallet = Ethereum::createWallet('My wallet');
mollsoft/laravel-ethereum-module 适用场景与选型建议
mollsoft/laravel-ethereum-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 349 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「ethereum」 「mollsoft」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mollsoft/laravel-ethereum-module 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mollsoft/laravel-ethereum-module 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mollsoft/laravel-ethereum-module 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bitcoin and Altcoin Payment Gateway for Magento 2 via CoinGate
Library for validation of cryptocoin wallets
Coinbase Commerce API library
Compralo PHP Library
Laravel Tron Module
ethereum eth heco erc20 trc20 web3 keysotre bip44 infura etherscan proxy api
统计信息
- 总下载量: 349
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-05