Financial Proposal: EVMcrispr, mutating DAOs' DNA 🧬

The upcoming version of EVMcrispr is almost ready, and as the previous month, we would like to let the Aragon Community choose the code name for EVMcrispr v0.5.x.

This version comes with significantly refactoring of the code, moving most of the AragonOS-related code to its module. This means that from now on, EVMcrispr can be used for more than just creating AragonOS votes. It is now a tool to create scripts that perform transactions to EVM-compatible blockchains, including AragonOS votes. So now we are closer to a more general tool that can be used to claim your farming rewards or send funds to multiple addresses, and both things can be done from an address or a DAO.

Knowing that we ask for your help to name this milestone. The options are:

  • “wonderful possibilities” - because this release opens the door to future integrations
  • “total rewiring” - due to the major refactoring the code experimented
  • “unplugged expressions” - because we do not need to be plugged to a DAO to use EVMcrispr anymore

0 voters

3 Likes

June 2022 EOM Report

@daniel-ospina @lee0007 @fartunov

Deliverables

We released the EVMcrispr v0.5.0 “unplugged expressions” with the following features:

  1. We restructured the EVMcrispr library in modules to make it easier to extend with other frameworks in the future - Completed
    • We separated the code between the std (standard) module and the aragonos module.
    • The std module contains the generic exec command and the @token, @me, @id, and @date helpers.
    • The aragonos module contains all the Aragon-specific commands (connect, install, upgrade, grant, revoke, exec, and act) and the @aragonEns helper.
  2. We introduced @id and @date helpers. - Completed
    • The @id helper can be used to obtain the hash of a string
    • The @date helper is a more powerful helper than the @now helper (that we will not need to implement):
      • We can use @date(now) to get the current time
      • We can also use a date in ISO 8601 format to specify an exact date, for instance, @date(2022-02-02Z) to obtain the timestamp for 2nd February 2022.
      • We can also add or remove periods to those dates. Examples: @date(now,+3d) for three days from now, and @date(2015-07-30Z,-2y-4m) for 2 years and 4 months ago from the Ethereum genesis block date.
  3. We introduced major support to named parameters in commands. - Completed
    • New --oracle option in grant command, replacing the @params and @params.oracle helpers we had planned. It allows an EVMcrispr user to set up permissions only available when the oracle returns true. An excellent example of that is the 1hive token oracle Aragon app, which is an ACL oracle that returns true when the address that acts has a specific token.
      # grant any entity permission to create votes if they have a specific token
      grant ANY_ENTITY voting CREATE_VOTES_ROLE voting --oracle token-oracle.open
      
    • New --version option in command install, so we can choose to install a different version, not just the last one. Example:
      # install voting v1.0.0
      install voting:new @token(HNY) $support $quorum $duration --version 1.0.0
      
    • New positional options in command upgrade make it optional and allow to specify a specific version. Example:
      # upgrade voting to the latest version
      upgrade voting
      # downgrade voting to 1.0.0
      upgrade voting 1.0.0
      # upgrade voting to a different contract (be very careful with this one)
      upgrade voting 0x...
      
  4. (From 0.7.x deliverable) Allow multi-transaction sending scripts, so we can create many votes in many different DAOs in just one script. - Completed
    • This is the first version in which we can use EVMcrispr to execute any transaction in the blockchain, without having to be attached to a DAO. Do you want to claim and re-stake your Unipool rewards? Easy:
      # No DAO needed; these actions are performed directly from your address
      exec $contract getReward()
      exec $contract stake(uint256) @token.balance(@me)
      
    • You can also create many votes in the same script!
      connect dao1 token-manager voting (
         # <actions to normal Aragon DAO>
      )
      connect dao2 disputable-voting.open --context "Optional link" (
         # <actions to Gardens>
      )
      
    • On top of that, you can even interact with the DAO apps from your address without forwarding.
      connect dao1 (
         # Cast a vote on vote #1 directly from your address, voting yes
         exec voting vote 1 true true
      )
      

