Giter Club home page Giter Club logo

fractal-contracts's Introduction

Fractal Contracts

Azorius Protocol

A Safe module which allows for composable governance.

Azorius conforms to the Zodiac pattern for Safe modules.

The Azorius contract acts as a central manager of DAO Proposals, maintaining the specifications of the transactions that comprise a Proposal.

All voting details are delegated to BaseStrategy implementations, of which an Azorius DAO can have any number.

Azorius was forked from and heavily based on the Usul module, by SekerDAO.

Contract Documentation

NatSpec documentation for Azorius Protocol contracts are available here.

Local Setup & Testing

Clone the repository:

git clone https://github.com/decent-dao/fractal-contracts.git

Look up the recommended Node version to use in the .nvmrc file and install and use the correct version:

nvm install 
nvm use

Install necessary dependencies:

npm install

Copy the example .env and replace the values for the desired networks

cp .env.example .env

Compile contracts to create typechain files:

npm run compile

Run the tests

npm run test

Update natspec doc files after modifying contracts

npx hardhat docgen

Deploy Contracts to <network>

npx hardhat deploy --network <network>

Deployed contracts can be verified on Etherscan via the following command:

npx hardhat verify --network {network name} {contract address}

Currently, this is done manually for each contract deployed, found in deployments/<network>/XXX.json

Local Hardhat deployment

To deploy the Fractal contracts to a local node:

npx hardhat node

NPM Package

The core contracts in this repository are published in an NPM package for easy use within other repositories.

To install the npm package in your project, run:

npm i @fractal-framework/fractal-contracts

To include uncompiled contracts within typechain-types follow these steps.

Publishing new versions to NPM

First, increment the version in package.json, then:

npm install

to get those version updates into package-lock.json

npm run publish:prepare 

to fully clean the project, compile contracts, create typechain directory, and compile the typechain directory

npm publish 

to publish the compiled typechain files and solidity contracts to NPM

git commit
git push

Versioning

Fractal follows a modified style of semantic versioning (https://semver.org/) specific to a smart contract use case.

There are three types of releases:

  • MAJOR: Rare, and correlates to a major overhaul to the core DAO governance contracts. These are changes incompatible with prior contract versions and would require an existing DAO's successful proposal to migrate to. A major version will have undergone a professional smart contract audit.
  • MINOR: Adds backwards-compatible functionality and additional utility or optimizations to the core governance smart contracts. New functionality will not impact the existing core governance contracts, will be optional for a DAO to utilize, and will have undergone either a contract audit or community bug bounty.
  • PATCH: Also rare, but adds bug and/or security fixes. No new functionality will be introduced and the code may or may not have a contract audit or bug bounty, depending on the context and severity of the issue. Also depending on the context of the issue, DAOs may be required to pass a proposal to migrate to this new version.

fractal-contracts's People

Contributors

tbwebb22 avatar herbig avatar christopherdancy avatar mudrila avatar sethhrbek avatar da-colon avatar adamgall 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.