Coder Social home page Coder Social logo

filiciagrind / zodiac-modifier-roles Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gnosisguild/zodiac-modifier-roles

0.0 0.0 0.0 17.83 MB

Smart account toolkit for role-based access control

Home Page: https://roles.gnosisguild.org

License: GNU Lesser General Public License v3.0

JavaScript 0.30% TypeScript 86.92% CSS 1.39% Solidity 10.52% MDX 0.88%

zodiac-modifier-roles's Introduction

📯 Legacy Zodiac Roles v1 sources at: gnosis/zodiac-modifier-roles-v1


Zodiac Roles Modifier

Build Status Coverage Status Contributor Covenant

The Roles Modifier belongs to the Zodiac collection of tools, which can be accessed through the Zodiac App available on Safe.

If you have any questions about Zodiac, join the Gnosis Guild Discord. Follow @GnosisGuild on Twitter for updates.

About the Roles Modifier

This modifier allows avatars to enforce granular, role-based, permissions for attached modules.

Modules that have been granted a role are able to unilaterally make calls to any approved addresses, approved functions, and using approved parameters.

The interface mirrors the relevant parts of the Safe's interface, so this contract can be placed between Safe modules and the Safe itself to enforce role-based permissions.

The contracts have been developed with Solidity 0.8.21 targeting evm version shanghai.

Features

  • Create multiple roles
  • Assign roles to addresses
  • Allow roles access to call, delegate call, and/or send to address
  • Scope which functions a role can call on given address
  • Define conditions on function parameters

Flow

  • Define a role by setting targets, functions, and parameters that it can call
  • Assign the role to an address with assignRoles()
  • Address can now trigger the safe to call those targets, functions, and parameters via execTransactionWithRole()

Deployments

Roles

Address: 0x9646fDAD06d3e24444381f44362a3B0eB343D337

MultiSendUnwrapper (transaction unwrapper)

Address: 0x93B7fCbc63ED8a3a24B59e1C3e6649D50B7427c0

AvatarIsOwnerOfERC721 (custom condition)

Address: 0x91B1bd7BCC5E623d5CE76b0152253499a9C819d1

Subgraphs

Development environment setup

  1. For each package were a .env.sample file is present, copy the content of the file into a .env file at the same location and populate it with your keys, etc.
  2. From the repo root run yarn
  3. From the repo root run yarn prepare

After that, you can start working on the different packages.

Packages

This monorepo uses yarn workspaces and is comprised of:

  • evm: Roles mod smart contracts
  • subgraph: a subgraph indexing deployed Roles mod instances
  • sdk: a TypeScript SDK for managing roles
  • app: a webapp for editing roles

Audits

Audits have been performed by the G0 group and Omniscia.

All identified issues have been resolved as of commit a19c0ebda97f7d645335f2c386818546641f832b

All audit reports are available at packages/evm/docs.

Security and Liability

All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

License

Created under the LGPL-3.0+ license.

zodiac-modifier-roles's People

Contributors

asgeir-s avatar auryn-macmillan avatar carlosfebres avatar cedricwaxwing avatar cristovaoth avatar eccogrinder avatar jfschwarz avatar juliopavila avatar nginnever avatar nledo avatar samepant avatar sgzerbo avatar

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.