Giter Club home page Giter Club logo

aragon-cli's People

Contributors

0x-r4bbit avatar 0xgabi avatar bingen avatar c0rv0s avatar dapplion avatar deamme avatar dependabot-preview[bot] avatar dependabot[bot] avatar drexpp avatar evalir avatar ewingrj avatar fabriziovigevani avatar gasolin avatar greenkeeper[bot] avatar izqui avatar jeremyconnor avatar john-light avatar jtremback avatar jvluso avatar kernelwhisperer avatar luisivan avatar macor161 avatar mikec avatar mnaamani avatar nestorbe avatar onbjerg avatar sohkai avatar theethernaut avatar xuhcc avatar yeqbfgxjiq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aragon-cli's Issues

Remove js-sha3 dependency

Other package already uses sha3 instead of js-sha3, so we should remove the latter as a dependency

'aragon init' app name issues

  • Should allow you to add a simple name and introduce the APM suffix aragon init matos -> aragon init matos.aragonpm.eth react
  • Should really exit the process if there is an error and not keep going

Add config for RPC providers

Right now there's an --rpc flag to set the Web3 provider, but the name is not good and it should be renamed. We should also have a flag and a config option to set the URL of the IPFS node.

Make it easy to switch between environments

We have an issue right now where packages are named e.g. foo.aragonpm.test, but this makes it cumbersome to publish the package to the live APM repositories (e.g. foo.aragonpm.eth).

We should think about how we want to do this. One idea would be to only have foo.aragonpm, as it denotes the package name and the repository, but the TLD would be computed from the chain ID.

For example, for mainnet the computed package name from foo.aragonpm would be foo.aragonpm.eth. Likewise, for something like foo.0xpackages on the mainnet, it would compute to foo.0xpackages.eth.

Rename project to 'aragon-cli'

As @Smokyish pointed out for consistency with other project names would be a good idea to rename.

Also this tool has been expanding a little bit in scope to the point it is not only useful to develop and publish Aragon apps, but to inspect and interact with DAOs from a CLI.

We will proceed with the rename in 36h if no objections are raised here.

Add command to setup dev environment with ENS and APM deployment

Instead of working in a custom deploy flow for our own development environment for Aragon apps, we should generalize this at the aragon-dev-cli level to setup a complete environment.

$ aragon-dev-cli setup [--registry-name Domain name for registry (default: aragonpm.test)]

Steps needed:

  • Deploy an ENS instance a create the needed subnodes until registryName is owned by the sender.
  • Deploy an APM instance with the rootnode for registryName. Call apm.setResolver().

This migration file for APM where all this steps are performed can be used for reference.

We need a way to save both the ENS and the registry name so that following aragon-dev-cli executions automatically use them (maybe add them to a config file that gets read if no flags are provided?).

publish: Add warning if aragon app solidity code initializes any global variable

Because of our use of Proxies, child contracts won't initialize global variables when created. In case an app being published does this, we should at least warn the developer.

contract MyFancyApp is App {
  uint initialState = 1;
}

In the above example, when used behind a proxy, initialState will be 0, even though the expectation reading the code is that it will be 1.

We should encourage the developer to make it something like:

contract MyFancyApp is App {
  uint initialState;

  function initialize() onlyInit { initialState = 1; }
}

Edit: this should apply to logic in constructors too

Add scaffolding

It should be possible to specify a template when running aragon-dev-cli init to scaffold a new module.

Implement run command

To make the developer experience a bit less painful we'll add a playground command that will run a local module in an instance of the Aragon Desktop Dapp.

Improve keyfile format

Ideally you would have one keyfile for all networks, so a format like this could be cool:

{
  [networkId]: string
}

ENS config etc. should be kept in a separate configuration file that you can share among team members (or maybe even commit to GitHub) in a similar format.

Set up CI

Run linting, tests and generate coverage reports.

Publish should ignore more by default

Nested node_modules: [this line] should contain something like **/node_modules instead (should probably be tested, not 100% of the globstar).

It'd also be real nice if it was the same as .gitignore or .npmignore.

Initial refactor

The code is a bit messy, so we'll need to do some initial cleaning.

  • #1: Move handlers into own files
  • #2: Create multiple reporters
  • #3: Abstract APM storage providers

Integration with Truffle

Right now the workflow is one of:

  • truffle build
  • truffle deploy
  • aragon-dev-cli publish
  • Sign and broadcast transaction

It would be cool if we could do something like

  • truffle deploy

which would build the application, deploy the contracts, generate the artifacts and publish the application to IPFS.

Default RPC and private key to development environment values

When running any commands with no rpc node is provided as a flag and there is no HTTP server listening at port 8545, I think it would be a good idea to start a testrpc node in the background with a huge amount of ETH for a dummy private key 0x1111....

Using this with #17 would allow for easy development with almost no setup.

Support test runners

From discussions with @izqui we should maybe add a test command that works with either ava or mocha, or both, instead of relying on people to install Truffle.

Analyse contract storage layout

Because of the way upgradeability works, changing the storage layout would break apps.

It is possible to analyse what the contract storage would look like for a contract, and perhaps make a diff between two versions of the same app - e.g. the storage layout for v1.0.0 of the contract and v2.0.0.

If they differ in a breaking way (i.e. a type is changed in a specific storage slot), then we should emit an error in the CLI. This error should be skippable by explicitly adding a flag to the publish command.

We could extract this to a separate module and make it mandatory to publish your contract source for source code verification. This would also allow us to display errors to the user in case the storage layout would change between versions.

Relevant link on the storage layout of Solidity contracts: https://solidity.readthedocs.io/en/v0.4.21/miscellaneous.html#layout-of-state-variables-in-storage

Sort of related to #26 as they both do contract analysis

Add documentation for configuration

It is possible to specify per-project configuration in package.json, which makes it possible to avoid using flags when running commands, but this is currently undocumented.

Example

// In `package.json`
{
  config: {
    aragon: {
      modulePath: './path/to/frontend',
      contractArtifactsPath: './path/to/truffle/artifacts'
    }
  }
}

Better error handling

Some errors are ugly, some are unhandled. For a good developer experience, we want to catch 'em all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.