GithubHelp home page GithubHelp logo

sys-labs / safe-deployments Goto Github PK

View Code? Open in Web Editor NEW

This project forked from safe-global/safe-deployments

0.0 0.0 0.0 579 KB

A collection of Safe singleton deployments

License: MIT License

JavaScript 0.75% TypeScript 99.25%

safe-deployments's Introduction

Safe Deployments

npm version

This contract contains a collection of deployments of the contract of the Safe contracts repository.

For each deployment the address on the different networks and the abi files are available. To get an overview of the available versions check the available json assets.

To add additional deployments please follow the deployment steps in the Safe contract repository.

Install

  • npm - npm i @safe-global/safe-deployments
  • yarn - yarn add @safe-global/safe-deployments

Usage

It is possible to directly use the json files in the assets folder that contain the addresses and abi definitions.

An alternative is to use the JavaScript library methods to query the correct deployment. The library supports different methods to get the deployment of a specific contract.

Each of the method takes an optional DeploymentFilter as a parameter.

interface DeploymentFilter {
    version?: string,
    released?: boolean, // Defaults to true if no filter is specified
    network?: string // Chain id of the network
}

The method will return a SingletonDeployment object or undefined if no deployment was found for the specified filter.

interface SingletonDeployment {
    defaultAddress: string, // Address the contract was deployed to by the Safe team
    version: string,
    abi: any[],
    networkAddresses: Record<string, string>, // Address of the contract by network
    contractName: string,
    released: boolean // A released version was audited and has a running bug bounty
}
  • Safe
const safeSingleton = getSafeSingletonDeployment()

// Returns latest contract version, even if not finally released yet
const safeSingletonNightly = getSafeSingletonDeployment({ released: undefined })

// Returns released contract version for specific network
const safeSingletonGörli = getSafeSingletonDeployment({ network: "5" })

// Returns released contract version for specific version
const safeSingleton100 = getSafeSingletonDeployment({ version: "1.0.0" })

// Version with additional events used on L2 networks
const safeL2Singleton = getSafeL2SingletonDeployment()
  • Factories
const proxyFactory = getProxyFactoryDeployment()
  • Libraries
const multiSendLib = getMultiSendDeployment()

const multiSendCallOnlyLib = getMultiSendCallOnlyDeployment()

const createCallLib = getCreateCallDeployment()
  • Handler
// Returns recommended handler
const fallbackHandler = getFallbackHandlerDeployment()

const callbackHandler = getDefaultCallbackHandlerDeployment()

const compatHandler = getCompatibilityFallbackHandlerDeployment()

Release cycle

safe-deployments release cycle is once per month, except urgent issues that require immediate attention.

Notes

A list of network information can be found at chainid.network

License

This library is released under MIT.

safe-deployments's People

Contributors

rmeissner avatar mmv08 avatar moisses89 avatar jpalvarezl avatar germartinez avatar nick8319 avatar svanegmond avatar 0x31 avatar piquinikis avatar pkakelas avatar uxio0 avatar t0mcr8se avatar iamacook avatar inomurko avatar vigan-abd avatar develcuy avatar datradito avatar mhxw avatar ernestognw avatar gzliudan avatar hirama avatar philipappiah avatar e00dan avatar fmrsabino avatar itsfridaythen avatar janmajayamall avatar titandac avatar gzeoneth avatar mainnet-pat avatar bijianing97 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.