daostack / infra

GNU General Public License v3.0
25 stars 22 forks source link

GenesisProtocol overrides staking token in constructor #13

Closed dkent600 closed 6 years ago

dkent600 commented 6 years ago

On this line:

https://github.com/daostack/infra/blob/732af4df82471288e0168ad74d7520da81bf1072/contracts/VotingMachines/GenesisProtocol.sol#L122

The GenesisProtocol overrides any staking token given in its constructor. Why is this? Can this be either fixed or documented in the code?

orenyodfat commented 6 years ago

The GEN token (staking token) address is hard coded in the contract by GEN_TOKEN_ADDRESS . This will work for a network which already hosted the GEN token on this address (mainnet , kovan...). If such contract does not exist in the network (e.g ganache) this if (isContract(address(GEN_TOKEN_ADDRESS))) will turn to false and will use the token address passed by the constructor. Yea, might worth to add a small comment in the code.

dkent600 commented 6 years ago

What if someone doesn't want to use GEN even though it exists on the network?

orenyodfat commented 6 years ago

It cannot use daostack gp contract

On Thu, 27 Sep 2018 at 12:52 Doug Kent notifications@github.com wrote:

What if someone doesn't want to use GEN even though it exists on the network?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/daostack/infra/issues/13#issuecomment-425030583, or mute the thread https://github.com/notifications/unsubscribe-auth/AFt3nombjVGLUefd3-WZtqTV6AbwyaK5ks5ufJ_FgaJpZM4W6bBK .

orenyodfat commented 6 years ago

The Staking token is gen

On Thu, 27 Sep 2018 at 13:06 Oren Sokolowsky oren.sokolowsky@gmail.com wrote:

It cannot use daostack gp contract

On Thu, 27 Sep 2018 at 12:52 Doug Kent notifications@github.com wrote:

What if someone doesn't want to use GEN even though it exists on the network?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/daostack/infra/issues/13#issuecomment-425030583, or mute the thread https://github.com/notifications/unsubscribe-auth/AFt3nombjVGLUefd3-WZtqTV6AbwyaK5ks5ufJ_FgaJpZM4W6bBK .

dkent600 commented 6 years ago

Should we get GEN onto Ropsten?

orenyodfat commented 6 years ago

We will

On Thu, 27 Sep 2018 at 13:26 Doug Kent notifications@github.com wrote:

Should we get GEN onto Ropsten?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/daostack/infra/issues/13#issuecomment-425039993, or mute the thread https://github.com/notifications/unsubscribe-auth/AFt3nlshn-0DKSXdVphykj4GChP_Q6Giks5ufKfigaJpZM4W6bBK .