Code Monkey home page Code Monkey logo

aragonos's People

Contributors

0mkara avatar a33bcn avatar bingen avatar cgewecke avatar cpurta avatar drexpp avatar eduadiez avatar facuspagnuolo avatar foopang avatar gregzaitsev avatar izqui avatar jgcarv avatar luisivan avatar mnaamani avatar onbjerg avatar pcowgill avatar quazia avatar readevalprint avatar smokyish avatar sohkai avatar stefek99 avatar usetech-llc avatar verdverm avatar

Watchers

 avatar  avatar  avatar  avatar

aragonos's Issues

Add dynamic forwarders

"Currently, the forwarder is mainly designed to pass isolated actions where the forwarder has little to no knowledge of the forwarded action. We will research potential ways to expand its usability by creating additional specifications for script execution. This will allow for more tightly coupled forwarder interactions where the forwarded call data can actually be leveraged and modified within the Forwarder contract."

The Dynamic forwarder interaction will require both helpers and a different contract for script execution. Since the current IEVMScriptExecutor.sol is already defined in AragonOS we should respect the current function - execScript(bytes script, bytes input, address[] blacklist) external returns (bytes) so we'll need to defined a DynamicCallScript contract with an unclaimed specID and EXECUTOR_TYPE = keccak256("DYNAMIC_CALLS_SCRIPT"). We will leverage the bytes input to pass in the modified data. We also need to create a DynamicForwarder contract to inherit from in order to create a struct we can have consistent and direct access to in our helper functions. In order to provide a smoother developer experience we need to add two main helpers to DynamicForwarder, one to parse data (parseScript(bytes script) internal pure returns(actionID) and one to convert the internal data back to bytes (encodeInput(uint256 actionID) internal pure) This way contracts can modify the struct provided for them through DynamicForwarder in place, and then just pass a reference to the helpers in order to parse the data from the initial call script into that struct, and compose the input data for execution from that struct.

Add internal helpers needed for encodeInput to DynamicForwarder contract

These helpers should allow the code to follow a similar flow to what we're doing in the _executeVote function in dot voting. We'll likely need helpers similar to addDynamicElements addAddressesAndVotes _goToParamOffset addInfoString and addExternalIds with modifications to each to accommodate the difference in struct.

Create DynamicForwarder contract

Take all the basic helpers that exist in dot voting and move them here, define the function signatures and the data structure. If any helpers make sense in the ScriptHelpers.sol file put them there, but if something has minimal re-use potential keep it in this contract.

Add encodeInput to DynamicForwarder contract

Leverage the internal helpers in order to translate an action id (that maps into a specific ActionInformation struct) into a raw bytes object to pass into the executor as input

Add parseScript to DynamicForwarder contract

Translate the initial new vote flow, and the candidate extraction from dot-voting into a generalized function that will add all "candidate" information and dynamic parameters into the DynamicForwarder ActionInformation struct. This should leverage the DynamicForwarder's internal helper functions.

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.