Giter VIP home page Giter VIP logo

pallet_supersig's Introduction

Key Contributor: Rusty Crewmates; Funded by Web3 foundation and Edgeware.

Supersig Pallet

This pallet provides functionality for creating and managing supersigs, which is designed to be more flexible than multisig, but with some trade-offs.

A supersig allow a group of members to collectively make decisions on behalf of an on-chain entity. Each member is assigned a role, either "Master" or "Standard", which determines their voting power in the decision-making process.

The supersig pallet extends the capabilities of a multisig so it can be fit for governance of larger funds. It is a superset of the multisig pallet, adding multiple functionalities and options to the original multi-signature dispatch allowing multiple signed origins (accounts) to coordinate and dispatch a call from the supersig account

Overview

The Supersig pallet provide function for:

  • Creating a supersig organisation
  • Adding and removing members
  • Leaving the supersig
  • Submit a proposal to execute a transaction
  • Vote for the transaction
  • Remove a pending transaction
  • Delete a supersig

Dispatchable Functions

  • create_supersig - Create a supersig, with specified members. The creator will have to deposit an existencial balance and a deposit that depend on the number of members, in the supersig account. This last amount will be reserved on the supersig /!!\ Reminder /!!\ the creator of the supersig will NOT be added by default, he will have to pass his address into the list of added users.

  • propose_call - Submit a proposal for the supersig to execute a transaction, which is an amount corresponding to the length of the encoded call will be reserved. The call wraps around the extrinsic which the user is proposing to execute. (Anything that requires a vote needs to be wrapped in a proposeCall function).

  • approve_call - Vote for the call to be execute. The threshold is enumerated to vote >= SimpleMajority, the call is executed. A user can only approve a call once.

  • remove_call - Remove a call from the poll. The reserved amount of the proposer will be unreserved.

  • add_members - Add new members to the supersig organisation. In case some user are already in the supersig, they will be ignored.

  • remove_members - Remove members from the supersig.

  • delete_supersig - Remove the supersig and all the associated data. Funds will be unreserved and transfered to specified beneficiary.

  • leave_supersig - Elect to leave the supersig. You cannot leave if you are the last member, instead you would need to delete_supersig.

Test

To run the tests in this pallet run: cargo test

Licence

SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

pallet_supersig's People

Contributors

gdnathan avatar decentration avatar tdelabro avatar ramseykes avatar roduquen 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.