Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 10 2017 22:42
    @jpitts banned @etherchamp1_twitter
  • Jun 05 2016 10:33
    @chriseth banned @adamskee
Daniel
@DanielRX
Okay, can you post a MWE on gist with some snippets of jobs so I can throw it in remix?
and my question is this, is there a job in the list that has a client for each {from:}
Nick Allen
@nicallennn
yes there is.
lemme just go over this and check again. but 99% sure.
Nick Allen
@nicallennn
this opens a new debate whether or not the client address is being stored correctly. i am going to go over this now so will try to resolve myself. thankyou for your help though. it is very much appreciated.
Nick Allen
@nicallennn
ok. this is interesting. I am passing the client address as: 0xf17f52151EbEF6C7334FAD080c5704D77216b732, however it is being stored as:
0xf17f52151ebef67f5f4ec4f6a29a735000000000
Pavlos Polianidis
@ppoliani
@nicallennn are you passing from web3?
if so use quotes
Nick Allen
@nicallennn
no i just just hardcoded it. i will try this. thanks
SOLVED
i was not passing the address in single quotes in the function arguments
double quotes doesnt seem to work
awesome. thank you guys.
Pavlos Polianidis
@ppoliani
:thumbsup:
Aminadav Glickshtein
@Aminadav
Anyone here can view this contract code, and answer a simple question about it
Daniel
@DanielRX
@Aminadav go on?
Aminadav Glickshtein
@Aminadav
I'm trying to understand the code, and it seems that there is lot of unused code, that never can be executed.
The name of the deployed contract is "LeadcoinSmartToken".
The source code contain many contract inside, and some of them (For e.g. LeadcoinCrowdsale) it seems not been used by this code. So why is it exist?
Maybe is it possible to call those functions in those contracts from other place?
Daniel
@DanielRX
All of the code is used
Is it deployed as crowdsale or token?
If it's just the token, then yes the crowdsale is not needed, but it looks like this would be used for both (for easier deployment, as much as it's a bad thing)
Aminadav Glickshtein
@Aminadav
Why do you say that? EtherScan said that the ContractName is "LeadcoinSmartToken". The contract in line 670 never used
Daniel
@DanielRX
^
Aminadav Glickshtein
@Aminadav
I'm not understand, how is it possible to use the crowdsale, if it deployed as a token?
You can see that it's deployed as a token, so no one used the code of the crowdsale
Daniel
@DanielRX
I'm saying they likely had one file, that they deployed as a token, then as a crowdsale
Aminadav Glickshtein
@Aminadav
The code now, is looks like a token. (Now the deployed it as a token).
If they deployed it before as a crowdsale, they have lose all the token owners.
Daniel
@DanielRX

1 file

Deployed twice, once for the crowdsale and one for the token

Instead of splitting the files as they should have
Aminadav Glickshtein
@Aminadav

I'm understand you. I'm just saying that if it deployed twice. The second deploy will not have any information about the token holders, because each deploy have it's own state.

So it seems that they never did 2 deploies to the blockchain. And if so it will be absolutly two different tokens. (They can't share states)
Am I miss something?

Daniel
@DanielRX

The first, will be the token.

The second will be a crowdsale, no tokens

if you have 2 contracts in one file, and you only use one, the other is still there
Aminadav Glickshtein
@Aminadav
.
Daniel
@DanielRX
If it is not included in the deployed main contract, does the compile optim it out?
Aminadav Glickshtein
@Aminadav

So do you agree with me, that if Solidity compiler was smarter, he can see that those contracts never used (The deployed contract no inherit any of them), and it can skip compiling it?

It can save bytes & gas.

Daniel
@DanielRX
Does it not already?
Aminadav Glickshtein
@Aminadav
It seems that not. You see that the verified source contain it.
Daniel
@DanielRX
Yes, so if the compiler removes it, the source will compile to the deployed contract
Aminadav Glickshtein
@Aminadav
About what you said early. First deploy as a token, second as a crowdsale.
But the crowdsale is for selling tokens, but the crowdsale, do not have access to the deployed contract with the tokens.
So how is it possible to split it to two deploys?
Daniel
@DanielRX
You just point the crowdsale to the token contract, in a variable
Aminadav Glickshtein
@Aminadav
So if two contract are deployed. Where the wallet balances exists?
In the first contract , or the second contract?
Daniel
@DanielRX
Whichever is the stores the tokens
Aminadav Glickshtein
@Aminadav
So how the 2nd contract can change the state of the balance of the token?
If I will deploy a new contract, it can't transfer token balances. How the second contract can have permissions to do those changes?
Daniel
@DanielRX
You add a modifier (onlyCrowdsale) that allows it to transfer
Notice how these have the same source, but different bytecode
Aminadav Glickshtein
@Aminadav
Cool.