Hello anyone help me how to create simple contact on my pc and run with complied using visual studio code
Feb 10, 2022, 12:21 PM
Currently i m creating contract in remix
How can i create my own currency of nft?
We can use nodejs
We creat logs
Feb 10, 2022, 1:26 PM
like how? I want to use websocket but can't miss any single logs (for obvious)
Feb 10, 2022, 3:36 PM
Pm2 logs install
And create logs for all code
Feb 10, 2022, 3:39 PM
and then you manually check them?
Feb 10, 2022, 3:40 PM
Both log also saved
Error logs also saved
Feb 10, 2022, 3:41 PM
then? how do u handle errors?
let's say the websocket provider going down for 1 minute
missing 10 blocks.
let's say the websocket provider going down for 1 minute
missing 10 blocks.
Feb 10, 2022, 3:43 PM
https://stackoverflow.com/questions/35503895/nodejs-websocket-detect-disconnected-socket
Create logs like this
var allClients = []; io.sockets.on('connection', function(socket) { allClients.push(socket); socket.on('disconnect', function() { console.log('Got disconnect!'); var i = allClients.indexOf(socket); allClients.splice(i, 1); }); });
var allClients = []; io.sockets.on('connection', function(socket) { allClients.push(socket); socket.on('disconnect', function() { console.log('Got disconnect!'); var i = allClients.indexOf(socket); allClients.splice(i, 1); }); });
You have all disconnect logs as in above that comes from client by using this
Feb 10, 2022, 4:19 PM
So you're logging when websocket gets disconnected.
Then manually enumerating the blockchain to find the missing
entries which were emitted after the provider went down?
Then manually enumerating the blockchain to find the missing
entries which were emitted after the provider went down?
Feb 10, 2022, 4:21 PM
That added into logs
When socket discomnect then emit never work
Client side socket keep live
Feb 10, 2022, 4:22 PM
But here I'm the client and not the server
Feb 10, 2022, 4:24 PM
You need to connect socket alive client side becase server side socket always keep a live
Feb 10, 2022, 5:05 PM