- What is renoki-co/laravel-web3 used for?
- It is a Laravel SDK wrapper around the web3p/web3.php client for interacting with Ethereum over JSON-RPC. It provides a service provider, a Web3 facade, and a publishable config file for the node endpoint. Developers use it to query blocks and transactions, read balances, call smart contracts, and manage accounts from Laravel.
- How do I install renoki-co/laravel-web3 in a Laravel app?
- Install it with Composer using composer require renoki-co/laravel-web3, then publish the package config file so you can set your Ethereum node endpoint and default account. The package registers a Web3 facade and container binding for the configured client. After that, inject or alias the facade where you need JSON-RPC access.
- Which Laravel and PHP versions does laravel-web3 support?
- The package was last released in 2022 and is archived, so its Illuminate constraints are likely capped around Laravel 8 and 9 with PHP 7.4 through 8.1. On Laravel 10 or 11 and PHP 8.2 or 8.3 you should expect to need a constraint patch, ignore-platform-reqs, or an internal fork. Always verify the actual composer.json constraint matrix before committing to an upgrade plan.
- Is renoki-co/laravel-web3 still maintained and safe for production?
- No, the repository is archived and has not had a release since July 2022. That means no security patches, no PHP or Laravel compatibility work, and no upstream issue triage. It can still be used with containment, but any fork or patch becomes your responsibility the moment you modify it.
- How do I configure the Ethereum node endpoint for Laravel Web3?
- Publish the package config and set the JSON-RPC endpoint for your node provider or self-hosted node. You can also set the default account used by the client. Because the config is Laravel-native, it works with config caching and environment-driven endpoints, but the package models one configured client rather than multiple named connections.
- Can I call smart contracts with laravel-web3?
- Yes, contract deploy and call support comes from the underlying web3p/web3.php client exposed through the wrapper. You can invoke contract methods and read results using the Web3 facade or injected client. The package does not add typed DTOs, revert-reason decoding, retries, or gas strategy, so those concerns remain in your application code.
- Can I send transactions or sign with private keys using this package?
- The underlying client exposes raw transaction signing and broadcast capabilities, but that does not make it a safe custody layer. Private keys would transit PHP process memory and application logs, which is a realistic leak vector in a web request. For production signing, prefer KMS, HSM, or an external signer rather than app-held keys inside PHP-FPM.
- Does laravel-web3 support multiple chains or Layer 2 networks?
- The package assumes a single JSON-RPC endpoint configured for the bound Web3 client. Multi-chain or multi-L2 usage requires application-level work, such as managing multiple client instances or configs yourself. It is not a multi-chain abstraction and does not model named connections out of the box.
- How should I test Laravel Web3 code without hitting mainnet?
- Point the package at a testnet or a local Ethereum node such as Anvil, Hardhat, or Ganache and keep test credentials separate from production. Because the wrapper is synchronous JSON-RPC with no built-in fake, wrap it behind a narrow gateway interface so you can mock balance, call, and receipt methods in unit tests. Reserve integration tests for a disposable local node.
- What are the alternatives to renoki-co/laravel-web3?
- The most direct alternative is using web3p/web3.php itself behind your own Laravel service binding, which removes the archived wrapper layer. You can also use a maintained Ethereum client or a JavaScript sidecar with ethers.js for signing and contract workflows. If you need historical logs or event indexing, use a dedicated indexer rather than this package.