Giter Site home page Giter Site logo

chuckn408 / contracts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 3dns-xyz/contracts

0.0 0.0 0.0 5.73 MB

License: Other

Shell 0.21% JavaScript 32.93% Ruby 5.67% Python 0.04% Julia 0.53% TypeScript 1.37% Nix 0.01% Makefile 0.06% Solidity 59.19%

contracts's Introduction

3DNS Smart Contracts

Root repo for all 3DNS related smart contracts & on-chain logic

Github Actions

Table of Contents

Getting Started

Code can be built and tested locally without an .env file, but to deploy or interact with any specific contracts, a permissioned user must set up the .env file and link their service to the internal management tool.

This project uses Foundry.

Install foundry

See the book for instructions on how to install and use Foundry.

Compile the code

forge build

Run the tests

forge test

Deployments

The deployment scripts use CREATE2 to deploy a counterfactual, 3dns access controlled factory

Initial Assumption

// Authority contract address based on manager_
contractAuthority = new ThreeDNSAuthority{
    salt: keccak256(Naming.THREE_DNS_AUTHORITY_NAME)
}(manager_);

// Factory based on authority with controller of manager_
factory = new ThreeDNSFactory{
    salt: keccak256(Naming.DEPLOYER_NAME)
}(contractAuthority);

3dns Contracts

Contracts

Contract Name Contract Address Mainnet Optimism OP Testnet
ThreeDNSAuthority 0xe4CA879805120f1BD635d4ce5b646e308aA55fFc ๐ŸŸข ๐ŸŸข ๐ŸŸข
ThreeDNSFactory 0x0AFE114C91348543844Ab790CCfA28909282f64B ๐ŸŸข ๐ŸŸข ๐ŸŸข
ThreeDNSAdministeredProxyAdmin 0x1a4047ad1356305dBc4810A6af1Cbe81A8603dC9 - ๐ŸŸข ๐ŸŸข
ThreeDNSContractRegistry 0xd3077FF69621Bb880b3c2655B8b301eD767bc2bb - ๐ŸŸข ๐ŸŸข
ThreeDNSRegControl 0xBB7B805B257d7C76CA9435B3ffe780355E4C4B17 - ๐ŸŸข ๐ŸŸข
ThreeDNSResolver 0xF97aAc6C8dbaEBCB54ff166d79706E3AF7a813c8 - ๐ŸŸข ๐ŸŸข

Legend

Symbol Description
๐ŸŸข Deployed
๐ŸŸก Coming Soon

3dns Permissioned Wallets

1. Roles and Networks

Role Permissions

Controller Manager Admin Deployment Manager Issuer Manager Signer Manager Deployer Proxy Admin Registrar Admin Signer Issuer
Controller ๐Ÿ”ต ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด
Manager Admin - - ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด ๐Ÿ”ด ๐ŸŸก ๐Ÿ”ด ๐ŸŸก ๐ŸŸก
Deployment Manager - - - - - ๐Ÿ”ด ๐Ÿ”ด - - -
Issuer Manager - - - - - - - - - ๐Ÿ”ด
Signer Manager - - - - - - - - ๐Ÿ”ด -

Legend

Symbol Description
๐Ÿ”ต only one can exist
๐Ÿ”ด full control (can set or remove)
๐ŸŸก indirect control (can set or remove that can control)

Development

The repo is divided into three main components: test, scripts, & src. All internal logic and contracts are stored and written in src, all tests are written in test, and all deployment logic and managerial scripts are written in scripts.

Src - Project Structure & Key Components

Test - Testing Structure & Philosiphy

Scripts - Key Management Actions & Deployment Scripts

contracts's People

Contributors

0xpaulio 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.