Giter Club home page Giter Club logo

ds-group's Introduction

DSGroup

Multisig with a command-line interface

The ds-group library is DSGroup with a command-line interface. A list of members, the required quorum and the window of time in which actions must be approved are fixed when the DSGroup contract is created. Actions can then be proposed, confirmed and triggered once a group quorum has been reached.

Installation & deployment

The DSGroup contract takes three parameters:

function DSGroup(address[] members, uint quorum, uint window)

address[] members

The list of group members. They will be able to create new proposals, accept them and trigger their execution.

uint quorum

The minimum number of members who have to accept a proposal before it can be triggered.

uint window

The proposal validity time in seconds.

Install Dapp to build and deploy the contract:

dapp build
dapp create DSGroup '[
  0011111111111111111111111111111111111111,
  0022222222222222222222222222222222222222,
  0033333333333333333333333333333333333333
]' 2 86400

Install the Seth dependency in order to use the command line interface. Then type make link from the ds-group directory to install the ds-group CLI tool:

Usage: ds-group <command> <group> [<args>]
   or: ds-group <command> --help

Commands:

action        print information about a multisig action
confirm       confirm a proposed multisig action
ls            list already-proposed multisig actions
propose       propose a new multisig action
trigger       trigger a confirmed multisig action
verify        verify the meaning of a multisig action

Examples

~$ ds-group ls @mkrgroup
    ACT  CONFIRMATIONS      EXPIRATION  STATUS
     15   0/6 (need 4)        8 h left  Unconfirmed
     16   0/6 (need 4)        9 h left  Unconfirmed

~$ ds-group propose @mkrgroup @feedbase 0 "claim()"
Proposing action...
  target     0x5927c5cc723c4486f93bf90bad3be8831139499e
  value      0
  calldata   0x4e71d92d
seth-send: 0x307b667c434794c234b7c463b26827bdceb9c838fdb306f3f4398edefa5b1310
seth-send: Waiting for transaction receipt.........................
seth-send: Transaction included in block 1519991.
seth-send: note: return value may be inaccurate (see `seth send --help')
Successfully proposed act 17.

~$ ds-group ls @mkrgroup
    ACT  CONFIRMATIONS      EXPIRATION  STATUS
     15   0/6 (need 4)        8 h left  Unconfirmed
     16   0/6 (need 4)        9 h left  Unconfirmed
     17   0/6 (need 4)       23 h left  Unconfirmed

~$ ds-group confirm @mkrgroup 17
Confirming action 17...
seth-send: 0x72fc6bf7c5135645a0fa298aa3ae01e072a82eabfddc8e3fbcdca72d0007d94b
seth-send: Waiting for transaction receipt...............
seth-send: Transaction included in block 1520018.

~$ ds-group ls @mkrgroup
 ACTION  CONFIRMATIONS      EXPIRATION  STATUS
     15   0/6 (need 4)        8 h left  Unconfirmed
     16   0/6 (need 4)        9 h left  Unconfirmed
     17   1/6 (need 4)       23 h left  Unconfirmed

~$ ds-group trigger @mkrgroup 17
ds-group-trigger: error: act not confirmed: 17

~$ ds-group action @mkrgroup 17
calldata        0x4e71d92d
confirmations   1
confirmed       false
deadline        1471876934
expired         false
status          Unconfirmed
target          0x5927c5cc723c4486f93bf90bad3be8831139499e
triggered       false
value           0

ds-group's People

Contributors

apmilen avatar dbrock avatar desaperados avatar mbrock avatar nmushegian avatar rainbreak avatar

Stargazers

 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

ds-group's Issues

Feature request ds-group CLI

Add the following flags:

  • --confrimedBy args = actionID and address, returns bool
  • --isMember args = address, returns bool

fun aliases

Let's leave the regular names bc backwards compatability and this is good normie bait

But let's still have good words

load -> cock ->fire

consistent with fire from ds-clock

Verify Action

Verify should take an action arg as well and then compare the calldata with that of the action number.

ds-group action

Consider also returning a human readable time stamp. Perhaps in UTC.

Example:

calldata        0x4e71d92d
confirmations   1
confirmed       false
deadline        1471876934
dadlineUTC      2016, August 22, Monday 14:42:14 UTC
expired         false
status          Unconfirmed
target          0x5927c5cc723c4486f93bf90bad3be8831139499e
triggered       false
value           0

drop `auth` dependency

Using the auth mechanism for initial initializing is a bad pattern. Making this dependent on ds-auth is overkill. Could just be a special "initializor" address

Update Readme

  • ~$ ds-group ls @mkrgroup example listed three times
  • Add documentation of constructor
    • example constructor dapp create DSGroup '[4f26ffbe5f04ed43630fdc30a87638d53d0b0876,855Be87Fe5DDeA2761dbD97f1a4e857Aa00a15FD,c9107bd75a6971d9beaba390a28ab9bb30adc9bc,6ea073f4de9cd42955539033091ae587c06a882c,dB33dFD3D61308C33C63209845DaD3e6bfb2c674,61Bf84D5aB026F58c873F86Ff0DFcA82b55733Ae]' 2 86400
    • Define constructor arguments

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.