I'm trying to work on ethereum and currently I'm using ethers npm package and I was trying to connect it to my private net which I will be using it for testing.
I've run my geth with this command.
geth --port 3000 --networkid 5 --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcapi "eth,net,web3,personal"
Now, I have assigned one public IP to that machine and accessing from outside through RPC. But that's not correctly working.
I'm running this code and I'm able to generate address, but on geth console, I'm not able to get any log about the created wallet.
var ethers = require('ethers'); var providers = require('ethers').providers; var p = new providers.JsonRpcProvider('http://MY_RPC_PUBLIC_IP:8545', false, 5); ethers.Wallet.provider=p; var privateKey = "0x0123456789012345678901234567890123456789012345678901234567890123"; var wallet = new ethers.Wallet(privateKey); console.log("Address: " + wallet.address);
Can anyone point out the mistake I'm doing here?