videoDAC / livepeer-aragon

Aragon App for interacting with the Livepeer Protocol. Includes Delegator functionality and basic Transcoder functionality.
https://rinkeby.aragon.org/#/livepeerdelegator.aragonid.eth/0x4a7335f3ecb43b685526c1b39043bf696c78c641
8 stars 2 forks source link

Executing approveAndBond via aragonCLI incorrectly interprets _amount variable #17

Closed chrishobcroft closed 5 years ago

chrishobcroft commented 5 years ago

Observed behaviour

When I use the aragonCLI to call approveAndBond on the Livepeer App, the argument passed as the _amount variable gets interpreted in a way which I would not expect.

What appears to be happening is that if e.g. the amount variable passed in is xxxxxxxx then the value proposed in the vote to be approved and bonded is 0.xxxxxxxx.

This means that there appears to be no way to set an _amount of >= 1 using the aragonCLI.

Expected behaviour

I would expect that the _amount variable is expressed in LPTU, such that:

1 is interpreted as 0.000000000000000001 LPT

1000000000000000000 is interpreted at 1 LPT

Steps to reproduce

  1. Using aragonCLI, run the following command using a signing key for an address which has the permissions to approveAndBond on the App (either directly, or through the voting app):
dao exec <DAO-Address> <Livepeer-App-Proxy-Address> approveAndBond 123456789 <Transcoder-Address> --environment aragon:rinkeby
  1. See the voting app of the DAO in the web interface has created a vote to bond 0.123456789 LPT

Screenshots and other relevant information

Running these commands in aragonCLI

Screenshot from 2019-05-20 13-37-47

...resulted in these votes in the Aragon UI:

Screenshot from 2019-05-20 13-37-53

willjgriff commented 5 years ago

Fixed as of commit: 60ea2d2ea789b651fdafa4a38e5133c7ae1f2fec

chrishobcroft commented 5 years ago

Verified in install on rinkeby

https://rinkeby.aragon.org/#/0x7B31232e7b07C2CaF45B970bbDE335Fb1A9e1a96