Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token Manager revert on initialize #387

Closed
cslarson opened this issue Feb 28, 2019 · 13 comments

Comments

4 participants
@cslarson
Copy link

commented Feb 28, 2019

I took the following steps to recreate the issue:

  1. dao new
  2. dao token new Member MBR 0 false
  3. dao install [dao-address] token-manager --app-init none
  4. dao apps --all [dao-address] # get token-manager proxy address`
  5. dao token change-controller [token-address] [token-manager-address]
  6. dao acl create [dao-address] [token-manager-address] MINT_ROLE [my-address] [my-address]
  7. dao exec [dao-address] [token-manager-address] initialize [token-address] false 1

here it returns ✖ Returned error: VM Exception while processing transaction: revert

@cslarson

This comment has been minimized.

Copy link
Author

commented Feb 28, 2019

alternatively, as an interactive shell script:

#!/bin/bash

ME=0xb4124cEB3451635DAcedd11767f004d8a28c6eE7

dao new
echo What is the deployed DAO address?
read DAO

dao token new Member MBR 0 false
echo What is the deployed token address?
read TOK

dao install $DAO token-manager --app-init none

dao apps $DAO --all
echo What is the deployed token manager address?
read TOKM

dao token change-controller $TOK $TOKM

echo assigning MINT_ROLE...
dao acl create $DAO $TOKM MINT_ROLE $ME $ME

echo initializing token manager...
dao exec $DAO $TOKM initialize $TOK false 1    # reverts here

dao exec $DAO $TOKM mint $ME 1
@cslarson

This comment has been minimized.

Copy link
Author

commented Feb 28, 2019

it does seem to work on rinkeby, though.

#!/bin/bash

ME=0xb4124cEB3451635DAcedd11767f004d8a28c6eE7

dao new --environment aragon:rinkeby
echo What is the deployed DAO address?
read DAO

dao token new Member MBR 0 false --environment aragon:rinkeby
echo What is the deployed token address?
read TOK

dao install $DAO token-manager --app-init none --environment aragon:rinkeby

dao apps $DAO --all --environment aragon:rinkeby
echo What is the deployed token manager address?
read TOKM

dao token change-controller $TOK $TOKM --environment aragon:rinkeby

echo assigning MINT_ROLE...
dao acl create $DAO $TOKM MINT_ROLE $ME $ME --environment aragon:rinkeby

echo initializing token manager...
dao exec $DAO $TOKM initialize $TOK false 1 --environment aragon:rinkeby

dao exec $DAO $TOKM mint $ME 1 --environment aragon:rinkeby

results in:

...
initializing token manager...
 ✔ Generating transaction
 ✔ Sending transaction
 ✔ Successfully executed: "undefined"
 ✔ Generating transaction
 ✔ Sending transaction
 ✔ Successfully executed: "Mint 1 tokens for 0xb4124cEB3451635DAcedd11767f004d8a28c6eE7"

@sohkai sohkai added the 🐛 bug label Mar 1, 2019

@sohkai

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

Hmm @0x6431346e @0xGabi are we still using an old version of aragen that doesn't have the change in TokenManager.initialize()'s interface? I remember we were talking about upgrading it earlier in Jan. (but I didn't get to it 🙁)

@0xGabi

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

@sohkai You are right we didn't update aragen. I can do it 👍

@0xGabi 0xGabi added this to the aragonCLI v5.5 milestone Mar 4, 2019

@0xGabi 0xGabi self-assigned this Mar 4, 2019

@0x6431346e

This comment has been minimized.

Copy link
Member

commented Mar 11, 2019

Can't figure this out...and it's proving to be very time-consuming.

the change in TokenManager.initialize()'s interface?

I don't think that's the problem because I tried with the old interface, passing an extra bool for _logHolders and it still fails. Plus, it used to work before.

I think we should address the underlying problems though (I hope this is not blocking you @cslarson ):

  1. Error: VM Exception while processing transaction: revert by trying out https://sol-trace.com/
  2. Better logging of what's deployed to aragen: opened #397
@cslarson

This comment has been minimized.

Copy link
Author

commented Mar 11, 2019

I hope this is not blocking you

Nope! I had been having issues with deploying locally with my kit but it turned out that was a separate bug. So now I'm deploying locally with a kit (where shell script fails) and using a shell script to do a non-kit deploy to rinkeby (where my kit fails!).

@0x6431346e 0x6431346e removed this from the aragonCLI v5.5 milestone Mar 11, 2019

@0xGabi 0xGabi added this to the aragonCLI v5.6 milestone Mar 11, 2019

@sohkai

This comment has been minimized.

Copy link
Member

commented Mar 13, 2019

You may also have some luck with truffle's debugger but may be hard to feed in the ABI. What if you modify the kit so that it doesn't try to install the token manager at all? Does it work?

@cslarson

This comment has been minimized.

Copy link
Author

commented Mar 13, 2019

Thanks @sohkai. Deploying to rinkeby it is failing because the gas used exceeds the block limit. The dao now has 2 tokens managers and 5 separate apps. I haven't managed to or known the best approach for splitting up the (kit) dao init into multiple tx but I would like to do that. For one I think it's cheaper using the kit, but it's also more convenient.

@sohkai

This comment has been minimized.

Copy link
Member

commented Mar 13, 2019

@cslarson If you're deploying two MiniMe tokens, you will probably want to split it up so that those two tokens are deployed first with one transaction and then the organization is deployed in the second. You can see how we split this up in our beta templates: https://github.com/aragon/dao-kits/blob/master/kits/democracy/contracts/DemocracyKit.sol#L42

@cslarson

This comment has been minimized.

Copy link
Author

commented Mar 14, 2019

Thanks @sohkai. I'm working to replicate that (with the modification to cache multiple tokens by their symbol).

Am I right that there is no way to call newToken using the cli?

@0xGabi

This comment has been minimized.

Copy link
Member

commented Mar 15, 2019

Hi @cslarson. Yes this is possible with the new dao token new command. But, with aragonCLI you need to change the controller of your new token to your's DAO token-manager. We have a guide about custom deploy with aragonCLI that explain this proccess.

@0x6431346e 0x6431346e added this to To do in Aragon Mesh Team Mar 23, 2019

@0xGabi 0xGabi moved this from To do to In progress in Aragon Mesh Team Mar 24, 2019

@0x6431346e 0x6431346e removed this from the aragonCLI v5.6 milestone Apr 24, 2019

@sohkai

This comment has been minimized.

Copy link
Member

commented May 18, 2019

@0xGabi I believe this should be fixed on newer versions of aragonCLI / aragen?

@0xGabi

This comment has been minimized.

Copy link
Member

commented May 18, 2019

Yess I just check and the problem was fixed 🎉🎉

@0xGabi 0xGabi closed this May 18, 2019

Aragon Mesh Team automation moved this from In progress to Done May 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.