Additional deliverables

  • We researched how to properly create a Little Language (more known as Domain-Specific Language), and started implementing an interpreter to create an Abstract Syntax Tree. It will make it easier to interpret, highlight, and autocomplete the user scripts. - Ongoing
  • New option to command new to create DAOs: new dao <aragonId>. - Ongoing
    • It creates an empty DAO. Once available in the graph, you can install as many apps as you want and grant them permissions within a connect command.
    • Connecting to the DAO just after creating it does not work yet; it needs to be done in a different script.
  • New @aragonEns helper to find the addresses pointed by subdomains of aragonpm.eth and aragonid.eth. Real example used last week: - Completed
    set $repo @aragonEns(hooked-token-manager-no-controller.open.aragonpm.eth)
    exec $repo newVersion(uint16[3],address,bytes) [2,0,0] 0x7cdB48CBF25F4f044eEaE83187E3825Ae301C93d ipfs:Qma2cVx7i9eTu9VSBexWVbfqeS1qwKc8zFFnwV4zrjTMUJ
    
  • We migrated the UI to use Chakra React components, which will make it easier to expand the frontend next to the subsequent iterations. - Completed

Funding Request

  • USDC (90%): $15,000
  • ANT (10%): $1,667

We request a relation of 90% USDC / 10% ANT instead of 70% USDC / 30% ANT because of the Financial Guild Proposal to reduce the spending in ANT.

Next steps

We will keep reading the Crafting Interpreters book from Robert Nystrom, and rebuilding EVMcrispr to be more efficient and powerful based on it.

We also are going to start working on the next version (v0.6.0), which will include the following:

  • Retrieve external contracts ABI from external sources (i. e. etherscan).
  • Introduce @ipfs, @calc, and @get helpers.
  • And everything else we can do during the next month!

Thanks to everyone who attended the AMA on 10th June; it was very cool to see that this project is taking traction!

4 Likes

Great work Sem! Everything coming along really nicely :rocket:

Happy to sign off on this again on behalf of NFTX :white_check_mark:

Thanks for the thorough overview. Some awesome features being added.

1 Like

1/3 approved cc @Ricktik6

2 Likes

Thank you @sembrestels!
Appreciate your validation @gausman
Approved 2/3 cc @Ricktik6

2 Likes

3/3 approved, thank you!

Another version is going to be released (v0.6.0) focusing on making it easier to interact with contract ABIs, IPFS, numeric parameters, and blockchain data in general.

How should we call it? I’m curious on what values do you feel more identified with.

  • “genuine courage” - we are what we do repeatedly, and we are courageous when our acts have part of our heart in them.
  • “fearless authenticity” - we can avoid lots of problems by not staying true to our principles, but staying with the majority won’t allow us to be ourselves.
  • “truthful deepness” - the truth is deep like a fractal; only truth can be zoomed in indefinitely and still be interesting.

0 voters

3 Likes

July 2022 EOM Report

@daniel-ospina @lee0007 @fartunov

Deliverables

We released the EVMcrispr v0.6.0 “fearless authenticity” with the following features:

  1. It reads the ABI from Etherscan API, so we do not need to know the entire function signature to use the exec command - Completed
    • If we want to use this feature, we need to set the $etherscanAPI variable with a valid API key.
    • Now, instead of writing the entire signature, we can write the function name. Example exec @token(WETH) withdraw 40 instead of exec @token(WETH) withdraw(uint256) 40.
    • It supports EIP1822, EIP1967, and other kinds of proxies.
  2. We introduced @ipfs, @calc, and @get helpers. - Completed
    • The @ipfs helper can be used to obtain the CID hash of a string that has been pinned in Pinata. To use this feature, we need to set $ipfs.jwt with the Pinata JWT key. Example: set $foo @ipfs(Hello world).
    • The @calc helper allows calculating big number expressions using +, -, *, and /. It takes care of the order of the operations and accepts environment variables. Example: @calc(2+8e18*13/$bar).
    • We can use @get to get any value exposed in a contract. Example: set $abi name():(string); set $var @get($weth,$abi). It calls the name function of the WETH contract and returns the “Wrapped Ether” string.

