1Hive / time-lock-app

The Time Lock app enables Aragon organizations to require users transfer or temporarily lock tokens before forwarding an intent.
GNU General Public License v3.0
16 stars 11 forks source link

Smoothest way to install app along with a Token Oracle #46

Closed fabriziovigevani closed 4 years ago

fabriziovigevani commented 5 years ago

Been thinking about what would be the easiest way to test the Lock app with the Oracle as they are two different apps which requires to have them deployed to local apm and installed on the newly deployed DAO and came up with the following:

Steps to have a Dao with lock and token oracle for testing

from token-oracle folder

  • Publish token oracle to local apm from lock app folder
  • Use lock-app template to install everything (which also creates and sets the oracle permission) We would need to have the @1hive/token-oracle repo published to npm and add it as a dev-dependecy for lock-app

Alternative

from token-oracle folder

  • Publish token oracle to local apm from lock app folder
  • Create DAO with lock-app installed
  • Install manually token oracle in DAO through cli (this requires to have a ERC20 token already deployed in devchain)
  • Set through truffle script the LOCK_TOKENS_ROLE permission with params to use the token oracle (requires DAO address as argument to script, token oracle address can be obtained from the DAO itself).

For DAOS in rinkeby/mainnet.

For setting the permission with params to an app installed on a deployed rinkeby DAO we'll require a truffle script (assuming oracle and lock-app already installed).

For testing i think the first one will be better for users as they have less steps to take but open to suggestions.

0xGabi commented 4 years ago

I been thinking about this as well and I believe it will be a more and more general use case so probably we should solve it with a general solution.

My idea is having a new template boilerplate to improve the hurdles of working with several apps. Anyways the main obstacle I see is how to have custom apps content available locally on snapshot 🤔

An idea is to have a configuration file for the templates where we can provide an array of directories where the app's are located with the following format:

{
  "apps": [
    "test-app": "path",
    ...
    ]
}

With this information we could automatically publish the apps with a script.

Eventually we could have even further configurations.

fabriziovigevani commented 4 years ago

That's a good idea!

So the publishing would be done through the cli sequentially ? Does this require changes from the cli to support this ?

rperez89 commented 4 years ago

@willjgriff when you have a chance take a look to PR #62 so we can close this issue