These are chat archives for Nethereum/Nethereum

26th
Jul 2018
Michael Ilchuk
@Ilchuk-Mihail
Jul 26 2018 06:56 UTC
Ok.
How the exchanges do it?
They also issue addresses. hd wallet will not help
Сan someone tell about it ?
Juan Blanco
@juanfranblanco
Jul 26 2018 09:28 UTC
@Ilchuk-Mihail depends on the exchange
but some will just generate an address each time
not using hd
what I have seen some exchanges will generate your address, then when you transfer the funds to your address
inmediately will transfer the funds to their cold / hot storage account
but obviously each one will do a different thing internally
Michael Ilchuk
@Ilchuk-Mihail
Jul 26 2018 10:14 UTC
Ok, for generating addresses I understand.
But , how they send coins from many addresses to one ?
Like, bitcoin , - > many inputs to one output
Juan Blanco
@juanfranblanco
Jul 26 2018 10:14 UTC
you cannot
in the normal way
I think i mentioned yesterday you could use a smart contract
that holds the ether
and that smart contract sends different amounts to different addresses
mainly by passing an array to it
that smart contract could be multisig
p0isoN
@p0isoNz_twitter
Jul 26 2018 10:19 UTC
Heyy
How would i subscibe to a server so everytime my address gets a new incoming or outgoing transaction my wallet immediately know?
It wouldnt be very efficient to make a web request every second
so how else could we do it?
Michael Ilchuk
@Ilchuk-Mihail
Jul 26 2018 10:29 UTC

I don't understand very vell.
1) I give addreses to users (for example 10)
2) When users send coins to this adresses, I need send coins to smart contract ?

But exchanges do not do it, I guess
Smart contract it hold all coins in exchange ?
Or , maybe I can send all coins to Exchange wallet, and withdraw from it, when it needed ?
I don't need smart contract for this, but i must pay fee for this resending

p0isoN
@p0isoNz_twitter
Jul 26 2018 10:32 UTC

I don't understand very vell.
1) I give addreses to users (for example 10)
2) When users send coins to this adresses, I need send coins to smart contract ?

But exchanges do not do it, I guess
Smart contract it hold all coins in exchange ?
Or , maybe I can send all coins to Exchange wallet, and withdraw from it, when it needed ?
I don't need smart contract for this, but i must pay fee for this resending

No. You give users 10 addresses. On each of these addresses, have it setup to automatically send to a central wallet - the exchange wallet.

Michael Ilchuk
@Ilchuk-Mihail
Jul 26 2018 10:34 UTC
automatically ? How?
Exchange pays fee for it ?
Michael Ilchuk
@Ilchuk-Mihail
Jul 26 2018 10:41 UTC
Maybe needs give to each user address samrrt contract, which automaticaly transfer coin to another wallet
p0isoN
@p0isoNz_twitter
Jul 26 2018 11:08 UTC
@juanfranblanco
could you please help my issue when you're free. Thanks
Juan Blanco
@juanfranblanco
Jul 26 2018 16:35 UTC
@p0isoNz_twitter on that scenario you will to use parity trace_filter
geth does not provide that capability
p0isoN
@p0isoNz_twitter
Jul 26 2018 17:07 UTC
@juanfranblanco is there an example anywhere?
and how would i use parity?
Michael Ilchuk
@Ilchuk-Mihail
Jul 26 2018 17:11 UTC
Maybe needs give to each user address smart contract, which automaticaly transfer coin to another wallet
Exchange pays fee for it ?
p0isoN
@p0isoNz_twitter
Jul 26 2018 17:22 UTC
also just to be clear - trace_filter will notify me of all new transactions that happen on the address i provide?
like a subscription service
p0isoN
@p0isoNz_twitter
Jul 26 2018 17:47 UTC
Infura has one
but i can only find specific examples for web3.js
var subscription = web3.eth.subscribe('logs', {
address: '0x123456..',
topics: ['0x12345...']
}, function(error, result){
if (!error)
console.log(result);
})
.on("data", function(log){
console.log(log);
})
.on("changed", function(log){
});

// unsubscribes the subscription
subscription.unsubscribe(function(error, success){
if(success)
console.log('Successfully unsubscribed!');
});
Thats how you do it in web3.js
but we dont have web3.eth.subscribe