PHP code example of wpbc / metahash-rewards

1. Go to this page and download the library: Download wpbc/metahash-rewards library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wpbc / metahash-rewards example snippets


$nodes = [
  'address'         => '', // Node address. Example - 0x0....
  'private_key'     => '', // Node private Key. Example 3074020... or 3077020...
  'data'            => '', // Text data sent with transaction. Example - Reward from my SuperNode
  'percentage'      => 80, // Default percentage paid to delegators.
  'superAddresses'  => $superAddresses
];

$skipAddresses = [
    '0x0072578dg76acc75554erg84es81seg4esg14se84841wfaw87',
    '0x00256841dg47csca774de4gib6154see8451ff151841ddsd11'
];

$superAddresses = [
    '0x0072578dg76acc75554erg84es81seg4esg14se84841wfaw87' => 90, // 90%
    '0x00256841dg47csca774de4gib6154see8451ff151841ddsd11' => 85, // 83%
];

$rewards->debug = true;
bash
$ 2 0 * * * /usr/bin/php /metahash-rewards/example/index.php >> /metahash-rewards/example/log.log 2>&1