Additional deliverables

  • We have been working on an enhanced version of the interpreter, much more potent than the current one. It is still immature and needs much testing before its release, but it is already available at https://next.evmcrispr.blossom.software and this git branch. - Ongoing
    • It allows much more complex scripts, allowing DAO2DAO connections, or interacting with other protocols in the future.
    • It also encapsulates the commands and helpers in modules that can be loaded within the script, keeping the evmcrispr core functionalities much simpler.
  • We added a new raw command that allows sending a transaction to an address with a custom data field. - Completed

Funding Request

  • USDC (90%): $15,000
  • ANT (10%): $1,667

We request a relation of 90% USDC / 10% ANT instead of 70% USDC / 30% ANT because of the Financial Guild Proposal to reduce the spending in ANT.

Next steps

For the next version (v0.7.0), we will stabilize the new interpreter which will allow to create more complex and powerful scripts, while trying to make it as backward-compatible as possible with the current ones.

The new interpreter will be able to load modules, packages containing commands, and helpers that will make our life easier.

We will also introduce the switch command, allowing us to change our connected account or the chain in the middle of a script to operate with different chains and accounts.

4 Likes

1/3 Approved cc @Ricktik6 pending NFTX review

2 Likes

2/3 :slight_smile:
Also pending NFTX

cc @Ricktik6

1 Like

Love these deliverables. ABI/Etherscan API stuff is super cool, as well as all the other features and interpreter improvements.

Great stuff, Sem. All looks really solid to me.

NFTX review :white_check_mark:

3 Likes

3/3 cc @Ricktik6

1 Like

This is what shipping code looks like… outstanding work. Also your work has been helping some exciting new developers take Aragon to the credit world Introduction to Chelo - Chelo User Guide has been able to leverage your tooling. thanks again

4 Likes

This month we are merging our work based on the programming language theory for EVMcrispr into the main branch. This version presents cas11, a formalized and fully-fledged version of the current command language that, along with its interpreter, comes with new features such as new recursive structures, closures, better error handling, modules, etc. How should we code-name it?

  • “linguistic broadness” - in this release, we extend the language to a higher level of composability, using commands from one module within the commands of another.
  • “branchy syntax” - to interpret the language correctly, we combine the symbols and put them in syntactic trees so we can process them in the correct order.
  • “eternal linguist” - we formalized a language to interact with a variety of decentralized computer networks that are meant to last due to their resilience.

0 voters

3 Likes

branchy syntax…amazing…

eternal linguist is super alliterative, but branchy syntax to the max

1 Like

Branchy Syntax = legit!

1 Like

Hi everyone!

elessar here!

Sorry for the late release this month. It has been a hectic month and a lot of work has been done, but hopefully, the new features compensate for the delayed report.

August 2022 EOM Report - v.0.7.0 “Branchy Syntax”

@daniel-ospina @lee0007 @fartunov

This version comprises a complete refactoring and restructuring of the library.

Embrace modularity . The evmcl command language (which is now called cas11 :nerd_face:) has been converted into a formal fully-fledged DSL (Domain-specific Language) comprise of composable and independent parser combinators that receive the raw cas11 script and produce the nodes (building blocks) of something called AST (Abstract Syntax Tree) which will be later on processed by an interpreter (the evmcrispr).

ASTs are pretty useful structures that facilitate the manipulation and processing of source code in a more consistent, non-ambiguous, and convenient manner.

The different commands and helpers have been moved to separated encapsulated modules following the separation of concerns principle. In this way, new web3 protocols can be supported and integrated more easily.

