diff --git a/composer.json b/composer.json index 2dd2d25..0118399 100644 --- a/composer.json +++ b/composer.json @@ -21,10 +21,7 @@ "autoload": { "psr-4": { "Ethereum\\": "src/" - }, - "files": [ - "src/helpers/ethereum-client-workaround-helpers.php" - ] + } }, "license": "MIT", "authors": [ diff --git a/src/Ethereum.php b/src/Ethereum.php index be63389..06eb200 100644 --- a/src/Ethereum.php +++ b/src/Ethereum.php @@ -8,8 +8,6 @@ use Ethereum\EthDataType; use Exception; -require_once __DIR__ . '/helpers/ethereum-client-workaround-helpers.php'; - /** * @defgroup client Ethereum Client * @@ -66,8 +64,11 @@ class Ethereum extends EthereumStatic implements JsonRpcInterface */ public function __construct($url = 'http://localhost:8545') { + // Require the workaround helpers, as autoload files in composer + // doesn't work as expected. + require_once __DIR__ . '/helpers/ethereum-client-workaround-helpers.php'; - $this->client = RpcClient::factory($url, [ + $this->client = RpcClient::factory($url, [ // Debug JsonRPC requests. 'debug' => false, ]);