This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* example of package https://github.com/digitaldonkey/ethereum-php | |
*/ | |
require __DIR__ . '/vendor/autoload.php'; | |
use Ethereum\DataType\EthD; | |
use Ethereum\Ethereum; | |
// https://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html#recover | |
$recoveredAddr = Ethereum::personalEcRecover('Some data', new EthD('0xb91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apps": [ | |
{ | |
"name": "artisan-queue-work", | |
"script": "artisan", | |
"args": [ | |
"queue:work", | |
"--tries=1", | |
"--sleep=1" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var httpProxy = require('http-proxy'); | |
const rpcPort = process.env.RPC_PORT; | |
const exportPort = process.env.EXPORT_PORT; | |
httpProxy.createProxyServer({ target: `http://127.0.0.1:${rpcPort}` }).listen(exportPort); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// require zmq extension in ubuntu run `sudo apt install php-zmq` to install it | |
$context = new \ZMQContext(); | |
$subscriber = new \ZMQSocket($context, \ZMQ::SOCKET_SUB); | |
$subscriber->connect("tcp://192.168.1.136:28332"); | |
$subscriber->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "hashblock"); | |
$subscriber->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "hashtx"); | |
$subscriber->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "rawblock"); |