Deliverables

  • New switch <network name or id> command that allows you to dynamically switch the chain.

  • New load <module> [as <alias>] command that allows you to import the modules containing a set of commands and helpers. At the moment, there are two modules:

    • std: the core module which is not required to import. It contains the following:
      • Commands: load, exec and set and switch.
      • Helpers: @date, @get, @id, @ipfs, @me, @token and @token.balance.
    • aragonos: Aragon module that contains the following:
      • Commands: act, connect, forward, grant, install, new-dao, new-token, revoke and upgrade
      • Helpers: @aragonEns.

    When loading a module, you have access to all its commands and helpers by prefixing the module name. For example, to use the aragonos module you’d do the following:

      load aragonos as ar
      
      ar:connect 1hive token-manager voting (
      	install agent:new
      	grant voting token-manager ISSUE_ROLE voting
      )
    

    Note an alias (in this case ar ) has been set for the module.

  • New call operator <contractAddress>::<method>(<args>) to call read-only contract functions. Example:

     load aragonos as ar
    
     ar:connect myDAO (
     	set $var1 token-manager
     	exec token-manager::token() transfer(address,uint256) vault 2500e18
     	exec $var1::token() transfer(address,uint256) vault 2500e18
     	set $var2 @token(DAI)::decimals()
     )
    
    

    It also supports chainable calls. Here’s an example:

      load aragonos as ar
    
      ar:connect myDAO (
      	set $var1 token-manager::token()::decimals()
      )
    
    

    At the moment it only supports calls to functions that return primitive data types.

  • @calc() helper has been deprecated in favor of native arithmetic expression operations that support priority parenthesis. Example: set $var1 (@token.balance(DAI, @me) * (5 - myContract::aMethodReturningNumber())).

  • Complete support of nested expression structures (e.g. arrays, block command expressions, call expressions, helper expressions, etc).

  • Support of nested connect commands that allow you to define DAO-to-DAO operations scripts and have access to different organizations’ apps inside a scope.
    You can reference a different DAO’s app by their name, address or nesting index. The format would be as follow: _<dao>:<app-identifier>.
    Example:

    load aragonos as ar
    ar:connect mainDAO (
        ar:connect subDAO tollgate token-manager voting (
       		 # It grants mainDAO's voting app permissions to create votes in
       		 # subDAO's voting app.
       	 grant _mainDAO:voting voting CREATE_VOTES_ROLE 
       		 # Here the nesting index "_1" is the same as "_myDAO".
       	 grant _1:voting token-manager MINT_ROLE
        )
    )
    
    
  • The forward <...path> ( <...commands> ) command is back. It allows you to customize the forward path by not having to define it in the connect command. This can be helpful when creating scripts that will be sent through a forwarding path composed of apps from different DAOs. Example:

    load aragonos as ar
    ar:connect mainDAO (
       ar:connect committeeDAO (
       	forward _mainDAO:token-manager token-manager (
       		...
       	)
       )
    )
    
  • Option arguments can now be used in-between commands. Example my-command --anOpt 1e18 anotherArg --anotherOpt 1e18 anotherArg.

  • Improved error handling logic that displays the location (line and column number) and type of the failed expression along with the error message.

  • Parser combinators implement error recovering logic which allows them to scan the whole script looking for the maximum number of syntax errors.

Funding Request

  • USDC (90%): $15,000
  • ANT (10%): $1,667

We request a relation of 90% USDC / 10% ANT instead of 70% USDC / 30% ANT because of the Financial Guild Proposal to reduce the spending in ANT.

Next steps

We will keep working on integrating the new library into the EVMcrispr terminal and improving the code highlighting and auto-completion of the editor (which will be easier to do now thanks to ASTs).

We’ll also keep polishing the library and fixing any possible edge case.

4 Likes

This brilliant project continues to have my 100% support for funding but ANT Holders are yet to commit to honouring legitimate funding allocations since S2 ESD funding was not approved. If you hold ANT I would highly recommend voting here Aragon Voice cc @sembrestels

1 Like

Thank you for yet another month of valuable contribution! Waiting for @gausman’s sign off before approving monthly payment

1 Like

Very interesting, can you explain how this supports integration more easily?

This looks like great work! Thank you for such a technical update!