Updatable, unobtrusive Solidity authorization pattern
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib dapp upgrade ds-test May 9, 2018
src solc v0.4.23 Apr 29, 2018
.gitignore clean up and fix Mar 11, 2017
.gitmodules dapp-install ds-test Mar 11, 2017
Dappfile clean up, add `auth_as' Mar 11, 2017
LICENSE gpl3 Nov 3, 2017
Makefile clean up and fix Mar 11, 2017
README.md updating README for dapp.tools Nov 14, 2017
default.nix Add default.nix May 8, 2018



Fully updatable unobtrusive auth

Provides a flexible and updatable auth pattern which is completely separate from application logic. By default, the auth modifier will restrict function-call access to the including contract owner and the including contract itself.

In addition, fine-grained function access can be controlled by specifying an authority - a contract which implements the DSAuthority interface to define custom access permissions.

Dappsys provides a couple of ready-made authority contracts, ds-guard and ds-roles, which can be used as authorities where updatable fine-grained permissioned auth is required.


The auth modifier provided by DSAuth triggers the internal isAuthorized function to require that the msg.sender is authorized ie. the sender is either:

  1. the contract owner;
  2. the contract itself;
  3. or has been granted permission via a specified authority.
function myProtectedFunction() auth {}


setOwner(address owner_)

Set a new owner (requires auth)

setAuthority(DSAuthority authority_)

Set a new authority (requires auth)