xmrmemes/database/seeders/WalletSeeder.php
dev 821fb9b1ed Finish rough draft of website
Update the payment code so everything is working now

Improve DB structure

Improve design

Add API

Validate XMR Address upon registration

And Much More...

Still Need to work on:

- SEO
- Dropdown in menu (bug, not dropping down)
2021-08-06 13:06:07 -07:00

25 lines
819 B
PHP

<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use MoneroIntegrations\MoneroPhp\walletRPC;
class WalletSeeder extends Seeder
{
/**
* Create Initial Wallet
*
* @return void
*/
public function run()
{
try {
$walletRPC = new walletRPC(config('app.xmr_daemon_ip'), config('app.xmr_network_port')); // Change to match your wallet (monero-wallet-rpc) IP address and port; 18083 is the customary port for mainnet, 28083 for testnet, 38083 for stagenet
$create_wallet = $walletRPC->create_wallet(config('app.xmr_wallet_name'), ''); // Creates a new wallet named memes with no passphrase. Comment this line and edit the next line to use your own wallet
} catch (\Exception $e) {
dump($e->getMessage());
}
}
}